DesignMode: Apply 'static pattern'

Also:
 - and replace some occurrences of DesignMode::instance()->id() by
   Core::Constants::MODE_DESIGN for less dependence on the lifetime
   of the DesignMode object (and less indirection)
 - remove storage if DesignMode::instance() values when direct
   use of the static functions suffice
 - remove some unused items from the interface
 - use member-initialization in DesignMode::Private.

Change-Id: Ie66c06da0fc0a3ccc588b8079e51db6b39284152
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2018-01-23 09:09:46 +01:00
parent fba61c5b55
commit 2b76504bd2
9 changed files with 28 additions and 50 deletions

View File

@@ -58,7 +58,7 @@ bool ScxmlEditorPlugin::initialize(const QStringList &arguments, QString *errorS
void ScxmlEditorPlugin::extensionsInitialized()
{
DesignMode::instance()->setDesignModeIsRequired();
DesignMode::setDesignModeIsRequired();
}
ExtensionSystem::IPlugin::ShutdownFlag ScxmlEditorPlugin::aboutToShutdown()