ProjectExplorer: Derive RunControl::displayName from exectuable

Unless explicitly provided. Less user code.

Also, de-virtualize RunControl::displayName, it's never overridden.

Change-Id: Ibd315aac3c478d993e984af20f7df9077dffe634
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2022-05-30 18:01:30 +02:00
parent 1ffe32187a
commit 6431b02947
4 changed files with 5 additions and 7 deletions

View File

@@ -282,13 +282,11 @@ CallgrindToolPrivate::CallgrindToolPrivate()
if (dlg.exec() != QDialog::Accepted)
return;
m_perspective.select();
CommandLine command = dlg.commandLine();
auto runControl = new RunControl(CALLGRIND_RUN_MODE);
runControl->copyDataFromRunConfiguration(runConfig);
runControl->createMainWorker();
runControl->setCommandLine(command);
runControl->setCommandLine(dlg.commandLine());
runControl->setWorkingDirectory(dlg.workingDirectory());
runControl->setDisplayName(command.executable().toUserOutput());
ProjectExplorerPlugin::startRunControl(runControl);
});