aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/sanity/tst_sanity.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-07 12:32:46 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-12 06:57:08 +0000
commit1b06792a30b2914c59b1fb5816cb2f6abf601c63 (patch)
treeffb78e39ecbf0a8941411bb4c065e11d9be13acd /tests/auto/sanity/tst_sanity.cpp
parent797b177bd2201400e2aa99a7bb645a373c0b1214 (diff)
Update tst_sanity for multiple styles
Change-Id: I8e4cf5eb65e6e5f0196704f707c9b9764e36a75b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/sanity/tst_sanity.cpp')
-rw-r--r--tests/auto/sanity/tst_sanity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index ac5bcfba..2f0753df 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -142,7 +142,7 @@ void tst_Sanity::initTestCase()
it.next();
QFileInfo info = it.fileInfo();
if (info.dir().dirName() != QStringLiteral("snippets") && info.dir().dirName() != QStringLiteral("designer"))
- files.insert(info.baseName(), info.filePath());
+ files.insert(info.dir().dirName() + "/" + info.fileName(), info.filePath());
}
}
@@ -259,8 +259,8 @@ void tst_Sanity::attachedObjects()
QVERIFY(object.data());
foreach (QObject *object, *qt_qobjects) {
QString className = object->metaObject()->className();
- if (className.endsWith("Attached"))
- QVERIFY2(!classNames.contains(className), qPrintable(QString("Multiple instances of attached type %1").arg(className)));
+ if (className.endsWith("Attached") || className.endsWith("Style"))
+ QVERIFY2(!classNames.contains(className), qPrintable(QString("Multiple %1 instances").arg(className)));
classNames.insert(className);
}
}