ProjectExplorer: Add and use a RunConfiguration::registerAspect<>

... to register RunConfigurationAspect creating functions.

Change-Id: I9e7a2cef0bc134ac6a7becbd0b5ecb40c26ef118
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2017-07-14 09:36:09 +02:00
parent b7babda68d
commit d93da5f5f1
5 changed files with 18 additions and 57 deletions

View File

@@ -421,18 +421,6 @@ namespace Internal {
void addCdbOptionPages(QList<IOptionsPage*> *opts);
void addGdbOptionPages(QList<IOptionsPage*> *opts);
/// DebuggerRunControlFactory
class DebuggerRunControlFactory : public IRunControlFactory
{
public:
IRunConfigurationAspect *createRunConfigurationAspect(RunConfiguration *rc) override
{
return new DebuggerRunConfigurationAspect(rc);
}
};
static QIcon visibleStartIcon(Id id, bool toolBarStyle)
{
if (id == Id(Constants::DEBUG)) {
@@ -1495,7 +1483,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_localsAndExpressionsWindow->setObjectName(QLatin1String(DOCKWIDGET_WATCHERS));
m_localsAndExpressionsWindow->setWindowTitle(m_localsWindow->windowTitle());
m_plugin->addAutoReleasedObject(new DebuggerRunControlFactory);
RunConfiguration::registerAspect<DebuggerRunConfigurationAspect>();
// The main "Start Debugging" action.
act = m_startAction = new QAction(this);