From 66285fd4954b061a5f912f690704c0bdcadf5c98 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Fri, 7 Aug 2020 12:32:33 +0300 Subject: [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. Pick-to: 5.15 Change-Id: If0e6615999019cf1869a237056d41e35b5be12f1 Reviewed-by: Assam Boudjelthia --- src/qmltest/quicktest.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/qmltest/quicktest.cpp') diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index da4644f8aa..5962af8569 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -457,17 +457,18 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch } #endif -#if defined(Q_OS_ANDROID) - if (testPath.isEmpty()) - testPath = QLatin1String(":/"); -#endif - // Determine where to look for the test data. if (testPath.isEmpty() && sourceDir) { const QString s = QString::fromLocal8Bit(sourceDir); 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 -- cgit v1.2.3