forked from qt-creator/qt-creator
Core: Keep track of modes in the ModeManager directly
... instead of having the indirection of the global object pool. ModeManagerPrivate has been maintaining the list of instantiated modes by tracking (all...) pool object additions / removals. This can be achieved more directly by calling functions from the IMode base constructor/destructor. The pattern used deviates a bit from the otherwise used 'static QList<Foo *> allFoos();' acessor pattern as there is some sorting logic etc. associated each time a mode is appended. Sticking to the preexisting structure seemed less effort for now. Change-Id: Ic1b4e641e155f949248890acc48cafbe74025115 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -311,7 +311,6 @@ bool MainWindow::init(QString *errorMessage)
|
||||
|
||||
PluginManager::addObject(m_coreImpl);
|
||||
m_statusBarManager->init();
|
||||
m_modeManager->init();
|
||||
m_progressManager->init(); // needs the status bar manager
|
||||
|
||||
PluginManager::addObject(m_generalSettings);
|
||||
|
||||
Reference in New Issue
Block a user