Merge lp:~renatofilho/buteo-syncfw-qml/service-available-property into lp:buteo-syncfw-qml

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 8
Merged at revision: 8
Proposed branch: lp:~renatofilho/buteo-syncfw-qml/service-available-property
Merge into: lp:buteo-syncfw-qml
Diff against target: 59 lines (+10/-0)
2 files modified
Buteo/buteo-sync-qml.cpp (+7/-0)
Buteo/buteo-sync-qml.h (+3/-0)
To merge this branch: bzr merge lp:~renatofilho/buteo-syncfw-qml/service-available-property
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
system-apps-ci-bot continuous-integration Approve
Review via email: mp+306130@code.launchpad.net

Commit message

Expose 'serviceAvailable' property.

This property can be used to check if the service is installed/running or not.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:8
https://jenkins.canonical.com/system-apps/job/lp-buteo-syncfw-qml-ci/3/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1554
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/361
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1554
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1402/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1402
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1402/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-buteo-syncfw-qml-ci/3/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Buteo/buteo-sync-qml.cpp'
2--- Buteo/buteo-sync-qml.cpp 2015-09-29 13:01:01 +0000
3+++ Buteo/buteo-sync-qml.cpp 2016-09-19 17:43:26 +0000
4@@ -51,6 +51,11 @@
5 return profiles().count();
6 }
7
8+bool ButeoSyncFW::serviceAvailable() const
9+{
10+ return !m_iface.isNull();
11+}
12+
13 void ButeoSyncFW::classBegin()
14 {
15 m_serviceWatcher.reset(new QDBusServiceWatcher(BUTEO_DBUS_SERVICE_NAME,
16@@ -102,6 +107,7 @@
17 reloadProfiles();
18
19 // notify changes on properties
20+ emit serviceAvailableChanged();
21 emit syncStatusChanged();
22 }
23
24@@ -190,6 +196,7 @@
25 m_iface.reset();
26
27 // notify changes on properties
28+ emit serviceAvailableChanged();
29 emit profilesChanged();
30 emit syncStatusChanged();
31 }
32
33=== modified file 'Buteo/buteo-sync-qml.h'
34--- Buteo/buteo-sync-qml.h 2015-09-01 15:04:57 +0000
35+++ Buteo/buteo-sync-qml.h 2016-09-19 17:43:26 +0000
36@@ -28,6 +28,7 @@
37 Q_PROPERTY(bool syncing READ syncing NOTIFY syncStatusChanged)
38 Q_PROPERTY(int profilesCount READ profilesCount NOTIFY profilesChanged)
39 Q_PROPERTY(QStringList visibleSyncProfiles READ visibleSyncProfiles NOTIFY profilesChanged)
40+ Q_PROPERTY(bool serviceAvailable READ serviceAvailable NOTIFY serviceAvailableChanged)
41
42 public:
43 ButeoSyncFW(QObject *parent = 0);
44@@ -35,6 +36,7 @@
45 bool syncing() const;
46 QStringList visibleSyncProfiles() const;
47 int profilesCount() const;
48+ bool serviceAvailable() const;
49
50 // QQmlParserStatus
51 void classBegin();
52@@ -118,6 +120,7 @@
53 */
54 void syncStatusChanged();
55 void profilesChanged();
56+ void serviceAvailableChanged();
57
58 public slots:
59 /*!

Subscribers

People subscribed via source and target branches