Merge lp:~ralsina/ubuntu-push-qml/unpack-tags into lp:ubuntu-push-qml/rtm

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 12
Merged at revision: 10
Proposed branch: lp:~ralsina/ubuntu-push-qml/unpack-tags
Merge into: lp:ubuntu-push-qml/rtm
Diff against target: 15 lines (+4/-1)
1 file modified
src/Ubuntu/PushNotifications/pushclient.cpp (+4/-1)
To merge this branch: bzr merge lp:~ralsina/ubuntu-push-qml/unpack-tags
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Review via email: mp+240574@code.launchpad.net

Commit message

Expand tags before passing them to clearPersistent

Description of the change

Expand tags before passing them to clearPersistent (bug #1384855)

To test:

Install hello app.
Edit main.qml and change

        Component.onCompleted: {
            notificationsChanged.connect(messageList.handle_notifications)
            error.connect(messageList.handle_error)
        }

to

        Component.onCompleted: {
            notificationsChanged.connect(messageList.handle_notifications)
            error.connect(messageList.handle_error)
            pushClient.clearPersistent([])
        }

Start the app, make sure it doesn't crash push-client.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/PushNotifications/pushclient.cpp'
2--- src/Ubuntu/PushNotifications/pushclient.cpp 2014-08-14 13:09:33 +0000
3+++ src/Ubuntu/PushNotifications/pushclient.cpp 2014-11-04 13:19:05 +0000
4@@ -121,7 +121,10 @@
5 QString path(POSTAL_PATH);
6 path += "/" + pkgname;
7 QDBusMessage message = QDBusMessage::createMethodCall(POSTAL_SERVICE, path, POSTAL_IFACE, "ClearPersistent");
8- message << this->appId << tags;
9+ message << this->appId;
10+ for (int i = 0; i < tags.size(); ++i) {
11+ message << tags.at(i);
12+ }
13 QDBusMessage reply = bus.call(message);
14 if (reply.type() == QDBusMessage::ErrorMessage) {
15 emit error(reply.errorMessage());

Subscribers

People subscribed via source and target branches