aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/unitymenumodel.cpp
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2014-07-17 02:04:02 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-07-17 02:04:02 +0000
commitf7719ce3a367360a2e01a856f6db9348d6bfed5b (patch)
tree6e9d4cf3455c0f658a3676e68f287527b8ecca8a /libqmenumodel/src/unitymenumodel.cpp
parent018eaeb8b2dc83867dccee516c54499594788ed8 (diff)
parent166406a8433438623f5b2ed42830e4abd417adc8 (diff)
downloadqmenumodel-f7719ce3a367360a2e01a856f6db9348d6bfed5b.tar.gz
qmenumodel-f7719ce3a367360a2e01a856f6db9348d6bfed5b.tar.bz2
qmenumodel-f7719ce3a367360a2e01a856f6db9348d6bfed5b.zip
unitymenumodel: add nameOwner property Fixes: 1308011
Approved by: Mirco Müller, PS Jenkins bot
Diffstat (limited to 'libqmenumodel/src/unitymenumodel.cpp')
-rw-r--r--libqmenumodel/src/unitymenumodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp
index a6ae140..a75e8c8 100644
--- a/libqmenumodel/src/unitymenumodel.cpp
+++ b/libqmenumodel/src/unitymenumodel.cpp
@@ -170,6 +170,8 @@ void UnityMenuModelPrivate::clearName()
this->updateActions();
this->updateMenuModel();
+
+ Q_EMIT model->nameOwnerChanged (this->nameOwner);
}
void UnityMenuModelPrivate::updateActions()
@@ -231,6 +233,8 @@ void UnityMenuModelPrivate::nameAppeared(GDBusConnection *connection, const gcha
priv->updateActions();
priv->updateMenuModel();
+
+ Q_EMIT priv->model->nameOwnerChanged (priv->nameOwner);
}
void UnityMenuModelPrivate::nameVanished(GDBusConnection *connection, const gchar *name, gpointer user_data)
@@ -295,6 +299,11 @@ QByteArray UnityMenuModel::busName() const
return priv->busName;
}
+QByteArray UnityMenuModel::nameOwner() const
+{
+ return priv->nameOwner;
+}
+
void UnityMenuModel::setBusName(const QByteArray &name)
{
if (name == priv->busName)
@@ -309,6 +318,7 @@ void UnityMenuModel::setBusName(const QByteArray &name)
UnityMenuModelPrivate::nameAppeared, UnityMenuModelPrivate::nameVanished,
priv, NULL);
priv->busName = name;
+ Q_EMIT busNameChanged (priv->busName);
}
QVariantMap UnityMenuModel::actions() const