Activate tst_QWidget_window::tst_showWithoutActivating on cocoa

The test passes, the functionality is implemented in QCocoaWindow.

Task-number: QTBUG-8857
Pick-to: 6.2
Change-Id: I2f4b3a39cec1aaaf4351753b590f35e280503461
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Volker Hilsheimer 2021-10-10 09:29:04 +02:00
parent 3715166539
commit 971bf3a9bb

View File

@ -434,14 +434,14 @@ void tst_QWidget_window::tst_windowFilePath()
void tst_QWidget_window::tst_showWithoutActivating() void tst_QWidget_window::tst_showWithoutActivating()
{ {
QString platformName = QGuiApplication::platformName().toLower(); QString platformName = QGuiApplication::platformName().toLower();
if (platformName == "cocoa") if (platformName != QStringLiteral("xcb")
QSKIP("Cocoa: This fails. Figure out why."); && platformName != QStringLiteral("windows")
else if (platformName != QStringLiteral("xcb") && platformName != QStringLiteral("cocoa")
&& platformName != QStringLiteral("windows") && platformName != QStringLiteral("ios")
&& platformName != QStringLiteral("ios") && platformName != QStringLiteral("tvos")
&& platformName != QStringLiteral("tvos") && platformName != QStringLiteral("watchos"))
&& platformName != QStringLiteral("watchos")) QSKIP("Qt::WA_ShowWithoutActivating is currently supported only on xcb, " \
QSKIP("Qt::WA_ShowWithoutActivating is currently supported only on xcb, windows, and ios/tvos/watchos platforms."); "windows, and macos/ios/tvos/watchos platforms.");
QWidget w1; QWidget w1;
w1.setAttribute(Qt::WA_ShowWithoutActivating); w1.setAttribute(Qt::WA_ShowWithoutActivating);