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
=== modified file 'src/app/addressbookapp.cpp'
--- src/app/addressbookapp.cpp 2014-07-20 20:23:20 +0000
+++ src/app/addressbookapp.cpp 2014-10-30 20:04:38 +0000
@@ -221,6 +221,11 @@
221{221{
222 unsetFirstRun();222 unsetFirstRun();
223223
224 if (m_syncMonitor) {
225 m_syncMonitor->call("detach");
226 delete m_syncMonitor;
227 }
228
224 if (m_view) {229 if (m_view) {
225 delete m_view;230 delete m_view;
226 }231 }
@@ -438,9 +443,11 @@
438 "com.canonical.SyncMonitor");443 "com.canonical.SyncMonitor");
439 if (m_syncMonitor->lastError().isValid()) {444 if (m_syncMonitor->lastError().isValid()) {
440 qWarning() << "Fail to connect with sync monitor:" << m_syncMonitor->lastError();445 qWarning() << "Fail to connect with sync monitor:" << m_syncMonitor->lastError();
446 } else {
447 connect(m_syncMonitor, SIGNAL(stateChanged()), SIGNAL(syncingChanged()));
448 connect(m_syncMonitor, SIGNAL(enabledServicesChanged()), SIGNAL(syncEnabledChanged()));
449 m_syncMonitor->call("attach");
441 }450 }
442 connect(m_syncMonitor, SIGNAL(stateChanged()), SIGNAL(syncingChanged()));
443 connect(m_syncMonitor, SIGNAL(enabledServicesChanged()), SIGNAL(syncEnabledChanged()));
444 Q_EMIT syncEnabledChanged();451 Q_EMIT syncEnabledChanged();
445 Q_EMIT syncingChanged();452 Q_EMIT syncingChanged();
446}453}

Subscribers

People subscribed via source and target branches