aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index 2e32a60b2d..1c69cee456 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -203,8 +203,11 @@ int quick_test_main(int argc, char **argv, const char *name, quick_test_viewport
}
// Determine where to look for the test data.
- if (testPath.isEmpty() && sourceDir)
- testPath = QString::fromLocal8Bit(sourceDir);
+ if (testPath.isEmpty() && sourceDir) {
+ const QString s = QString::fromLocal8Bit(sourceDir);
+ if (QFile::exists(s))
+ testPath = s;
+ }
if (testPath.isEmpty()) {
QDir current = QDir::current();
#ifdef Q_OS_WIN