Merge lp:~renatofilho/address-book-app/attach-to-sync-monitor into lp:~phablet-team/address-book-app/staging

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Merged at revision: 319
Proposed branch: lp:~renatofilho/address-book-app/attach-to-sync-monitor
Merge into: lp:~phablet-team/address-book-app/staging
Diff against target: 29 lines (+9/-2)
1 file modified
src/app/addressbookapp.cpp (+9/-2)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/attach-to-sync-monitor
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+240165@code.launchpad.net

Commit message

Call "attach" on sync monitor server to notify a new client connection.
We need to notify sync-monitor that we are attached to him to start to receive signals.

Description of the change

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/addressbookapp.cpp'
2--- src/app/addressbookapp.cpp 2014-07-20 20:23:20 +0000
3+++ src/app/addressbookapp.cpp 2014-10-30 20:04:38 +0000
4@@ -221,6 +221,11 @@
5 {
6 unsetFirstRun();
7
8+ if (m_syncMonitor) {
9+ m_syncMonitor->call("detach");
10+ delete m_syncMonitor;
11+ }
12+
13 if (m_view) {
14 delete m_view;
15 }
16@@ -438,9 +443,11 @@
17 "com.canonical.SyncMonitor");
18 if (m_syncMonitor->lastError().isValid()) {
19 qWarning() << "Fail to connect with sync monitor:" << m_syncMonitor->lastError();
20+ } else {
21+ connect(m_syncMonitor, SIGNAL(stateChanged()), SIGNAL(syncingChanged()));
22+ connect(m_syncMonitor, SIGNAL(enabledServicesChanged()), SIGNAL(syncEnabledChanged()));
23+ m_syncMonitor->call("attach");
24 }
25- connect(m_syncMonitor, SIGNAL(stateChanged()), SIGNAL(syncingChanged()));
26- connect(m_syncMonitor, SIGNAL(enabledServicesChanged()), SIGNAL(syncEnabledChanged()));
27 Q_EMIT syncEnabledChanged();
28 Q_EMIT syncingChanged();
29 }

Subscribers

People subscribed via source and target branches