summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-12-08 10:53:46 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-05 15:46:32 +0000
commit53fae41e4243cd2708fec0725460b618ad78be80 (patch)
tree07f1770db29ee1f903a37b61402121f03f19e3d9 /src/plugins
parent5e2f583a67c75c1c03e213467bb56207e5084279 (diff)
QWindowsXPStyle: Remove unused code
Fixes a deprecation warning about QDesktopWidget::screenGeometry(). Change-Id: Ib56b2d3f62ddca60d84b4f626571b5e444304804 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp38
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h3
2 files changed, 0 insertions, 41 deletions
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index 0c28a9900d..1f7e223fe2 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -54,7 +54,6 @@
#include <private/qapplication_p.h>
#include <qpa/qplatformnativeinterface.h>
-#include <qdesktopwidget.h>
#if QT_CONFIG(toolbutton)
#include <qtoolbutton.h>
#endif
@@ -186,7 +185,6 @@ HRGN XPThemeData::mask(QWidget *widget)
// QWindowsXPStylePrivate -------------------------------------------------------------------------
// Static initializations
-QPixmap *QWindowsXPStylePrivate::tabbody = 0;
HWND QWindowsXPStylePrivate::m_vistaTreeViewHelper = 0;
HTHEME QWindowsXPStylePrivate::m_themes[NThemes];
bool QWindowsXPStylePrivate::use_xp = false;
@@ -266,8 +264,6 @@ void QWindowsXPStylePrivate::cleanup(bool force)
use_xp = false;
cleanupHandleMap();
- delete tabbody;
- tabbody = 0;
}
/* In order to obtain the correct VistaTreeViewTheme (arrows for PE_IndicatorBranch),
@@ -415,30 +411,6 @@ HWND QWindowsXPStylePrivate::winId(const QWidget *widget)
}
/*! \internal
- Returns the pointer to a tab widgets body pixmap, scaled to the
- height of the screen. This way the theme engine doesn't need to
- scale the body for every time we ask for it. (Speed optimization)
-*/
-const QPixmap *QWindowsXPStylePrivate::tabBody(QWidget *widget)
-{
- if (!tabbody) {
- XPThemeData theme(0, 0, QWindowsXPStylePrivate::TabTheme, TABP_BODY);
- const QSize size = (theme.size() * QWindowsStylePrivate::nativeMetricScaleFactor(widget)).toSize();
-
- tabbody = new QPixmap(size.width(), QApplication::desktop()->screenGeometry().height());
- QPainter painter(tabbody);
- theme.rect = QRect(QPoint(0, 0), size);
- drawBackground(theme);
- // We fill with the last line of the themedata, that
- // way we don't get a tiled pixmap inside big tabs
- QPixmap temp(size.width(), 1);
- painter.drawPixmap(0, 0, temp, 0, size.height() - 1, -1, -1);
- painter.drawTiledPixmap(0, size.height(), size.width(), tabbody->height() - size.height(), temp);
- }
- return tabbody;
-}
-
-/*! \internal
Returns a native buffer (DIB section) of at least the size of
( \a x , \a y ). The buffer has a 32 bit depth, to not lose
the alpha values on proper alpha-pixmaps.
@@ -564,16 +536,6 @@ QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData)
}
/*! \internal
- Sets the parts region on a window.
-*/
-void QWindowsXPStylePrivate::setTransparency(QWidget *widget, XPThemeData &themeData)
-{
- HRGN hrgn = themeData.mask(widget);
- if (hrgn && widget)
- SetWindowRgn(winId(widget), hrgn, true);
-}
-
-/*! \internal
Returns \c true if the native doublebuffer contains pixels with
varying alpha value.
*/
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h b/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h
index 4f3fd9c48d..60f9d7e9b7 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h
@@ -232,7 +232,6 @@ public:
void init(bool force = false);
void cleanup(bool force = false);
void cleanupHandleMap();
- const QPixmap *tabBody(QWidget *widget);
HBITMAP buffer(int w = 0, int h = 0);
HDC bufferHDC()
@@ -244,7 +243,6 @@ public:
bool isTransparent(XPThemeData &themeData);
QRegion region(XPThemeData &themeData);
- void setTransparency(QWidget *widget, XPThemeData &themeData);
bool drawBackground(XPThemeData &themeData);
bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, qreal aditionalDevicePixelRatio);
bool drawBackgroundDirectly(HDC dc, XPThemeData &themeData, qreal aditionalDevicePixelRatio);
@@ -277,7 +275,6 @@ private:
static QBasicAtomicInt ref;
static bool use_xp;
- static QPixmap *tabbody;
QHash<ThemeMapKey, ThemeMapData> alphaCache;
HDC bufferDC;