summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qstyle
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-11-16 17:39:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-21 11:03:48 +0100
commit9bc49b0bca361646aac90cd00706588d3dcd66c9 (patch)
treef4de997044c6dd6d6bc0e5dc121851412aec4997 /tests/auto/widgets/styles/qstyle
parentf4a2352cd1efee9bbffe89e7d430b8be0cacc5bd (diff)
Made QFusionStyle internal
We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QFusionStyle directly. Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/widgets/styles/qstyle')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index e2a0f095a5..bec83e949c 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -71,10 +71,6 @@
#include <qmdiarea.h>
#include <qscrollarea.h>
-#ifndef Q_NO_STYLE_FUSION
-#include <qfusionstyle.h>
-#endif
-
#ifdef Q_OS_MAC
#include <QMacStyle>
#endif
@@ -372,9 +368,10 @@ bool tst_QStyle::testScrollBarSubControls(QStyle* style)
#ifndef QT_NO_STYLE_FUSION
void tst_QStyle::testFusionStyle()
{
- QFusionStyle fstyle;
- QVERIFY(testAllFunctions(&fstyle));
- lineUpLayoutTest(&fstyle);
+ QStyle *fstyle = QStyleFactory::create("Fusion");
+ QVERIFY(testAllFunctions(fstyle));
+ lineUpLayoutTest(fstyle);
+ delete fstyle;
}
#endif
@@ -649,14 +646,14 @@ void tst_QStyle::progressBarChangeStyle()
//where changing the styles and deleting a progressbar would crash
QWindowsStyle style1;
- QFusionStyle style2;
+ QStyle *style2 = QStyleFactory::create("Fusion");
QProgressBar *progress=new QProgressBar;
progress->setStyle(&style1);
progress->show();
- progress->setStyle(&style2);
+ progress->setStyle(style2);
QTest::qWait(100);
delete progress;
@@ -664,6 +661,7 @@ void tst_QStyle::progressBarChangeStyle()
QTest::qWait(100);
//before the correction, there would be a crash here
+ delete style2;
}
#endif