Merge lp:~mzanetti/unity8/fix-launcher-count-emblems into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1372
Merged at revision: 1407
Proposed branch: lp:~mzanetti/unity8/fix-launcher-count-emblems
Merge into: lp:unity8
Diff against target: 34 lines (+4/-4)
2 files modified
plugins/Unity/Launcher/dbusinterface.cpp (+2/-2)
tests/plugins/Unity/Launcher/launchermodeltest.cpp (+2/-2)
To merge this branch: bzr merge lp:~mzanetti/unity8/fix-launcher-count-emblems
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+240155@code.launchpad.net

Commit message

Fix DBusVariant conversion for launcher emblems

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

no

 * Did you perform an exploratory manual test run of your code change and any related functionality?

yes

 * Did you make sure that your branch does not contain spurious tags?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

n/a

 * If you changed the UI, has there been a design review?

n/a

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

* Did CI run pass?
No, because autopilot

* Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/Launcher/dbusinterface.cpp'
2--- plugins/Unity/Launcher/dbusinterface.cpp 2014-08-29 14:24:45 +0000
3+++ plugins/Unity/Launcher/dbusinterface.cpp 2014-10-30 18:53:47 +0000
4@@ -183,13 +183,13 @@
5 }
6 } else if (message.member() == "Set") {
7 if (message.arguments()[1].toString() == "count") {
8- int newCount = message.arguments()[2].toInt();
9+ int newCount = message.arguments()[2].value<QDBusVariant>().variant().toInt();
10 if (!item || newCount != item->count()) {
11 Q_EMIT countChanged(appid, newCount);
12 emitPropChangedDbus(appid, "count", QVariant(newCount));
13 }
14 } else if (message.arguments()[1].toString() == "countVisible") {
15- bool newVisible = message.arguments()[2].toBool();
16+ bool newVisible = message.arguments()[2].value<QDBusVariant>().variant().toBool();
17 if (!item || newVisible != item->countVisible()) {
18 Q_EMIT countVisibleChanged(appid, newVisible);
19 emitPropChangedDbus(appid, "countVisible", newVisible);
20
21=== modified file 'tests/plugins/Unity/Launcher/launchermodeltest.cpp'
22--- tests/plugins/Unity/Launcher/launchermodeltest.cpp 2014-09-29 14:26:56 +0000
23+++ tests/plugins/Unity/Launcher/launchermodeltest.cpp 2014-10-30 18:53:47 +0000
24@@ -351,8 +351,8 @@
25 QCOMPARE(map.value("countVisible").toBool(), false);
26
27 // Now make it visible and set it to 55 through D-Bus
28- interface.call("Set", "com.canonical.Unity.Launcher.Item", "count", 55);
29- interface.call("Set", "com.canonical.Unity.Launcher.Item", "countVisible", true);
30+ interface.call("Set", "com.canonical.Unity.Launcher.Item", "count", QVariant::fromValue(QDBusVariant(55)));
31+ interface.call("Set", "com.canonical.Unity.Launcher.Item", "countVisible", QVariant::fromValue(QDBusVariant(true)));
32
33 // Fetch it again using GetAll
34 reply = interface.call("GetAll");

Subscribers

People subscribed via source and target branches