ProjectExplorer: Make kit aspects self-register

Also, construct the KitManager implicitly when the first
KitAspect is created. Ramp-down is still explicit and
somewhat odd.

Change-Id: If1506e1d0789ecabbaad2d8008851d0b42c5218b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-03-14 09:17:59 +01:00
parent fbc043c96d
commit fb4d8b5a01
9 changed files with 118 additions and 75 deletions

View File

@@ -775,6 +775,8 @@ public:
DebugInfoTaskHandler m_debugInfoTaskHandler;
Perspective m_perspective{Constants::PRESET_PERSPECTIVE_ID, tr("Debugger")};
DebuggerKitAspect debuggerKitAspect;
};
DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin)
@@ -2256,8 +2258,6 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
mstart->addSeparator(MENU_GROUP_GENERAL);
mstart->addSeparator(MENU_GROUP_SPECIAL);
KitManager::registerKitAspect<DebuggerKitAspect>();
// Task integration.
//: Category under which Analyzer tasks are listed in Issues view
ProjectExplorer::TaskHub::addCategory(Debugger::Constants::ANALYZERTASK_ID, tr("Debugger"));