diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index aabe9e9bc3f..69f7d718231 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -654,12 +654,9 @@ public: PythonRunConfigurationFactory runConfigFactory; }; -static PythonEditorPluginPrivate *dd = nullptr; - PythonEditorPlugin::~PythonEditorPlugin() { - delete dd; - dd = nullptr; + delete d; } bool PythonEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage) @@ -667,7 +664,7 @@ bool PythonEditorPlugin::initialize(const QStringList &arguments, QString *error Q_UNUSED(arguments) Q_UNUSED(errorMessage) - dd = new PythonEditorPluginPrivate; + d = new PythonEditorPluginPrivate; ProjectManager::registerProjectType(PythonMimeType); diff --git a/src/plugins/pythoneditor/pythoneditorplugin.h b/src/plugins/pythoneditor/pythoneditorplugin.h index 26c86fe86cf..d5b9f05acc0 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.h +++ b/src/plugins/pythoneditor/pythoneditorplugin.h @@ -37,10 +37,13 @@ class PythonEditorPlugin : public ExtensionSystem::IPlugin public: PythonEditorPlugin() = default; - ~PythonEditorPlugin() override; + ~PythonEditorPlugin() final; - bool initialize(const QStringList &arguments, QString *errorMessage) override; - void extensionsInitialized() override; +private: + bool initialize(const QStringList &arguments, QString *errorMessage) final; + void extensionsInitialized() final; + + class PythonEditorPluginPrivate *d = nullptr; }; } // namespace Internal