From 5809d6f617aafd138de41ef4f7af57cc6d6703e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kaijanm=C3=A4ki?= Date: Wed, 2 Apr 2014 09:28:57 +0300 Subject: UnityMenuModel::setName: handle empty strings properly. --- libqmenumodel/src/unitymenumodel.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp index a2aae31..6b57493 100644 --- a/libqmenumodel/src/unitymenumodel.cpp +++ b/libqmenumodel/src/unitymenumodel.cpp @@ -294,13 +294,23 @@ void UnityMenuModel::setBusName(const QByteArray &name) { priv->clearName(); - if (priv->nameWatchId) + if (priv->nameWatchId) { g_bus_unwatch_name (priv->nameWatchId); + priv->nameWatchId = 0; + } + priv->busName = name; + if (name.isEmpty()) + return; + + /* We could do a g_dbus_is_name() check here if we want to + * validate the name before passing it to g_bus_watch_name(). + * Currently if an invalid name is passed nameWatchId becomes 0 + * and g_bus_watch_name() prints out a nasty GCritical. + */ priv->nameWatchId = g_bus_watch_name (G_BUS_TYPE_SESSION, name.constData(), G_BUS_NAME_WATCHER_FLAGS_AUTO_START, UnityMenuModelPrivate::nameAppeared, UnityMenuModelPrivate::nameVanished, priv, NULL); - priv->busName = name; } QVariantMap UnityMenuModel::actions() const -- cgit v1.2.3 From 112eb60fcc0b3d8075c6dd5d522e1669210a6629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kaijanm=C3=A4ki?= Date: Wed, 2 Apr 2014 13:15:29 +0300 Subject: revert the last commit. --- libqmenumodel/src/unitymenumodel.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp index 6b57493..a2aae31 100644 --- a/libqmenumodel/src/unitymenumodel.cpp +++ b/libqmenumodel/src/unitymenumodel.cpp @@ -294,23 +294,13 @@ void UnityMenuModel::setBusName(const QByteArray &name) { priv->clearName(); - if (priv->nameWatchId) { + if (priv->nameWatchId) g_bus_unwatch_name (priv->nameWatchId); - priv->nameWatchId = 0; - } - priv->busName = name; - if (name.isEmpty()) - return; - - /* We could do a g_dbus_is_name() check here if we want to - * validate the name before passing it to g_bus_watch_name(). - * Currently if an invalid name is passed nameWatchId becomes 0 - * and g_bus_watch_name() prints out a nasty GCritical. - */ priv->nameWatchId = g_bus_watch_name (G_BUS_TYPE_SESSION, name.constData(), G_BUS_NAME_WATCHER_FLAGS_AUTO_START, UnityMenuModelPrivate::nameAppeared, UnityMenuModelPrivate::nameVanished, priv, NULL); + priv->busName = name; } QVariantMap UnityMenuModel::actions() const -- cgit v1.2.3 From bc008a3a928859b5496848b5867d93a1363473e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kaijanm=C3=A4ki?= Date: Wed, 2 Apr 2014 13:19:02 +0300 Subject: Add standard "has the property actually changed" check to UnityMenuModel::setBusName() --- libqmenumodel/src/unitymenumodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp index a2aae31..8db990b 100644 --- a/libqmenumodel/src/unitymenumodel.cpp +++ b/libqmenumodel/src/unitymenumodel.cpp @@ -292,6 +292,9 @@ QByteArray UnityMenuModel::busName() const void UnityMenuModel::setBusName(const QByteArray &name) { + if (name == priv->busName) + return; + priv->clearName(); if (priv->nameWatchId) -- cgit v1.2.3 From 26a791f2e64a3b6a66134b8341b08f7089015aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kaijanm=C3=A4ki?= Date: Thu, 8 May 2014 12:53:49 +0300 Subject: manually merge debian/changelog after a manual upload to the archive. --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index e0f6f23..8415f52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +qmenumodel (0.2.7+14.04.20140305-0ubuntu2) trusty; urgency=medium + + * No-change rebuild for shlib changes in qtbase and qtdeclarative. + + -- Ricardo Salveti de Araujo Mon, 14 Apr 2014 13:06:57 -0300 + qmenumodel (0.2.7+14.04.20140305-0ubuntu1) trusty; urgency=low [ CI bot ] -- cgit v1.2.3 From 20eb438523e9dd3c8ce6a52cf3b9d212eb434f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kaijanm=C3=A4ki?= Date: Thu, 8 May 2014 13:19:51 +0300 Subject: try to fix debian/changelog for the ci train.. --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8415f52..3a54859 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +qmenumodel (0.2.7+14.04.20140305-0ubuntu3) UNRELEASED; urgency=medium + + * Add standard "has the property actually changed" check to UnityMenuModel::setBusName() + + -- Antti Kaijanmäki Thu, 08 May 2014 13:18:09 +0300 + qmenumodel (0.2.7+14.04.20140305-0ubuntu2) trusty; urgency=medium * No-change rebuild for shlib changes in qtbase and qtdeclarative. -- cgit v1.2.3 From 802224ff32bbb4b669343e614c651f52b69b54ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kaijanm=C3=A4ki?= Date: Thu, 8 May 2014 13:24:22 +0300 Subject: wrap the changelog entry. --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3a54859..69e5a6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ qmenumodel (0.2.7+14.04.20140305-0ubuntu3) UNRELEASED; urgency=medium - * Add standard "has the property actually changed" check to UnityMenuModel::setBusName() + * Add standard "has the property actually changed" + check to UnityMenuModel::setBusName() -- Antti Kaijanmäki Thu, 08 May 2014 13:18:09 +0300 -- cgit v1.2.3