From 5c37258b06107d247f254fc7e3e852d2838e0a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 8 Oct 2019 18:31:33 +0200 Subject: macOS: Don't dismiss menu during applicationShouldTerminate The logic was a leftover from the Carbon days and is no longer needed. Change-Id: I557b669eadea902fa439c43162218c5864077df9 Reviewed-by: Volker Hilsheimer --- src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index 00f5a1bf09..9daf65abcf 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -142,8 +142,6 @@ QT_USE_NAMESPACE - (BOOL)canQuit { - [[NSApp mainMenu] cancelTracking]; - bool handle_quit = true; NSMenuItem *quitMenuItem = [[QCocoaMenuLoader sharedMenuLoader] quitMenuItem]; if (!QGuiApplicationPrivate::instance()->modalWindowList.isEmpty() -- cgit v1.2.3 From e5c003b77ddd9830805124ab829067a7858bf024 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sat, 12 Oct 2019 16:58:08 +0200 Subject: Set icon on the select-all action in the text edit context menu too Makes this consistent with the rest of the actions here, and avoids dirty hacks like KIconTheme::assignIconsToContextMenu. Change-Id: I749f4d5f67efdbf595a52185dd507de5f87f6487 Reviewed-by: Friedemann Kleint Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qlineedit.cpp | 1 + src/widgets/widgets/qwidgettextcontrol.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 7f482a6a4e..fb67936768 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -2226,6 +2226,7 @@ QMenu *QLineEdit::createStandardContextMenu() action = popup->addAction(QLineEdit::tr("Select All") + ACCEL_KEY(QKeySequence::SelectAll)); action->setEnabled(!d->control->text().isEmpty() && !d->control->allSelected()); + setActionIcon(action, QStringLiteral("edit-select-all")); d->selectAllAction = action; connect(action, SIGNAL(triggered()), SLOT(selectAll())); diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 094c59a0c9..dce18f9100 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -2362,6 +2362,7 @@ QMenu *QWidgetTextControl::createStandardContextMenu(const QPointF &pos, QWidget a = menu->addAction(tr("Select All") + ACCEL_KEY(QKeySequence::SelectAll), this, SLOT(selectAll())); a->setEnabled(!d->doc->isEmpty()); a->setObjectName(QStringLiteral("select-all")); + setActionIcon(a, QStringLiteral("edit-select-all")); } if ((d->interactionFlags & Qt::TextEditable) && QGuiApplication::styleHints()->useRtlExtensions()) { -- cgit v1.2.3