ExtensionSystem: Start reworking initialization order system

Allow specifying object creation without immediate creation
(but create them nevetheless very soon).

Change-Id: I01b91f7cf753ced61705d3f26352548b268be6b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-03-02 15:29:50 +01:00
parent 7869c4e810
commit b91f234c7d
3 changed files with 83 additions and 1 deletions

View File

@@ -1119,6 +1119,7 @@ bool PluginSpecPrivate::initializePlugin()
hasError = true;
return false;
}
plugin->tryCreateObjects();
state = PluginSpec::Initialized;
return true;
}
@@ -1145,6 +1146,7 @@ bool PluginSpecPrivate::initializeExtensions()
return false;
}
plugin->extensionsInitialized();
plugin->tryCreateObjects();
state = PluginSpec::Running;
return true;
}
@@ -1164,7 +1166,9 @@ bool PluginSpecPrivate::delayedInitialize()
hasError = true;
return false;
}
return plugin->delayedInitialize();
const bool res = plugin->delayedInitialize();
plugin->tryCreateObjects();
return res;
}
/*!