forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user