From d4fd619b1088f885878381508918d933c7c226e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 16 Jan 2015 17:54:47 +0100 Subject: [PATCH] iOS: Don't re-apply window state during QIOSWindow construction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We set the parent of the window as part of constructing it, which will cause a layout of the QIOSDesktopManagerView's subviews, but in this case we don't need to re-set the window state as that's taken care of later on in the QIOSWindow constructor. Change-Id: Ic197c9a50394908c8aa2155abdc97bc322937a85 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosviewcontroller.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index 01bc84ae68..164b58d63e 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -75,7 +75,11 @@ - (void)layoutView:(QUIView *)view { QWindow *window = view.qwindow; - Q_ASSERT(window->handle()); + + // Return early if the QIOSWindow is still constructing, as we'll + // take care of setting the correct window state in the constructor. + if (!window->handle()) + return; // Re-apply window states to update geometry if (window->windowState() & (Qt::WindowFullScreen | Qt::WindowMaximized))