aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-03-13 18:31:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-17 14:59:49 +0100
commitb7032bed6799c72ef8d89e5763586349b6991b93 (patch)
tree430d515fe675b33f246db368eb8ceae4bb1795ac /src
parentd0af156930f80c7133b0190765d21b12a3d4a76a (diff)
QQuickLoader: fix the recursion guard for size updates
Task-number: QTBUG-30183 Change-Id: Ic8720e1e35bf2f349d74d2021dd202849da67852 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickloader.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index 0434c2af41..0d14f3e266 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -887,16 +887,19 @@ void QQuickLoader::setAsynchronous(bool a)
void QQuickLoaderPrivate::_q_updateSize(bool loaderGeometryChanged)
{
Q_Q(QQuickLoader);
- if (!item || updatingSize)
+ if (!item)
return;
- updatingSize = true;
-
if (loaderGeometryChanged && q->widthValid())
item->setWidth(q->width());
if (loaderGeometryChanged && q->heightValid())
item->setHeight(q->height());
+ if (updatingSize)
+ return;
+
+ updatingSize = true;
+
q->setImplicitSize(getImplicitWidth(), getImplicitHeight());
updatingSize = false;