summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2023-08-08 15:01:23 +0200
committerTor Arne Vestbø <[email protected]>2023-08-08 18:15:22 +0200
commit5cf3d062f66677e77c0e288ba5544c6a835398e5 (patch)
tree72309b61844e055a1b7921a781512c064466989b
parent63dbc5c05dc6e6a4098622c0675de86ff40f4fc7 (diff)
Fix embeddedwindows test on platforms without native window helper
Pick-to: 6.6 Change-Id: I33074fc4a04982075a8c264bad41c56235e98cb6 Reviewed-by: Mikołaj Boc <[email protected]>
-rw-r--r--tests/manual/embeddedwindows/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/manual/embeddedwindows/main.cpp b/tests/manual/embeddedwindows/main.cpp
index 15c321839fe..0bc2901d69c 100644
--- a/tests/manual/embeddedwindows/main.cpp
+++ b/tests/manual/embeddedwindows/main.cpp
@@ -3,7 +3,10 @@
#include <QtGui>
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) || defined(Q_OS_WIN)
#include "../../shared/nativewindow.h"
+#define HAVE_NATIVE_WINDOW
+#endif
#include <QDebug>
@@ -69,6 +72,7 @@ int main(int argc, char *argv[])
transparentChildWindow->setGeometry(350, 50, 100, 100);
transparentChildWindow->showNormal();
+#if defined(HAVE_NATIVE_WINDOW)
NativeWindow nativeWindow;
if (QWindow *foreignWindow = QWindow::fromWinId(nativeWindow)) {
foreignWindow->setParent(&window);
@@ -95,6 +99,7 @@ int main(int argc, char *argv[])
maskedChildWindowOfNativeWindow->setGeometry(25, 25, 50, 50);
maskedChildWindowOfNativeWindow->showNormal();
}
+#endif
window.show();