summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qwizard_win.cpp
diff options
context:
space:
mode:
authorOlli Werwolff <qt-info@nokia.com>2011-07-12 13:02:54 +0200
committerOliver Wolff <oliver.wolff@nokia.com>2011-07-12 14:15:35 +0200
commit992ef929dff21e079f7d8a207c07dbfd0c3c8f78 (patch)
tree32c286aff3e501e704e02dc114228da5d032d5df /src/widgets/dialogs/qwizard_win.cpp
parent54ec6d177e0e8fb04cd01e70461484a80ca1f7a4 (diff)
Use PlatformNativeInterface to obtain backingStore's dc
Change-Id: I6ec2fc0b8e7696fdfe4468920228df2d21c933fd Reviewed-on: http://codereview.qt.nokia.com/1501 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qwizard_win.cpp')
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index ab59e0109a..6c2a67639b 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -232,7 +232,9 @@ void QVistaBackButton::paintEvent(QPaintEvent *)
else if (underMouse())
state = WIZ_NAV_BB_HOT;
- pDrawThemeBackground(theme, p.paintEngine()->getDC(), WIZ_NAV_BACKBUTTON, state, &clipRect, &clipRect);
+ QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
+ HDC hdc = static_cast<HDC>(nativeInterface->nativeResourceForBackingStore("getDC", backingStore()));
+ pDrawThemeBackground(theme, hdc, WIZ_NAV_BACKBUTTON, state, &clipRect, &clipRect);
}
/******************************************************************************
@@ -318,12 +320,14 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type)
void QVistaHelper::drawTitleBar(QPainter *painter)
{
- HDC hdc = static_cast<QRasterPaintEngine *>(painter->paintEngine())->getDC();
+ Q_ASSERT(backButton_);
+ QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
+ QBackingStore *backingStore = backButton_->backingStore();
+ HDC hdc = static_cast<HDC>(nativeInterface->nativeResourceForBackingStore("getDC", backingStore));
if (vistaState() == VistaAero)
drawBlackRect(QRect(0, 0, wizard->width(),
titleBarSize() + topOffset()), hdc);
- Q_ASSERT(backButton_);
const int btnTop = backButton_->mapToParent(QPoint()).y();
const int btnHeight = backButton_->size().height();
const int verticalCenter = (btnTop + btnHeight / 2) - 1;