From 286a073085c1920cf891f479eb1a5f70b1c4daac Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 22 Mar 2010 12:52:51 +1000 Subject: 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. --- src/declarative/util/qdeclarativestateoperations.cpp | 5 ++--- 1 file 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; -- cgit v0.12