Merge lp:~larsu/qmenumodel/add-nameowner-property into lp:qmenumodel

Proposed by Lars Karlitski
Status: Merged
Approved by: Mirco Müller
Approved revision: 110
Merged at revision: 109
Proposed branch: lp:~larsu/qmenumodel/add-nameowner-property
Merge into: lp:qmenumodel
Diff against target: 84 lines (+20/-0)
3 files modified
debian/changelog (+6/-0)
libqmenumodel/src/unitymenumodel.cpp (+10/-0)
libqmenumodel/src/unitymenumodel.h (+4/-0)
To merge this branch: bzr merge lp:~larsu/qmenumodel/add-nameowner-property
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+226428@code.launchpad.net

Commit message

unitymenumodel: add nameOwner property

Description of the change

unitymenumodel: add nameOwner property

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mirco Müller (macslow) wrote :

Looks good to me... and helps me with sorting out https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1308011

review: Approve
111. By Lars Karlitski

Update changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-07-04 07:38:12 +0000
3+++ debian/changelog 2014-07-15 16:11:58 +0000
4@@ -1,3 +1,9 @@
5+qmenumodel (0.2.8-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * unitymenumodel: add nameOwner property
8+
9+ -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Tue, 15 Jul 2014 18:10:54 +0200
10+
11 qmenumodel (0.2.7+14.10.20140704-0ubuntu1) utopic; urgency=low
12
13 [ Charles Kerr ]
14
15=== modified file 'libqmenumodel/src/unitymenumodel.cpp'
16--- libqmenumodel/src/unitymenumodel.cpp 2014-06-30 17:42:42 +0000
17+++ libqmenumodel/src/unitymenumodel.cpp 2014-07-15 16:11:58 +0000
18@@ -170,6 +170,8 @@
19
20 this->updateActions();
21 this->updateMenuModel();
22+
23+ Q_EMIT model->nameOwnerChanged (this->nameOwner);
24 }
25
26 void UnityMenuModelPrivate::updateActions()
27@@ -231,6 +233,8 @@
28
29 priv->updateActions();
30 priv->updateMenuModel();
31+
32+ Q_EMIT priv->model->nameOwnerChanged (priv->nameOwner);
33 }
34
35 void UnityMenuModelPrivate::nameVanished(GDBusConnection *connection, const gchar *name, gpointer user_data)
36@@ -295,6 +299,11 @@
37 return priv->busName;
38 }
39
40+QByteArray UnityMenuModel::nameOwner() const
41+{
42+ return priv->nameOwner;
43+}
44+
45 void UnityMenuModel::setBusName(const QByteArray &name)
46 {
47 if (name == priv->busName)
48@@ -309,6 +318,7 @@
49 UnityMenuModelPrivate::nameAppeared, UnityMenuModelPrivate::nameVanished,
50 priv, NULL);
51 priv->busName = name;
52+ Q_EMIT busNameChanged (priv->busName);
53 }
54
55 QVariantMap UnityMenuModel::actions() const
56
57=== modified file 'libqmenumodel/src/unitymenumodel.h'
58--- libqmenumodel/src/unitymenumodel.h 2013-09-03 10:02:47 +0000
59+++ libqmenumodel/src/unitymenumodel.h 2014-07-15 16:11:58 +0000
60@@ -28,6 +28,7 @@
61 {
62 Q_OBJECT
63 Q_PROPERTY(QByteArray busName READ busName WRITE setBusName NOTIFY busNameChanged)
64+ Q_PROPERTY(QByteArray nameOwner READ nameOwner NOTIFY nameOwnerChanged)
65 Q_PROPERTY(QVariantMap actions READ actions WRITE setActions NOTIFY actionsChanged)
66 Q_PROPERTY(QByteArray menuObjectPath READ menuObjectPath WRITE setMenuObjectPath NOTIFY menuObjectPathChanged)
67 Q_PROPERTY(ActionStateParser* actionStateParser READ actionStateParser WRITE setActionStateParser NOTIFY actionStateParserChanged)
68@@ -39,6 +40,8 @@
69 QByteArray busName() const;
70 void setBusName(const QByteArray &name);
71
72+ QByteArray nameOwner() const;
73+
74 QVariantMap actions() const;
75 void setActions(const QVariantMap &actions);
76
77@@ -67,6 +70,7 @@
78
79 Q_SIGNALS:
80 void busNameChanged(const QByteArray &name);
81+ void nameOwnerChanged(const QByteArray &owner);
82 void actionsChanged(const QByteArray &path);
83 void menuObjectPathChanged(const QByteArray &path);
84 void actionStateParserChanged(ActionStateParser* parser);

Subscribers

People subscribed via source and target branches