diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2016-06-03 20:18:35 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2016-06-16 10:43:22 +0000 |
commit | d2f1e081b9de201fd45e67b78567c6d720d0c6bf (patch) | |
tree | 9ee221149b19b1829cfcf84e25d7c3f1fbe90c86 /src/quick | |
parent | 547d0bdf09c46f361966809f8d7db3a581969799 (diff) |
ItemViews: Make the wording of the warning on cache properties slightly sterner.
I have seen far too many cases of someone simply setting cacheBuffer to a
massive number in an attempt to workaround a slow delegate. It should be
explicit that cacheBuffer is not a solution for these problems.
Change-Id: I09416d06ff7faf51a104e09ca5f6b3593ddc53c7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquickgridview.cpp | 10 | ||||
-rw-r--r-- | src/quick/items/qquicklistview.cpp | 10 | ||||
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 10 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp index 8d84144519..6e5710a97b 100644 --- a/src/quick/items/qquickgridview.cpp +++ b/src/quick/items/qquickgridview.cpp @@ -1524,10 +1524,12 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight) Note that cacheBuffer is not a pixel buffer - it only maintains additional instantiated delegates. - Setting this value can make scrolling the list smoother at the expense - of additional memory usage. It is not a substitute for creating efficient - delegates; the fewer objects and bindings in a delegate, the faster a view may be - scrolled. + \note Setting this property is not a replacement for creating efficient delegates. + It can improve the smoothness of scrolling behavior at the expense of additional + memory usage. The fewer objects and bindings in a delegate, the faster a + view can be scrolled. It is important to realize that setting a cacheBuffer + will only postpone issues caused by slow-loading delegates, it is not a + solution for this scenario. The cacheBuffer operates outside of any display margins specified by displayMarginBeginning or displayMarginEnd. diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 242fdd2cfa..78a64c5df1 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -2197,10 +2197,12 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation) Note that cacheBuffer is not a pixel buffer - it only maintains additional instantiated delegates. - Setting this value can improve the smoothness of scrolling behavior at the expense - of additional memory usage. It is not a substitute for creating efficient - delegates; the fewer objects and bindings in a delegate, the faster a view can be - scrolled. + \note Setting this property is not a replacement for creating efficient delegates. + It can improve the smoothness of scrolling behavior at the expense of additional + memory usage. The fewer objects and bindings in a delegate, the faster a + view can be scrolled. It is important to realize that setting a cacheBuffer + will only postpone issues caused by slow-loading delegates, it is not a + solution for this scenario. The cacheBuffer operates outside of any display margins specified by displayMarginBeginning or displayMarginEnd. diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index 73146f015e..7e1fa95692 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -1306,10 +1306,12 @@ void QQuickPathView::resetPathItemCount() allowing creation to occur across multiple frames and reducing the likelihood of skipping frames. - Setting this value can improve the smoothness of scrolling behavior at the expense - of additional memory usage. It is not a substitute for creating efficient - delegates; the fewer objects and bindings in a delegate, the faster a view can be - moved. + \note Setting this property is not a replacement for creating efficient delegates. + It can improve the smoothness of scrolling behavior at the expense of additional + memory usage. The fewer objects and bindings in a delegate, the faster a + view can be scrolled. It is important to realize that setting cacheItemCount + will only postpone issues caused by slow-loading delegates, it is not a + solution for this scenario. \sa pathItemCount */ |