libdbusmenu-qt5/dont-leak-all-the-watchers.diff

21 lines
737 B
Diff
Raw Normal View History

=== modified file 'src/dbusmenuimporter.cpp'
--- src/dbusmenuimporter.cpp 2014-03-05 09:53:39 +0000
+++ src/dbusmenuimporter.cpp 2015-05-05 19:42:58 +0000
@@ -433,6 +433,7 @@
void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher)
{
int parentId = watcher->property(DBUSMENU_PROPERTY_ID).toInt();
+ watcher->deleteLater();
QDBusPendingReply<uint, DBusMenuLayoutItem> reply = *watcher;
if (!reply.isValid()) {
@@ -538,6 +539,7 @@
void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher *watcher)
{
int id = watcher->property(DBUSMENU_PROPERTY_ID).toInt();
+ watcher->deleteLater();
QDBusPendingReply<bool> reply = *watcher;
if (reply.isError()) {