mirror of https://github.com/qt/qtbase.git
iOS: Don't assume screens will not be connected before QIOSIntegration
When an external screen is connected to an iPad, and the application is starting up on that screen, we will get a connection notification about that screen as part of the initial bootstrap of UIApplicationMain, before we call the user's main(). Since we initialize and add all available screen on QIOSIntegration creation, we can just ignore the early connection notification. This avoids a crash, but the window will not show anything on the external screen, which is a separate issue. Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-106701 Change-Id: I9e0a9736bf602277316bd004e0d01c640feaf319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
686c02224c
commit
dd49793bc3
|
@ -73,8 +73,8 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
|
|||
|
||||
+ (void)screenConnected:(NSNotification*)notification
|
||||
{
|
||||
Q_ASSERT_X(QIOSIntegration::instance(), Q_FUNC_INFO,
|
||||
"Screen connected before QIOSIntegration creation");
|
||||
if (!QIOSIntegration::instance())
|
||||
return; // Will be added when QIOSIntegration is created
|
||||
|
||||
QWindowSystemInterface::handleScreenAdded(new QIOSScreen([notification object]));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue