summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-02-07 04:24:36 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-02-07 05:05:49 (GMT)
commit6bd233953ac87603ddee8c5f087fbe523dd3793e (patch)
tree6ad93628a7f4e08d263bc9b864f8d76fcb88a58b /src/declarative
parente57716ad44e5894890d662f9ac596b70c109104f (diff)
downloadQt-6bd233953ac87603ddee8c5f087fbe523dd3793e.zip
Qt-6bd233953ac87603ddee8c5f087fbe523dd3793e.tar.gz
Qt-6bd233953ac87603ddee8c5f087fbe523dd3793e.tar.bz2
Changing header/footer size during creation caused recusion
If the size of the header or footer was changed during creation it would trigger itemGeometryChanged() which called updateHeader() and updateFooter() thereby causing recusion. We should only call those methods if the header/footer is already created. Change-Id: Ia2ae4047d745d1f301d243278550e65854fa830a Task-number: QT-4439 Reviewed-by: Joona Petrell
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 9aade98..c2c4ed7 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -331,8 +331,10 @@ public:
}
}
} else if ((header && header->item == item) || (footer && footer->item == item)) {
- updateHeader();
- updateFooter();
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index bb5bd75..800e82e 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -413,8 +413,10 @@ public:
}
}
if ((header && header->item == item) || (footer && footer->item == item)) {
- updateHeader();
- updateFooter();
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
}
if (currentItem && currentItem->item == item)
updateHighlight();