From 7d48fd1c831b84a688ac01958ace89d89f1b7423 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 20 Nov 2012 13:50:40 +0100 Subject: Made QWindowsMobileStyle 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 QWindowsMobileStyle directly. Change-Id: Id64f3dabff38db7864e235c79b2e9276379f4ba4 Reviewed-by: Andreas Holzammer Reviewed-by: Janne Anttila --- tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/widgets/styles') diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index 3864f22059..f5358b4e15 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -76,7 +76,6 @@ #endif #ifdef Q_OS_WINCE_WM -#include #include static bool qt_wince_is_smartphone() { @@ -336,7 +335,7 @@ bool tst_QStyle::testScrollBarSubControls(QStyle* style) { // WinCE SmartPhone doesn't have scrollbar subcontrols, so skip the rest of the test. #ifdef Q_OS_WINCE_WM - if (qobject_cast(style) && qt_wince_is_smartphone()) + if (style->inherits("QWindowsMobileStyle") && qt_wince_is_smartphone()) return true; #else Q_UNUSED(style); @@ -547,8 +546,9 @@ void tst_QStyle::testWindowsCEStyle() // WindowsMobileStyle style void tst_QStyle::testWindowsMobileStyle() { - QWindowsMobileStyle cstyle; + QStyle *cstyle = QStyleFactory::create("WindowsMobile"); QVERIFY(testAllFunctions(&cstyle)); + delete cstyle; } #endif -- cgit v1.2.3