summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-05 16:29:01 +0100
committerLiang Qi <liang.qi@qt.io>2019-02-06 22:11:56 +0000
commita6f25dedd8fc7fa6053a6a1b98dc0548f3559db6 (patch)
tree918ccaf4852ddc4838a9b770d2ea7de0f2ee97de /src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
parent27065bdc50fb3163f41d65ff70653aac8ca19094 (diff)
Windows style, themes: Fix deprecation warnings
Fix: qwindowstheme.cpp:287:77: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] qwindowstheme.cpp:336:37: warning: 'const QBrush& QPalette::foreground() const' is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] qwindowstheme.cpp:861:102: warning: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] qwindowsvistastyle.cpp:635:56: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] qwindowsvistastyle.cpp:707:60: warning: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] qwindowsxpstyle.cpp:743:58: warning: 'const QMatrix& QPainter::deviceMatrix() const' is deprecated: Use deviceTransform() instead [-Wdeprecated-declarations] qwindowsinputcontext.cpp:448:49: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: I00a52a27b066caeb135ad4124f71ef3e09beafbf Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'src/plugins/styles/windowsvista/qwindowsxpstyle.cpp')
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index 43e8b37f71..90026e5bf0 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -740,7 +740,8 @@ bool QWindowsXPStylePrivate::drawBackgroundDirectly(HDC dc, XPThemeData &themeDa
{
QPainter *painter = themeData.painter;
- const QPointF redirectionDelta(painter->deviceMatrix().dx(), painter->deviceMatrix().dy());
+ const auto deviceTransform = painter->deviceTransform();
+ const QPointF redirectionDelta(deviceTransform.dx(), deviceTransform.dy());
const QRect area = scaleRect(QRectF(themeData.rect), additionalDevicePixelRatio).translated(redirectionDelta).toRect();
QRegion sysRgn = painter->paintEngine()->systemClip();
@@ -835,7 +836,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
alphaType = data.alphaType;
potentialInvalidAlpha = data.hadInvalidAlpha;
- haveCachedPixmap = QPixmapCache::find(pixmapCacheKey, cachedPixmap);
+ haveCachedPixmap = QPixmapCache::find(pixmapCacheKey, &cachedPixmap);
#ifdef DEBUG_XP_STYLE
char buf[25];