iOS: accept window modal message dialogs

Although we cannot really show anything but application modal
dialogs on iOS, falling back to using non-native dialogs for
window modal seems unnecessary strict; In practice you will
never have a work flow on iOS where you have several windows
visible, and at the same time, need to show a dialog that
blocks only one of them.

This patch will lift the restriction, and handle window modal
as application modal on iOS.

Task-number: QTBUG-55909
Change-Id: I581c1a47724ee2bfc2e041672c82c25ed34b2b2d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Richard Moe Gustavsen 2016-09-13 14:37:19 +02:00 committed by Shawn Rutledge
parent 0dedb60385
commit c3084f101d

View File

@ -108,7 +108,7 @@ bool QIOSMessageDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality win
Q_UNUSED(windowFlags);
if (m_alertController // Ensure that the dialog is not showing already
|| !options() // Some message dialogs don't have options (QErrorMessage)
|| windowModality != Qt::ApplicationModal // We can only do app modal dialogs
|| windowModality == Qt::NonModal // We can only do modal dialogs
|| QSysInfo::MacintoshVersion < QSysInfo::MV_IOS_8_0) // API limitation
return false;