EditorManager: Avoid using sender()

Change-Id: I9965f26f6c2dc3a496e8d80ceb061e54ee1c0956
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-07-20 11:13:53 +02:00
parent a793fe6479
commit 956cc2a257

View File

@@ -2433,11 +2433,10 @@ void EditorManagerPrivate::copyFilePathFromContextMenu()
void EditorManagerPrivate::copyLocationFromContextMenu()
{
const auto action = qobject_cast<const QAction *>(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);
}