Merge lp:~renatofilho/address-book-app/buteo-qml into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Michael Sheldon
Approved revision: 460
Merged at revision: 477
Proposed branch: lp:~renatofilho/address-book-app/buteo-qml
Merge into: lp:address-book-app
Diff against target: 211 lines (+45/-13)
8 files modified
debian/control (+2/-2)
src/app/addressbookapp.cpp (+10/-0)
src/app/addressbookapp.h (+6/-2)
src/imports/ABContactListPage.qml (+1/-1)
src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailSyncTargetEditor.qml (+14/-0)
src/imports/Ubuntu/Contacts/ContactListView.qml (+11/-6)
src/imports/Ubuntu/Contacts/OnlineAccountsHelper.qml (+1/-1)
src/imports/Ubuntu/Contacts/simcardcontacts.cpp (+0/-1)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/buteo-qml
Reviewer Review Type Date Requested Status
Ken VanDine packaging Approve
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+264294@code.launchpad.net

Commit message

Replace sync-monitor with buteo qml component.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
457. By Renato Araujo Oliveira Filho

Show Address book icon if available.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
458. By Renato Araujo Oliveira Filho

Use iconSource property on OptionSelectorDelegate instead of icon.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
459. By Renato Araujo Oliveira Filho

Hide sync button if the device goes offline.

460. By Renato Araujo Oliveira Filho

Removed ununsed include.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected?
 - https://code.launchpad.net/~renatofilho/address-book-app/buteo-qml/+merge/264294

Is your branch in sync with latest trunk?
YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
YES

Did you successfully run all tests found in your component's Test Plan on device or emulator?
YES

If you changed the UI, was the change specified/approved by design?
NO UI CHANGED

If you changed UI labels, did you update the pot file?
NO LABEL CHANGED

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
YES

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Code looks good to me

review: Approve
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Packaging changes look fine

review: Approve (packaging)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2015-05-14 21:23:43 +0000
+++ debian/control 2015-07-21 18:04:28 +0000
@@ -18,7 +18,7 @@
18 qtdeclarative5-ubuntu-content1 [i386 amd64 armhf],18 qtdeclarative5-ubuntu-content1 [i386 amd64 armhf],
19 qtdeclarative5-ubuntu-history0.1 [i386 amd64 armhf],19 qtdeclarative5-ubuntu-history0.1 [i386 amd64 armhf],
20 qtdeclarative5-ubuntu-keyboard-extensions0.1 [i386 amd64 armhf],20 qtdeclarative5-ubuntu-keyboard-extensions0.1 [i386 amd64 armhf],
21 qtdeclarative5-ubuntu-syncmonitor0.1 [i386 amd64 armhf],21 qtdeclarative5-buteo-syncfw0.1 [i386 amd64 armhf],
22 qtdeclarative5-ubuntu-telephony-phonenumber0.1 [i386 amd64 armhf],22 qtdeclarative5-ubuntu-telephony-phonenumber0.1 [i386 amd64 armhf],
23 qtdeclarative5-ubuntu-ui-toolkit-plugin [i386 amd64 armhf],23 qtdeclarative5-ubuntu-ui-toolkit-plugin [i386 amd64 armhf],
24 qt5-default,24 qt5-default,
@@ -62,7 +62,7 @@
62Depends: qtdeclarative5-accounts-plugin,62Depends: qtdeclarative5-accounts-plugin,
63 qtdeclarative5-online-accounts-client0.1,63 qtdeclarative5-online-accounts-client0.1,
64 qtdeclarative5-qtquick2-plugin,64 qtdeclarative5-qtquick2-plugin,
65 qtdeclarative5-ubuntu-syncmonitor0.1,65 qtdeclarative5-buteo-syncfw0.1,
66 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+14.10.20140527) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,66 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+14.10.20140527) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
67 qtdeclarative5-qtcontacts-plugin,67 qtdeclarative5-qtcontacts-plugin,
68 suru-icon-theme,68 suru-icon-theme,
6969
=== modified file 'src/app/addressbookapp.cpp'
--- src/app/addressbookapp.cpp 2015-06-08 15:59:22 +0000
+++ src/app/addressbookapp.cpp 2015-07-21 18:04:28 +0000
@@ -100,6 +100,7 @@
100AddressBookApp::AddressBookApp(int &argc, char **argv)100AddressBookApp::AddressBookApp(int &argc, char **argv)
101 : QGuiApplication(argc, argv),101 : QGuiApplication(argc, argv),
102 m_view(0),102 m_view(0),
103 m_netManager(new QNetworkConfigurationManager),
103 m_pickingMode(false),104 m_pickingMode(false),
104 m_testMode(false),105 m_testMode(false),
105 m_withArgs(false)106 m_withArgs(false)
@@ -107,6 +108,10 @@
107 s_elapsed.start();108 s_elapsed.start();
108 setOrganizationName("com.ubuntu.address-book");109 setOrganizationName("com.ubuntu.address-book");
109 setApplicationName("AddressBookApp");110 setApplicationName("AddressBookApp");
111 connect(m_netManager.data(),
112 SIGNAL(onlineStateChanged(bool)),
113 SIGNAL(isOnlineChanged()),
114 Qt::QueuedConnection);
110}115}
111116
112bool AddressBookApp::setup()117bool AddressBookApp::setup()
@@ -414,3 +419,8 @@
414 Q_EMIT callbackApplicationChanged();419 Q_EMIT callbackApplicationChanged();
415 }420 }
416}421}
422
423bool AddressBookApp::isOnline() const
424{
425 return m_netManager->isOnline();
426}
417427
=== modified file 'src/app/addressbookapp.h'
--- src/app/addressbookapp.h 2015-06-08 15:59:22 +0000
+++ src/app/addressbookapp.h 2015-07-21 18:04:28 +0000
@@ -21,12 +21,14 @@
21#include <QtDBus/QDBusInterface>21#include <QtDBus/QDBusInterface>
22#include <QtGui/QGuiApplication>22#include <QtGui/QGuiApplication>
23#include <QtQuick/QQuickView>23#include <QtQuick/QQuickView>
24#include <QtNetwork/QNetworkConfigurationManager>
2425
25class AddressBookApp : public QGuiApplication26class AddressBookApp : public QGuiApplication
26{27{
27 Q_OBJECT28 Q_OBJECT
28 Q_PROPERTY(bool firstRun READ isFirstRun CONSTANT)29 Q_PROPERTY(bool firstRun READ isFirstRun CONSTANT)
29 Q_PROPERTY(QString callbackApplication READ callbackApplication WRITE setCallbackApplication NOTIFY callbackApplicationChanged)30 Q_PROPERTY(QString callbackApplication READ callbackApplication WRITE setCallbackApplication NOTIFY callbackApplicationChanged)
31 Q_PROPERTY(bool isOnline READ isOnline NOTIFY isOnlineChanged)
3032
31public:33public:
32 AddressBookApp(int &argc, char **argv);34 AddressBookApp(int &argc, char **argv);
@@ -37,10 +39,11 @@
37 QString callbackApplication() const;39 QString callbackApplication() const;
38 void setCallbackApplication(const QString &application);40 void setCallbackApplication(const QString &application);
3941
42 bool isOnline() const;
43
40Q_SIGNALS:44Q_SIGNALS:
41 void syncingChanged();
42 void syncEnabledChanged();
43 void callbackApplicationChanged();45 void callbackApplicationChanged();
46 void isOnlineChanged();
4447
45public Q_SLOTS:48public Q_SLOTS:
46 void activateWindow();49 void activateWindow();
@@ -59,6 +62,7 @@
5962
60private:63private:
61 QQuickView *m_view;64 QQuickView *m_view;
65 QScopedPointer<QNetworkConfigurationManager> m_netManager;
62 QString m_initialArg;66 QString m_initialArg;
63 QString m_callbackApplication;67 QString m_callbackApplication;
64 bool m_viewReady;68 bool m_viewReady;
6569
=== modified file 'src/imports/ABContactListPage.qml'
--- src/imports/ABContactListPage.qml 2015-06-10 17:24:55 +0000
+++ src/imports/ABContactListPage.qml 2015-07-21 18:04:28 +0000
@@ -226,7 +226,7 @@
226 }226 }
227 },227 },
228 Action {228 Action {
229 visible: contactList.syncEnabled229 visible: (application.isOnline && contactList.syncEnabled)
230 text: contactList.syncing ? i18n.tr("Syncing") : i18n.tr("Sync")230 text: contactList.syncing ? i18n.tr("Syncing") : i18n.tr("Sync")
231 iconName: "reload"231 iconName: "reload"
232 enabled: !contactList.syncing232 enabled: !contactList.syncing
233233
=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailSyncTargetEditor.qml'
--- src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailSyncTargetEditor.qml 2015-05-07 17:27:16 +0000
+++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailSyncTargetEditor.qml 2015-07-21 18:04:28 +0000
@@ -108,6 +108,20 @@
108108
109 delegate: OptionSelectorDelegate {109 delegate: OptionSelectorDelegate {
110 text: contact.displayLabel.label110 text: contact.displayLabel.label
111 constrainImage: true
112 iconSource: {
113 var details = contact.details(ContactDetail.ExtendedDetail)
114 for(var i in details) {
115 if (details[i].name === "PROVIDER") {
116 if (details[i].data === "") {
117 return "image://theme/address-book-app-symbolic"
118 } else {
119 return "image://theme/online-accounts-%1".arg(details[i].data)
120 }
121 }
122 }
123 return "image://theme/address-book-app-symbolic"
124 }
111 height: units.gu(4)125 height: units.gu(4)
112 }126 }
113127
114128
=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
--- src/imports/Ubuntu/Contacts/ContactListView.qml 2015-06-01 22:13:47 +0000
+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2015-07-21 18:04:28 +0000
@@ -19,7 +19,7 @@
1919
20import Ubuntu.Components 1.120import Ubuntu.Components 1.1
21import Ubuntu.Components.ListItems 1.0 as ListItem21import Ubuntu.Components.ListItems 1.0 as ListItem
22import Ubuntu.SyncMonitor 0.122import Buteo 0.1
2323
24/*!24/*!
25 \qmltype ContactListView25 \qmltype ContactListView
@@ -204,13 +204,18 @@
204204
205 This property holds if the list is running a sync with online accounts or not205 This property holds if the list is running a sync with online accounts or not
206 */206 */
207 readonly property bool syncing: (syncMonitor.state === "syncing")207 readonly property alias syncing: buteoSync.syncing
208 /*!208 /*!
209 \qmlproperty bool syncEnabled209 \qmlproperty bool syncEnabled
210210
211 This property holds if there is online account to sync or not211 This property holds if there is online account to sync or not
212 */212 */
213 readonly property bool syncEnabled: syncMonitor.enabledServices ? syncMonitor.serviceIsEnabled("contacts") : false213 // we are using 'buteoSync.visibleSyncProfiles because' it is a property
214 // and will re-check if the property changes.
215 // Using only '(buteoSync.syncProfilesByCategory("contacts").length > 0)'
216 // the value will be checked only on app startup
217 readonly property bool syncEnabled: buteoSync.visibleSyncProfiles &&
218 (buteoSync.syncProfilesByCategory("contacts").length > 0)
214 /*!219 /*!
215 \qmlproperty bool busy220 \qmlproperty bool busy
216221
@@ -340,7 +345,7 @@
340 */345 */
341 function sync()346 function sync()
342 {347 {
343 syncMonitor.sync(["contacts"])348 buteoSync.startSyncByCategory("contacts")
344 }349 }
345350
346 ContactSimpleListView {351 ContactSimpleListView {
@@ -538,8 +543,8 @@
538 }543 }
539 }544 }
540545
541 SyncMonitor {546 ButeoSync {
542 id: syncMonitor547 id: buteoSync
543 }548 }
544549
545 SIMList {550 SIMList {
546551
=== modified file 'src/imports/Ubuntu/Contacts/OnlineAccountsHelper.qml'
--- src/imports/Ubuntu/Contacts/OnlineAccountsHelper.qml 2015-02-09 13:25:01 +0000
+++ src/imports/Ubuntu/Contacts/OnlineAccountsHelper.qml 2015-07-21 18:04:28 +0000
@@ -33,7 +33,7 @@
33 }33 }
34 Setup {34 Setup {
35 id: setup35 id: setup
36 applicationId: "contacts-sync"36 applicationId: "address-book-app"
37 providerId: "google"37 providerId: "google"
38 onFinished: {38 onFinished: {
39 root.running = false39 root.running = false
4040
=== modified file 'src/imports/Ubuntu/Contacts/simcardcontacts.cpp'
--- src/imports/Ubuntu/Contacts/simcardcontacts.cpp 2015-05-27 22:49:00 +0000
+++ src/imports/Ubuntu/Contacts/simcardcontacts.cpp 2015-07-21 18:04:28 +0000
@@ -19,7 +19,6 @@
19#include <QDebug>19#include <QDebug>
20#include <QDBusConnection>20#include <QDBusConnection>
21#include <qofonophonebook.h>21#include <qofonophonebook.h>
22#include <qofono-qt5/dbus/ofonophonebook.h>
2322
24SimCardContacts::SimCardContacts(QObject *parent)23SimCardContacts::SimCardContacts(QObject *parent)
25 : QObject(parent),24 : QObject(parent),

Subscribers

People subscribed via source and target branches