diff options
-rw-r--r-- | tests/auto/sanity/BLACKLIST | 6 | ||||
-rw-r--r-- | tests/auto/sanity/tst_sanity.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/sanity/BLACKLIST b/tests/auto/sanity/BLACKLIST index 965790e7..b2b1a905 100644 --- a/tests/auto/sanity/BLACKLIST +++ b/tests/auto/sanity/BLACKLIST @@ -1,5 +1,3 @@ -[signalHandlers:material/CursorDelegate.qml] -* [attachedObjects:material/ComboBox.qml] * [attachedObjects:material/Switch.qml] @@ -8,7 +6,3 @@ * [attachedObjects:universal/ComboBox.qml] * -[functions:material/RectangularGlow.qml] -* -[anchors:material/RectangularGlow.qml] -* diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp index 2988c96c..ae442b4a 100644 --- a/tests/auto/sanity/tst_sanity.cpp +++ b/tests/auto/sanity/tst_sanity.cpp @@ -42,6 +42,7 @@ #include <QtQml/private/qqmljsparser_p.h> #include <QtQml/private/qqmljsast_p.h> #include <QtQml/private/qqmljsastvisitor_p.h> +#include <QtQml/private/qqmlmetatype_p.h> Q_GLOBAL_STATIC(QObjectList, qt_qobjects) @@ -138,12 +139,17 @@ private: void tst_Sanity::initTestCase() { + QQmlEngine engine; + QQmlComponent component(&engine); + component.setData(QString("import QtQuick.Templates 2.%1; Control { }").arg(QT_VERSION_MINOR - 7).toUtf8(), QUrl()); + + const QStringList qmlTypeNames = QQmlMetaType::qmlTypeNames(); + QDirIterator it(QQC2_IMPORT_PATH, QStringList() << "*.qml" << "*.js", QDir::Files, QDirIterator::Subdirectories); - const QStringList excludeDirs = QStringList() << QStringLiteral("snippets") << QStringLiteral("designer"); while (it.hasNext()) { it.next(); QFileInfo info = it.fileInfo(); - if (!excludeDirs.contains(info.dir().dirName())) + if (qmlTypeNames.contains(QStringLiteral("QtQuick.Templates/") + info.baseName())) files.insert(info.dir().dirName() + "/" + info.fileName(), info.filePath()); } } |