From 5d82b0f4c4442f7389f3914c3ae740d972cf642f Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 10 Feb 2020 10:57:35 +0100 Subject: [PATCH] Qt: set min version to 5.14 --- BUILDING.md | 8 ++++---- rpcs3/main.cpp | 9 --------- rpcs3/rpcs3qt/emu_settings.cpp | 8 -------- rpcs3/rpcs3qt/qt_utils.h | 4 ---- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index ca8f8e31f3..e93d010cba 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -9,11 +9,11 @@ Other instructions may be found [here](https://wiki.rpcs3.net/index.php?title=Bu * [CMake 3.14.1+](https://www.cmake.org/download/) (add to PATH) * [Python 3.3+](https://www.python.org/downloads/) (add to PATH) -* [Qt 5.11+](https://www.qt.io/download-qt-installer) (Avoid 5.11.1, due to a bug) +* [Qt 5.14+](https://www.qt.io/download-qt-installer) * [Visual Studio 2019](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) * [Vulkan SDK 1.1.97.0+](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) -**Either add the** `QTDIR` **environment variable, e.g.** `\5.11.0\msvc2017_64\` **, or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools-19123)** +**Either add the** `QTDIR` **environment variable, e.g.** `\5.14.1\msvc2017_64\` **, or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools-19123)** ### Linux @@ -21,7 +21,7 @@ These are the essentials tools to build RPCS3 on Linux. Some of them can be inst * Clang 5.0+ or GCC 8.1+ * [CMake 3.8.2+](https://www.cmake.org/download/) -* [Qt 5.11+](https://www.qt.io/download-qt-installer) (Avoid 5.11.1, due to a bug) +* [Qt 5.14+](https://www.qt.io/download-qt-installer) * [Vulkan SDK 1.1.97.0+](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)) * [SDL2](https://www.libsdl.org/download-2.0.php) (for the FAudio backend) @@ -92,7 +92,7 @@ git submodule update --init #### Configuring the Qt plugin (if used) 1) Go to the Qt5 menu and edit Qt5 options. -2) Add the path to your Qt installation with compiler e.g. `\5.11.0\msvc2017_64`. +2) Add the path to your Qt installation with compiler e.g. `\5.14.1\msvc2017_64`. 3) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added. #### Building the projects diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index cac0e65199..44bd4f4d96 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -129,19 +129,13 @@ QCoreApplication* createApplication(int& argc, char* argv[]) const auto i_hdpi_2 = (argc > (i_hdpi + 1)) ? (i_hdpi + 1) : 0; const auto high_dpi_setting = (i_hdpi_2 && !strcmp(cmp_str.c_str(), argv[i_hdpi_2])) ? "0" : "1"; -#if (QT_VERSION < QT_VERSION_CHECK(5,14,0)) - // Set QT_AUTO_SCREEN_SCALE_FACTOR from environment. Defaults to cli argument, which defaults to 1. - use_high_dpi = "1" == qEnvironmentVariable("QT_AUTO_SCREEN_SCALE_FACTOR", high_dpi_setting); -#else // Set QT_ENABLE_HIGHDPI_SCALING from environment. Defaults to cli argument, which defaults to 1. use_high_dpi = "1" == qEnvironmentVariable("QT_ENABLE_HIGHDPI_SCALING", high_dpi_setting); -#endif } // AA_EnableHighDpiScaling has to be set before creating a QApplication QApplication::setAttribute(use_high_dpi ? Qt::AA_EnableHighDpiScaling : Qt::AA_DisableHighDpiScaling); -#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) if (use_high_dpi) { // Set QT_SCALE_FACTOR_ROUNDING_POLICY from environment. Defaults to cli argument, which defaults to RoundPreferFloor. @@ -193,7 +187,6 @@ QCoreApplication* createApplication(int& argc, char* argv[]) } QApplication::setHighDpiScaleFactorRoundingPolicy(rounding_val); } -#endif return new gui_application(argc, argv); } @@ -235,9 +228,7 @@ int main(int argc, char** argv) parser.addOption(QCommandLineOption(arg_headless, "Run RPCS3 in headless mode.")); parser.addOption(QCommandLineOption(arg_no_gui, "Run RPCS3 without its GUI.")); parser.addOption(QCommandLineOption(arg_high_dpi, "Enables Qt High Dpi Scaling.", "enabled", "1")); -#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) parser.addOption(QCommandLineOption(arg_rounding, "Sets the Qt::HighDpiScaleFactorRoundingPolicy for values like 150% zoom.", "rounding", "4")); -#endif parser.addOption(QCommandLineOption(arg_styles, "Lists the available styles.")); parser.addOption(QCommandLineOption(arg_style, "Loads a custom style.", "style", "")); parser.addOption(QCommandLineOption(arg_stylesheet, "Loads a custom stylesheet.", "path", "")); diff --git a/rpcs3/rpcs3qt/emu_settings.cpp b/rpcs3/rpcs3qt/emu_settings.cpp index 63db4ce9a1..54d934411a 100644 --- a/rpcs3/rpcs3qt/emu_settings.cpp +++ b/rpcs3/rpcs3qt/emu_settings.cpp @@ -505,11 +505,7 @@ void emu_settings::EnhanceSpinBox(QSpinBox* spinbox, SettingsType type, const QS spinbox->setRange(min, max); spinbox->setValue(val); -#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) connect(spinbox, &QSpinBox::textChanged, [=](const QString&/* text*/) -#else - connect(spinbox, QOverload::of(&QSpinBox::valueChanged), [=](const QString&/* value*/) -#endif { SetSetting(type, sstr(spinbox->cleanText())); }); @@ -551,11 +547,7 @@ void emu_settings::EnhanceDoubleSpinBox(QDoubleSpinBox* spinbox, SettingsType ty spinbox->setRange(min, max); spinbox->setValue(val); -#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) connect(spinbox, &QDoubleSpinBox::textChanged, [=](const QString&/* text*/) -#else - connect(spinbox, QOverload::of(&QDoubleSpinBox::valueChanged), [=](const QString&/* value*/) -#endif { SetSetting(type, sstr(spinbox->cleanText())); }); diff --git a/rpcs3/rpcs3qt/qt_utils.h b/rpcs3/rpcs3qt/qt_utils.h index ed9b2a45d3..3513785001 100644 --- a/rpcs3/rpcs3qt/qt_utils.h +++ b/rpcs3/rpcs3qt/qt_utils.h @@ -16,11 +16,7 @@ namespace gui template static QSet list_to_set(const QList& list) { -#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) return QSet(list.begin(), list.end()); -#else - return QSet::fromList(list); -#endif } // Creates a frame geometry rectangle with given width height that's centered inside the origin,