diff options
author | Alan Alpert <aalpert@blackberry.com> | 2013-04-11 16:57:19 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-26 21:17:42 +0200 |
commit | 53e317468626284fe26877659dff551ce3bc0e55 (patch) | |
tree | bb129a2df33f3a283bcb7e6f33be6b00659b4467 /tests/auto/qmltest/listview | |
parent | 8563adb737cec5d440197ddbd514fe201c5f18ff (diff) | |
download | qtdeclarative-53e317468626284fe26877659dff551ce3bc0e55.tar.gz |
No longer apply pending changes when accessing ItemView properties
Applying changes in the getters can lead to binding loops, and is
currently inconsistently applied. Removing the applyPendingChanges calls
from remaining getters, and adding a forceLayout() function for cases
where the immediate-apply behavior is needed.
Task-number: QTBUG-30555
Parts-of-patch-by: Albert Astals Cid
Change-Id: I64632601e02f2a53060296ab7739577a749d916f
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Diffstat (limited to 'tests/auto/qmltest/listview')
-rw-r--r-- | tests/auto/qmltest/listview/tst_listview.qml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qmltest/listview/tst_listview.qml b/tests/auto/qmltest/listview/tst_listview.qml index cbace624c3..52384fe242 100644 --- a/tests/auto/qmltest/listview/tst_listview.qml +++ b/tests/auto/qmltest/listview/tst_listview.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 import QtTest 1.0 Item { @@ -168,6 +168,7 @@ Item { modelalter.currentIndex = 1; compare(modelalter.currentItem.text, "AlterModelElement1") altermodel.clear() + modelalter.forceLayout() tryCompare(modelalter.count, 0) compare(modelalter.currentItem, null) } |