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>
bb10
Friedemann Kleint 2017-12-08 10:53:46 +01:00
parent 5e2f583a67
commit 53fae41e42
2 changed files with 0 additions and 41 deletions

View File

@ -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),
@ -414,30 +410,6 @@ HWND QWindowsXPStylePrivate::winId(const QWidget *widget)
return GetDesktopWindow();
}
/*! \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
@ -563,16 +535,6 @@ QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData)
return region;
}
/*! \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.

View File

@ -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;