summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qstyle
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-11-16 16:54:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-21 16:36:50 +0100
commit537efea52b43c9b8f4fdb12121ac6d0263be21fe (patch)
treebb9e8b67affe3e432adafdb0f6f883dafc4be6f4 /tests/auto/widgets/styles/qstyle
parent146f63bea487dbc4d6af34b56fa382f5a6a18e82 (diff)
Made QWindowsVistaStyle 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 and even merging style implementations (XP & Vista) later on, without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsVistaStyle directly. Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests/auto/widgets/styles/qstyle')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index bec83e949c..73dec7d566 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -77,7 +77,6 @@
#ifdef Q_OS_WIN
#include <QWindowsXPStyle>
-#include <QWindowsVistaStyle>
#endif
#ifdef Q_OS_WINCE
@@ -416,13 +415,14 @@ QImage readImage(const QString &fileName)
#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA)
void tst_QStyle::testWindowsVistaStyle()
{
- QWindowsVistaStyle vistastyle;
- QVERIFY(testAllFunctions(&vistastyle));
+ QStyle *vistastyle = QStyleFactory::create("WindowsVista");
+ QVERIFY(testAllFunctions(vistastyle));
if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA)
- testPainting(&vistastyle, "vista");
+ testPainting(vistastyle, "vista");
else if (QSysInfo::WindowsVersion == QSysInfo::WV_XP)
- testPainting(&vistastyle, "xp");
+ testPainting(vistastyle, "xp");
+ delete vistastyle;
}
#endif