aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/creationtime/tst_creationtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/creationtime/tst_creationtime.cpp')
-rw-r--r--tests/benchmarks/creationtime/tst_creationtime.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/benchmarks/creationtime/tst_creationtime.cpp b/tests/benchmarks/creationtime/tst_creationtime.cpp
index fa72aa86..9539ee1b 100644
--- a/tests/benchmarks/creationtime/tst_creationtime.cpp
+++ b/tests/benchmarks/creationtime/tst_creationtime.cpp
@@ -92,9 +92,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt
if (QFile::exists(filePath)) {
QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath);
break;
- } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) {
- QTest::newRow(qPrintable(name)) << QUrl(filePath);
- break;
+ } else {
+ filePath = QQmlFile::urlToLocalFileOrQrc(filePath);
+ if (!filePath.isEmpty() && QFile::exists(filePath)) {
+ QTest::newRow(qPrintable(name)) << QUrl(filePath);
+ break;
+ }
}
}
}