diff options
author | Liang Qi <liang.qi@qt.io> | 2018-06-25 10:49:57 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-06-25 10:49:57 +0200 |
commit | 66a781692a4d21ba4c8a124cb4be84e4e2ffa742 (patch) | |
tree | 4fe9261e26281ddb5f1444563cda53c8bf39d978 /src/quicktemplates2/qquicktumbler_p_p.h | |
parent | 7fec7105b7f6119135aafd6f9ee609128125d594 (diff) | |
parent | d5fbbddd7794265f24d392d33c4874ac756cb9c9 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/imports/controls/imagine/TextArea.qml
src/imports/controls/imagine/TextField.qml
tests/auto/controls/data/tst_tumbler.qml
Change-Id: I25a8228a4299fb7a53db70b7223663a1637ed933
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquicktumbler_p_p.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p_p.h b/src/quicktemplates2/qquicktumbler_p_p.h index 4d4c3bcf..2f8b1207 100644 --- a/src/quicktemplates2/qquicktumbler_p_p.h +++ b/src/quicktemplates2/qquicktumbler_p_p.h @@ -76,7 +76,8 @@ public: int visibleItemCount = 5; bool wrap = true; bool explicitWrap = false; - bool ignoreWrapChanges = false; + bool modelBeingSet = false; + bool currentIndexSetDuringModelChange = false; QQuickItem *view = nullptr; QQuickItem *viewContentItem = nullptr; ContentItemType viewContentItemType = UnsupportedContentItemType; @@ -104,11 +105,17 @@ public: void warnAboutIncorrectContentItem(); void syncCurrentIndex(); + enum PropertyChangeReason { + UserChange, + InternalChange + }; + + void setCurrentIndex(int newCurrentIndex, PropertyChangeReason changeReason = InternalChange); void setCount(int newCount); void setWrapBasedOnCount(); void setWrap(bool shouldWrap, bool isExplicit); - void lockWrap(); - void unlockWrap(); + void beginSetModel(); + void endSetModel(); void itemChildAdded(QQuickItem *, QQuickItem *) override; void itemChildRemoved(QQuickItem *, QQuickItem *) override; |