#307 Fix the compilation error of qt6.x (#317)

This commit is contained in:
czy 2023-11-10 12:02:08 +08:00 committed by GitHub
parent 85a3fe1b2f
commit 8ab8822448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -116,7 +116,7 @@ QT_END_NAMESPACE
#endif
// QLatin1StringView can't be constexpr until Qt6?
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
# define Q_STRING_CONSTEXPR constexpr
#else
# define Q_STRING_CONSTEXPR

View File

@ -49,9 +49,9 @@
# include <QtGui/private/qguiapplication_p.h>
# endif // (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
# include <QtGui/qpa/qplatformwindow.h>
# if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
# if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
# include <QtGui/qpa/qplatformnativeinterface.h>
# else // (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
# else // (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
# include <QtGui/qpa/qplatformwindow_p.h>
# endif // (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
#endif
@ -2305,7 +2305,7 @@ bool Utils::shouldAppsUseDarkMode_windows()
return false;
}
#if FRAMELESSHELPER_CONFIG(private_qt)
# if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
# if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
if (const auto app = qApp->nativeInterface<QNativeInterface::Private::QWindowsApplication>()) {
return app->isDarkMode();
} else {
@ -2320,7 +2320,7 @@ bool Utils::shouldAppsUseDarkMode_windows()
# else // (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
// Qt gained the ability to detect the system dark mode setting only since 5.15.
// We should detect it ourself on versions below that.
# endif // (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
# endif // (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
#endif // FRAMELESSHELPER_CONFIG(private_qt)
// Starting from Windows 10 1903, "ShouldAppsUseDarkMode()" (exported by UXTHEME.DLL,
// ordinal number 132) always return "TRUE" (actually, a random non-zero number at