aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-05 18:43:30 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-02-10 09:27:06 +0100
commit63bfaae1f527a8f6de34e76dfd1282cd7e22d989 (patch)
treef280c4b17993ffe647ba5cf13c7f8d159acb6277 /tests/auto
parent026f8f4df59b641bcafca7bd392f5efefd795898 (diff)
Support and prefer QML_IMPORT_PATH over QML2_IMPORT_PATH
The 2 is meaningless. Task-number: QTBUG-85064 Change-Id: I9f140155d274c691b5eab1285d9b7153f9f93a87 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index 92565cc591..bfa836f92c 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -64,13 +64,13 @@ void tst_QQmlImport::cleanup()
void tst_QQmlImport::envResourceImportPath()
{
- const bool hadEnv = qEnvironmentVariableIsSet("QML2_IMPORT_PATH");
- const QByteArray oldEnv = hadEnv ? qgetenv("QML2_IMPORT_PATH") : QByteArray();
+ const bool hadEnv = qEnvironmentVariableIsSet("QML_IMPORT_PATH");
+ const QByteArray oldEnv = hadEnv ? qgetenv("QML_IMPORT_PATH") : QByteArray();
auto guard = qScopeGuard([&] {
if (hadEnv)
- qputenv("QML2_IMPORT_PATH", oldEnv);
+ qputenv("QML_IMPORT_PATH", oldEnv);
else
- qunsetenv("QML2_IMPORT_PATH");
+ qunsetenv("QML_IMPORT_PATH");
});
const QStringList envPaths({
@@ -80,7 +80,7 @@ void tst_QQmlImport::envResourceImportPath()
directory()
});
- qputenv("QML2_IMPORT_PATH", envPaths.join(QDir::listSeparator()).toUtf8());
+ qputenv("QML_IMPORT_PATH", envPaths.join(QDir::listSeparator()).toUtf8());
QQmlImportDatabase importDb(nullptr);
const QStringList importPaths = importDb.importPathList();