From ab947649eb984b006a856d41476e615dc901bcf7 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 30 Apr 2012 14:26:47 +0200 Subject: QPA: Cleanup native dialog modal execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the _q_platformRunNativeAppModalPanel() function, together with the launchNativeAppModalPanel() signal and emitLaunchNativeAppModalPanel() slot, which were previously used to run the modal loop inside the QDialog::exec() loop. This trick isn't necessary anymore, so remove the mechanism and code related to it. Rename QPlatformDialogHelper::platformNativeDialogModalHelp() to exec_sys(). This function is now responsible for both showing the native dialog and running the modal loop. QDialog:exec() now calls this function if a native dialog is in use (it does not call QEventLoop::exec() anymore). The dialogResultCode_sys() function was unused, so it has also been removed. This commit also removes some unused private slots that were left over from the port to QPA. Note that the comments in the Cocoa plugin are still valid and relevant, but this commit does not fix the scenarios mentioned. This will be done in a future commit. The Windows plugin needs minor changes. The QueuedConnections to accept() and reject() cause the deliver to come too late, resulting in crashes, hence the change to AutoConnection (which ends up being a DirectConnection). Change-Id: Ifc90325c945ca78737e60bf331929f03ecc52e0a Reviewed-by: Friedemann Kleint Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoafontdialoghelper.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoafontdialoghelper.h') diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h index 501e67deb3..d135a958df 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h @@ -56,15 +56,13 @@ public: QCocoaFontDialogHelper(); virtual ~QCocoaFontDialogHelper(); - void platformNativeDialogModalHelp(); - void _q_platformRunNativeAppModalPanel(); + void exec_sys(); + void deleteNativeDialog_sys(); bool show_sys(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent); void hide_sys(); - QPlatformDialogHelper::DialogCode dialogResultCode_sys(); - void setCurrentFont_sys(const QFont &); QFont currentFont_sys() const; -- cgit v1.2.3