aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-06-12 09:19:35 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-13 01:41:58 +0200
commit86cbb55522f9a4ca76854be860a8131f006553a8 (patch)
tree9c1489de62ab7efb0038f393b8e1ab7ef9d5c925 /tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
parenteba101e4974b3f6150e299f3f2e513124c69eadf (diff)
Set a non-zero default cacheBuffer.
The likelihood of constant framerate when flicking is considerably improved by having a cacheBuffer. Since there is only a minimal cost in having a modest cacheBuffer, it is better to have a more optimal default value - 320 seems a good starting point. Change-Id: Id3c8a153821573b5b08c6fbd80d34152908d358d Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickgridview/tst_qquickgridview.cpp')
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index d7eb5b2950..9876a36ec3 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -58,6 +58,7 @@
#include "../shared/viewtestutil.h"
#include "../shared/visualtestutil.h"
#include <QtGui/qguiapplication.h>
+#include "qplatformdefs.h"
Q_DECLARE_METATYPE(QQuickGridView::Flow)
Q_DECLARE_METATYPE(Qt::LayoutDirection)
@@ -2236,7 +2237,11 @@ void tst_QQuickGridView::defaultValues()
QTRY_COMPARE(obj->highlightFollowsCurrentItem(), true);
QTRY_VERIFY(obj->flow() == 0);
QTRY_COMPARE(obj->isWrapEnabled(), false);
- QTRY_COMPARE(obj->cacheBuffer(), 0);
+#ifdef QML_VIEW_DEFAULTCACHEBUFFER
+ QTRY_COMPARE(obj->cacheBuffer(), QML_VIEW_DEFAULTCACHEBUFFER);
+#else
+ QTRY_COMPARE(obj->cacheBuffer(), 320);
+#endif
QTRY_COMPARE(obj->cellWidth(), qreal(100)); //### Should 100 be the default?
QTRY_COMPARE(obj->cellHeight(), qreal(100));
delete obj;