on xenial help sign in
Small fix after previous real -> int change
commit006ecdb186f5180c00a4e089c308190071caf77f authorAlbert Astals <albert.astals@canonical.com> dateWed 3 Dec 2014, 12:06 (12 years ago) parent6ad7a55
2 files changed+5−3
qml/Dash/ScopeListView.qml+4−2 tests/plugins/Dash/listviewwithpageheadertest.cpp+1−1
qml/Dash/ScopeListView.qml+4−2
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2014 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -20,5 +20,7 @@ import Dash 0.1
2020ListViewWithPageHeader {
2121 maximumFlickVelocity: height * 10
2222 flickDeceleration: height * 2
23− cacheBuffer: Number.MAX_VALUE
23+ // 1073741823 is s^30 -1. A quite big number so that you have "infinite" cache, but not so
24+ // big so that if you add if with itself you're outside the 2^31 int range
25+ cacheBuffer: 1073741823
2426}
tests/plugins/Dash/listviewwithpageheadertest.cpp+1−1
@@ -1920,7 +1920,7 @@ private Q_SLOTS:
19201920
19211921 void testAllCacheBuffer()
19221922 {
1923− lvwph->setCacheBuffer(std::numeric_limits<qreal>::max());
1923+ lvwph->setCacheBuffer(std::numeric_limits<int>::max());
19241924 QTRY_COMPARE(lvwph->m_visibleItems.count(), 6);
19251925 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
19261926 verifyItem(0, 50., 150., false);