summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qhash/tst_qhash.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-31 13:51:36 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-12 04:30:20 +0200
commit290655c8a2401b84b9ddd223b67c06182886c597 (patch)
treebde39afdf33134dd79ade0b61796d615e0bc9f3b /tests/auto/corelib/tools/qhash/tst_qhash.cpp
parentc5665a182db5002afe6dc7c69f343e89de5fca31 (diff)
Fix compilation of tests/auto/corelib/tools with QT_STRICT_ITERATORS
Most fixes are simple and quite obvious. The ones more involved are the ones to QArrayData, which had probably not been compiled with strict iterators thus far. Change-Id: Ic4ff84c34fd9a04fd686fecaa98149b1c47c9346 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qhash/tst_qhash.cpp')
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 5bd13b23a3..e4a2b964ba 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -395,8 +395,8 @@ void tst_QHash::insert1()
QVERIFY(count == 2);
count = 0;
- it1 = hash.begin();
- while (it1 != hash.end()) {
+ it1 = hash.constBegin();
+ while (it1 != hash.constEnd()) {
count++;
++it1;
}
@@ -606,9 +606,9 @@ void tst_QHash::find()
map1.insertMulti(4, compareString);
}
- QHash<int, QString>::const_iterator it=map1.find(4);
+ QHash<int, QString>::const_iterator it=map1.constFind(4);
- for(i = 9; i > 2 && it != map1.end() && it.key() == 4; --i) {
+ for(i = 9; i > 2 && it != map1.constEnd() && it.key() == 4; --i) {
compareString = testString.arg(i);
QVERIFY(it.value() == compareString);
++it;