From ccc4fbdf3f31bcc564c989f077a84e8e1400ac60 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sun, 21 Oct 2012 21:49:43 +0200 Subject: test: Remove some QSKIP's from tst_QStyle Change-Id: Ic277889a75871a8bf72ab2eb2b97e6deeed498e9 Reviewed-by: Caroline Chao --- tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 43 +++++++++++++------------ 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'tests/auto/widgets') diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index 1bb87b1f32..e2a0f095a5 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -124,17 +124,25 @@ private slots: void testFusionStyle(); #endif void testWindowsStyle(); -#ifndef QT_NO_STYLE_WINDOWSXP +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSXP) void testWindowsXPStyle(); #endif +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) void testWindowsVistaStyle(); +#endif +#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(); -#if !defined(QT_NO_STYLE_WINDOWS) +#if !defined(QT_NO_STYLE_WINDOWS) && !defined(QT_NO_STYLE_FUSION) void progressBarChangeStyle(); #endif void defaultFont(); @@ -384,16 +392,13 @@ void tst_QStyle::testWindowsStyle() wstyle.drawControl(QStyle::CE_ProgressBar, &pb, &painter, 0); } -#ifndef QT_NO_STYLE_WINDOWSXP +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSXP) +// WindowsXP style void tst_QStyle::testWindowsXPStyle() { -#ifdef Q_OS_WIN QWindowsXPStyle xpstyle; QVERIFY(testAllFunctions(&xpstyle)); lineUpLayoutTest(&xpstyle); -#else - QSKIP("No WindowsXP style"); -#endif } #endif @@ -411,9 +416,9 @@ QImage readImage(const QString &fileName) } +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) void tst_QStyle::testWindowsVistaStyle() { -#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) QWindowsVistaStyle vistastyle; QVERIFY(testAllFunctions(&vistastyle)); @@ -421,8 +426,8 @@ void tst_QStyle::testWindowsVistaStyle() testPainting(&vistastyle, "vista"); else if (QSysInfo::WindowsVersion == QSysInfo::WV_XP) testPainting(&vistastyle, "xp"); -#endif } +#endif void comparePixmap(const QString &filename, const QPixmap &pixmap) { @@ -530,33 +535,31 @@ qDebug("TEST PAINTING"); } +#ifdef Q_OS_MAC void tst_QStyle::testMacStyle() { -#ifdef Q_OS_MAC QMacStyle mstyle; QVERIFY(testAllFunctions(&mstyle)); -#endif } +#endif +#ifdef Q_OS_WINCE +// WindowsCEStyle style void tst_QStyle::testWindowsCEStyle() { -#if defined(Q_OS_WINCE) QWindowsCEStyle cstyle; QVERIFY(testAllFunctions(&cstyle)); -#else - QSKIP("No WindowsCEStyle style"); -#endif } +#endif +#ifdef Q_OS_WINCE_WM +// WindowsMobileStyle style void tst_QStyle::testWindowsMobileStyle() { -#if defined(Q_OS_WINCE_WM) QWindowsMobileStyle cstyle; QVERIFY(testAllFunctions(&cstyle)); -#else - QSKIP("No WindowsMobileStyle style"); -#endif } +#endif // Helper class... @@ -639,7 +642,7 @@ void tst_QStyle::pixelMetric() delete style; } -#if !defined(QT_NO_STYLE_WINDOWS) +#if !defined(QT_NO_STYLE_WINDOWS) && !defined(QT_NO_STYLE_FUSION) void tst_QStyle::progressBarChangeStyle() { //test a crashing situation (task 143530) -- cgit v1.2.3