AssetExporterPlugin: Don't leak action on shutdown

Detected by memory analyzer.

Change-Id: Iddfe613e8c7267de24d8d9cc07e1e0c7357e383f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-06-27 14:19:17 +02:00
parent 1956fa0365
commit 1a144b4bdd

View File

@@ -105,7 +105,7 @@ void AssetExporterPlugin::onExport()
void AssetExporterPlugin::addActions() void AssetExporterPlugin::addActions()
{ {
auto exportAction = new QAction(tr("Export Components")); auto exportAction = new QAction(tr("Export Components"), this);
exportAction->setToolTip(tr("Export components in the current project.")); exportAction->setToolTip(tr("Export components in the current project."));
connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport); connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport);
Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML); Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML);