aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/pressandhold/data/dependencies.qml4
-rw-r--r--tests/auto/sanity/data/dependencies.qml4
-rw-r--r--tests/auto/sanity/tst_sanity.cpp18
-rw-r--r--tests/auto/snippets/data/dependencies.qml6
-rw-r--r--tests/auto/styles/data/dependencies.qml7
5 files changed, 32 insertions, 7 deletions
diff --git a/tests/auto/pressandhold/data/dependencies.qml b/tests/auto/pressandhold/data/dependencies.qml
new file mode 100644
index 00000000..13690bbc
--- /dev/null
+++ b/tests/auto/pressandhold/data/dependencies.qml
@@ -0,0 +1,4 @@
+import QtQuick 2.6
+import Qt.labs.controls 1.0
+
+Control { }
diff --git a/tests/auto/sanity/data/dependencies.qml b/tests/auto/sanity/data/dependencies.qml
new file mode 100644
index 00000000..13690bbc
--- /dev/null
+++ b/tests/auto/sanity/data/dependencies.qml
@@ -0,0 +1,4 @@
+import QtQuick 2.6
+import Qt.labs.controls 1.0
+
+Control { }
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index bc114d62..7f438721 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -267,14 +267,18 @@ static void addTestRows(QQmlEngine *engine, const QString &targetPath, const QSt
// the engine's import path. This way we can use QQmlComponent to load each QML file
// for benchmarking.
- QFileInfoList entries = QDir(QQC2_IMPORT_PATH + targetPath).entryInfoList(QStringList("*.qml"), QDir::Files);
+ QFileInfoList entries = QDir(QQC2_IMPORT_PATH "/" + targetPath).entryInfoList(QStringList("*.qml"), QDir::Files);
foreach (const QFileInfo &entry, entries) {
QString name = entry.baseName();
if (!skiplist.contains(name)) {
foreach (const QString &importPath, engine->importPathList()) {
- QString filePath = QDir(importPath + "/Qt/labs/" + targetPath).absoluteFilePath(entry.fileName());
+ QString name = entry.dir().dirName() + "/" + entry.fileName();
+ QString filePath = importPath + "/Qt/labs/" + targetPath + "/" + entry.fileName();
if (QFile::exists(filePath)) {
- QTest::newRow(qPrintable(entry.dir().dirName() + "/" + entry.fileName())) << QUrl::fromLocalFile(filePath);
+ QTest::newRow(qPrintable(name)) << QUrl::fromLocalFile(filePath);
+ break;
+ } else if (QFile::exists(QQmlFile::urlToLocalFileOrQrc(filePath))) {
+ QTest::newRow(qPrintable(name)) << QUrl(filePath);
break;
}
}
@@ -305,10 +309,10 @@ void tst_Sanity::attachedObjects()
void tst_Sanity::attachedObjects_data()
{
QTest::addColumn<QUrl>("url");
- addTestRows(&engine, "/calendar");
- addTestRows(&engine, "/controls");
- addTestRows(&engine, "/controls/material", QStringList() << "Ripple" << "SliderHandle");
- addTestRows(&engine, "/controls/universal");
+ addTestRows(&engine, "calendar");
+ addTestRows(&engine, "controls");
+ addTestRows(&engine, "controls/material", QStringList() << "Ripple" << "SliderHandle");
+ addTestRows(&engine, "controls/universal");
}
QTEST_MAIN(tst_Sanity)
diff --git a/tests/auto/snippets/data/dependencies.qml b/tests/auto/snippets/data/dependencies.qml
new file mode 100644
index 00000000..15fa1a9a
--- /dev/null
+++ b/tests/auto/snippets/data/dependencies.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.6
+import QtQuick.Layouts 1.3
+import Qt.labs.controls 1.0
+import Qt.labs.calendar 1.0
+
+Control { }
diff --git a/tests/auto/styles/data/dependencies.qml b/tests/auto/styles/data/dependencies.qml
new file mode 100644
index 00000000..310fbf40
--- /dev/null
+++ b/tests/auto/styles/data/dependencies.qml
@@ -0,0 +1,7 @@
+import QtTest 1.0
+import QtQuick 2.6
+import Qt.labs.controls 1.0
+import Qt.labs.controls.material 1.0
+import Qt.labs.controls.universal 1.0
+
+Control { }