diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2020-06-05 09:24:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-06-06 20:25:49 +0200 |
commit | 45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch) | |
tree | 363dfd46575d147206267d854ce14747157f432e /src/widgets/styles/qwindowsstyle.cpp | |
parent | aa81b90738ce9faee5e433617c8bd243cb238729 (diff) |
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/styles/qwindowsstyle.cpp')
-rw-r--r-- | src/widgets/styles/qwindowsstyle.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 6c7ea3740e..ae238c8951 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -267,7 +267,7 @@ void QWindowsStyle::polish(QApplication *app) d->inactiveCaptionColor = d->inactiveGradientCaptionColor; d->inactiveCaptionText = palette.window().color(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) //fetch native title bar colors +#if defined(Q_OS_WIN) //fetch native title bar colors if(app->desktopSettingsAware()){ DWORD activeCaption = GetSysColor(COLOR_ACTIVECAPTION); DWORD gradientActiveCaption = GetSysColor(COLOR_GRADIENTACTIVECAPTION); @@ -312,7 +312,7 @@ void QWindowsStyle::polish(QPalette &pal) int QWindowsStylePrivate::pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *, const QWidget *widget) { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) switch (pm) { case QStyle::PM_DockWidgetFrameWidth: return GetSystemMetrics(SM_CXFRAME); @@ -339,7 +339,7 @@ int QWindowsStylePrivate::pixelMetricFromSystemDp(QStyle::PixelMetric pm, const default: break; } -#else // Q_OS_WIN && !Q_OS_WINRT +#else // Q_OS_WIN Q_UNUSED(pm); Q_UNUSED(widget); #endif @@ -498,7 +498,7 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QPixmap desktopIcon; switch(standardPixmap) { case SP_DriveCDIcon: @@ -537,7 +537,7 @@ QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyl if (!desktopIcon.isNull()) { return desktopIcon; } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN return QCommonStyle::standardPixmap(standardPixmap, opt, widget); } @@ -577,7 +577,7 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid ret = 0; break; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) // Option not used on WinRT -> common style +#if defined(Q_OS_WIN) case SH_UnderlineShortcut: { ret = 1; @@ -613,15 +613,15 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid #endif // QT_NO_ACCESSIBILITY break; } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN case SH_Menu_SubMenuSloppyCloseTimeout: case SH_Menu_SubMenuPopupDelay: { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) DWORD delay; if (SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) ret = delay; else -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN ret = 400; break; } |