forked from qt-creator/qt-creator
Analyzer: Add prepare step to tool starting.
The toolPreparer can do a last minute check and stop the execution of the actual tool. The QML profiler uses this to check for unsaved notes. Change-Id: I5185430f50ffb01e9854cafa442f0eaaad27fa5d Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -70,7 +70,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
action->setToolId(QmlProfilerToolId);
|
||||
action->setWidgetCreator(widgetCreator);
|
||||
action->setRunControlCreator(runControlCreator);
|
||||
action->setToolStarter([tool] { tool->startLocalTool(); });
|
||||
action->setToolPreparer([tool] { return tool->prepareTool(); });
|
||||
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
|
||||
action->setText(tr("QML Profiler"));
|
||||
action->setToolTip(description);
|
||||
@@ -83,6 +83,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
action->setWidgetCreator(widgetCreator);
|
||||
action->setRunControlCreator(runControlCreator);
|
||||
action->setToolStarter([tool] { tool->startRemoteTool(); });
|
||||
action->setToolPreparer([tool] { return tool->prepareTool(); });
|
||||
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
|
||||
action->setText(tr("QML Profiler (External)"));
|
||||
action->setToolTip(description);
|
||||
|
||||
Reference in New Issue
Block a user