Merge lp:~mardy/signon-ui/local-interface into lp:signon-ui

Proposed by Alberto Mardegan on 2012-09-24
Status: Merged
Approved by: David King on 2012-09-24
Approved revision: 64
Merged at revision: 65
Proposed branch: lp:~mardy/signon-ui/local-interface
Merge into: lp:signon-ui
Diff against target: 27 lines (+5/-3)
2 files modified
src/request.cpp (+4/-1)
src/webcredentials_interface.cpp (+1/-2)
To merge this branch: bzr merge lp:~mardy/signon-ui/local-interface
Reviewer Review Type Date Requested Status
David King (community) 2012-09-24 Approve on 2012-09-24
jenkins (community) continuous-integration Needs Fixing on 2012-09-24
Review via email: mp+126012@code.launchpad.net

Description of the change

Do not instantiate invalid QDBusMessages

QDBus does not allow creating replies out of invalid messages: there's a
Q_ASSERT for that inside the Qt code, which luckily isn't met because Qt is
built with assertions disabled.
Still, we were running into undefined behaviour.

To post a comment you must log in.
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)
David King (amigadave) wrote :

Seems fine here.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/request.cpp'
2--- src/request.cpp 2012-03-16 13:06:13 +0000
3+++ src/request.cpp 2012-09-24 13:49:22 +0000
4@@ -268,7 +268,10 @@
5 QDBusPendingReply<> reply =
6 webcredentialsIf->ReportFailure(account->id(), notification);
7 if (reply.isFinished()) {
8- if (reply.isError()) {
9+ if (reply.isError() &&
10+ /* if this is a fake D-Bus interface, we get the
11+ * "Disconnected" error. */
12+ reply.error().type() != QDBusError::Disconnected) {
13 BLAME() << "Error dispatching to indicator:" <<
14 reply.error().message();
15 return false;
16
17=== modified file 'src/webcredentials_interface.cpp'
18--- src/webcredentials_interface.cpp 2012-03-06 12:41:37 +0000
19+++ src/webcredentials_interface.cpp 2012-09-24 13:49:22 +0000
20@@ -56,6 +56,5 @@
21 {
22 Q_ASSERT(IndicatorService::instance() != 0);
23 IndicatorService::instance()->reportFailure(account_id, notification);
24- QDBusMessage message;
25- return QDBusPendingCall::fromCompletedCall(message.createReply());
26+ return QDBusPendingReply<>();
27 }

Subscribers

People subscribed via source and target branches

to all changes: