summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-05-05 06:39:05 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-05-05 06:39:05 (GMT)
commitab030e931e05a060b4f6fabf4235f05aeb0c252c (patch)
tree99bcfd4ede7b77c76ce4eb348cca346768611b69 /src/declarative
parentd6597781a658ba9546bc56f4f3079234c0790e1d (diff)
downloadQt-ab030e931e05a060b4f6fabf4235f05aeb0c252c.zip
Qt-ab030e931e05a060b4f6fabf4235f05aeb0c252c.tar.gz
Qt-ab030e931e05a060b4f6fabf4235f05aeb0c252c.tar.bz2
Fix cacheBuffer documentation.
Task-number: QTBUG-10385
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp20
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp18
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp2
3 files changed, 28 insertions, 12 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 4c72482..528cb22 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1405,12 +1405,20 @@ void QDeclarativeGridView::setWrapEnabled(bool wrap)
}
/*!
- \qmlproperty int GridView::cacheBuffer
- This property holds the number of off-screen pixels to cache.
-
- This property determines the number of pixels above the top of the view
- and below the bottom of the view to cache. Setting this value can make
- scrolling the view smoother at the expense of additional memory usage.
+ \qmlproperty int GridView::cacheBuffer
+ This property determines whether delegates are retained outside the
+ visible area of the view.
+
+ If non-zero the view will keep as many delegates
+ instantiated as will fit within the buffer specified. For example,
+ if in a vertical view the delegate is 20 pixels high and \c cacheBuffer is
+ set to 40, then up to 2 delegates above and 2 delegates below the visible
+ area may be retained.
+
+ 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 elements in a delegate, the faster a view may be
+ scrolled.
*/
int QDeclarativeGridView::cacheBuffer() const
{
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 3877fab..75cf547 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1839,11 +1839,19 @@ void QDeclarativeListView::setWrapEnabled(bool wrap)
/*!
\qmlproperty int ListView::cacheBuffer
- This property holds the number of off-screen pixels to cache.
-
- This property determines the number of pixels above the top of the list
- and below the bottom of the list to cache. Setting this value can make
- scrolling the list smoother at the expense of additional memory usage.
+ This property determines whether delegates are retained outside the
+ visible area of the view.
+
+ If non-zero the view will keep as many delegates
+ instantiated as will fit within the buffer specified. For example,
+ if in a vertical view the delegate is 20 pixels high and \c cacheBuffer is
+ set to 40, then up to 2 delegates above and 2 delegates below the visible
+ area may be retained.
+
+ 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 elements in a delegate, the faster a view may be
+ scrolled.
*/
int QDeclarativeListView::cacheBuffer() const
{
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 9f95348..5b2954b 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -874,7 +874,7 @@ void QDeclarativePropertyActionPrivate::init()
This property holds an explicit target object to animate.
The exact effect of the \c target property depends on how the animation
- is being used. Refer to the \l animation documentation for details.
+ is being used. Refer to the \l {QML Animation} documentation for details.
*/
QObject *QDeclarativePropertyAction::target() const