summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qwizard_win.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-11-28 14:33:54 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-28 16:57:58 +0100
commitb8d330904b279de57d70caef70ab2d2a6770f0cc (patch)
treea9edf91fa9b80142bdcdf2912b2701704bf7ca6c /src/widgets/dialogs/qwizard_win.cpp
parentf6c107d799d14bbdb2cb71b8446483541bb0adb5 (diff)
QtGui: Bring back HBITMAP/HICON conversion functions.
- Move the conversion functions from the Lighthouse plugin to QtGui as qt_pixmap/From/To/HBITMAP/HICON(). - Re-enable them in Widgets (QFileIconProvider, QWindowsStyle). - Use them in QtPrintSupport. Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qwizard_win.cpp')
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index 6177700d8c..075c8b81bb 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -320,6 +320,8 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type)
void QVistaHelper::drawTitleBar(QPainter *painter)
{
+ Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &);
+
Q_ASSERT(backButton_);
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
QBackingStore *backingStore = backButton_->backingStore();
@@ -351,9 +353,10 @@ void QVistaHelper::drawTitleBar(QPainter *painter)
QRect(titleOffset() - glowOffset, verticalCenter - textHeight / 2, textWidth, textHeight),
hdc);
- if (!wizard->windowIcon().isNull()) {
+ const QIcon windowIcon = wizard->windowIcon();
+ if (!windowIcon.isNull()) {
QRect rect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize());
- HICON hIcon = 0; //###FIXME wizard->windowIcon().pixmap(iconSize()).toWinHICON();
+ const HICON hIcon = qt_pixmapToWinHICON(windowIcon.pixmap(iconSize()));
DrawIconEx(hdc, rect.left(), rect.top(), hIcon, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT);
DestroyIcon(hIcon);
}