diff --git a/src/plugins/scxmleditor/scxmleditorfactory.cpp b/src/plugins/scxmleditor/scxmleditorfactory.cpp index 6a923237d13..013ce959e72 100644 --- a/src/plugins/scxmleditor/scxmleditorfactory.cpp +++ b/src/plugins/scxmleditor/scxmleditorfactory.cpp @@ -38,7 +38,8 @@ using namespace ScxmlEditor::Constants; using namespace ScxmlEditor::Internal; -ScxmlEditorFactory::ScxmlEditorFactory() +ScxmlEditorFactory::ScxmlEditorFactory(QObject *parent) + : IEditorFactory(parent) { setId(K_SCXML_EDITOR_ID); setDisplayName(QCoreApplication::translate("ScxmlEditor", C_SCXMLEDITOR_DISPLAY_NAME)); diff --git a/src/plugins/scxmleditor/scxmleditorfactory.h b/src/plugins/scxmleditor/scxmleditorfactory.h index 1e621e0615c..8732d94acc7 100644 --- a/src/plugins/scxmleditor/scxmleditorfactory.h +++ b/src/plugins/scxmleditor/scxmleditorfactory.h @@ -37,7 +37,7 @@ class ScxmlEditorFactory : public Core::IEditorFactory Q_OBJECT public: - explicit ScxmlEditorFactory(); + explicit ScxmlEditorFactory(QObject *parent); Core::IEditor *createEditor() override; diff --git a/src/plugins/scxmleditor/scxmleditorplugin.cpp b/src/plugins/scxmleditor/scxmleditorplugin.cpp index 30bddf6b2f8..d8b1514a178 100644 --- a/src/plugins/scxmleditor/scxmleditorplugin.cpp +++ b/src/plugins/scxmleditor/scxmleditorplugin.cpp @@ -24,34 +24,21 @@ ****************************************************************************/ #include "scxmleditorplugin.h" -#include "scxmleditorconstants.h" #include "scxmleditorfactory.h" -#include #include -#include -#include - -#include -#include -#include -#include - -#include using namespace Core; -using namespace ScxmlEditor::Internal; -ScxmlEditorPlugin::ScxmlEditorPlugin() -{ -} +namespace ScxmlEditor { +namespace Internal { bool ScxmlEditorPlugin::initialize(const QStringList &arguments, QString *errorString) { Q_UNUSED(arguments) Q_UNUSED(errorString) - addAutoReleasedObject(new ScxmlEditorFactory); + (void) new ScxmlEditorFactory(this); return true; } @@ -61,7 +48,5 @@ void ScxmlEditorPlugin::extensionsInitialized() DesignMode::setDesignModeIsRequired(); } -ExtensionSystem::IPlugin::ShutdownFlag ScxmlEditorPlugin::aboutToShutdown() -{ - return SynchronousShutdown; -} +} // Internal +} // ScxmlEditor diff --git a/src/plugins/scxmleditor/scxmleditorplugin.h b/src/plugins/scxmleditor/scxmleditorplugin.h index 71e8552ccf0..55555773739 100644 --- a/src/plugins/scxmleditor/scxmleditorplugin.h +++ b/src/plugins/scxmleditor/scxmleditorplugin.h @@ -22,7 +22,6 @@ ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ -#include "scxmleditor_global.h" #include @@ -35,11 +34,11 @@ class ScxmlEditorPlugin : public ExtensionSystem::IPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "ScxmlEditor.json") public: - ScxmlEditorPlugin(); + ScxmlEditorPlugin() = default; - bool initialize(const QStringList &arguments, QString *errorString) override; - void extensionsInitialized() override; - ShutdownFlag aboutToShutdown() override; +private: + bool initialize(const QStringList &arguments, QString *errorString) final; + void extensionsInitialized() final; }; } // namespace Internal