From 6a633221f3a98e8933ad5c2bbee89a8c5a938ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 2 Aug 2023 16:02:18 +0200 Subject: [PATCH] tests: Add iOS support to nativewindow helper Pick-to: 6.6 Change-Id: I3e22423734d25acb2ef04d22a1647874c2d10420 Reviewed-by: Timur Pocheptsov --- tests/shared/nativewindow.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/shared/nativewindow.h b/tests/shared/nativewindow.h index 4b2aff0cdd..75461d134d 100644 --- a/tests/shared/nativewindow.h +++ b/tests/shared/nativewindow.h @@ -6,6 +6,10 @@ #if defined(Q_OS_MACOS) # include +# define VIEW_BASE NSView +#elif defined(Q_OS_IOS) +# include +# define VIEW_BASE UIView #elif defined(Q_OS_WIN) # include #endif @@ -24,16 +28,16 @@ public: QRect geometry() const; private: -#if defined(Q_OS_MACOS) - NSView *m_handle = nullptr; +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) + VIEW_BASE *m_handle = nullptr; #elif defined(Q_OS_WIN) HWND m_handle = nullptr; #endif }; -#if defined(Q_OS_MACOS) +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) -@interface View : NSView +@interface View : VIEW_BASE @end @implementation View