QWizard/Win: Fix vista helper cache state invalidation

If the cached state is not dirty and the instanceCount is zero, when the
instanceCount is incremented the cached state will not be correct. To
fix this, reset the cached state to dirty if the instanceCount is
incremented from zero.

Change-Id: Ic49eef7f83b1289a939f998817b1b2b5f5a2a45f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Jonathan Liu 2012-09-04 15:30:21 +10:00 committed by Qt by Nokia
parent 8486a510d5
commit e5ebcbc634

View File

@ -248,8 +248,9 @@ QVistaHelper::QVistaHelper(QWizard *wizard)
, wizard(wizard)
, backButton_(0)
{
++instanceCount;
is_vista = resolveSymbols();
if (instanceCount++ == 0)
cachedVistaState = Dirty;
if (is_vista)
backButton_ = new QVistaBackButton(wizard);