path: root/src/widgets/dialogs/qwizard_win_p.h
diff options
authorJonathan Liu <>2012-09-03 00:11:57 +1000
committerQt by Nokia <>2012-09-03 11:05:49 +0200
commit952ea029f40aaff9de0101fc165907ef8693e4aa (patch)
treeb1e853a2d8ec2ad14d2d42e66c7371f312d7dde8 /src/widgets/dialogs/qwizard_win_p.h
parent6960fb2f6e7d338d16ad883a6feea0da448c76c1 (diff)
QWizard/Win: Fix incorrect cached state after all wizards destroyed
If a QWizard is shown when Aero is enabled, the current visual style is cached in a static member of QVistaHelper. The cached state is updated by QVistaHelper when it receives WM_THEMECHANGED or WM_DWMCOMPOSITIONCHANGED events from Windows. If all QWizard instances are destroyed, there are no instances of QVistaHelper to receive these notifications and update the cache. If Aero is now disabled, the cached current visual style in QVistaHelper isn't updated. If a wizard is now created and shown, a large black rectangle is shown in the titlebar. A static instance count is added so that when no wizards are running, the cached state is not used. Task-number: QTBUG-27004 Change-Id: Iefe4c8552388280219c9726418ed7476b8ebb15a Reviewed-by: Miikka Heikkinen <> Reviewed-by: Friedemann Kleint <>
Diffstat (limited to 'src/widgets/dialogs/qwizard_win_p.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h
index 80b5fd8241..86696952b0 100644
--- a/src/widgets/dialogs/qwizard_win_p.h
+++ b/src/widgets/dialogs/qwizard_win_p.h
@@ -133,6 +133,7 @@ private:
void mouseReleaseEvent(QMouseEvent *event);
bool eventFilter(QObject *obj, QEvent *event);
+ static int instanceCount;
static bool is_vista;
static VistaState cachedVistaState;
static bool isCompositionEnabled();