diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp b/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp index 8405c98b..67aeb586 100644 --- a/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp +++ b/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp @@ -110,7 +110,12 @@ void tst_customcontrolsstyle::style() void tst_customcontrolsstyle::changeStyle() { qputenv("QT_QUICK_CONTROLS_1_STYLE", "Base"); - qputenv("QML2_IMPORT_PATH", QFile::encodeName(directory())); + QByteArray importPath = qgetenv("QML2_IMPORT_PATH"); + if (importPath.isEmpty()) + importPath = QFile::encodeName(directory()); + else + importPath.prepend(QFile::encodeName(directory()) + QDir::listSeparator().toLatin1()); + qputenv("QML2_IMPORT_PATH", importPath); QQmlEngine engine; |