From 956cc2a257e1654204fdce97fa88815490d7caaa Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 20 Jul 2022 11:13:53 +0200 Subject: [PATCH] EditorManager: Avoid using sender() Change-Id: I9965f26f6c2dc3a496e8d80ceb061e54ee1c0956 Reviewed-by: Eike Ziller Reviewed-by: --- src/plugins/coreplugin/editormanager/editormanager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 1566cf85863..48ce6423138 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -2433,11 +2433,10 @@ void EditorManagerPrivate::copyFilePathFromContextMenu() void EditorManagerPrivate::copyLocationFromContextMenu() { - const auto action = qobject_cast(sender()); - if (!d->m_contextMenuEntry || !action) + if (!d->m_contextMenuEntry) return; const QString text = d->m_contextMenuEntry->fileName().toUserOutput() - + QLatin1Char(':') + action->data().toString(); + + QLatin1Char(':') + m_copyLocationContextAction->data().toString(); setClipboardAndSelection(text); }