Core: Force and rely on mode creation before extensionsInitialized

cf7f898db3 broke initial mode display due to the then-intentional
delay in registration. Now change the approach: Only record
the modes and the last requested start mode and do all remaining
setup triggered from MainWindow::extensionsInitialized.

This changes behavior insofar as only the last requested mode
on startup (typical Welcome, if Welcome not loaded, Edit) will
be activated.

Change-Id: I62b28342c347938b001c6d3be6a076c5a69b560b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2018-01-26 08:56:40 +01:00
parent 78b7c34bbc
commit 3d2db474a4
3 changed files with 47 additions and 15 deletions

View File

@@ -70,6 +70,8 @@ private:
explicit ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack);
~ModeManager();
static void extensionsInitialized();
static void addMode(IMode *mode);
static void removeMode(IMode *mode);
void currentTabAboutToChange(int index);