aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/tst_qtgraphicaleffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tst_qtgraphicaleffects.cpp')
-rw-r--r--tests/auto/tst_qtgraphicaleffects.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/tst_qtgraphicaleffects.cpp b/tests/auto/tst_qtgraphicaleffects.cpp
index 0f0e1df..7f26b01 100644
--- a/tests/auto/tst_qtgraphicaleffects.cpp
+++ b/tests/auto/tst_qtgraphicaleffects.cpp
@@ -89,8 +89,12 @@ void tst_qtgraphicaleffects::initTestCase()
{
QString import;
+ QString qmlImportPath = qgetenv("QML2_IMPORT_PATH");
+ if (qmlImportPath.isEmpty() || !QFile::exists(qmlImportPath))
+ qmlImportPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
+
// Allow the test to work whether or not the module is yet installed.
- if (QFile::exists(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + "/QtGraphicalEffects")) {
+ if (QFile::exists(qmlImportPath + "/QtGraphicalEffects")) {
// Module is installed - import it the nice way
import = "QtGraphicalEffects";
}