diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-08-07 12:32:33 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-10-14 09:47:03 +0000 |
commit | 7f87b07cf393707d448b0fa515a33b90c79fc584 (patch) | |
tree | a1e2f684cd51a84b2bfd1046c11bb58d4a50c692 | |
parent | dfa0948e936aad3ea823427d5b015c4d906c7113 (diff) |
[Fix] Use the sourceDir if specified
Android is passing the test path via QUICK_TEST_SOURCE_DIR but it was
set
to ":/" no matter what.
Change-Id: If0e6615999019cf1869a237056d41e35b5be12f1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 66285fd4954b061a5f912f690704c0bdcadf5c98)
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
-rw-r--r-- | src/qmltest/quicktest.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index cfc9221b20..312769b8d3 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -457,7 +457,7 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch } #endif -#if defined(Q_OS_ANDROID) || defined(Q_OS_WINRT) +#if defined(Q_OS_WINRT) if (testPath.isEmpty()) testPath = QLatin1String(":/"); #endif @@ -468,6 +468,12 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch if (QFile::exists(s)) testPath = s; } + +#if defined(Q_OS_ANDROID) + if (testPath.isEmpty()) + testPath = QLatin1String(":/"); +#endif + if (testPath.isEmpty()) { QDir current = QDir::current(); #ifdef Q_OS_WIN |