summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoão Abecasis <joao@trolltech.com>2010-02-12 17:31:54 (GMT)
committerJoão Abecasis <joao@trolltech.com>2010-02-18 18:22:13 (GMT)
commitb408d94902ef0b2856a4c462e06fcc4412de49be (patch)
tree4ad78a1e59d1ef0d7058cd4721a0faef82a6bf72 /tests
parent7f01b5aa56e61048a9785040e9807fd871a4b59a (diff)
downloadQt-b408d94902ef0b2856a4c462e06fcc4412de49be.zip
Qt-b408d94902ef0b2856a4c462e06fcc4412de49be.tar.gz
Qt-b408d94902ef0b2856a4c462e06fcc4412de49be.tar.bz2
Fixing QDir benchmarks...
The initial state of QDirIterator is ill-defined. If the hasNext returns true, then one must start by advancing the iterator to the first position. (Rinse, lather, repeat)
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/corelib/io/qdir/tst_qdir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp b/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp
index aea9fd0..f2e52d2 100644
--- a/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp
@@ -95,9 +95,9 @@ private slots:
QBENCHMARK {
QDirIterator dit(testdir.path(), QDir::Files);
while (dit.hasNext()) {
+ dit.next();
dit.fileInfo().isDir();
dit.fileInfo().size();
- dit.next();
}
}
}
@@ -116,9 +116,9 @@ private slots:
QBENCHMARK {
QDirIterator dit(testdir.path());
while (dit.hasNext()) {
+ dit.next();
dit.fileInfo().isDir();
dit.fileInfo().size();
- dit.next();
}
}
}