diff --git a/CMakeLists.txt b/CMakeLists.txt index f647204a4b..29c2b38602 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -594,7 +594,7 @@ if (ENABLE_QT) list(APPEND CMAKE_PREFIX_PATH "${Qt6_DIR}") endif() - find_package(Qt6 REQUIRED COMPONENTS Core) + find_package(Qt6 6.5 REQUIRED COMPONENTS Core) if (NOT DEFINED QT_TARGET_PATH) get_target_property(qtcore_path Qt6::Core LOCATION_Release) diff --git a/docs/Deps.md b/docs/Deps.md index 2b73ecb4ac..4f293b9642 100644 --- a/docs/Deps.md +++ b/docs/Deps.md @@ -25,7 +25,7 @@ The following additional tools are also required: * `tools/windows/install-vulkan-sdk.ps1` (for PowerShell 5+) * `tools/windows/install-vulkan-sdk.sh` (for Git Bash, etc) -If you are on desktop and plan to use the Qt frontend, you *must* install Qt 6, and optionally Qt Creator (the **RECOMMENDED** IDE for building) +If you are on desktop and plan to use the Qt frontend, you *must* install Qt >=6.6, and optionally Qt Creator (the **RECOMMENDED** IDE for building) * On Linux, *BSD and macOS, this can be done by the package manager * If you wish to use Qt Creator, append `qtcreator` or `qt-creator` to the commands seen below. diff --git a/src/qt_common/qt_common.cpp b/src/qt_common/qt_common.cpp index 64b2c0262c..fa34a74cb9 100644 --- a/src/qt_common/qt_common.cpp +++ b/src/qt_common/qt_common.cpp @@ -332,10 +332,10 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) { } #ifdef _WIN32 -// TODO(crueter): Does this affect Qt 6 at all? static void OverrideWindowsFont() { - // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters + // Qt chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters. + // https://github.com/qt/qtbase/blob/v6.12.0/src/gui/text/windows/qwindowsfontdatabasebase.cpp#L970-L1020 const QString startup_font = QGuiApplication::font().family(); const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")}; if (ugly_fonts.contains(startup_font)) { diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index d45083b4b9..ccebaf2513 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -179,11 +179,6 @@ bool GRenderWindow::IsShown() const { return !isMinimized(); } -// On Qt 5.0+, this correctly gets the size of the framebuffer (pixels). -// -// Older versions get the window size (density independent pixels), -// and hence, do not support DPI scaling ("retina" displays). -// The result will be a viewport that is smaller than the extent of the window. void GRenderWindow::OnFramebufferSizeChanged() { // Screen changes potentially incur a change in screen DPI, hence we should update the // framebuffer size diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h index 2c71d85e55..e4db191107 100644 --- a/src/yuzu/loading_screen.h +++ b/src/yuzu/loading_screen.h @@ -12,6 +12,8 @@ #include #include +#include "common/container/unordered_map.h" + #if !QT_CONFIG(movie) #define YUZU_QT_MOVIE_MISSING 1 #endif @@ -91,7 +93,3 @@ private: std::chrono::steady_clock::time_point previous_time; std::size_t slow_shader_first_value = 0; }; - -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -Q_DECLARE_METATYPE(VideoCore::LoadCallbackStage); -#endif diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index 3b550862c0..0ee4384c7f 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -64,9 +64,7 @@ // Qt Stuff // #define QT_NO_OPENGL -#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) #include -#endif #include #include @@ -345,17 +343,9 @@ QString GetTranslatedGameIconSize(size_t index) { } // namespace #ifndef _WIN32 -// TODO(crueter): carboxyl does this, is it needed in qml? inline static bool isDarkMode() { -#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) const auto scheme = QGuiApplication::styleHints()->colorScheme(); return scheme == Qt::ColorScheme::Dark; -#else - const QPalette defaultPalette; - const auto text = defaultPalette.color(QPalette::WindowText); - const auto window = defaultPalette.color(QPalette::Window); - return text.lightness() > window.lightness(); -#endif // QT_VERSION } #endif // _WIN32