diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-05-25 11:41:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-28 05:30:34 +0200 |
commit | 2533a40cf26ded5b777aae6b3c49813a044ab735 (patch) | |
tree | dc58ecb893b0049dba16b4926bc211fb8874ae5f /tests/auto/quick/shared/viewtestutil.h | |
parent | d4dad3a0b83c921ed4d746eb9694be8b008bcc1a (diff) |
Fix PathView not updating after all items are removed from the model.
Always clear the layoutScheduled flag on a refill even if there are no
items to create, otherwise future layouts won't be scheduled because
it appears one is already pending.
Fixes an issue in the dragselection example where items that should
have moved to the PathView instead disappeared.
Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/quick/shared/viewtestutil.h')
-rw-r--r-- | tests/auto/quick/shared/viewtestutil.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/quick/shared/viewtestutil.h b/tests/auto/quick/shared/viewtestutil.h index 06efd9c28e..10ecd6a2ce 100644 --- a/tests/auto/quick/shared/viewtestutil.h +++ b/tests/auto/quick/shared/viewtestutil.h @@ -60,7 +60,7 @@ namespace QQuickViewTestUtil QList<int> adjustIndexesForRemoveDisplaced(const QList<int> &indexes, int index, int count); struct ListChange { - enum { Inserted, Removed, Moved, SetCurrent, SetContentY } type; + enum { Inserted, Removed, Moved, SetCurrent, SetContentY, Polish } type; int index; int count; int to; // Move @@ -71,6 +71,7 @@ namespace QQuickViewTestUtil static ListChange move(int index, int to, int count) { ListChange c = { Moved, index, count, to, 0.0 }; return c; } static ListChange setCurrent(int index) { ListChange c = { SetCurrent, index, -1, -1, 0.0 }; return c; } static ListChange setContentY(qreal pos) { ListChange c = { SetContentY, -1, -1, -1, pos }; return c; } + static ListChange polish() { ListChange c = { Polish, -1, -1, -1, 0.0 }; return c; } }; class QmlListModel : public QListModelInterface |