Don't leak BeautifierPluginPrivate on shutdown

Properly delete QtcProcess used for version on shutdown.

Change-Id: I325a267ba5bb28a82158d9c50802955804713be0
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-08-31 12:59:46 +02:00
parent 348ef8cdd2
commit 73874980ef
2 changed files with 8 additions and 0 deletions

View File

@@ -133,6 +133,13 @@ void BeautifierPlugin::extensionsInitialized()
dd = new BeautifierPluginPrivate;
}
ExtensionSystem::IPlugin::ShutdownFlag BeautifierPlugin::aboutToShutdown()
{
delete dd;
dd = nullptr;
return SynchronousShutdown;
}
BeautifierPluginPrivate::BeautifierPluginPrivate()
{
updateActions();

View File

@@ -49,6 +49,7 @@ public:
private:
bool initialize(const QStringList &arguments, QString *errorString) override;
void extensionsInitialized() override;
ShutdownFlag aboutToShutdown() override;
};
} // namespace Internal