diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-05-08 15:26:50 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-05-08 19:51:25 +0200 |
commit | 6c36e21bec1197e933ee1fbe14bd18936544d32a (patch) | |
tree | f3cb9286e8a50d83176bc0102f49f7fb311ee81a /tests/auto/gui/kernel | |
parent | c878a51509d22d4ef774ebb81b90e385ded6f885 (diff) |
iOS: Always call setParent during QIOSWindow construction
We rely on setParent for parenting top level windows into our desktop
manager view, so we can't condition the call on having a parent window,
like we do on other platforms.
This was a regression from 988039729f55a5e62e32b82c6f29ff7457e91d9d.
Fixes: QTBUG-125142
Pick-to: 6.7
Change-Id: I2884d77db09cba5371ccd77eabda7ce38c0292de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r-- | tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp index 526abd6ea3..fdb1b333ef 100644 --- a/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp @@ -172,6 +172,9 @@ void tst_ForeignWindow::destroyWhenParentIsDestroyed() // Reparenting into a window will result in creating it QVERIFY(parentWindow.handle()); + parentWindow.show(); + QVERIFY(QTest::qWaitForWindowExposed(&parentWindow)); + // Destroying the parent window of the foreign window results // in destroying the foreign window as well, as the foreign // window no longer has a parent it can be embedded in. @@ -184,6 +187,9 @@ void tst_ForeignWindow::destroyWhenParentIsDestroyed() foreignWindow->create(); QVERIFY(foreignWindow->handle()); QTRY_COMPARE(nativeWindow.parentWinId(), parentWindow.winId()); + + parentWindow.show(); + QVERIFY(QTest::qWaitForWindowExposed(&parentWindow)); } #include <tst_foreignwindow.moc> |