Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
#307 Fix the compilation error of qt6.x (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
czyt1988 authored Nov 10, 2023
1 parent 85a3fe1 commit 8ab8822
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/FramelessHelper/Core/framelesshelpercore_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/core/utils_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 8ab8822

Please sign in to comment.