ProjectExplorer: Use Core::Id as RunMode "enum values"

This provides a way for third-party plugins to implement run
modes without the need to add a value to the central enum or
using manual workarounds like RunMode(*(int*)&someUniqueObject).

Instead of centrally defined enum values this uses Core::Id that could
be defined anywhere.

Change-Id: Ic350e3d8dbb8042c61b2d4ffec993ca151f53099
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
BogDan Vatra
2015-06-29 10:36:29 +03:00
parent 7743664957
commit 2182ded57b
50 changed files with 218 additions and 219 deletions

View File

@@ -71,7 +71,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
action->setWidgetCreator(widgetCreator);
action->setRunControlCreator(runControlCreator);
action->setToolPreparer([tool] { return tool->prepareTool(); });
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
action->setRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
action->setText(tr("QML Profiler"));
action->setToolTip(description);
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
@@ -84,7 +84,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
action->setRunControlCreator(runControlCreator);
action->setCustomToolStarter([tool] { tool->startRemoteTool(); });
action->setToolPreparer([tool] { return tool->prepareTool(); });
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
action->setRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
action->setText(tr("QML Profiler (External)"));
action->setToolTip(description);
action->setMenuGroup(Constants::G_ANALYZER_REMOTE_TOOLS);