summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2020-06-05 09:24:37 +0200
committerLiang Qi <liang.qi@qt.io>2020-06-06 20:25:49 +0200
commit45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch)
tree363dfd46575d147206267d854ce14747157f432e /tests/auto/widgets/kernel
parentaa81b90738ce9faee5e433617c8bd243cb238729 (diff)
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r--tests/auto/widgets/kernel/qapplication/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qapplication/qapplication.pro2
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt8
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/test.pro8
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp15
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp3
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qwidget/CMakeLists.txt2
-rw-r--r--tests/auto/widgets/kernel/qwidget/qwidget.pro2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp104
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp20
-rw-r--r--tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp12
14 files changed, 36 insertions, 159 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/CMakeLists.txt
index 8e68089f5e..3bb7e31691 100644
--- a/tests/auto/widgets/kernel/qapplication/CMakeLists.txt
+++ b/tests/auto/widgets/kernel/qapplication/CMakeLists.txt
@@ -1,7 +1,5 @@
# Generated from qapplication.pro.
+add_subdirectory(desktopsettingsaware)
+add_subdirectory(modal)
add_subdirectory(test)
-if(NOT WINRT)
- add_subdirectory(desktopsettingsaware)
- add_subdirectory(modal)
-endif()
diff --git a/tests/auto/widgets/kernel/qapplication/qapplication.pro b/tests/auto/widgets/kernel/qapplication/qapplication.pro
index 21bfb50aee..5154c915cd 100644
--- a/tests/auto/widgets/kernel/qapplication/qapplication.pro
+++ b/tests/auto/widgets/kernel/qapplication/qapplication.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-!winrt: SUBDIRS = desktopsettingsaware modal
+SUBDIRS = desktopsettingsaware modal
test.depends += $$SUBDIRS
SUBDIRS += test
diff --git a/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt
index 40e612f0de..7f92e1cee8 100644
--- a/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt
+++ b/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt
@@ -29,14 +29,14 @@ extend_target(test CONDITION builtin_testdata
BUILTIN_TESTDATA
)
-#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID:
# SUBPROGRAMS = "desktopsettingsaware" "modal"
-#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID:
# TEST_HELPER_INSTALLS = "../debug/helper"
-#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID:
# TEST_HELPER_INSTALLS = "../release/helper"
-#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID:
# TEST_HELPER_INSTALLS = "../helper"
diff --git a/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
index 171ee1b273..304480f509 100644
--- a/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
+++ b/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
@@ -30,14 +30,14 @@ extend_target(tst_qapplication CONDITION builtin_testdata # special case
BUILTIN_TESTDATA
)
-#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID:
# SUBPROGRAMS = "desktopsettingsaware" "modal"
-#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID:
# TEST_HELPER_INSTALLS = "../debug/helper"
-#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID:
# TEST_HELPER_INSTALLS = "../release/helper"
-#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID:
# TEST_HELPER_INSTALLS = "../helper"
diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro
index 8ade4d8364..39b099261a 100644
--- a/tests/auto/widgets/kernel/qapplication/test/test.pro
+++ b/tests/auto/widgets/kernel/qapplication/test/test.pro
@@ -9,20 +9,20 @@ builtin_testdata: DEFINES += BUILTIN_TESTDATA
TESTDATA = ../test/test.pro ../tmp/README ../modal
-!android:!winrt: SUBPROGRAMS = desktopsettingsaware modal
+!android: SUBPROGRAMS = desktopsettingsaware modal
debug_and_release {
CONFIG(debug, debug|release) {
TARGET = ../../debug/tst_qapplication
- !android:!winrt: TEST_HELPER_INSTALLS = ../debug/helper
+ !android: TEST_HELPER_INSTALLS = ../debug/helper
for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../debug/$${file}"
} else {
TARGET = ../../release/tst_qapplication
- !android:!winrt: TEST_HELPER_INSTALLS = ../release/helper
+ !android: TEST_HELPER_INSTALLS = ../release/helper
for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../release/$${file}"
}
} else {
TARGET = ../tst_qapplication
- !android:!winrt: TEST_HELPER_INSTALLS = ../helper
+ !android: TEST_HELPER_INSTALLS = ../helper
for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}"
}
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index c9857b4379..b0689f5c16 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -241,9 +241,6 @@ public:
void tst_QApplication::alert()
{
-#ifdef Q_OS_WINRT
- QSKIP("WinRT does not support more than 1 native widget at the same time");
-#endif
int argc = 0;
QApplication app(argc, nullptr);
QApplication::alert(nullptr, 0);
@@ -811,9 +808,6 @@ public:
void tst_QApplication::closeAllWindows()
{
-#ifdef Q_OS_WINRT
- QSKIP("PromptOnCloseWidget does not work on WinRT - QTBUG-68297");
-#endif
int argc = 0;
QApplication app(argc, nullptr);
@@ -922,9 +916,6 @@ void tst_QApplication::libraryPaths()
expected = QSet<QString>(expected.constBegin(), expected.constEnd()).values();
expected.sort();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "On WinRT PluginsPath is outside of sandbox. QTBUG-68297", Abort);
-#endif
QVERIFY2(isPathListIncluded(actual, expected),
qPrintable("actual:\n - " + actual.join("\n - ") +
"\nexpected:\n - " + expected.join("\n - ")));
@@ -1032,9 +1023,6 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2()
<< QDir(QCoreApplication::applicationDirPath()).canonicalPath()
<< QDir(QDir::fromNativeSeparators(QString::fromLatin1(validPath))).canonicalPath();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "On WinRT PluginsPath is outside of sandbox. QTBUG-68297", Abort);
-#endif
QVERIFY2(isPathListIncluded(QCoreApplication::libraryPaths(), expected),
qPrintable("actual:\n - " + QCoreApplication::libraryPaths().join("\n - ") +
"\nexpected:\n - " + expected.join("\n - ")));
@@ -1753,9 +1741,6 @@ void tst_QApplication::focusMouseClick()
QSpontaneKeyEvent::setSpontaneous(&ev);
QVERIFY(ev.spontaneous());
qApp->notify(&w2, &ev);
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
-#endif
QTRY_COMPARE(QApplication::focusWidget(), &w2);
// now back to tab focus and click again (it already had focus) -> focus should stay
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index 45a35fe4f1..fd4ce89b56 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -282,9 +282,6 @@ void tst_QFormLayout::wrapping()
w.setWindowTitle(QTest::currentTestFunction());
w.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "setFixedWidth does not work on WinRT", Abort);
-#endif
QCOMPARE(le->geometry().y() > lbl->geometry().y(), true);
//TODO: additional tests covering different wrapping cases
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index c8fe1841c8..55116fe8c0 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -337,7 +337,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden()
{
-#if (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)) || defined(Q_OS_WINRT)
+#if (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED))
QSKIP("Test does not work on platforms which default to showMaximized()");
#endif
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 55738ca036..9df4e4c1ab 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -39,9 +39,6 @@ rhel-7.6
centos
opensuse-leap
ubuntu
-[windowState]
-# QTBUG-75270
-winrt
[syntheticEnterLeave]
macos # Can't move cursor (QTBUG-76312)
diff --git a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
index dc47e7d9d9..bf7544c393 100644
--- a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
+++ b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
@@ -51,7 +51,7 @@ extend_target(tst_qwidget CONDITION APPLE
${FWSecurity}
)
-extend_target(tst_qwidget CONDITION WIN32 AND NOT WINRT
+extend_target(tst_qwidget CONDITION WIN32
PUBLIC_LIBRARIES
gdi32
user32
diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro
index d3fbd6d0d9..98c0102d9f 100644
--- a/tests/auto/widgets/kernel/qwidget/qwidget.pro
+++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro
@@ -16,4 +16,4 @@ mac {
OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm
}
-win32:!winrt: QMAKE_USE += user32 gdi32
+win32: QMAKE_USE += user32 gdi32
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 365f64014a..a999ea05df 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -84,7 +84,7 @@
using namespace QTestPrivate;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
# include <QtCore/qt_windows.h>
# include <QtGui/private/qguiapplication_p.h>
#include <qpa/qplatformnativeinterface.h>
@@ -106,7 +106,7 @@ static HWND winHandleOf(const QWidget *w)
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
QSKIP("desktop is not visible, this test would fail");
-#else // Q_OS_WIN && !Q_OS_WINRT
+#else // Q_OS_WIN
# define Q_CHECK_PAINTEVENTS
#endif
@@ -121,7 +121,7 @@ bool macHasAccessToWindowsServer()
}
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
static inline void setWindowsAnimationsEnabled(bool enabled)
{
ANIMATIONINFO animation = { sizeof(ANIMATIONINFO), enabled };
@@ -134,10 +134,10 @@ static inline bool windowsAnimationsEnabled()
SystemParametersInfo(SPI_GETANIMATION, 0, &animation, 0);
return animation.iMinAnimate;
}
-#else // Q_OS_WIN && !Q_OS_WINRT
+#else // Q_OS_WIN
inline void setWindowsAnimationsEnabled(bool) {}
static inline bool windowsAnimationsEnabled() { return false; }
-#endif // !Q_OS_WIN || Q_OS_WINRT
+#endif // !Q_OS_WIN
template <class T>
static QByteArray msgComparisonFailed(T v1, const char *op, T v2)
@@ -192,7 +192,7 @@ private slots:
void appFocusWidgetWithFocusProxyLater();
void appFocusWidgetWhenLosingFocusProxy();
void explicitTabOrderWithComplexWidget();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
void activation();
#endif
void reparent();
@@ -269,7 +269,7 @@ private slots:
void subtractOpaqueSiblings();
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN)
void setGeometry_win();
#endif
@@ -339,7 +339,7 @@ private slots:
void quitOnCloseAttribute();
void moveRect();
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN)
void gdiPainting();
void paintOnScreenPossible();
#endif
@@ -577,7 +577,7 @@ void tst_QWidget::getSetCheck()
QCOMPARE(true, obj1.autoFillBackground());
var1.reset();
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN)
obj1.setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
const HWND handle = reinterpret_cast<HWND>(obj1.winId()); // explicitly create window handle
QVERIFY(GetWindowLong(handle, GWL_STYLE) & LONG(WS_POPUP));
@@ -1384,7 +1384,7 @@ void tst_QWidget::visible_setWindowOpacity()
QVERIFY( !testWidget->isVisible() );
testWidget->setWindowOpacity(0.5);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
QVERIFY(!::IsWindowVisible(winHandleOf(testWidget.data())));
#endif
testWidget->setWindowOpacity(1.0);
@@ -1574,7 +1574,7 @@ void tst_QWidget::mapFromAndTo()
subWindow2->setGeometry(75, 75, 100, 100);
subSubWindow->setGeometry(10, 10, 10, 10);
-#if !defined(Q_OS_QNX) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_QNX)
//update visibility
if (windowMinimized) {
if (!windowHidden) {
@@ -2276,7 +2276,7 @@ void tst_QWidget::explicitTabOrderWithComplexWidget()
QTRY_COMPARE(QApplication::focusWidget(), lineEditOne);
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
void tst_QWidget::activation()
{
Q_CHECK_PAINTEVENTS
@@ -2321,8 +2321,7 @@ void tst_QWidget::windowState()
QPoint pos;
QSize size = m_testWidgetSize;
if (QGuiApplicationPrivate::platformIntegration()->defaultWindowState(Qt::Widget)
- == Qt::WindowFullScreen
- || m_platform == QStringLiteral("winrt")) {
+ == Qt::WindowFullScreen) {
size = QGuiApplication::primaryScreen()->size();
} else {
pos = QPoint(10, 10);
@@ -2526,8 +2525,6 @@ void tst_QWidget::showFullScreen()
QSKIP("QTBUG-52974");
#endif
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT: This fails. QTBUG-68297");
QWidget plain;
QHBoxLayout *layout;
QWidget layouted;
@@ -2651,8 +2648,6 @@ void tst_QWidget::resizeEvent()
wTopLevel.resize(m_testWidgetSize);
wTopLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&wTopLevel));
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support resize", Abort);
QCOMPARE (wTopLevel.m_resizeEventCount, 1); // initial resize event before paint for toplevels
wTopLevel.hide();
QSize safeSize(640,480);
@@ -2683,9 +2678,6 @@ void tst_QWidget::showMinimized()
plain.showMinimized();
QVERIFY(plain.isMinimized());
QVERIFY(plain.isVisible());
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Winrt does not support move and resize", Abort);
-#endif
QVERIFY2(HighDpi::fuzzyCompare(plain.pos(), pos, m_fuzz),
qPrintable(HighDpi::msgPointMismatch(plain.pos(), pos)));
@@ -2845,15 +2837,11 @@ void tst_QWidget::showMinimizedKeepsFocus()
#ifdef Q_OS_MACOS
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
-#elif defined(Q_OS_WINRT)
- QEXPECT_FAIL("", "Winrt fails here - QTBUG-68297", Continue);
#endif
QTRY_COMPARE(window.focusWidget(), firstchild);
#ifdef Q_OS_MACOS
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
-#elif defined(Q_OS_WINRT)
- QEXPECT_FAIL("", "Winrt fails here - QTBUG-68297", Continue);
#endif
QTRY_COMPARE(QApplication::focusWidget(), firstchild);
}
@@ -2884,9 +2872,6 @@ void tst_QWidget::reparent()
parent.show();
childTLW.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "WinRT does not support more than 1 top level widget", Abort);
-#endif
QVERIFY(QTest::qWaitForWindowExposed(&parent));
parent.move(parentPosition);
@@ -2984,8 +2969,6 @@ void tst_QWidget::normalGeometry()
if (m_platform == QStringLiteral("wayland"))
QSKIP("Wayland: This fails. Figure out why.");
- else if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT: This fails. Figure out why - QTBUG-68297.");
QWidget parent;
parent.setWindowTitle("NormalGeometry parent");
QWidget *child = new QWidget(&parent);
@@ -3098,8 +3081,6 @@ void tst_QWidget::setGeometry()
tlw.setGeometry(tr);
child.setGeometry(cr);
tlw.showNormal();
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support setGeometry", Abort);
QTRY_COMPARE(tlw.geometry().size(), tr.size());
QCOMPARE(child.geometry(), cr);
@@ -3606,8 +3587,6 @@ void tst_QWidget::saveRestoreGeometry()
QVERIFY(QTest::qWaitForWindowExposed(&widget));
QApplication::processEvents();
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support move/resize", Abort);
QTRY_VERIFY2(HighDpi::fuzzyCompare(widget.pos(), position, m_fuzz),
qPrintable(HighDpi::msgPointMismatch(widget.pos(), position)));
QCOMPARE(widget.size(), size);
@@ -3785,9 +3764,6 @@ void tst_QWidget::restoreVersion1Geometry()
QVERIFY(QTest::qWaitForWindowExposed(&widget));
QTest::qWait(100);
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support restoreGeometry", Abort);
-
if (expectedWindowState == Qt::WindowNoState) {
QTRY_COMPARE(widget.size(), expectedSize);
QCOMPARE(widget.geometry(), expectedNormalGeometry);
@@ -3833,8 +3809,6 @@ void tst_QWidget::widgetAt()
QSKIP("Wayland: This fails. Figure out why.");
if (m_platform == QStringLiteral("offscreen"))
QSKIP("Platform offscreen does not support lower()/raise() or WindowMasks");
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT does not support more than 1 top level widget");
Q_CHECK_PAINTEVENTS
@@ -4136,8 +4110,6 @@ void tst_QWidget::optimizedResizeMove()
staticWidget.gotPaintEvent = false;
staticWidget.move(staticWidget.pos() + QPoint(10, 10));
QTest::qWait(20);
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support move/resize", Abort);
QCOMPARE(staticWidget.gotPaintEvent, false);
staticWidget.gotPaintEvent = false;
@@ -4241,8 +4213,6 @@ void tst_QWidget::optimizedResize_topLevel()
QTRY_VERIFY(topLevel.gotPaintEvent);
if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("offscreen"))
QSKIP("QTBUG-26424");
- else if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support move/resize", Abort);
QCOMPARE(topLevel.partial, true);
QCOMPARE(topLevel.paintedRegion, expectedUpdateRegion);
}
@@ -4349,8 +4319,6 @@ void tst_QWidget::setFixedSize()
QVERIFY(QTest::qWaitForWindowActive(&w));
if (m_platform == QStringLiteral("xcb"))
QSKIP("QTBUG-26424");
- else if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support move/resize", Abort);
QCOMPARE(w.size(), defaultSize + QSize(150,150));
}
@@ -4600,8 +4568,6 @@ void tst_QWidget::transientParent()
void tst_QWidget::showNativeChild()
{
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT does not support setGeometry");
QWidget topLevel;
topLevel.setGeometry(QRect(m_availableTopLeft + QPoint(100, 100), m_testWidgetSize));
topLevel.setWindowTitle(__FUNCTION__);
@@ -4780,8 +4746,6 @@ void tst_QWidget::update()
// widgets are transparent by default, so both should get repaints
{
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support setGeometry", Abort);
QApplication::processEvents();
QApplication::processEvents();
QCOMPARE(child.numPaintEvents, 1);
@@ -5023,8 +4987,6 @@ void tst_QWidget::scroll()
QCoreApplication::processEvents();
QRegion dirty(QRect(0, 0, w, 10));
dirty += QRegion(QRect(0, 10, 10, h - 10));
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT does not support move/resize", Abort);
QTRY_COMPARE(updateWidget.paintedRegion, dirty);
}
@@ -5186,8 +5148,6 @@ void tst_QWidget::setWindowGeometry()
{
if (m_platform == QStringLiteral("xcb"))
QSKIP("X11: Skip this test due to Window manager positioning issues.");
- else if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT does not support setWindowGeometry");
QFETCH(Rects, rects);
QFETCH(int, windowFlags);
@@ -5319,7 +5279,7 @@ void tst_QWidget::setWindowGeometry()
}
}
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN)
void tst_QWidget::setGeometry_win()
{
QWidget widget;
@@ -5340,7 +5300,7 @@ void tst_QWidget::setGeometry_win()
QVERIFY2(rt.top <= m_availableTopLeft.y(),
msgComparisonFailed(int(rt.top), "<=", m_availableTopLeft.y()));
}
-#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
+#endif // defined (Q_OS_WIN)
// Since X11 WindowManager operation are all async, and we have no way to know if the window
// manager has finished playing with the window geometry, this test can't be reliable on X11.
@@ -5356,8 +5316,6 @@ void tst_QWidget::windowMoveResize()
QSKIP("X11: Skip this test due to Window manager positioning issues.");
if (m_platform == QStringLiteral("wayland"))
QSKIP("Wayland: This fails. Figure out why.");
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT does not support move/resize");
QFETCH(Rects, rects);
QFETCH(int, windowFlags);
@@ -5681,8 +5639,6 @@ void tst_QWidget::moveChild()
QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry());
QTRY_COMPARE(child.r, QRegion(child.rect()));
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT does not support setGeometry (and we cannot use QEXPECT_FAIL because of VERIFY_COLOR)");
VERIFY_COLOR(child, child.rect(),
child.color);
VERIFY_COLOR(parent, QRegion(parent.rect()) - child.geometry(), parent.color);
@@ -5739,8 +5695,6 @@ void tst_QWidget::showAndMoveChild()
child.move(desktopDimensions.width()/2, desktopDimensions.height()/2);
QCoreApplication::processEvents();
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT does not support setGeometry (and we cannot use QEXPECT_FAIL because of VERIFY_COLOR)");
VERIFY_COLOR(child, child.rect(), Qt::blue);
VERIFY_COLOR(parent, QRegion(parent.rect()) - child.geometry(), Qt::red);
}
@@ -5831,8 +5785,6 @@ void tst_QWidget::multipleToplevelFocusCheck()
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("Window activation is not supported");
- else if (m_platform == QStringLiteral("winrt"))
- QSKIP("Winrt: Sometimes crashes in QTextLayout. - QTBUG-68297");
TopLevelFocusCheck w1;
TopLevelFocusCheck w2;
@@ -5991,8 +5943,6 @@ void tst_QWidget::setFocus()
testWidget->clearFocus();
child1.setFocus();
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT fails here - QTBUG-68297", Abort);
QVERIFY(!child1.hasFocus());
QCOMPARE(window.focusWidget(), &child1);
QCOMPARE(QApplication::focusWidget(), nullptr);
@@ -6692,8 +6642,6 @@ QByteArray EventRecorder::msgEventListMismatch(const EventList &expected, const
void tst_QWidget::childEvents()
{
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT: This fails. QTBUG-68297.");
EventRecorder::EventList expected;
// Move away the cursor; otherwise it might result in an enter event if it's
@@ -7092,8 +7040,6 @@ void tst_QWidget::renderInvisible()
{
if (m_platform == QStringLiteral("xcb"))
QSKIP("QTBUG-26424");
- if (m_platform == QStringLiteral("winrt"))
- QSKIP("WinRT: This fails. QTBUG-68297.");
QScopedPointer<QCalendarWidget> calendar(new QCalendarWidget);
calendar->move(m_availableTopLeft + QPoint(100, 100));
@@ -8042,8 +7988,6 @@ void tst_QWidget::hideOpaqueChildWhileHidden()
child.hide();
child2.hide();
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QTRY_COMPARE(w.r, QRegion(child.geometry()));
child.show();
@@ -8082,8 +8026,6 @@ void tst_QWidget::updateWhileMinimized()
// Make sure update requests are discarded until the widget is shown again.
widget.update(0, 0, 50, 50);
QTest::qWait(10);
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
int count = 0;
// mutter/GNOME Shell doesn't unmap when minimizing window.
// More details at https://gitlab.gnome.org/GNOME/mutter/issues/185
@@ -8655,8 +8597,6 @@ void tst_QWidget::doubleRepaint()
#if defined(Q_OS_QNX)
QEXPECT_FAIL("", "Platform does not support showMinimized()", Continue);
#endif
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QCOMPARE(widget.numPaintEvents, 0);
widget.numPaintEvents = 0;
@@ -8781,8 +8721,6 @@ void tst_QWidget::setMaskInResizeEvent()
QRegion expectedParentUpdate(0, 0, 100, 10); // Old testWidget area.
expectedParentUpdate += testWidget.geometry(); // New testWidget area.
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QTRY_COMPARE(w.paintedRegion, expectedParentUpdate);
QTRY_COMPARE(testWidget.paintedRegion, testWidget.mask());
@@ -9015,7 +8953,7 @@ void tst_QWidget::moveRect()
child.move(10, 10); // Don't crash.
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
class GDIWidget : public QDialog
{
Q_OBJECT
@@ -9082,7 +9020,7 @@ void tst_QWidget::paintOnScreenPossible()
w2.setAttribute(Qt::WA_PaintOnScreen);
QVERIFY(w2.testAttribute(Qt::WA_PaintOnScreen));
}
-#endif // Q_OS_WIN && !Q_OS_WINRT
+#endif // Q_OS_WIN
void tst_QWidget::reparentStaticWidget()
{
@@ -9240,8 +9178,6 @@ void tst_QWidget::translucentWidget()
const QImage actual = widgetSnapshot.toImage().convertToFormat(QImage::Format_RGB32);
QImage expected = pm.toImage().scaled(label.devicePixelRatioF() * pm.size());
expected.setDevicePixelRatio(label.devicePixelRatioF());
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QCOMPARE(actual.size(),expected.size());
QCOMPARE(actual,expected);
@@ -9963,8 +9899,6 @@ void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
correct.fill(Qt::green);
const QPixmap mainPixmap = grabFromWidget(&main, QRect(QPoint(0, 0), QSize(-1, -1)));
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QTRY_COMPARE(mainPixmap.toImage().convertToFormat(QImage::Format_RGB32),
correct.toImage().convertToFormat(QImage::Format_RGB32));
#ifndef QT_NO_CURSOR
@@ -10058,8 +9992,6 @@ void tst_QWidget::activateWindow()
QCoreApplication::processEvents();
QTRY_VERIFY(mainwindow->isActiveWindow());
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QTRY_VERIFY(!mainwindow2->isActiveWindow());
}
@@ -11363,8 +11295,6 @@ void tst_QWidget::resizeStaticContentsChildWidget_QTBUG35282()
widget.showNormal();
QVERIFY(QTest::qWaitForWindowExposed(&widget));
- if (m_platform == QStringLiteral("winrt"))
- QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QCOMPARE(childWidget.numPaintEvents, 0);
childWidget.reset();
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index 72fa32a1b1..ee40fc56c9 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -192,9 +192,6 @@ void tst_QWidget_window::tst_move_show()
const QPoint pos(100, 100);
w.move(pos);
w.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Winrt does not support move", Abort);
-#endif
QVERIFY2(qFuzzyCompareWindowPosition(w.pos(), pos, m_fuzz),
qPrintable(msgPointMismatch(w.pos(), pos)));
}
@@ -226,9 +223,6 @@ void tst_QWidget_window::tst_resize_show()
QWidget w;
w.resize(m_testWidgetSize);
w.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Winrt does not support resize", Abort);
-#endif
QCOMPARE(w.size(), m_testWidgetSize);
}
@@ -418,8 +412,7 @@ void tst_QWidget_window::tst_exposeObscuredMapped_QTBUG39220()
const auto integration = QGuiApplicationPrivate::platformIntegration();
if (!integration->hasCapability(QPlatformIntegration::MultipleWindows)
- || !integration->hasCapability(QPlatformIntegration::NonFullScreenWindows)
- || QGuiApplication::platformName() == QLatin1String("winrt")) {
+ || !integration->hasCapability(QPlatformIntegration::NonFullScreenWindows)) {
QSKIP("The platform does not have the required capabilities");
}
// QTBUG-39220: Fully obscured parent widgets may not receive expose
@@ -631,9 +624,6 @@ void tst_QWidget_window::tst_dnd()
QWidget *dropsAcceptingWidget3 = new DnDEventLoggerWidget(&log, &dndTestWidget, true);
dropsAcceptingWidget3->setAcceptDrops(true);
dropsAcceptingWidget3->setObjectName(QLatin1String("acceptingDropsWidget3"));
- // 260 + 40 = 300 = widget size, must not be more than that.
- // otherwise it will break WinRT because there the tlw is maximized every time
- // and this window will receive one more event
dropsAcceptingWidget3->resize(180, 40);
dropsAcceptingWidget3->move(10, 260);
@@ -994,9 +984,6 @@ void tst_QWidget_window::tst_resize_count()
resize.setWindowFlags(Qt::X11BypassWindowManagerHint);
resize.show();
QVERIFY(QTest::qWaitForWindowExposed(&resize));
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Winrt does not support resize", Abort);
-#endif
QCOMPARE(resize.resizeCount, 1);
resize.resizeCount = 0;
QSize size = resize.size();
@@ -1274,11 +1261,6 @@ void tst_QWidget_window::setWindowState()
w.setWindowState(state);
QCOMPARE(w.windowState(), state);
w.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("0", "Winrt windows are maximized by default", Abort);
- QEXPECT_FAIL("Qt::WindowMinimized", "Winrt windows are maximized by default", Abort);
- QEXPECT_FAIL("Qt::WindowFullScreen", "Winrt windows are maximized by default", Abort);
-#endif
QCOMPARE(w.windowState(), state);
QCOMPARE(w.windowHandle()->windowStates(), state);
if (!(state & Qt::WindowMinimized))
diff --git a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
index 98aebfe975..2a8edaf1a2 100644
--- a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
+++ b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
@@ -107,9 +107,6 @@ void tst_QWindowContainer::testShow()
root.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
-#endif
QVERIFY(QTest::qWaitForWindowExposed(window));
}
@@ -149,9 +146,6 @@ void tst_QWindowContainer::testExposeObscure()
container->show();
QVERIFY(QTest::qWaitForWindowExposed(container.data()));
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
-#endif
QVERIFY(QTest::qWaitForWindowExposed(window));
QVERIFY(window->numberOfExposes > 0);
@@ -273,9 +267,6 @@ void tst_QWindowContainer::testUnparentReparent()
QTRY_VERIFY(!window->isVisible());
container->show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
-#endif
QVERIFY(QTest::qWaitForWindowExposed(window));
QTRY_VERIFY(window->isVisible());
@@ -383,9 +374,6 @@ void tst_QWindowContainer::testNativeContainerParent()
root.show();
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
-#endif
QVERIFY(QTest::qWaitForWindowExposed(window));
QTRY_COMPARE(window->parent(), container->windowHandle());
}