From 916a8c44c4a9ba639e89660226d14d51ed44feaa Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 13 Aug 2016 17:54:46 +0200 Subject: [PATCH] Revert "Cocoa: make dialogs emit the "selected" signals" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit dfa8854cf7e00705e0122cf7022ff1ea4f8e5a74 and removes all "selected" signal emissions from the Cocoa platform dialogs. Even though it fixed the new QML dialogs that were relying on the "selected" signals, it lead to duplicate signals with QColorDialog, QFileDialog, and QFontDialog. We'll fix the new QML dialogs to not rely on the selected signals, but handle it on accept the same way than QtWidgets and QtQuick Dialogs do, so there is no need to repeat the signals in all platform plugins. Task-number: QTBUG-55299 Change-Id: I35e08cee92a4454544497b027ed10abad6c26673 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 2 -- src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 9 --------- src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 1 - 3 files changed, 12 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index 85468009f3..0319d4ca6d 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -177,8 +177,6 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSColorPanelDelegate); { Q_UNUSED(notification); [self updateQtColor]; - if (mHelper) - emit mHelper->colorSelected(mQtColor); } - (void)windowWillClose:(NSNotification *)notification diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index 475e6c7afb..4eb35f5495 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -582,15 +582,6 @@ void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_panelClosed(bool accepted) QCocoaMenuBar::resetKnownMenuItemsToQt(); if (accepted) { emit accept(); - - QString filter = selectedNameFilter(); - if (filter.isEmpty()) - emit filterSelected(filter); - - QList files = selectedFiles(); - emit filesSelected(files); - if (files.count() == 1) - emit fileSelected(files.first()); } else { emit reject(); } diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index dfda22d376..dc7dfb788f 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -365,7 +365,6 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate); emit mHelper->reject(); } else { emit mHelper->accept(); - emit mHelper->fontSelected(mHelper->currentFont()); } } }