diff options
author | Hannah von Reth <hannah.vonreth@kdab.com> | 2016-04-29 12:42:37 +0200 |
---|---|---|
committer | Hannah von Reth <hannah.vonreth@kdab.com> | 2016-06-06 13:12:14 +0000 |
commit | ca434d0c209c692441e775528e657a1ba9c4648d (patch) | |
tree | 4d0e83abbe14efe816877034ea335d4910f7fcd8 /tests/auto/widgets/styles | |
parent | 62091be85ccfc0d967c73b881d9134a75cb939c9 (diff) |
Enable testStyleOptionInit for all styles and fix affected styles.
Change-Id: I7cb759445342ecb58d5187ddd4a22e41fdea084a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r-- | tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index 46b6fcca82..361a7e7ed4 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -949,17 +949,14 @@ private: void tst_QStyle::testStyleOptionInit() { QStringList keys = QStyleFactory::keys(); - QVector<QStyle*> styles; - styles.reserve(keys.size() + 1); - - styles << new QCommonStyle(); + keys.prepend(QString()); // QCommonStyle marker - Q_FOREACH (QStyle *style, styles) { + Q_FOREACH (const QString &key, keys) { + QStyle* style = key.isEmpty() ? new QCommonStyle : QStyleFactory::create(key); TestStyleOptionInitProxy testStyle; testStyle.setBaseStyle(style); testAllFunctions(style); QVERIFY(!testStyle.invalidOptionsDetected); - delete style; } } |