diff --git a/src/plugins/scxmleditor/scxmleditorfactory.cpp b/src/plugins/scxmleditor/scxmleditorfactory.cpp index a7120e71df2..a18132f9846 100644 --- a/src/plugins/scxmleditor/scxmleditorfactory.cpp +++ b/src/plugins/scxmleditor/scxmleditorfactory.cpp @@ -38,8 +38,7 @@ using namespace ScxmlEditor::Constants; using namespace ScxmlEditor::Internal; -ScxmlEditorFactory::ScxmlEditorFactory(QObject *parent) - : IEditorFactory(parent) +ScxmlEditorFactory::ScxmlEditorFactory() { 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 42135ec64b3..f4424f613c7 100644 --- a/src/plugins/scxmleditor/scxmleditorfactory.h +++ b/src/plugins/scxmleditor/scxmleditorfactory.h @@ -35,7 +35,7 @@ class ScxmlEditorData; class ScxmlEditorFactory final : public Core::IEditorFactory { public: - explicit ScxmlEditorFactory(QObject *parent); + ScxmlEditorFactory(); private: ScxmlEditorData* m_editorData = nullptr; diff --git a/src/plugins/scxmleditor/scxmleditorplugin.cpp b/src/plugins/scxmleditor/scxmleditorplugin.cpp index d8b1514a178..a78c11893a6 100644 --- a/src/plugins/scxmleditor/scxmleditorplugin.cpp +++ b/src/plugins/scxmleditor/scxmleditorplugin.cpp @@ -24,6 +24,7 @@ ****************************************************************************/ #include "scxmleditorplugin.h" + #include "scxmleditorfactory.h" #include @@ -33,12 +34,23 @@ using namespace Core; namespace ScxmlEditor { namespace Internal { +class ScxmlEditorPluginPrivate +{ +public: + ScxmlEditorFactory editorFactory; +}; + +ScxmlEditorPlugin::~ScxmlEditorPlugin() +{ + delete d; +} + bool ScxmlEditorPlugin::initialize(const QStringList &arguments, QString *errorString) { Q_UNUSED(arguments) Q_UNUSED(errorString) - (void) new ScxmlEditorFactory(this); + d = new ScxmlEditorPluginPrivate; return true; } diff --git a/src/plugins/scxmleditor/scxmleditorplugin.h b/src/plugins/scxmleditor/scxmleditorplugin.h index 55555773739..88ab59d7613 100644 --- a/src/plugins/scxmleditor/scxmleditorplugin.h +++ b/src/plugins/scxmleditor/scxmleditorplugin.h @@ -35,10 +35,13 @@ class ScxmlEditorPlugin : public ExtensionSystem::IPlugin public: ScxmlEditorPlugin() = default; + ~ScxmlEditorPlugin(); private: bool initialize(const QStringList &arguments, QString *errorString) final; void extensionsInitialized() final; + + class ScxmlEditorPluginPrivate *d = nullptr; }; } // namespace Internal