forked from qt-creator/qt-creator
ProjectExplorer: Split Target and ToolRunners into smaller tasks
This increases re-usability of activities like 'port gathering', and makes their use less dependent on actual device implementations. Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -255,14 +255,11 @@ CallgrindTool::CallgrindTool(QObject *parent)
|
||||
QString toolTip = tr("Valgrind Function Profiler uses the "
|
||||
"Callgrind tool to record function calls when a program runs.");
|
||||
|
||||
auto rcc = [this](RunConfiguration *runConfiguration, Id mode) {
|
||||
auto runControl = new RunControl(runConfiguration, mode);
|
||||
(void) createRunTool(runControl);
|
||||
return runControl;
|
||||
};
|
||||
RunControl::registerWorkerCreator(CALLGRIND_RUN_MODE, [this](RunControl *runControl) {
|
||||
return createRunTool(runControl);
|
||||
});
|
||||
|
||||
if (!Utils::HostOsInfo::isWindowsHost()) {
|
||||
Debugger::registerAction(CALLGRIND_RUN_MODE, rcc);
|
||||
auto action = new QAction(tr("Valgrind Function Profiler"), this);
|
||||
action->setToolTip(toolTip);
|
||||
menu->addAction(ActionManager::registerAction(action, CallgrindLocalActionId),
|
||||
@@ -279,7 +276,6 @@ CallgrindTool::CallgrindTool(QObject *parent)
|
||||
});
|
||||
}
|
||||
|
||||
Debugger::registerAction(CALLGRIND_RUN_MODE, rcc);
|
||||
auto action = new QAction(tr("Valgrind Function Profiler (External Application)"), this);
|
||||
action->setToolTip(toolTip);
|
||||
menu->addAction(ActionManager::registerAction(action, CallgrindRemoteActionId),
|
||||
|
||||
Reference in New Issue
Block a user