aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktumbler_p_p.h
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-07-03 13:14:57 +0200
committerMitch Curtis <mitch.curtis@qt.io>2017-07-07 09:16:26 +0000
commitcca6e8e3bd80824ff5aa3e17995a5b46ad48be28 (patch)
tree67664d7115c9c153700accab3972d70d44478efb /src/quicktemplates2/qquicktumbler_p_p.h
parent23482c09b812c0254ba5357e070441a6d847d7b2 (diff)
Tumbler: fix regression with currentIndex and currentItem
2c4b2d48 made Tumbler's wrap property follow its count by default, but did so using updatePolish() to account for the use case where a items are appended to the model in a for loop, as is done in TumblerDatePicker.qml in Tumbler's auto tests. This (appending items one at a time in a for loop) is not a good idea, but it should work. The problem with the solution is that the delay means that the use cases mentioned in the referenced bug report were broken. This patch removes the delay. The recursion guards are necessary due to the complex nature of TumblerView (and its non-standard use of the Qt Quick views), as they prevent a memory leak in QQuickListView::createHighlight() from being introuduced. We now call deleteLater() to ensure we do not interfere with the views' internal operations, and hence we also perform a few extra operations at the same time as insurance (although it appears that simply unparenting the internal view from QQuickTumblerView is enough to get the tests to pass). Task-number: QTBUG-61374 Change-Id: Ifef9e99522ea183b282ac862f346beaed12d0c09 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p_p.h')
-rw-r--r--src/quicktemplates2/qquicktumbler_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p_p.h b/src/quicktemplates2/qquicktumbler_p_p.h
index 301b8402..0dcae762 100644
--- a/src/quicktemplates2/qquicktumbler_p_p.h
+++ b/src/quicktemplates2/qquicktumbler_p_p.h
@@ -88,6 +88,7 @@ public:
int pendingCurrentIndex;
bool ignoreCurrentIndexChanges;
int count;
+ bool ignoreSignals;
void _q_updateItemHeights();
void _q_updateItemWidths();