summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-22 02:52:51 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-22 02:56:18 (GMT)
commit286a073085c1920cf891f479eb1a5f70b1c4daac (patch)
treedb37df79f9bf188a6fb13fe815d8bd0c78a3893e
parent3d9ea4d3b1cf81710ba5ef843399c8625e1ccd9f (diff)
downloadQt-286a073085c1920cf891f479eb1a5f70b1c4daac.zip
Qt-286a073085c1920cf891f479eb1a5f70b1c4daac.tar.gz
Qt-286a073085c1920cf891f479eb1a5f70b1c4daac.tar.bz2
Fix warning mentioned in the comments of QTBUG-9182.
Make sure the 'stackBefore' sibling in ParentChanges is cleared if the target is the last child.
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 0946e88..96c75a9 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -456,11 +456,10 @@ void QDeclarativeParentChange::saveCurrentValues()
}
d->rewindParent = d->target->parentItem();
+ d->rewindStackBefore = 0;
- if (!d->rewindParent) {
- d->rewindStackBefore = 0;
+ if (!d->rewindParent)
return;
- }
//try to determine the item's original stack position so we can restore it
int siblingIndex = ((AccessibleFxItem*)d->target)->siblingIndex() + 1;