Merge lp:~gnumdk/appmenu-qt/fix-service-isValid into lp:appmenu-qt

Proposed by Cédric Bellegarde on 2013-01-14
Status: Merged
Approved by: Albert Astals Cid on 2013-01-17
Approved revision: 51
Merged at revision: 51
Proposed branch: lp:~gnumdk/appmenu-qt/fix-service-isValid
Merge into: lp:appmenu-qt
Diff against target: 26 lines (+7/-3)
1 file modified
src/appmenuplatformmenubar.cpp (+7/-3)
To merge this branch: bzr merge lp:~gnumdk/appmenu-qt/fix-service-isValid
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) 2013-01-14 Approve on 2013-01-17
PS Jenkins bot continuous-integration Pending
Review via email: mp+143134@code.launchpad.net

Description of the change

This patch fix an issue in revision 50:
https://bbs.archlinux.org/viewtopic.php?id=155843

We need to check if service is valid to not hide menubar when no registrar is running.

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

Makes sense

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/appmenuplatformmenubar.cpp'
2--- src/appmenuplatformmenubar.cpp 2013-01-11 15:05:38 +0000
3+++ src/appmenuplatformmenubar.cpp 2013-01-14 16:01:25 +0000
4@@ -410,6 +410,10 @@
5 registrar = new com::canonical::AppMenu::Registrar(REGISTRAR_SERVICE, REGISTRAR_PATH, QDBusConnection::sessionBus(), 0);
6 }
7
8+ if (!registrar || !registrar->isValid()) {
9+ return false;
10+ }
11+
12 Q_FOREACH(QAction *action, m_menuBar->actions()) {
13 if (!action->isSeparator()) {
14 m_rootMenu->addAction(action);
15@@ -430,9 +434,9 @@
16 }
17
18 m_registeredWinId = winId;
19- if (registrar) {
20- registrar->RegisterWindow(winId, QDBusObjectPath(m_objectPath));
21- }
22+
23+ registrar->RegisterWindow(winId, QDBusObjectPath(m_objectPath));
24+
25 return true;
26 }
27

Subscribers

People subscribed via source and target branches

to all changes: