Merge lp:~renatofilho/address-book-app/dynamic-backend into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Francis Ginther
Approved revision: 110
Merged at revision: 108
Proposed branch: lp:~renatofilho/address-book-app/dynamic-backend
Merge into: lp:address-book-app
Diff against target: 387 lines (+109/-39)
14 files modified
CMakeLists.txt (+12/-12)
src/app/addressbookapp.cpp (+9/-0)
src/imports/Common/ContactDetailGroupBase.qml (+21/-2)
src/imports/ContactEdit/ContactDetailWithTypeEditor.qml (+4/-2)
src/imports/ContactList/ContactListPage.qml (+1/-0)
src/imports/ContactView/CMakeLists.txt (+0/-1)
src/imports/ContactView/ContactDetailGroupWithTypeView.qml (+1/-0)
src/imports/ContactView/ContactView.qml (+2/-1)
src/imports/Ubuntu/Contacts/CMakeLists.txt (+1/-0)
src/imports/Ubuntu/Contacts/ContactFetch.qml (+32/-5)
src/imports/Ubuntu/Contacts/ContactListView.qml (+1/-0)
src/imports/Ubuntu/Contacts/ContactSearchListView.qml (+7/-0)
src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+17/-16)
src/imports/Ubuntu/Contacts/qmldir (+1/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/dynamic-backend
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+192326@code.launchpad.net

Commit message

Allow change the application QtContact backend, using env variable (QTCONTACTS_MANAGER_OVERRIDE).

To post a comment you must log in.
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

57 + // use galare as default QtContacts Manager
58 + if (qEnvironmentVariableIsSet("QTCONTACTS_MANAGER_OVERRIDE")) {
59 + defaultManager = qgetenv("QTCONTACTS_MANAGER_OVERRIDE");
60 + }

Wouldn't it be a good idea to check if the value set from command line actually exists in the list of available managers?

review: Needs Information
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

> 57 + // use galare as default QtContacts Manager
> 58 + if (qEnvironmentVariableIsSet("QTCONTACTS_MANAGER_OVERRIDE")) {
> 59 + defaultManager = qgetenv("QTCONTACTS_MANAGER_OVERRIDE");
> 60 + }
>
> Wouldn't it be a good idea to check if the value set from command line
> actually exists in the list of available managers?
If the manager does not exists it will use the default one.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:109
http://jenkins.qa.ubuntu.com/job/address-book-app-ci/291/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-amd64-ci/1
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-armhf-ci/1
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-armhf-ci/1/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-i386-ci/1
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/18/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/18
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/14/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/18
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/18/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/18
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/18/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2650
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2701
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/339
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/338

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/address-book-app-ci/291/rebuild

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

PASSED: Continuous integration, rev:110
http://jenkins.qa.ubuntu.com/job/address-book-app-ci/292/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-amd64-ci/2
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-armhf-ci/2
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-armhf-ci/2/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-trusty-i386-ci/2
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/19
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/19
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/15
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/19
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/19/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/19
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/19/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2651
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2702
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/340
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/341

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/address-book-app-ci/292/rebuild

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

Looks good and works as expected!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

jenkins failed due to a bad armhf build node. Re-approving.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-10-08 18:42:21 +0000
+++ CMakeLists.txt 2013-10-23 13:28:45 +0000
@@ -27,18 +27,6 @@
27# Tests27# Tests
28enable_testing()28enable_testing()
2929
30# uninstall target
31configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
32 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
33 IMMEDIATE @ONLY)
34add_custom_target(uninstall "${CMAKE_COMMAND}"
35 -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
36
37# config file
38configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
39 "${CMAKE_CURRENT_BINARY_DIR}/config.h"
40 IMMEDIATE @ONLY)
41
42# components PATH30# components PATH
43execute_process(31execute_process(
44 COMMAND qmake -query QT_INSTALL_QML32 COMMAND qmake -query QT_INSTALL_QML
@@ -51,3 +39,15 @@
51add_subdirectory(src)39add_subdirectory(src)
52add_subdirectory(po)40add_subdirectory(po)
53add_subdirectory(tests)41add_subdirectory(tests)
42
43# uninstall target
44configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
45 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
46 IMMEDIATE @ONLY)
47add_custom_target(uninstall "${CMAKE_COMMAND}"
48 -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
49
50# config file
51configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
52 "${CMAKE_CURRENT_BINARY_DIR}/config.h"
53 IMMEDIATE @ONLY)
5454
=== modified file 'src/app/addressbookapp.cpp'
--- src/app/addressbookapp.cpp 2013-10-15 14:34:03 +0000
+++ src/app/addressbookapp.cpp 2013-10-23 13:28:45 +0000
@@ -18,6 +18,7 @@
18#include "addressbookapp.h"18#include "addressbookapp.h"
19#include "imagescalethread.h"19#include "imagescalethread.h"
2020
21
21#include <QDir>22#include <QDir>
22#include <QUrl>23#include <QUrl>
23#include <QUrlQuery>24#include <QUrlQuery>
@@ -90,6 +91,13 @@
9091
91 QString contactKey;92 QString contactKey;
92 QStringList arguments = this->arguments();93 QStringList arguments = this->arguments();
94 QByteArray defaultManager("galera");
95
96 // use galare as default QtContacts Manager
97 if (qEnvironmentVariableIsSet("QTCONTACTS_MANAGER_OVERRIDE")) {
98 defaultManager = qgetenv("QTCONTACTS_MANAGER_OVERRIDE");
99 }
100 qDebug() << "Using contact manager:" << defaultManager;
93101
94 if (arguments.contains("--help")) {102 if (arguments.contains("--help")) {
95 printUsage(arguments);103 printUsage(arguments);
@@ -147,6 +155,7 @@
147 m_view->setResizeMode(QQuickView::SizeRootObjectToView);155 m_view->setResizeMode(QQuickView::SizeRootObjectToView);
148 m_view->setTitle("AddressBook");156 m_view->setTitle("AddressBook");
149 m_view->engine()->addImportPath(importPath("/imports/"));157 m_view->engine()->addImportPath(importPath("/imports/"));
158 m_view->rootContext()->setContextProperty("DEFAULT_CONTACT_MANAGER", defaultManager);
150 m_view->rootContext()->setContextProperty("application", this);159 m_view->rootContext()->setContextProperty("application", this);
151 m_view->rootContext()->setContextProperty("contactKey", contactKey);160 m_view->rootContext()->setContextProperty("contactKey", contactKey);
152161
153162
=== modified file 'src/imports/Common/ContactDetailGroupBase.qml'
--- src/imports/Common/ContactDetailGroupBase.qml 2013-10-03 22:48:16 +0000
+++ src/imports/Common/ContactDetailGroupBase.qml 2013-10-23 13:28:45 +0000
@@ -33,10 +33,11 @@
33 property Component detailDelegate33 property Component detailDelegate
34 property int minimumHeight: 034 property int minimumHeight: 0
35 property bool loaded: false35 property bool loaded: false
36 property bool showEmpty: true
3637
37 signal newFieldAdded(var index)38 signal newFieldAdded(var index)
3839
39 implicitHeight: root.details.length > 0 ? contents.implicitHeight : minimumHeight40 implicitHeight: detailsModel.values.length > 0 ? contents.implicitHeight : minimumHeight
40 visible: implicitHeight > 041 visible: implicitHeight > 0
4142
42 // This model is used to avoid rebuild the repeater every time that the details change43 // This model is used to avoid rebuild the repeater every time that the details change
@@ -44,7 +45,25 @@
44 ListModel {45 ListModel {
45 id: detailsModel46 id: detailsModel
4647
47 property var values: root.details48 property var values: root.showEmpty ? root.details : filterDetails(root.details)
49
50 function filterDetails(details) {
51 var result = []
52 for(var d in details) {
53 var isEmpty = true
54 for(var f in root.fields) {
55 var fieldValue = details[d].value(root.fields[f])
56 if (fieldValue && (String(fieldValue) !== "")) {
57 isEmpty = false
58 break;
59 }
60 }
61 if (!isEmpty) {
62 result.push(details[d])
63 }
64 }
65 return result
66 }
4867
49 onValuesChanged: {68 onValuesChanged: {
50 if (!values) {69 if (!values) {
5170
=== modified file 'src/imports/ContactEdit/ContactDetailWithTypeEditor.qml'
--- src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2013-10-03 22:48:16 +0000
+++ src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2013-10-23 13:28:45 +0000
@@ -45,10 +45,12 @@
45 var input = fieldValues.children[i]45 var input = fieldValues.children[i]
46 if (input.detail && (input.field >= 0)) {46 if (input.detail && (input.field >= 0)) {
47 var originalValue = input.detail.value(input.field)47 var originalValue = input.detail.value(input.field)
48 if (input.text != "") {48 originalValue = originalValue ? String(originalValue) : ""
49 if (input.text !== "") {
49 isEmpty = false50 isEmpty = false
50 }51 }
51 if (originalValue != input.text) {52
53 if (originalValue !== input.text) {
52 input.detail.setValue(input.field, input.text)54 input.detail.setValue(input.field, input.text)
53 detailchanged = true55 detailchanged = true
54 }56 }
5557
=== modified file 'src/imports/ContactList/ContactListPage.qml'
--- src/imports/ContactList/ContactListPage.qml 2013-10-10 15:15:15 +0000
+++ src/imports/ContactList/ContactListPage.qml 2013-10-23 13:28:45 +0000
@@ -65,6 +65,7 @@
65 ContactsUI.ContactListView {65 ContactsUI.ContactListView {
66 id: contactList66 id: contactList
6767
68 manager: DEFAULT_CONTACT_MANAGER
68 showFavoritePhoneLabel: false69 showFavoritePhoneLabel: false
69 multiSelectionEnabled: true70 multiSelectionEnabled: true
70 anchors {71 anchors {
7172
=== modified file 'src/imports/ContactView/CMakeLists.txt'
--- src/imports/ContactView/CMakeLists.txt 2013-09-17 01:31:27 +0000
+++ src/imports/ContactView/CMakeLists.txt 2013-10-23 13:28:45 +0000
@@ -12,7 +12,6 @@
12 ContactDetailPhoneNumbersView.qml12 ContactDetailPhoneNumbersView.qml
13 ContactDetailPhoneNumberView.qml13 ContactDetailPhoneNumberView.qml
14 ContactDetailWithTypeView.qml14 ContactDetailWithTypeView.qml
15 ContactFetch.qml
16 ContactHeaderView.qml15 ContactHeaderView.qml
17 ContactView.qml16 ContactView.qml
18)17)
1918
=== modified file 'src/imports/ContactView/ContactDetailGroupWithTypeView.qml'
--- src/imports/ContactView/ContactDetailGroupWithTypeView.qml 2013-07-25 20:00:03 +0000
+++ src/imports/ContactView/ContactDetailGroupWithTypeView.qml 2013-10-23 13:28:45 +0000
@@ -27,6 +27,7 @@
27 property Action defaultAction27 property Action defaultAction
28 signal actionTrigerred(string action, QtObject detail)28 signal actionTrigerred(string action, QtObject detail)
2929
30 showEmpty: false
30 headerDelegate: ListItem.Empty {31 headerDelegate: ListItem.Empty {
31 highlightWhenPressed: false32 highlightWhenPressed: false
3233
3334
=== modified file 'src/imports/ContactView/ContactView.qml'
--- src/imports/ContactView/ContactView.qml 2013-09-19 12:37:39 +0000
+++ src/imports/ContactView/ContactView.qml 2013-10-23 13:28:45 +0000
@@ -18,6 +18,7 @@
18import QtContacts 5.018import QtContacts 5.0
19import Ubuntu.Components 0.119import Ubuntu.Components 0.1
20import Ubuntu.Components.ListItems 0.1 as ListItem20import Ubuntu.Components.ListItems 0.1 as ListItem
21import Ubuntu.Contacts 0.1 as ContactsUI
2122
22Page {23Page {
23 id: root24 id: root
@@ -137,7 +138,7 @@
137 anchors.centerIn: parent138 anchors.centerIn: parent
138 }139 }
139140
140 ContactFetch {141 ContactsUI.ContactFetch {
141 id: contactFetch142 id: contactFetch
142143
143 onContactRemoved: pageStack.pop()144 onContactRemoved: pageStack.pop()
144145
=== modified file 'src/imports/Ubuntu/Contacts/CMakeLists.txt'
--- src/imports/Ubuntu/Contacts/CMakeLists.txt 2013-10-08 20:53:44 +0000
+++ src/imports/Ubuntu/Contacts/CMakeLists.txt 2013-10-23 13:28:45 +0000
@@ -5,6 +5,7 @@
5 ContactDetailPhoneNumberTypeModel.qml5 ContactDetailPhoneNumberTypeModel.qml
6 ContactDetailPickerDelegate.qml6 ContactDetailPickerDelegate.qml
7 ContactDetailPickerPhoneNumberDelegate.qml7 ContactDetailPickerPhoneNumberDelegate.qml
8 ContactFetch.qml
8 ContactListView.qml9 ContactListView.qml
9 Contacts.js10 Contacts.js
10 ContactSearchListView.qml11 ContactSearchListView.qml
1112
=== renamed file 'src/imports/ContactView/ContactFetch.qml' => 'src/imports/Ubuntu/Contacts/ContactFetch.qml'
--- src/imports/ContactView/ContactFetch.qml 2013-09-11 22:39:52 +0000
+++ src/imports/Ubuntu/Contacts/ContactFetch.qml 2013-10-23 13:28:45 +0000
@@ -24,17 +24,35 @@
24 property QtObject contact: null24 property QtObject contact: null
25 property bool contactIsDirty: false25 property bool contactIsDirty: false
2626
27 property string _pendingId: ""
28 property bool _ready: false
29
27 signal contactFetched(QtObject contact)30 signal contactFetched(QtObject contact)
28 signal contactRemoved()31 signal contactRemoved()
2932
30 function fetchContact(contactId) {33 function fetchContact(contactId) {
34 if (root._ready) {
35 root._fetchContact(contactId)
36 } else {
37 root._pendingId = contactId
38 }
39 }
40
41 function _fetchContact(contactId) {
31 if (contact && !contactIsDirty) {42 if (contact && !contactIsDirty) {
32 contactFetched(contact)43 contactFetched(contact)
33 } else {44 } else {
34 running = true45 running = true
35 connections.currentQueryId = model.fetchContacts([contactId])46 if (model.manager === "memory") {
36 if (connections.currentQueryId === -1) {47 // memory backend emit contact fetched before return from "fetchContacts" we will use operation = "-2"
37 running = false48 // to say that we are wainting for a operation from memory manager
49 connections.currentQueryId = -2
50 model.fetchContacts([contactId])
51 } else {
52 connections.currentQueryId = model.fetchContacts([contactId])
53 if (connections.currentQueryId === -1) {
54 running = false
55 }
38 }56 }
39 }57 }
40 }58 }
@@ -62,13 +80,22 @@
62 property int currentQueryId: -180 property int currentQueryId: -1
6381
64 onContactsFetched: {82 onContactsFetched: {
65 if (requestId == currentQueryId) {83 // currentQueryId == -2 is used during a fetch using "memory" manager
84 if ((currentQueryId == -2) || (requestId == currentQueryId)) {
66 root.contactIsDirty = false85 root.contactIsDirty = false
67 root.running = false86 root.running = false
68 currentQueryId = -187 currentQueryId = -1
88 root.contact = fetchedContacts[0]
69 root.contactFetched(fetchedContacts[0])89 root.contactFetched(fetchedContacts[0])
70 root.contact = fetchedContacts[0]
71 }90 }
72 }91 }
73 }92 }
93
94 Component.onCompleted: {
95 root._ready = true
96 if (root._pendingId != "") {
97 root._fetchContact(root._pendingId)
98 root._pendingId = ""
99 }
100 }
74}101}
75102
=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
--- src/imports/Ubuntu/Contacts/ContactListView.qml 2013-10-10 15:15:15 +0000
+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2013-10-23 13:28:45 +0000
@@ -56,6 +56,7 @@
56 ContactSimpleListView {56 ContactSimpleListView {
57 id: favouritesList57 id: favouritesList
5858
59 manager: root.manager
59 header: ListItem.Header {60 header: ListItem.Header {
60 height: units.gu(5)61 height: units.gu(5)
61 text: i18n.tr("Favourites")62 text: i18n.tr("Favourites")
6263
=== modified file 'src/imports/Ubuntu/Contacts/ContactSearchListView.qml'
--- src/imports/Ubuntu/Contacts/ContactSearchListView.qml 2013-09-26 14:39:08 +0000
+++ src/imports/Ubuntu/Contacts/ContactSearchListView.qml 2013-10-23 13:28:45 +0000
@@ -111,6 +111,13 @@
111 */111 */
112 property variant detailFieldsToDisplay: [ PhoneNumber.Number ]112 property variant detailFieldsToDisplay: [ PhoneNumber.Number ]
113 /*!113 /*!
114 \qmlproperty string manager
115
116 This property holds the manager uri of the contact backend engine.
117 By default this is set to "galera"
118 */
119 property alias manager: contactsModel.manager
120 /*!
114 \internal \qmlproperty variant ___selectedDetail121 \internal \qmlproperty variant ___selectedDetail
115 */122 */
116 property variant ___selectedDetail: null123 property variant ___selectedDetail: null
117124
=== modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml'
--- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2013-10-15 18:34:42 +0000
+++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2013-10-23 13:28:45 +0000
@@ -149,6 +149,15 @@
149 By default this is set to true149 By default this is set to true
150 */150 */
151 property bool showSections: true151 property bool showSections: true
152
153 /*!
154 \qmlproperty string manager
155
156 This property holds the manager uri of the contact backend engine.
157 By default this is set to "galera"
158 */
159 property alias manager: contactsModel.manager
160
152 /*!161 /*!
153 This handler is called when any error occurs in the contact model162 This handler is called when any error occurs in the contact model
154 */163 */
@@ -200,11 +209,8 @@
200 */209 */
201 function _fetchContact(index, contact)210 function _fetchContact(index, contact)
202 {211 {
203 if (priv.currentOperation !== -1) {
204 return
205 }
206 contactListView.currentIndex = index212 contactListView.currentIndex = index
207 priv.currentOperation = contactsModel.fetchContacts(contact.contactId)213 contactFetch.fetchContact(contact.contactId)
208 }214 }
209215
210 clip: true216 clip: true
@@ -259,7 +265,7 @@
259 width: parent.width265 width: parent.width
260 visible: loaderDelegate.status == Loader.Ready266 visible: loaderDelegate.status == Loader.Ready
261 state: contactListView.expanded ? "" : "collapsed"267 state: contactListView.expanded ? "" : "collapsed"
262 268
263 Behavior on height {269 Behavior on height {
264 enabled: currentContactExpanded == index || detailsShown270 enabled: currentContactExpanded == index || detailsShown
265 UbuntuNumberAnimation {}271 UbuntuNumberAnimation {}
@@ -349,6 +355,7 @@
349 return355 return
350 }356 }
351357
358 console.debug("Will fetch" + contact)
352 contactListView._fetchContact(index, contact)359 contactListView._fetchContact(index, contact)
353 }360 }
354 onPressAndHold: {361 onPressAndHold: {
@@ -463,17 +470,11 @@
463 onTriggered: priv.scrollList()470 onTriggered: priv.scrollList()
464 }471 }
465472
466 Connections {473 ContactFetch {
467 target: listModel474 id: contactFetch
468 onContactsFetched: {475
469 if (requestId == priv.currentOperation) {476 model: contactsModel
470 priv.currentOperation = -1477 onContactFetched: contactListView.contactClicked(contact)
471 // this fetch request can only return one contact
472 if(fetchedContacts.length !== 1)
473 return
474 contactListView.contactClicked(fetchedContacts[0])
475 }
476 }
477 }478 }
478479
479 // This is a workaround to make sure the spinner will disappear if the model is empty480 // This is a workaround to make sure the spinner will disappear if the model is empty
480481
=== modified file 'src/imports/Ubuntu/Contacts/qmldir'
--- src/imports/Ubuntu/Contacts/qmldir 2013-10-04 19:16:48 +0000
+++ src/imports/Ubuntu/Contacts/qmldir 2013-10-23 13:28:45 +0000
@@ -2,6 +2,7 @@
22
3ContactDetailOnlineAccountTypeModel 0.1 ContactDetailOnlineAccountTypeModel.qml3ContactDetailOnlineAccountTypeModel 0.1 ContactDetailOnlineAccountTypeModel.qml
4ContactDetailPhoneNumberTypeModel 0.1 ContactDetailPhoneNumberTypeModel.qml4ContactDetailPhoneNumberTypeModel 0.1 ContactDetailPhoneNumberTypeModel.qml
5ContactFetch 0.1 ContactFetch.qml
5ContactListView 0.1 ContactListView.qml6ContactListView 0.1 ContactListView.qml
6ContactSearchListView 0.1 ContactSearchListView.qml7ContactSearchListView 0.1 ContactSearchListView.qml
7ContactSimpleListView 0.1 ContactSimpleListView.qml8ContactSimpleListView 0.1 ContactSimpleListView.qml

Subscribers

People subscribed via source and target branches