diff options
author | Yuhang Zhao <2546789017@qq.com> | 2022-12-15 13:50:54 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2022-12-16 05:12:50 +0800 |
commit | 514a6cb7dcc6f40c2be16ebcd356aadb422c16fa (patch) | |
tree | 0c954a81f794240158dfb88bd655edc0e70269aa /src/plugins/styles | |
parent | 5fe52a0420a50e0d0e78bb7ff5d7625443a43673 (diff) |
Vista style: remove temporary workaround
The MinGW issue has been fixed some time ago.
Change-Id: Ie2eaa2952d398a913b06d36d7e621efff9e4c926
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/styles')
-rw-r--r-- | src/plugins/styles/windowsvista/qwindowsvistastyle.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp index d14f021c0e..fc612c82e5 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp @@ -68,14 +68,6 @@ HTHEME QWindowsVistaStylePrivate::m_themes[NThemes]; bool QWindowsVistaStylePrivate::useVistaTheme = false; Q_CONSTINIT QBasicAtomicInt QWindowsVistaStylePrivate::ref = Q_BASIC_ATOMIC_INITIALIZER(-1); // -1 based refcounting -namespace QOSWorkaround { - // Due to a mingw bug being confused by static constexpr variables in an exported class, - // we cannot use QOperatingSystemVersion::Windows11 in libraries outside of QtCore. - // ### TODO Remove this when that problem is fixed. - static constexpr QOperatingSystemVersionBase Windows11 { QOperatingSystemVersionBase::Windows, - 10, 0, 22000 }; -} - static void qt_add_rect(HRGN &winRegion, QRect r) { HRGN rgn = CreateRectRgn(r.left(), r.top(), r.x() + r.width(), r.y() + r.height()); @@ -2939,7 +2931,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption else theme.stateId = bullet ? MC_BULLETNORMAL: MC_CHECKMARKNORMAL; d->drawBackground(theme); - } else if (QOperatingSystemVersion::current() >= QOSWorkaround::Windows11 + } else if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows11 && !act) { painter->fillRect(checkRect, menuitem->palette.highlight().color().lighter(200)); } @@ -3024,7 +3016,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption partId, stateId, option->rect); d->drawBackground(theme); } - return; + return; case CE_MenuBarEmptyArea: { stateId = MBI_NORMAL; |