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>
#include <qsplashscreen.h>
#include <qplatformpixmap_qpa.h>
+#include <private/qguiapplication_p.h>
#include <private/qdrawhelper_p.h>
#include <QSet>
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)
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:
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()
{
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();
// 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
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();
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;
QVERIFY(!painter.begin(&printer));
}
-#endif
+#endif // Q_OS_WIN
void tst_QPrinter::testMulitpleSets_data()
{
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");
}
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
// 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()
{
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()
wince*|!contains(QT_CONFIG, accessibility):SUBDIRS -= qaccessibility
-!mac|qpa: SUBDIRS -= \
+!mac: SUBDIRS -= \
macgui \
macnativeevents \
- macplist \
+ macplist
!embedded|wince*: SUBDIRS -= \
qdirectpainter \
# Input
SOURCES += main.cpp
+QT += widgets
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
int main(int argc, char **argv)
{
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);
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
}
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
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
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
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
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
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);
}
CONFIG += testcase
TARGET = tst_qsound
SOURCES += tst_qsound.cpp
-QT += testlib
+QT += testlib widgets
wince* {
deploy.files += 4.wav
#include <QtTest/QtTest>
-#include <QtGui>
+#include <QtWidgets>
class tst_QSound : public QObject
{
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();
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);
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 {
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
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();
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
#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());
#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);
}
// 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
#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
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 );
#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);
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