summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-10 23:27:10 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-10 23:27:10 +0200
commitcbe332405aa22257d432f1797b325f5e57007c20 (patch)
tree0d817dc7ed2f3a2f6035f924a824d351420910c5 /tests/auto/widgets/styles
parentd2c6294bd5cc3c2e61aaa0c83bfd74941ced150e (diff)
parent67ca72796e23269451795baf9adde02a184a7b9e (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: configure mkspecs/macx-ios-clang/features/default_pre.prf mkspecs/macx-ios-clang/features/sdk.prf mkspecs/unsupported/freebsd-g++46/qplatformdefs.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp9
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 d4f398a61c..5c213fea04 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -930,17 +930,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;
}
}