Merge lp:~david.edmundson/libdbusmenu-qt/libdbusmenu-qt into lp:libdbusmenu-qt

Proposed by David Edmundson on 2015-05-05
Status: Merged
Approved by: Pete Woods on 2015-05-22
Approved revision: 269
Merged at revision: 268
Proposed branch: lp:~david.edmundson/libdbusmenu-qt/libdbusmenu-qt
Merge into: lp:libdbusmenu-qt
Diff against target: 30 lines (+4/-2)
1 file modified
src/dbusmenuimporter.cpp (+4/-2)
To merge this branch: bzr merge lp:~david.edmundson/libdbusmenu-qt/libdbusmenu-qt
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) 2015-05-05 Approve on 2015-05-14
PS Jenkins bot (community) continuous-integration Approve on 2015-05-05
Review via email: mp+258306@code.launchpad.net

Commit message

fix leaks

Description of the change

fix leaks

To post a comment you must log in.
Albert Astals Cid (aacid) wrote :

Looks good to me.

review: Approve
David Edmundson (david.edmundson) wrote :

How do I now merge the branch? I don't think I have permissions.

Albert Astals Cid (aacid) wrote :

Pete will handle it next week

David Edmundson (david.edmundson) wrote :

Perfect, thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dbusmenuimporter.cpp'
2--- src/dbusmenuimporter.cpp 2014-03-05 09:53:39 +0000
3+++ src/dbusmenuimporter.cpp 2015-05-21 14:53:26 +0000
4@@ -433,6 +433,7 @@
5 void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher)
6 {
7 int parentId = watcher->property(DBUSMENU_PROPERTY_ID).toInt();
8+ watcher->deleteLater();
9
10 QDBusPendingReply<uint, DBusMenuLayoutItem> reply = *watcher;
11 if (!reply.isValid()) {
12@@ -538,6 +539,7 @@
13 void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher *watcher)
14 {
15 int id = watcher->property(DBUSMENU_PROPERTY_ID).toInt();
16+ watcher->deleteLater();
17
18 QDBusPendingReply<bool> reply = *watcher;
19 if (reply.isError()) {
20@@ -551,8 +553,8 @@
21
22 if (needRefresh || menu->actions().isEmpty()) {
23 d->m_idsRefreshedByAboutToShow << id;
24- watcher = d->refresh(id);
25- if (!d->waitForWatcher(watcher, REFRESH_TIMEOUT)) {
26+ QDBusPendingCallWatcher *watcher2 = d->refresh(id);
27+ if (!d->waitForWatcher(watcher2, REFRESH_TIMEOUT)) {
28 DMWARNING << "Application did not refresh before timeout";
29 }
30 }

Subscribers

People subscribed via source and target branches