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>bb10
parent
3849455ee7
commit
0c3d898a03
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ SUBDIRS=\
|
|||
|
||||
wince*|!contains(QT_CONFIG, accessibility):SUBDIRS -= qaccessibility
|
||||
|
||||
!mac|qpa: SUBDIRS -= \
|
||||
!mac: SUBDIRS -= \
|
||||
macgui \
|
||||
macnativeevents \
|
||||
macplist \
|
||||
macplist
|
||||
|
||||
!embedded|wince*: SUBDIRS -= \
|
||||
qdirectpainter \
|
||||
|
|
|
|||
|
|
@ -9,3 +9,4 @@ INCLUDEPATH += .
|
|||
|
||||
# Input
|
||||
SOURCES += main.cpp
|
||||
QT += widgets
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -125,9 +125,6 @@ static void VERIFY_COLOR(const QRegion ®ion, const QColor &color)
|
|||
const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(),
|
||||
rect.left(), rect.top(),
|
||||
rect.width(), rect.height());
|
||||
#ifdef Q_WS_QPA
|
||||
QEXPECT_FAIL("", "QTBUG-20863 QPixmap::grabWindow unimplemented for qpa", Abort);
|
||||
#endif
|
||||
QCOMPARE(pixmap.size(), rect.size());
|
||||
QPixmap expectedPixmap(pixmap); /* ensure equal formats */
|
||||
expectedPixmap.fill(color);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ QT += core-private gui-private
|
|||
|
||||
SOURCES += tst_qfontdialog.cpp
|
||||
|
||||
mac:!qpa {
|
||||
OBJECTIVE_SOURCES += tst_qfontdialog_mac_helpers.mm
|
||||
LIBS += -framework Cocoa
|
||||
mac {
|
||||
# ### fixme
|
||||
# OBJECTIVE_SOURCES += tst_qfontdialog_mac_helpers.mm
|
||||
# LIBS += -framework Cocoa
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ TARGET = tst_qgraphicsgridlayout
|
|||
QT += widgets testlib
|
||||
SOURCES += tst_qgraphicsgridlayout.cpp
|
||||
CONFIG += parallel_test
|
||||
contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
|
||||
# ### fixme: QTBUG-20756 crashes on xcb
|
||||
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ DEFINES += QT_NO_CAST_TO_ASCII
|
|||
|
||||
win32:!wince*: LIBS += -lUser32
|
||||
|
||||
contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
|
||||
# ### fixme: QTBUG-20756 crashes on xcb
|
||||
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
|
||||
|
|
|
|||
|
|
@ -6,4 +6,5 @@ QT += core-private gui-private
|
|||
|
||||
SOURCES += tst_qgraphicsproxywidget.cpp
|
||||
|
||||
contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
|
||||
# ### fixme: QTBUG-20756 crashes on xcb
|
||||
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
|
||||
|
|
|
|||
|
|
@ -18,4 +18,5 @@ wince* {
|
|||
DEFINES += SRCDIR=\\\".\\\"
|
||||
}
|
||||
|
||||
contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
|
||||
# ### fixme: QTBUG-20756 crashes on xcb
|
||||
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ QT += core-private gui-private
|
|||
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
|
||||
DEFINES += QT_NO_CAST_TO_ASCII
|
||||
|
||||
contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
|
||||
# ### fixme: QTBUG-20756 crashes on xcb
|
||||
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
|
||||
|
|
|
|||
|
|
@ -240,13 +240,12 @@ void tst_QAction::setStandardKeys()
|
|||
QVERIFY(act.shortcut() == act.shortcuts().first());
|
||||
|
||||
QList<QKeySequence> expected;
|
||||
#if defined(Q_WS_MAC)
|
||||
#if defined(Q_OS_MAC)
|
||||
expected << QKeySequence("CTRL+C");
|
||||
#elif defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
|
||||
expected << QKeySequence("CTRL+C") << QKeySequence("CTRL+INSERT");
|
||||
#else
|
||||
expected << QKeySequence("CTRL+C") << QKeySequence("F16") << QKeySequence("CTRL+INSERT");
|
||||
expected << QKeySequence("CTRL+C") << QKeySequence("CTRL+INSERT");
|
||||
#endif
|
||||
// Qt/Embedded on Windows: expected << QKeySequence("CTRL+C") << QKeySequence("F16") << QKeySequence("CTRL+INSERT");
|
||||
QVERIFY(act.shortcuts() == expected);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
CONFIG += testcase
|
||||
TARGET = tst_qsound
|
||||
SOURCES += tst_qsound.cpp
|
||||
QT += testlib
|
||||
QT += testlib widgets
|
||||
|
||||
wince* {
|
||||
deploy.files += 4.wav
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
|
||||
class tst_QSound : public QObject
|
||||
{
|
||||
|
|
@ -59,9 +59,7 @@ private slots:
|
|||
|
||||
void tst_QSound::checkFinished()
|
||||
{
|
||||
#if defined(Q_WS_QPA)
|
||||
QSKIP("QSound is not implemented on Lighthouse");
|
||||
#else
|
||||
QSound sound(SRCDIR"4.wav");
|
||||
sound.setLoops(3);
|
||||
sound.play();
|
||||
|
|
@ -71,17 +69,14 @@ void tst_QSound::checkFinished()
|
|||
QEXPECT_FAIL("", "QSound buggy on embedded (task QTBUG-157)", Abort);
|
||||
#endif
|
||||
QVERIFY(sound.isFinished() );
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QSound::staticPlay()
|
||||
{
|
||||
QSKIP("Test disabled -- only for manual purposes");
|
||||
#if !defined(Q_WS_QPA)
|
||||
// Check that you hear sound with static play also.
|
||||
QSound::play(SRCDIR"4.wav");
|
||||
QTest::qWait(2000);
|
||||
#endif
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QSound);
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ aix-g++*:QMAKE_CXXFLAGS+=-fpermissive
|
|||
|
||||
CONFIG += x11inc
|
||||
|
||||
mac:!qpa {
|
||||
LIBS += -framework Security -framework AppKit -framework Carbon
|
||||
OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm
|
||||
mac {
|
||||
# ### fixme
|
||||
# LIBS += -framework Security -framework AppKit -framework Carbon
|
||||
# OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm
|
||||
}
|
||||
|
||||
x11 {
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ private slots:
|
|||
|
||||
void setClearAndResizeMask();
|
||||
void maskedUpdate();
|
||||
#if defined(Q_WS_X11) || (defined(Q_WS_WIN) && !defined(Q_OS_WINCE_WM)) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
|
||||
#if !defined(Q_OS_WINCE_WM)
|
||||
void syntheticEnterLeave();
|
||||
void taskQTBUG_4055_sendSyntheticEnterLeave();
|
||||
#endif
|
||||
|
|
@ -1931,8 +1931,9 @@ void tst_QWidget::showMaximized()
|
|||
layouted.showNormal();
|
||||
QVERIFY(!(layouted.windowState() & Qt::WindowMaximized));
|
||||
|
||||
#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE) && !defined(Q_WS_QPA)
|
||||
//embedded may choose a different size to fit on the screen.
|
||||
// ### fixme: embedded may choose a different size to fit on the screen.
|
||||
// Check platforms (QTBUG-22326)
|
||||
#if 0
|
||||
QCOMPARE(layouted.size(), layouted.sizeHint());
|
||||
#endif
|
||||
layouted.showMaximized();
|
||||
|
|
@ -2008,8 +2009,8 @@ void tst_QWidget::showFullScreen()
|
|||
layouted.showNormal();
|
||||
QVERIFY(!(layouted.windowState() & Qt::WindowFullScreen));
|
||||
|
||||
#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE) && !defined(Q_WS_QPA)
|
||||
//embedded may choose a different size to fit on the screen.
|
||||
// ### fixme: embedded may choose a different size to fit on the screen. (QTBUG-22326)
|
||||
#if 0
|
||||
QCOMPARE(layouted.size(), layouted.sizeHint());
|
||||
#endif
|
||||
|
||||
|
|
@ -3278,9 +3279,8 @@ void tst_QWidget::widgetAt()
|
|||
#if defined(Q_OS_WINCE)
|
||||
QEXPECT_FAIL("", "Windows CE does only support rectangular regions", Continue); //See also task 147191
|
||||
#endif
|
||||
#if defined(Q_WS_QPA)
|
||||
QEXPECT_FAIL("", "Window mask not implemented on Lighthouse", Continue);
|
||||
#endif
|
||||
/// ### fixme: Check platforms
|
||||
QEXPECT_FAIL("", "Window mask not implemented on Lighthouse QTBUG-22326", Continue);
|
||||
|
||||
QTRY_COMPARE(QApplication::widgetAt(100,100)->objectName(), w1->objectName());
|
||||
QTRY_COMPARE(QApplication::widgetAt(101,101)->objectName(), w2->objectName());
|
||||
|
|
@ -3297,9 +3297,8 @@ void tst_QWidget::widgetAt()
|
|||
#if defined(Q_OS_WINCE)
|
||||
QEXPECT_FAIL("", "Windows CE does only support rectangular regions", Continue); //See also task 147191
|
||||
#endif
|
||||
#if defined(Q_WS_QPA)
|
||||
QEXPECT_FAIL("", "Window mask not implemented on Lighthouse", Continue);
|
||||
#endif
|
||||
/// ### fixme: Check platforms
|
||||
QEXPECT_FAIL("", "Window mask not implemented on Lighthouse QTBUG-22326", Continue);
|
||||
QTRY_VERIFY(QApplication::widgetAt(100,100) == w1);
|
||||
QTRY_VERIFY(QApplication::widgetAt(101,101) == w2);
|
||||
|
||||
|
|
@ -8632,7 +8631,7 @@ void tst_QWidget::maskedUpdate()
|
|||
}
|
||||
|
||||
// Windows Mobile has no proper cursor support, so skip this test on that platform.
|
||||
#if defined(Q_WS_X11) || (defined(Q_WS_WIN) && !defined(Q_OS_WINCE_WM)) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
|
||||
#if !defined(Q_OS_WINCE_WM)
|
||||
void tst_QWidget::syntheticEnterLeave()
|
||||
{
|
||||
class MyWidget : public QWidget
|
||||
|
|
@ -8737,7 +8736,7 @@ void tst_QWidget::syntheticEnterLeave()
|
|||
#endif
|
||||
|
||||
// Windows Mobile has no proper cursor support, so skip this test on that platform.
|
||||
#if defined(Q_WS_X11) || (defined(Q_WS_WIN) && !defined(Q_OS_WINCE_WM)) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
|
||||
#if !defined(Q_OS_WINCE_WM)
|
||||
void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
|
||||
{
|
||||
class SELParent : public QWidget
|
||||
|
|
|
|||
|
|
@ -122,9 +122,8 @@ void tst_QSystemTrayIcon::getSetCheck()
|
|||
|
||||
void tst_QSystemTrayIcon::supportsMessages()
|
||||
{
|
||||
#ifdef Q_WS_QPA
|
||||
// ### fixme: Check platforms.
|
||||
QEXPECT_FAIL("", "QTBUG-20978 QSystemTrayIcon is unimplemented for qpa", Abort);
|
||||
#endif
|
||||
|
||||
#if !defined(Q_WS_QWS)
|
||||
QCOMPARE(QSystemTrayIcon::supportsMessages(), true );
|
||||
|
|
|
|||
|
|
@ -773,9 +773,9 @@ public:
|
|||
#ifndef Q_OS_WINCE_WM
|
||||
void tst_QMenu::task258920_mouseBorder()
|
||||
{
|
||||
#ifdef Q_WS_QPA
|
||||
// ### fixme: Check platforms
|
||||
QSKIP("QTBUG-20753 QCursor::setPos() / QTest::mouseMove() doesn't work on qpa");
|
||||
#endif
|
||||
|
||||
Menu258920 menu;
|
||||
// For styles which inherit from QWindowsStyle, styleHint(QStyle::SH_Menu_MouseTracking) is true.
|
||||
menu.setMouseTracking(true);
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ wince* {
|
|||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
||||
contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
|
||||
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20756 crashes on xcb
|
||||
|
|
|
|||
Loading…
Reference in New Issue