diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2012-11-20 13:50:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-23 10:08:10 +0100 |
commit | 7d48fd1c831b84a688ac01958ace89d89f1b7423 (patch) | |
tree | ac1ca298f6439da2a24d1c8e28ff93ca6dcae9b5 /tests/auto/widgets/styles | |
parent | 4fb0e52515d3f65aa335b9d5df8349d33535d434 (diff) |
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 <andreas.holzammer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r-- | tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 <QWindowsMobileStyle> #include <windows.h> 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<QWindowsMobileStyle*>(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 |