diff options
author | JiDe Zhang <zhangjide@uniontech.com> | 2021-09-28 17:46:16 +0800 |
---|---|---|
committer | JiDe Zhang <zhangjide@uniontech.com> | 2021-09-29 01:33:01 +0000 |
commit | 71ba53e3a7b63da1ac8755dba8b9311774d46103 (patch) | |
tree | 3ea6ac88902d3881f760591ffac75fb0df13e299 /src/plugins/platformthemes/xdgdesktopportal | |
parent | 52ad59f9eabbe1fc8ca49d117e4955f2d21d50a7 (diff) |
Fix memory leak
Destroy the QDBusPendingCallWatcher object when received
the QDBusPendingCallWatcher::finished signal later.
Pick-to: 5.15 6.2
Change-Id: I1ec67bf7c286f38200c374ad92df2a1579588a8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platformthemes/xdgdesktopportal')
-rw-r--r-- | src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp | 1 | ||||
-rw-r--r-- | src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp index 85bdd1ab88..66e374f621 100644 --- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp +++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp @@ -302,6 +302,7 @@ void QXdgDesktopPortalFileDialog::openPortal() this, SLOT(gotResponse(uint,QVariantMap))); } + watcher->deleteLater(); }); } diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp index fb324afbd8..2fc3167fd5 100644 --- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp +++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp @@ -111,6 +111,7 @@ QXdgDesktopPortalTheme::QXdgDesktopPortalTheme() if (reply.isValid()) { d->fileChooserPortalVersion = reply.value().toUInt(); } + watcher->deleteLater(); }); } |