summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/styles/qstyle/tst_qstyle.cpp')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp54
1 files changed, 3 insertions, 51 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index d4f398a61c..bafebc0dc6 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -56,20 +56,6 @@
#include <qlineedit.h>
#include <qmdiarea.h>
#include <qscrollarea.h>
-
-#ifdef Q_OS_WINCE_WM
-#include <windows.h>
-
-static bool qt_wince_is_smartphone() {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (QString::fromLatin1("Smartphone").utf16()), tszPlatform))
- return true;
- return false;
-}
-#endif
-
#include <qwidget.h>
// Make a widget frameless to prevent size constraints of title bars
@@ -90,7 +76,7 @@ public:
private:
bool testAllFunctions(QStyle *);
- bool testScrollBarSubControls(QStyle *);
+ bool testScrollBarSubControls();
void testPainting(QStyle *style, const QString &platform);
private slots:
void drawItemPixmap();
@@ -109,12 +95,6 @@ private slots:
#ifdef Q_OS_MAC
void testMacStyle();
#endif
-#ifdef Q_OS_WINCE
- void testWindowsCEStyle();
-#endif
-#ifdef Q_OS_WINCE_WM
- void testWindowsMobileStyle();
-#endif
void testStyleFactory();
void testProxyStyle();
void pixelMetric();
@@ -315,19 +295,11 @@ bool tst_QStyle::testAllFunctions(QStyle *style)
style->itemPixmapRect(QRect(0, 0, 100, 100), Qt::AlignHCenter, QPixmap(200, 200));
style->itemTextRect(QFontMetrics(qApp->font()), QRect(0, 0, 100, 100), Qt::AlignHCenter, true, QString("Test"));
- return testScrollBarSubControls(style);
+ return testScrollBarSubControls();
}
-bool tst_QStyle::testScrollBarSubControls(QStyle* style)
+bool tst_QStyle::testScrollBarSubControls()
{
- // WinCE SmartPhone doesn't have scrollbar subcontrols, so skip the rest of the test.
-#ifdef Q_OS_WINCE_WM
- if (style->inherits("QWindowsMobileStyle") && qt_wince_is_smartphone())
- return true;
-#else
- Q_UNUSED(style);
-#endif
-
QScrollBar scrollBar;
setFrameless(&scrollBar);
scrollBar.show();
@@ -522,26 +494,6 @@ void tst_QStyle::testMacStyle()
}
#endif
-#ifdef Q_OS_WINCE
-// WindowsCEStyle style
-void tst_QStyle::testWindowsCEStyle()
-{
- QStyle *cstyle = QStyleFactory::create("WindowsCE");
- QVERIFY(testAllFunctions(cstyle));
- delete cstyle;
-}
-#endif
-
-#ifdef Q_OS_WINCE_WM
-// WindowsMobileStyle style
-void tst_QStyle::testWindowsMobileStyle()
-{
- QStyle *cstyle = QStyleFactory::create("WindowsMobile");
- QVERIFY(testAllFunctions(cstyle));
- delete cstyle;
-}
-#endif
-
// Helper class...
MyWidget::MyWidget( QWidget* parent, const char* name )