diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-10-25 11:28:47 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-27 09:50:30 +0200 |
commit | 0c3d898a03b675c942e5c8a798b54676d3edf3ae (patch) | |
tree | 3e9ea3d434f80fc6bc43c9249c53a7d8b12cc180 /tests/auto/gui | |
parent | 3849455ee791d6f5cd4b87253732827d40e5d28a (diff) |
Tests: Remove Q_WS_QPA, qpa-sections from .profiles.
Compile without -qpa.
- Make Q_WS_QPA-#ifdefed sections the default in the code
- Replace some Q_WS_ by Q_OS_
- Add ### fixme for places that need checking
- Remove qpa conditionals from .pro files.
Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 12 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp | 6 | ||||
-rw-r--r-- | tests/auto/gui/painting/qprinter/tst_qprinter.cpp | 9 | ||||
-rw-r--r-- | tests/auto/gui/text/qcssparser/tst_qcssparser.cpp | 4 | ||||
-rw-r--r-- | tests/auto/gui/text/qfont/tst_qfont.cpp | 6 | ||||
-rw-r--r-- | tests/auto/gui/text/qstatictext/tst_qstatictext.cpp | 13 |
6 files changed, 16 insertions, 34 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 5ff764378a..98b8570b12 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -52,6 +52,7 @@ #include <qsplashscreen.h> #include <qplatformpixmap_qpa.h> +#include <private/qguiapplication_p.h> #include <private/qdrawhelper_p.h> #include <QSet> @@ -774,9 +775,8 @@ void tst_QPixmap::grabWidget() void tst_QPixmap::grabWindow() { -#ifdef Q_WS_QPA +// ### fixme: Check platforms QSKIP("QTBUG-20863 grabWindow is broken on most qpa backends"); -#endif #ifdef Q_OS_WINCE // We get out of memory, if the desktop itself is too big. if (QApplication::desktop()->width() <= 480) @@ -1083,10 +1083,6 @@ void tst_QPixmap::fromWinHICON() void tst_QPixmap::onlyNullPixmapsOutsideGuiThread() { -#ifdef Q_WS_QPA - QSKIP("QTBUG-20864 can't determine if threaded pixmaps are available for qpa"); -#endif -#if !defined(Q_WS_WIN) && !defined(Q_WS_MAC) class Thread : public QThread { public: @@ -1108,10 +1104,12 @@ void tst_QPixmap::onlyNullPixmapsOutsideGuiThread() QVERIFY(pixmap2.isNull()); } }; + if (QGuiApplicationPrivate::platform_integration->hasCapability(QPlatformIntegration::ThreadedPixmaps)) + QSKIP("This platform supports threaded pixmaps."); + Thread thread; thread.start(); thread.wait(); -#endif // !defined(Q_WS_WIN) && !defined(Q_WS_MAC) } void tst_QPixmap::refUnref() diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index bdcfb00ba1..4f6c7defda 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -55,7 +55,7 @@ class tst_QClipboard : public QObject { Q_OBJECT private slots: -#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA) && !defined(QT_NO_PROCESS) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC)) && !defined(QT_NO_PROCESS) void copy_exit_paste(); #endif void capabiliyFunctions(); @@ -191,14 +191,14 @@ void tst_QClipboard::testSignals() // This test does not make sense on X11 and embedded, as copied data disappears // from the clipboard when the application exits. It's still possible to test // copy/paste - just keep the apps running. -#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA) && !defined(QT_NO_PROCESS) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC)) && !defined(QT_NO_PROCESS) void tst_QClipboard::copy_exit_paste() { if (!nativeClipboardWorking()) QSKIP("Native clipboard not working in this setup"); const QStringList stringArgument = QStringList() << "Test string."; QCOMPARE(QProcess::execute("copier/copier", stringArgument), 0); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // The Pasteboard needs a moment to breathe (at least on older Macs). QTest::qWait(100); #endif diff --git a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp index 43524649ae..995f4ab113 100644 --- a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp +++ b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp @@ -82,9 +82,9 @@ private slots: void testSetOptions(); void testMargins_data(); void testMargins(); -#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA) && !defined(Q_OS_MAC) +#ifdef Q_OS_WIN void testNonExistentPrinter(); -#endif +#endif // Q_OS_WIN void testPageSetupDialog(); void testMulitpleSets_data(); void testMulitpleSets(); @@ -384,8 +384,7 @@ void tst_QPrinter::testMargins() delete painter; } -// QPrinter::testNonExistentPrinter() is not relevant for some platforms. -#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA) && !defined(Q_OS_MAC) +#ifdef Q_OS_WIN void tst_QPrinter::testNonExistentPrinter() { QPrinter printer; @@ -416,7 +415,7 @@ void tst_QPrinter::testNonExistentPrinter() QVERIFY(!painter.begin(&printer)); } -#endif +#endif // Q_OS_WIN void tst_QPrinter::testMulitpleSets_data() { diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index 822b5275da..1166c014fa 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -1593,12 +1593,10 @@ void tst_QCssParser::extractFontFamily() extractor.extractFont(&fnt, &adjustment); QFontInfo info(fnt); -#ifdef Q_WS_QPA // Note, we have to QSKIP rather than QEXPECT_FAIL because font lookup is broken // such that it may work or not work depending on the order in which fonts were - // loaded from disk + // loaded from disk: ### fixme: Check platforms QSKIP("QTBUG-20986 may fail on qpa"); -#endif QTEST(info.family(), "expectedFamily"); } diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 3566342f00..a949c91362 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -80,9 +80,7 @@ private slots: void italicOblique(); void insertAndRemoveSubstitutions(); void serializeSpacing(); -#if !defined(Q_WS_QWS) && !defined(Q_WS_QPA) void lastResortFont(); -#endif #if defined(Q_WS_MAC) void styleName(); #endif @@ -611,13 +609,13 @@ void tst_QFont::serializeSpacing() // QFont::lastResortFont() may abort with qFatal() on QWS/QPA // if absolutely no font is found. Just as ducumented for QFont::lastResortFont(). // This happens on our CI machines which run QWS autotests. -#if !defined(Q_WS_QWS) && !defined(Q_WS_QPA) +// ### fixme: Check platforms void tst_QFont::lastResortFont() { + QSKIP("QFont::lastResortFont() may abort with qFatal() on QPA, QTBUG-22325"); QFont font; QVERIFY(!font.lastResortFont().isEmpty()); } -#endif #if defined(Q_WS_MAC) void tst_QFont::styleName() diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp index 4bd50008db..05854440c6 100644 --- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp @@ -388,18 +388,7 @@ bool tst_QStaticText::supportsTransformations() const { QPixmap pm(10, 10); QPainter p(&pm); - QPaintEngine *engine = p.paintEngine(); - - QPaintEngine::Type type = engine->type(); - - if (type == QPaintEngine::OpenGL -#if !defined(Q_WS_WIN) && !defined(Q_WS_X11) && !defined(Q_WS_MAC) && !defined(Q_WS_QPA) - || type == QPaintEngine::Raster -#endif - ) - return false; - - return true; + return p.paintEngine()->type() != QPaintEngine::OpenGL; } void tst_QStaticText::rotatedPainter() |