From b05b940185450af70791befd47b2dd47eb0acfd5 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 4 Dec 2013 13:24:21 +0100 Subject: iOS: fix assert when using QOffscreenSurface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qt defaults to creating a QWindow as offscreen surface if QPlatformIntegration::createPlatformOffscreenSurface returns 0. Using an offscreen surface is often done in a background thread, which is problematic, since then a QIOSWindow will also be created in a background thread. According to Apple docs, working with a UIView from other threads than the main thread should not be done. In our case, we instead hit an assert in QApplication that checks for the same. As a quick fix for Qt 5.2, we remove the offending call that causes the assert, since we anyway will call the same function lazily when becoming first responder. Task-number: QTBUG-35378 Change-Id: Id35462f99783a9748c688b163f6497de9bfff73e Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 7b217e0bdc..5374bc530d 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -108,8 +108,6 @@ [NSNumber numberWithBool:YES], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; - [self updateTextInputTraits]; - if (isQtApplication()) self.hidden = YES; -- cgit v1.2.3