From 537efea52b43c9b8f4fdb12121ac6d0263be21fe Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 16 Nov 2012 16:54:43 +0100 Subject: Made QWindowsVistaStyle internal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/auto/widgets/styles/qstyle') 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 -#include #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 -- cgit v1.2.3