forked from qt-creator/qt-creator
Python: Plugin code cosmetics
Use the common pattern for PythonEditorPluginPrivate. Change-Id: Icec8d975e0ab921be7121d123af4dddecd7d0384 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -654,12 +654,9 @@ public:
|
|||||||
PythonRunConfigurationFactory runConfigFactory;
|
PythonRunConfigurationFactory runConfigFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
static PythonEditorPluginPrivate *dd = nullptr;
|
|
||||||
|
|
||||||
PythonEditorPlugin::~PythonEditorPlugin()
|
PythonEditorPlugin::~PythonEditorPlugin()
|
||||||
{
|
{
|
||||||
delete dd;
|
delete d;
|
||||||
dd = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PythonEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
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(arguments)
|
||||||
Q_UNUSED(errorMessage)
|
Q_UNUSED(errorMessage)
|
||||||
|
|
||||||
dd = new PythonEditorPluginPrivate;
|
d = new PythonEditorPluginPrivate;
|
||||||
|
|
||||||
ProjectManager::registerProjectType<PythonProject>(PythonMimeType);
|
ProjectManager::registerProjectType<PythonProject>(PythonMimeType);
|
||||||
|
|
||||||
|
@@ -37,10 +37,13 @@ class PythonEditorPlugin : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PythonEditorPlugin() = default;
|
PythonEditorPlugin() = default;
|
||||||
~PythonEditorPlugin() override;
|
~PythonEditorPlugin() final;
|
||||||
|
|
||||||
bool initialize(const QStringList &arguments, QString *errorMessage) override;
|
private:
|
||||||
void extensionsInitialized() override;
|
bool initialize(const QStringList &arguments, QString *errorMessage) final;
|
||||||
|
void extensionsInitialized() final;
|
||||||
|
|
||||||
|
class PythonEditorPluginPrivate *d = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
Reference in New Issue
Block a user