diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-09 03:04:15 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-09 03:04:15 +0100 |
commit | 5c8530c1fc4b9a6e52043353b97bfeba9900dc7a (patch) | |
tree | 2a468c428654c488d36f05d8931472b1fccfd4cd | |
parent | dbddc98658a8d1dc407ff0eb7d40558e99d831c7 (diff) | |
parent | 6ffa20bc5fb4ee1c556ab09a15e6e2be3b011fb9 (diff) | |
download | qtgraphicaleffects-5c8530c1fc4b9a6e52043353b97bfeba9900dc7a.tar.gz |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I08533cfea5e36c30e5c27b9fa19ec8c681b3bf9f
-rw-r--r-- | tests/auto/auto.pro | 3 | ||||
-rw-r--r-- | tests/auto/dummy.qml | 6 | ||||
-rw-r--r-- | tests/auto/tst_qtgraphicaleffects.cpp | 6 |
3 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 711d2ac..df22767 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -6,3 +6,6 @@ QT += qml testlib quick TARGET = tst_qtgraphicaleffects SOURCES += tst_qtgraphicaleffects.cpp + +DISTFILES += \ + dummy.qml diff --git a/tests/auto/dummy.qml b/tests/auto/dummy.qml new file mode 100644 index 0000000..17ba150 --- /dev/null +++ b/tests/auto/dummy.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + +} 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"; } |