summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-09-13 11:20:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-13 19:37:51 +0200
commit63a382a93073a96457a41118753ae88547023cac (patch)
treec4b99d26e589e2f66ed67628c978c758eb525bb9 /tests/auto
parent4c709fb3912ef65f83a5e604ffecc6a4a670a5cb (diff)
Add a static QFileInfo::exists(fileName) function
This avoids dynamic construction of the private class. According to the benchmark we go from 4,550 to 3,900 instruction reads per iteration. (without change 32629676 the baseline is 5,600) Change-Id: I5df925e30dbd49bdde87173e481820574ce5abe1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index af2578ac37..d2171cc64a 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -438,6 +438,7 @@ void tst_QFileInfo::exists()
QFileInfo fi(path);
QCOMPARE(fi.exists(), expected);
+ QCOMPARE(QFileInfo::exists(path), expected);
}
void tst_QFileInfo::absolutePath_data()