Merge lp:~fboucault/address-book-app/startup_time into lp:address-book-app

Proposed by Florian Boucault on 2016-09-27
Status: Merged
Approved by: Florian Boucault on 2016-11-08
Approved revision: 646
Merged at revision: 645
Proposed branch: lp:~fboucault/address-book-app/startup_time
Merge into: lp:address-book-app
Diff against target: 1233 lines (+458/-313)
32 files modified
debian/control (+1/-1)
debian/control.in (+1/-1)
src/imports/ABContactEditorPageWithEmptyContact.qml (+27/-0)
src/imports/ABContactListPage.qml (+15/-69)
src/imports/ABContactViewPage.qml (+11/-19)
src/imports/ABEmptyState.qml (+1/-0)
src/imports/ABMultiColumnEmptyState.qml (+11/-9)
src/imports/ABNewContactBottomEdge.qml (+22/-17)
src/imports/BusyImportingDialog.qml (+48/-0)
src/imports/CMakeLists.txt (+3/-0)
src/imports/MainWindow.qml (+0/-17)
src/imports/RemoveContactsDialog.qml (+36/-0)
src/imports/Ubuntu/AddressBook/Base/BusyExportingDialog.qml (+31/-0)
src/imports/Ubuntu/AddressBook/Base/CMakeLists.txt (+1/-0)
src/imports/Ubuntu/AddressBook/Base/ContactExporter.qml (+1/-16)
src/imports/Ubuntu/AddressBook/ContactEditor/AlertMessageDialog.qml (+53/-0)
src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImport.qml (+5/-82)
src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImportDialog.qml (+98/-0)
src/imports/Ubuntu/AddressBook/ContactEditor/CMakeLists.txt (+3/-0)
src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml (+7/-77)
src/imports/Ubuntu/AddressBook/ContactEditor/RemoveContactsDialog.qml (+60/-0)
src/imports/Ubuntu/AddressBook/ContactEditor/ValueSelector.qml (+2/-0)
src/imports/Ubuntu/AddressBook/ContactView/ActionButton.qml (+1/-0)
src/imports/Ubuntu/AddressBook/ContactView/ContactDetailAvatarView.qml (+1/-0)
src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml (+1/-0)
src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml (+1/-5)
src/imports/Ubuntu/Contacts/ActionButton.qml (+1/-0)
src/imports/Ubuntu/Contacts/ContactAvatar.qml (+1/-0)
src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml (+1/-0)
src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml (+2/-0)
src/imports/Ubuntu/Contacts/ListItemWithActions.qml (+2/-0)
tests/qml/tst_ContactList.qml (+10/-0)
To merge this branch: bzr merge lp:~fboucault/address-book-app/startup_time
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) 2016-09-27 Approve on 2016-10-27
system-apps-ci-bot continuous-integration Needs Fixing on 2016-10-06
Review via email: mp+306886@code.launchpad.net

Commit message

Reduced startup time (by 600ms on krillin):
- Bottom edge: delay compiling contact editor page.
- Load Icons asynchronously.
- Made all Components compile asynchronously when possible.

Made startup time overhead when lots of contacts in address book as small as possible

Description of the change

Reduced startup time (by 600ms on krillin):
- Bottom edge: delay compiling contact editor page.
- Load Icons asynchronously.
- Made all Components compile asynchronously when possible.

Made startup time overhead when lots of contacts in address book as small as possible

To post a comment you must log in.

FAILED: Continuous integration, rev:643
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/28/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1642/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1642
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1488/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1488/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1488/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1488/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1488/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1488/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1488/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1488/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1488
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1488/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/28/rebuild

review: Needs Fixing (continuous-integration)

FAILED: Continuous integration, rev:644
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/29/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1765/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1765
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1609/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1609/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1609/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1609/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1609/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1609/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1609/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1609/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1609
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1609/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/29/rebuild

review: Needs Fixing (continuous-integration)

looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-09-29 07:45:50 +0000
3+++ debian/control 2016-11-08 15:35:55 +0000
4@@ -15,7 +15,7 @@
5 dh-translations,
6 libgl1-mesa-dev | libgl-dev,
7 libgles2-mesa-dev,
8- python3,
9+ python3:any,
10 pkg-config,
11 qml-module-qttest [amd64 armhf i386],
12 qtdeclarative5-dev-tools [amd64 armhf i386],
13
14=== modified file 'debian/control.in'
15--- debian/control.in 2016-09-29 07:45:50 +0000
16+++ debian/control.in 2016-11-08 15:35:55 +0000
17@@ -8,7 +8,7 @@
18 dh-translations,
19 libgl1-mesa-dev | libgl-dev,
20 libgles2-mesa-dev,
21- python3,
22+ python3:any,
23 pkg-config,
24 qml-module-qttest [@ARCHS@],
25 qtdeclarative5-dev-tools [@ARCHS@],
26
27=== added file 'src/imports/ABContactEditorPageWithEmptyContact.qml'
28--- src/imports/ABContactEditorPageWithEmptyContact.qml 1970-01-01 00:00:00 +0000
29+++ src/imports/ABContactEditorPageWithEmptyContact.qml 2016-11-08 15:35:55 +0000
30@@ -0,0 +1,27 @@
31+/*
32+ * Copyright (C) 2016 Canonical, Ltd.
33+ *
34+ * This program is free software; you can redistribute it and/or modify
35+ * it under the terms of the GNU General Public License as published by
36+ * the Free Software Foundation; version 3.
37+ *
38+ * This program is distributed in the hope that it will be useful,
39+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
40+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41+ * GNU General Public License for more details.
42+ *
43+ * You should have received a copy of the GNU General Public License
44+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
45+ */
46+
47+import QtQuick 2.4
48+
49+import Ubuntu.AddressBook.ContactEditor 0.1
50+import Ubuntu.Contacts 0.1 as ContactsUI
51+
52+ABContactEditorPage {
53+ id: contactEditorPage
54+ contact: ContactsUI.ContactsJS.createEmptyContact("", contactEditorPage)
55+ onCanceled: contactEditorPage.pageStack.removePages(contactEditorPage)
56+ onContactSaved: contactEditorPage.pageStack.removePages(contactEditorPage)
57+}
58
59=== modified file 'src/imports/ABContactListPage.qml'
60--- src/imports/ABContactListPage.qml 2016-09-19 18:03:45 +0000
61+++ src/imports/ABContactListPage.qml 2016-11-08 15:35:55 +0000
62@@ -24,7 +24,6 @@
63 import Ubuntu.Content 1.3 as ContentHub
64
65 import Ubuntu.AddressBook.Base 0.1
66-import Ubuntu.AddressBook.ContactShare 0.1
67
68
69 Page {
70@@ -183,7 +182,8 @@
71
72 function importContact(urls)
73 {
74- mainPage._busyDialog = PopupUtils.open(busyDialogComponent, mainPage)
75+ mainPage._busyDialog = PopupUtils.open(Qt.resolvedUrl("./BusyImportingDialog.qml"), mainPage)
76+ mainPage._busyDialog.destruction.connect(function() {mainPage._busyDialog = null})
77
78 var importing = false
79 for(var i=0, iMax=urls.length; i < iMax; i++) {
80@@ -321,7 +321,6 @@
81 mainPage.state = "default"
82 }
83
84- onError: pageStack.contactModelError(error)
85 onCountChanged: {
86 if (mainPage.state === "searching") {
87 currentIndex = 0
88@@ -587,7 +586,9 @@
89 contacts.push(items.get(i).model.contact)
90 }
91
92- var dialog = PopupUtils.open(removeContactDialog, null)
93+ var dialog = PopupUtils.open(Qt.resolvedUrl("RemoveContactsDialog.qml"),
94+ null,
95+ {"contactListModel": contactList.listModel})
96 dialog.contacts = contacts
97 contactList.endSelection()
98 }
99@@ -716,67 +717,13 @@
100 if (!mainPage.pickMode) {
101 contactExporter.dismissBusyDialog()
102 pageStack.addPageToNextColumn(mainPage,
103- contactShareComponent,
104+ Qt.resolvedUrl("ContactShare/ContactSharePage.qml"),
105 {contactModel: contactExporter.contactModel,
106 contacts: contacts })
107 }
108 }
109 }
110
111- Component {
112- id: removeContactDialog
113-
114- RemoveContactsDialog {
115- id: removeContactsDialogMessage
116-
117- onCanceled: {
118- PopupUtils.close(removeContactsDialogMessage)
119- }
120-
121- onAccepted: {
122- removeContacts(contactList.listModel)
123- PopupUtils.close(removeContactsDialogMessage)
124- }
125- }
126- }
127-
128- Component {
129- id: busyDialogComponent
130-
131- Popups.Dialog {
132- id: busyDialog
133-
134- property alias allowToClose: closeButton.visible
135- property alias showActivity: busyIndicator.visible
136-
137- title: i18n.tr("Importing...")
138-
139- ActivityIndicator {
140- id: busyIndicator
141- running: visible
142- visible: true
143- }
144- Button {
145- id: closeButton
146- text: i18n.tr("Close")
147- visible: false
148- color: UbuntuColors.red
149- onClicked: {
150- PopupUtils.close(mainPage._busyDialog)
151- mainPage._busyDialog = null
152- }
153- }
154- }
155- }
156-
157- Component {
158- id: contactShareComponent
159-
160- ContactSharePage {
161- objectName: "contactSharePage"
162- }
163- }
164-
165 Component.onCompleted: {
166 application.elapsed()
167 if ((typeof(TEST_DATA) !== "undefined") && (TEST_DATA != "")) {
168@@ -796,16 +743,15 @@
169 enabled: false
170 active: true
171 asynchronous: true
172- sourceComponent: ABNewContactBottomEdge {
173- id: bottomEdge
174- parent: mainPage
175- modelToEdit: mainPage.contactModel
176- hint.flickable: contactList.view
177- pageStack: mainPage.pageStack
178- enabled: mainPage.active
179- hintVisible: (pageStack.columns === 1) && bottomEdgeLoader.enabled
180- visible: hintVisible
181- }
182+ Component.onCompleted: setSource(Qt.resolvedUrl("ABNewContactBottomEdge.qml"),
183+ {"parent": mainPage,
184+ "modelToEdit": Qt.binding(function () {return mainPage.contactModel}),
185+ "hint.flickable": Qt.binding(function () {return contactList.view}),
186+ "pageStack": Qt.binding(function () {return mainPage.pageStack}),
187+ "enabled": Qt.binding(function () {return mainPage.active}),
188+ "hintVisible": Qt.binding(function () {return mainPage.pageStack.columns === 1}),
189+ "visible": Qt.binding(function () {return mainPage.pageStack.columns === 1})
190+ })
191 }
192
193 Binding {
194
195=== modified file 'src/imports/ABContactViewPage.qml'
196--- src/imports/ABContactViewPage.qml 2016-08-17 18:15:07 +0000
197+++ src/imports/ABContactViewPage.qml 2016-11-08 15:35:55 +0000
198@@ -21,7 +21,6 @@
199
200 import Ubuntu.AddressBook.Base 0.1
201 import Ubuntu.AddressBook.ContactView 0.1
202-import Ubuntu.AddressBook.ContactShare 0.1
203
204 ContactViewPage {
205 id: root
206@@ -76,7 +75,7 @@
207 iconName: "share"
208 onTriggered: {
209 pageStack.addPageToCurrentColumn(root,
210- contactShareComponent,
211+ Qt.resolvedUrl("ContactShare/ContactSharePage.qml"),
212 {contactModel: root.model,
213 contacts: [root.contact]})
214 }
215@@ -115,27 +114,20 @@
216 Qt.openUrlExternally(("%1:%2").arg(action).arg(detail.value(0)))
217 }
218
219- Component {
220- id: contactShareComponent
221- ContactSharePage {}
222- }
223-
224 Loader {
225 id: bottomEdgeLoader
226
227 asynchronous: true
228- sourceComponent: ABNewContactBottomEdge {
229- id: bottomEdge
230-
231- parent: root
232- height: root.height
233- modelToEdit: root.model
234- hint.flickable: root.flickable
235- pageStack: root.pageStack
236- hintVisible: false
237- enabled: !root.editing
238- visible: (pageStack.columns > 1)
239- }
240+ Component.onCompleted: setSource(Qt.resolvedUrl("ABNewContactBottomEdge.qml"),
241+ {"parent": root,
242+ "height": Qt.binding(function () {return root.height}),
243+ "modelToEdit": Qt.binding(function () {return root.model}),
244+ "hint.flickable": Qt.binding(function () {return root.flickable}),
245+ "pageStack": Qt.binding(function () {return root.pageStack}),
246+ "hintVisible": false,
247+ "enabled": Qt.binding(function () {return !root.editing}),
248+ "visible": Qt.binding(function () {return root.pageStack.columns > 1})
249+ })
250 }
251
252 Binding {
253
254=== modified file 'src/imports/ABEmptyState.qml'
255--- src/imports/ABEmptyState.qml 2015-12-15 20:00:44 +0000
256+++ src/imports/ABEmptyState.qml 2016-11-08 15:35:55 +0000
257@@ -44,6 +44,7 @@
258 width: units.gu(5)
259 opacity: 0.3
260 name: "contact"
261+ asynchronous: true
262 }
263 Label {
264 id: emptyStateLabel
265
266=== modified file 'src/imports/ABMultiColumnEmptyState.qml'
267--- src/imports/ABMultiColumnEmptyState.qml 2016-08-17 18:15:07 +0000
268+++ src/imports/ABMultiColumnEmptyState.qml 2016-11-08 15:35:55 +0000
269@@ -65,16 +65,18 @@
270 id: bottomEdgeLoader
271
272 asynchronous: true
273- sourceComponent: ABNewContactBottomEdge {
274- id: bottomEdge
275+ Component.onCompleted: setSource(Qt.resolvedUrl("ABNewContactBottomEdge.qml"),
276+ {"hintVisible": false,
277+ "visible": Qt.binding(function () {return mainPage.pageStack.columns > 1}),
278+ "parent": root,
279+ "height": Qt.binding(function () {return root.height}),
280+ "modelToEdit": Qt.binding(function () {return root.model}),
281+ "hint.flickable": Qt.binding(function () {return root.flickable}),
282+ "pageStack": Qt.binding(function () {return root.pageStack})
283+ })
284
285- hintVisible: false
286- visible: (pageStack.columns > 1)
287- parent: root
288- height: root.height
289- modelToEdit: root.model
290- hint.flickable: root.flickable
291- pageStack: root.pageStack
292+ Connections {
293+ target: bottomEdgeLoader.item
294 onCommitCompleted: { root.openBottomEdgeWhenReady = false }
295 }
296
297
298=== modified file 'src/imports/ABNewContactBottomEdge.qml'
299--- src/imports/ABNewContactBottomEdge.qml 2016-08-18 12:50:33 +0000
300+++ src/imports/ABNewContactBottomEdge.qml 2016-11-08 15:35:55 +0000
301@@ -49,8 +49,9 @@
302 properties[contact] = bottomEdge._contactToEdit
303
304
305- var incubator = pageStack.addPageToNextColumn(bottomEdge.parent, editorPageBottomEdge, properties)
306+ var incubator = pageStack.addPageToNextColumn(bottomEdge.parent, bottomEdge.contentUrl, properties)
307 incubator.forceCompletion()
308+ setContactEditorPageProperties(incubator.object)
309 pageStack.bottomEdgeFloatingPage = incubator.object
310 incubator.object.Component.onDestruction.connect(function() {
311 pageStack.bottomEdgeFloatingPage = null
312@@ -68,28 +69,32 @@
313 }
314 }
315
316- contentComponent: editorPageBottomEdge
317- preloadContent: visible
318+ contentUrl: Qt.resolvedUrl("ABContactEditorPageWithEmptyContact.qml")
319+ onContentItemChanged: setContactEditorPageProperties(bottomEdge.contentItem)
320+ preloadContent: false
321+
322+ Timer {
323+ interval: 1
324+ repeat: false
325+ running: bottomEdge.visible
326+ onTriggered: bottomEdge.preloadContent = true
327+ }
328
329 onCommitCompleted: {
330 pushPage()
331 collapse()
332 }
333
334- Component {
335- id: editorPageBottomEdge
336-
337- ABContactEditorPage {
338- id: editorPageItem
339-
340- implicitHeight: mainWindow.height
341- implicitWidth: parent ? parent.width : bottomEdge.width
342- enabled: false
343- model: bottomEdge.modelToEdit
344- contact: ContactsUI.ContactsJS.createEmptyContact("", editorPageItem)
345- onCanceled: pageStack.removePages(editorPageItem)
346- onContactSaved: pageStack.removePages(editorPageItem)
347- pageStack: bottomEdge.pageStack
348+ function setContactEditorPageProperties(contactEditorPage) {
349+ if (contactEditorPage) {
350+ contactEditorPage.implicitHeight = Qt.binding(function () {return mainWindow.height;});
351+ contactEditorPage.implicitWidth = Qt.binding(function () {
352+ return contactEditorPage.parent ? contactEditorPage.parent.width
353+ : bottomEdge.width;
354+ });
355+ contactEditorPage.enabled = false;
356+ contactEditorPage.model = Qt.binding(function () {return bottomEdge.modelToEdit;});
357+ contactEditorPage.pageStack = Qt.binding(function () {return bottomEdge.pageStack;});
358 }
359 }
360 }
361
362=== added file 'src/imports/BusyImportingDialog.qml'
363--- src/imports/BusyImportingDialog.qml 1970-01-01 00:00:00 +0000
364+++ src/imports/BusyImportingDialog.qml 2016-11-08 15:35:55 +0000
365@@ -0,0 +1,48 @@
366+/*
367+ * Copyright (C) 2016 Canonical, Ltd.
368+ *
369+ * This program is free software; you can redistribute it and/or modify
370+ * it under the terms of the GNU General Public License as published by
371+ * the Free Software Foundation; version 3.
372+ *
373+ * This program is distributed in the hope that it will be useful,
374+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
375+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376+ * GNU General Public License for more details.
377+ *
378+ * You should have received a copy of the GNU General Public License
379+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
380+ */
381+
382+import QtQuick 2.4
383+
384+import Ubuntu.Components 1.3
385+import Ubuntu.Components.Popups 1.3 as Popups
386+
387+import Ubuntu.AddressBook.Base 0.1
388+
389+Popups.Dialog {
390+ id: busyImportingDialog
391+
392+ property alias allowToClose: closeButton.visible
393+ property alias showActivity: busyIndicator.visible
394+ signal destruction
395+
396+ title: i18n.tr("Importing...")
397+
398+ ActivityIndicator {
399+ id: busyIndicator
400+ running: visible
401+ visible: true
402+ }
403+ Button {
404+ id: closeButton
405+ text: i18n.tr("Close")
406+ visible: false
407+ color: UbuntuColors.red
408+ onClicked: {
409+ busyImportingDialog.destruction()
410+ PopupUtils.close(busyImportingDialog)
411+ }
412+ }
413+}
414
415=== modified file 'src/imports/CMakeLists.txt'
416--- src/imports/CMakeLists.txt 2016-02-12 20:40:02 +0000
417+++ src/imports/CMakeLists.txt 2016-11-08 15:35:55 +0000
418@@ -4,12 +4,15 @@
419 ABAdaptivePageLayout.qml
420 ABContactListPage.qml
421 ABContactEditorPage.qml
422+ ABContactEditorPageWithEmptyContact.qml
423 ABContactViewPage.qml
424 ABEmptyState.qml
425 ABNewContactBottomEdge.qml
426 ABMultiColumnEmptyState.qml
427 ContentHubProxy.qml
428 MainWindow.qml
429+ RemoveContactsDialog.qml
430+ BusyImportingDialog.qml
431 )
432
433 install(FILES ${ADDRESS_BOOK_APP_QMLS}
434
435=== modified file 'src/imports/MainWindow.qml'
436--- src/imports/MainWindow.qml 2016-08-17 18:15:07 +0000
437+++ src/imports/MainWindow.qml 2016-11-08 15:35:55 +0000
438@@ -223,23 +223,6 @@
439 value: mainStack.hasMouse
440 }
441
442- Component {
443- id: errorDialog
444-
445- Popups.Dialog {
446- id: dialogue
447-
448- title: i18n.tr("Error")
449- text: mainWindow.modelErrorMessage
450-
451- Button {
452- text: i18n.tr("Cancel")
453- gradient: UbuntuColors.greyGradient
454- onClicked: PopupUtils.close(dialogue)
455- }
456- }
457- }
458-
459 Connections {
460 target: UriHandler
461 onOpened: {
462
463=== added file 'src/imports/RemoveContactsDialog.qml'
464--- src/imports/RemoveContactsDialog.qml 1970-01-01 00:00:00 +0000
465+++ src/imports/RemoveContactsDialog.qml 2016-11-08 15:35:55 +0000
466@@ -0,0 +1,36 @@
467+/*
468+ * Copyright (C) 2016 Canonical, Ltd.
469+ *
470+ * This program is free software; you can redistribute it and/or modify
471+ * it under the terms of the GNU General Public License as published by
472+ * the Free Software Foundation; version 3.
473+ *
474+ * This program is distributed in the hope that it will be useful,
475+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
476+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
477+ * GNU General Public License for more details.
478+ *
479+ * You should have received a copy of the GNU General Public License
480+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
481+ */
482+
483+import QtQuick 2.4
484+
485+import Ubuntu.Components 1.3
486+import Ubuntu.Components.Popups 1.3 as Popups
487+import Ubuntu.AddressBook.Base 0.1
488+
489+RemoveContactsDialog {
490+ id: removeContactsDialog
491+
492+ property var contactListModel
493+
494+ onCanceled: {
495+ PopupUtils.close(removeContactsDialog)
496+ }
497+
498+ onAccepted: {
499+ removeContactsDialog.removeContacts(removeContactsDialog.contactListModel)
500+ PopupUtils.close(removeContactsDialog)
501+ }
502+}
503
504=== added file 'src/imports/Ubuntu/AddressBook/Base/BusyExportingDialog.qml'
505--- src/imports/Ubuntu/AddressBook/Base/BusyExportingDialog.qml 1970-01-01 00:00:00 +0000
506+++ src/imports/Ubuntu/AddressBook/Base/BusyExportingDialog.qml 2016-11-08 15:35:55 +0000
507@@ -0,0 +1,31 @@
508+/*
509+ * Copyright (C) 2016 Canonical, Ltd.
510+ *
511+ * This program is free software; you can redistribute it and/or modify
512+ * it under the terms of the GNU General Public License as published by
513+ * the Free Software Foundation; version 3.
514+ *
515+ * This program is distributed in the hope that it will be useful,
516+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
517+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
518+ * GNU General Public License for more details.
519+ *
520+ * You should have received a copy of the GNU General Public License
521+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
522+ */
523+
524+import QtQuick 2.4
525+
526+import Ubuntu.Components 1.3
527+import Ubuntu.Components.Popups 1.3
528+
529+Dialog {
530+ title: i18n.dtr("address-book-app", "Exporting contacts...")
531+
532+ ActivityIndicator {
533+ id: activity
534+
535+ anchors.horizontalCenter: parent.horizontalCenter
536+ running: true
537+ }
538+}
539
540=== modified file 'src/imports/Ubuntu/AddressBook/Base/CMakeLists.txt'
541--- src/imports/Ubuntu/AddressBook/Base/CMakeLists.txt 2015-04-29 18:39:01 +0000
542+++ src/imports/Ubuntu/AddressBook/Base/CMakeLists.txt 2016-11-08 15:35:55 +0000
543@@ -1,4 +1,5 @@
544 set(AB_CONTACT_COMMON_QMLS
545+ BusyExportingDialog.qml
546 ContactDetailBase.qml
547 ContactDetailItem.qml
548 ContactDetailGroupBase.qml
549
550=== modified file 'src/imports/Ubuntu/AddressBook/Base/ContactExporter.qml'
551--- src/imports/Ubuntu/AddressBook/Base/ContactExporter.qml 2016-03-16 16:13:17 +0000
552+++ src/imports/Ubuntu/AddressBook/Base/ContactExporter.qml 2016-11-08 15:35:55 +0000
553@@ -44,7 +44,7 @@
554 }
555
556 if (!priv.busyDialog) {
557- priv.busyDialog = PopupUtils.open(busyDialogComponent, root)
558+ priv.busyDialog = PopupUtils.open(Qt.resolvedUrl("BusyExportingDialog.qml"), root)
559 }
560
561 var ids = []
562@@ -159,19 +159,4 @@
563 }
564 }
565 }
566-
567- Component {
568- id: busyDialogComponent
569-
570- Dialog {
571- title: i18n.dtr("address-book-app", "Exporting contacts...")
572-
573- ActivityIndicator {
574- id: activity
575-
576- anchors.horizontalCenter: parent.horizontalCenter
577- running: true
578- }
579- }
580- }
581 }
582
583=== added file 'src/imports/Ubuntu/AddressBook/ContactEditor/AlertMessageDialog.qml'
584--- src/imports/Ubuntu/AddressBook/ContactEditor/AlertMessageDialog.qml 1970-01-01 00:00:00 +0000
585+++ src/imports/Ubuntu/AddressBook/ContactEditor/AlertMessageDialog.qml 2016-11-08 15:35:55 +0000
586@@ -0,0 +1,53 @@
587+/*
588+ * Copyright (C) 2012-2016 Canonical, Ltd.
589+ *
590+ * This program is free software; you can redistribute it and/or modify
591+ * it under the terms of the GNU General Public License as published by
592+ * the Free Software Foundation; version 3.
593+ *
594+ * This program is distributed in the hope that it will be useful,
595+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
596+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
597+ * GNU General Public License for more details.
598+ *
599+ * You should have received a copy of the GNU General Public License
600+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
601+ */
602+
603+import QtQuick 2.4
604+
605+import Ubuntu.Components 1.3
606+import Ubuntu.Components.Popups 1.3
607+import Ubuntu.Contacts 0.1 as ContactsUI
608+
609+Dialog {
610+ id: alertMessageDialog
611+
612+ property QtObject contact: null
613+ signal destruction
614+
615+ title: i18n.dtr("address-book-app", "Contact Editor")
616+ text: {
617+ if (ContactsUI.Contacts.updateIsRunning) {
618+ return i18n.dtr("address-book-app",
619+ "Your <b>%1</b> contact sync account needs to be upgraded.\nWait until the upgrade is complete to edit contacts.")
620+ .arg(alertMessageDialog.contact.syncTarget.syncTarget)
621+ }
622+ if (Qt.application.name === "AddressBookApp") {
623+ i18n.dtr("address-book-app",
624+ "Your <b>%1</b> contact sync account needs to be upgraded. Use the sync button to upgrade the Contacts app.\nOnly local contacts will be editable until upgrade is complete.")
625+ .arg(alertMessageDialog.contact.syncTarget.syncTarget)
626+ } else {
627+ i18n.dtr("address-book-app",
628+ "Your <b>%1</b> contact sync account needs to be upgraded by running Contacts app.\nOnly local contacts will be editable until upgrade is complete.")
629+ .arg(alertMessageDialog.contact.syncTarget.syncTarget);
630+ }
631+ }
632+
633+ Button {
634+ text: i18n.dtr("address-book-app", "Close")
635+ onClicked: PopupUtils.close(alertMessageDialog)
636+ }
637+
638+ Component.onCompleted: Qt.inputMethod.hide()
639+}
640
641=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImport.qml'
642--- src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImport.qml 2016-03-16 16:13:17 +0000
643+++ src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImport.qml 2016-11-08 15:35:55 +0000
644@@ -1,5 +1,5 @@
645 /*
646- * Copyright (C) 2012-2014 Canonical, Ltd.
647+ * Copyright (C) 2012-2016 Canonical, Ltd.
648 *
649 * This program is free software; you can redistribute it and/or modify
650 * it under the terms of the GNU General Public License as published by
651@@ -18,7 +18,6 @@
652
653 import Ubuntu.Components 1.3
654 import Ubuntu.Components.Popups 1.3
655-import Ubuntu.Content 1.3
656
657 Item {
658 id: root
659@@ -30,88 +29,12 @@
660 function requestNewAvatar()
661 {
662 if (!root.importDialog) {
663- root.importDialog = PopupUtils.open(contentHubDialog, null)
664+ root.importDialog = PopupUtils.open(Qt.resolvedUrl("AvatarImportDialog.qml"), null)
665+ root.importDialog.avatarReceived.connect(root.avatarReceived)
666+ root.importDialog.destruction.connect(function () {root.importDialog = null})
667+
668 } else {
669 console.warn("Import dialog already running")
670 }
671 }
672-
673- Component {
674- id: contentHubDialog
675-
676- PopupBase {
677- id: dialogue
678-
679- property alias activeTransfer: signalConnections.target
680-
681- parent: QuickUtils.rootItem(this)
682- focus: true
683-
684- Rectangle {
685- anchors.fill: parent
686-
687- ContentTransferHint {
688- anchors.fill: parent
689- activeTransfer: dialogue.activeTransfer
690- }
691-
692- ContentPeerPicker {
693- id: peerPicker
694-
695- anchors.fill: parent
696- contentType: ContentType.Pictures
697- handler: ContentHandler.Source
698-
699- onPeerSelected: {
700- peer.selectionType = ContentTransfer.Single
701- dialogue.activeTransfer = peer.request()
702- }
703-
704- onCancelPressed: {
705- PopupUtils.close(root.importDialog)
706- }
707- }
708- }
709-
710- Connections {
711- id: signalConnections
712-
713- onStateChanged: {
714- var done = ((dialogue.activeTransfer.state === ContentTransfer.Charged) ||
715- (dialogue.activeTransfer.state === ContentTransfer.Aborted))
716-
717- if (dialogue.activeTransfer.state === ContentTransfer.Charged) {
718- if (dialogue.activeTransfer.items.length > 0) {
719- root.avatarReceived(dialogue.activeTransfer.items[0].url)
720- }
721- }
722-
723- if (done) {
724- acceptTimer.restart()
725- }
726- }
727- }
728-
729- // WORKAROUND: Work around for application becoming insensitive to touch events
730- // if the dialog is dismissed while the application is inactive.
731- // Just listening for changes to Qt.application.active doesn't appear
732- // to be enough to resolve this, so it seems that something else needs
733- // to be happening first. As such there's a potential for a race
734- // condition here, although as yet no problem has been encountered.
735- Timer {
736- id: acceptTimer
737-
738- interval: 100
739- repeat: true
740- running: false
741- onTriggered: {
742- if(Qt.application.state === Qt.ApplicationActive) {
743- PopupUtils.close(root.importDialog)
744- }
745- }
746- }
747-
748- Component.onDestruction: root.importDialog = null
749- }
750- }
751 }
752
753=== added file 'src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImportDialog.qml'
754--- src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImportDialog.qml 1970-01-01 00:00:00 +0000
755+++ src/imports/Ubuntu/AddressBook/ContactEditor/AvatarImportDialog.qml 2016-11-08 15:35:55 +0000
756@@ -0,0 +1,98 @@
757+/*
758+ * Copyright (C) 2016 Canonical, Ltd.
759+ *
760+ * This program is free software; you can redistribute it and/or modify
761+ * it under the terms of the GNU General Public License as published by
762+ * the Free Software Foundation; version 3.
763+ *
764+ * This program is distributed in the hope that it will be useful,
765+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
766+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
767+ * GNU General Public License for more details.
768+ *
769+ * You should have received a copy of the GNU General Public License
770+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
771+ */
772+
773+import QtQuick 2.4
774+
775+import Ubuntu.Components 1.3
776+import Ubuntu.Components.Popups 1.3
777+import Ubuntu.Content 1.3
778+
779+PopupBase {
780+ id: dialogue
781+
782+ property alias activeTransfer: signalConnections.target
783+ signal avatarReceived(string avatarUrl)
784+ signal destruction()
785+
786+ parent: QuickUtils.rootItem(this)
787+ focus: true
788+
789+ Rectangle {
790+ anchors.fill: parent
791+
792+ ContentTransferHint {
793+ anchors.fill: parent
794+ activeTransfer: dialogue.activeTransfer
795+ }
796+
797+ ContentPeerPicker {
798+ id: peerPicker
799+
800+ anchors.fill: parent
801+ contentType: ContentType.Pictures
802+ handler: ContentHandler.Source
803+
804+ onPeerSelected: {
805+ peer.selectionType = ContentTransfer.Single
806+ dialogue.activeTransfer = peer.request()
807+ }
808+
809+ onCancelPressed: {
810+ PopupUtils.close(dialogue)
811+ }
812+ }
813+ }
814+
815+ Connections {
816+ id: signalConnections
817+
818+ onStateChanged: {
819+ var done = ((dialogue.activeTransfer.state === ContentTransfer.Charged) ||
820+ (dialogue.activeTransfer.state === ContentTransfer.Aborted))
821+
822+ if (dialogue.activeTransfer.state === ContentTransfer.Charged) {
823+ if (dialogue.activeTransfer.items.length > 0) {
824+ dialogue.avatarReceived(dialogue.activeTransfer.items[0].url)
825+ }
826+ }
827+
828+ if (done) {
829+ acceptTimer.restart()
830+ }
831+ }
832+ }
833+
834+ // WORKAROUND: Work around for application becoming insensitive to touch events
835+ // if the dialog is dismissed while the application is inactive.
836+ // Just listening for changes to Qt.application.active doesn't appear
837+ // to be enough to resolve this, so it seems that something else needs
838+ // to be happening first. As such there's a potential for a race
839+ // condition here, although as yet no problem has been encountered.
840+ Timer {
841+ id: acceptTimer
842+
843+ interval: 100
844+ repeat: true
845+ running: false
846+ onTriggered: {
847+ if(Qt.application.state === Qt.ApplicationActive) {
848+ PopupUtils.close(dialogue)
849+ }
850+ }
851+ }
852+
853+ Component.onDestruction: dialogue.destruction()
854+}
855
856=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/CMakeLists.txt'
857--- src/imports/Ubuntu/AddressBook/ContactEditor/CMakeLists.txt 2015-09-24 18:48:34 +0000
858+++ src/imports/Ubuntu/AddressBook/ContactEditor/CMakeLists.txt 2016-11-08 15:35:55 +0000
859@@ -1,5 +1,7 @@
860 set(AB_CONTACT_EDITOR_QMLS
861+ AlertMessageDialog.qml
862 AvatarImport.qml
863+ AvatarImportDialog.qml
864 ComboButtonAddField.qml
865 ContactDetailAddressesEditor.qml
866 ContactDetailAvatarEditor.qml
867@@ -12,6 +14,7 @@
868 ContactDetailSyncTargetEditor.qml
869 ContactDetailWithTypeEditor.qml
870 ContactEditorPage.qml
871+ RemoveContactsDialog.qml
872 TextInputDetail.qml
873 ValueSelector.qml
874 qmldir
875
876=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml'
877--- src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-08-18 13:24:57 +0000
878+++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-11-08 15:35:55 +0000
879@@ -364,11 +364,15 @@
880 left: parent.left
881 right: parent.right
882 }
883+ property var alertMessageDialog
884 onChanged: {
885 if (contactEditor.enabled &&
886 !contactEditor.isNewContact &&
887 syncTargetEditor.contactIsReadOnly(contactEditor.contact)) {
888- PopupUtils.open(alertMessage)
889+ syncTargetEditor.alertMessageDialog = PopupUtils.open(Qt.resolvedUrl("AlertMessageDialog.qml"),
890+ null,
891+ {"contact": contactEditor.contact})
892+ syncTargetEditor.alertMessageDialog.destruction.connect(contactEditor.close)
893 }
894 }
895 }
896@@ -463,7 +467,8 @@
897 enabled: contactEditor.active && deleteButton.visible
898 shortcut: "Ctrl+Delete"
899 onTriggered: {
900- var dialog = PopupUtils.open(removeContactDialog, null)
901+ var dialog = PopupUtils.open(Qt.resolvedUrl("RemoveContactsDialog.qml"), null,
902+ {"contactEditor": contactEditor})
903 dialog.contacts = [contactEditor.contact]
904 }
905 }
906@@ -500,79 +505,4 @@
907
908 focusTimer.restart()
909 }
910-
911- Component {
912- id: alertMessage
913-
914- Dialog {
915- id: aletMessageDialog
916-
917- title: i18n.dtr("address-book-app", "Contact Editor")
918- text: {
919- if (ContactsUI.Contacts.updateIsRunning) {
920- return i18n.dtr("address-book-app",
921- "Your <b>%1</b> contact sync account needs to be upgraded.\nWait until the upgrade is complete to edit contacts.")
922- .arg(contactEditor.contact.syncTarget.syncTarget)
923- }
924- if (Qt.application.name === "AddressBookApp") {
925- i18n.dtr("address-book-app",
926- "Your <b>%1</b> contact sync account needs to be upgraded. Use the sync button to upgrade the Contacts app.\nOnly local contacts will be editable until upgrade is complete.")
927- .arg(contactEditor.contact.syncTarget.syncTarget)
928- } else {
929- i18n.dtr("address-book-app",
930- "Your <b>%1</b> contact sync account needs to be upgraded by running Contacts app.\nOnly local contacts will be editable until upgrade is complete.")
931- .arg(contactEditor.contact.syncTarget.syncTarget);
932- }
933- }
934-
935- Button {
936- text: i18n.dtr("address-book-app", "Close")
937- onClicked: PopupUtils.close(aletMessageDialog)
938- }
939-
940- Component.onCompleted: Qt.inputMethod.hide()
941- Component.onDestruction: contactEditor.pageStack.removePages(contactEditor)
942- }
943- }
944-
945- Component {
946- id: removeContactDialog
947-
948- RemoveContactsDialog {
949- id: removeContactsDialogMessage
950-
951- property bool popPages: false
952-
953- onCanceled: {
954- PopupUtils.close(removeContactsDialogMessage)
955- }
956-
957- onAccepted: {
958- popPages = true
959- removeContacts(contactEditor.model)
960- PopupUtils.close(removeContactsDialogMessage)
961- }
962-
963- // hide virtual keyboard if necessary
964- Component.onCompleted: {
965- contactEditor.enabled = false
966- Qt.inputMethod.hide()
967- }
968-
969- // WORKAROUND: SDK element crash if pop the page where the dialog was created
970- Component.onDestruction: {
971- contactEditor.enabled = true
972- if (popPages) {
973- if (contactEditor.pageStack.removePages) {
974- contactEditor.pageStack.removePages(contactEditor)
975- } else {
976- contactEditor.pageStack.pop() // editor page
977- contactEditor.pageStack.pop() // view page
978- }
979- }
980- if (contactEditor.pageStack.primaryPage)
981- contactEditor.pageStack.primaryPage.forceActiveFocus()
982- }
983- }
984- }
985 }
986
987=== added file 'src/imports/Ubuntu/AddressBook/ContactEditor/RemoveContactsDialog.qml'
988--- src/imports/Ubuntu/AddressBook/ContactEditor/RemoveContactsDialog.qml 1970-01-01 00:00:00 +0000
989+++ src/imports/Ubuntu/AddressBook/ContactEditor/RemoveContactsDialog.qml 2016-11-08 15:35:55 +0000
990@@ -0,0 +1,60 @@
991+/*
992+ * Copyright (C) 2012-2016 Canonical, Ltd.
993+ *
994+ * This program is free software; you can redistribute it and/or modify
995+ * it under the terms of the GNU General Public License as published by
996+ * the Free Software Foundation; version 3.
997+ *
998+ * This program is distributed in the hope that it will be useful,
999+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1000+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1001+ * GNU General Public License for more details.
1002+ *
1003+ * You should have received a copy of the GNU General Public License
1004+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1005+ */
1006+
1007+import QtQuick 2.4
1008+
1009+import Ubuntu.Components 1.3
1010+import Ubuntu.Components.Popups 1.3
1011+
1012+import Ubuntu.AddressBook.Base 0.1
1013+
1014+RemoveContactsDialog {
1015+ id: removeContactsDialogMessage
1016+
1017+ property bool popPages: false
1018+ property var contactEditor
1019+
1020+ onCanceled: {
1021+ PopupUtils.close(removeContactsDialogMessage)
1022+ }
1023+
1024+ onAccepted: {
1025+ popPages = true
1026+ removeContacts(contactEditor.model)
1027+ PopupUtils.close(removeContactsDialogMessage)
1028+ }
1029+
1030+ // hide virtual keyboard if necessary
1031+ Component.onCompleted: {
1032+ contactEditor.enabled = false
1033+ Qt.inputMethod.hide()
1034+ }
1035+
1036+ // WORKAROUND: SDK element crash if pop the page where the dialog was created
1037+ Component.onDestruction: {
1038+ contactEditor.enabled = true
1039+ if (popPages) {
1040+ if (contactEditor.pageStack.removePages) {
1041+ contactEditor.pageStack.removePages(contactEditor)
1042+ } else {
1043+ contactEditor.pageStack.pop() // editor page
1044+ contactEditor.pageStack.pop() // view page
1045+ }
1046+ }
1047+ if (contactEditor.pageStack.primaryPage)
1048+ contactEditor.pageStack.primaryPage.forceActiveFocus()
1049+ }
1050+}
1051
1052=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ValueSelector.qml'
1053--- src/imports/Ubuntu/AddressBook/ContactEditor/ValueSelector.qml 2015-10-26 13:18:11 +0000
1054+++ src/imports/Ubuntu/AddressBook/ContactEditor/ValueSelector.qml 2016-11-08 15:35:55 +0000
1055@@ -97,6 +97,7 @@
1056 color: "black"
1057 height: units.gu(1)
1058 width: height
1059+ asynchronous: true
1060
1061 anchors {
1062 verticalCenter: parent.verticalCenter
1063@@ -169,6 +170,7 @@
1064 height: visible ? units.gu(1) : 0
1065 width: height
1066 visible: index < (listView.count - 1)
1067+ asynchronous: true
1068
1069 anchors {
1070 verticalCenter: listLabel.verticalCenter
1071
1072=== modified file 'src/imports/Ubuntu/AddressBook/ContactView/ActionButton.qml'
1073--- src/imports/Ubuntu/AddressBook/ContactView/ActionButton.qml 2015-11-19 16:38:36 +0000
1074+++ src/imports/Ubuntu/AddressBook/ContactView/ActionButton.qml 2016-11-08 15:35:55 +0000
1075@@ -31,5 +31,6 @@
1076 height: root.iconSize
1077 width: root.iconSize
1078 color: root.activeFocus ? UbuntuColors.orange : "gray"
1079+ asynchronous: true
1080 }
1081 }
1082
1083=== modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailAvatarView.qml'
1084--- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailAvatarView.qml 2015-12-10 19:13:20 +0000
1085+++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailAvatarView.qml 2016-11-08 15:35:55 +0000
1086@@ -46,6 +46,7 @@
1087 anchors.fill: parent
1088 fillMode: Image.PreserveAspectCrop
1089 visible: false
1090+ asynchronous: true
1091 }
1092
1093 FastBlur {
1094
1095=== modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml'
1096--- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml 2015-12-10 19:13:20 +0000
1097+++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml 2016-11-08 15:35:55 +0000
1098@@ -81,5 +81,6 @@
1099 name: root.action ? root.action.iconName : ""
1100 color: root.activeFocus ? UbuntuColors.orange : "gray"
1101 visible: width > 0
1102+ asynchronous: true
1103 }
1104 }
1105
1106=== modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml'
1107--- src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml 2016-03-02 14:32:16 +0000
1108+++ src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml 2016-11-08 15:35:55 +0000
1109@@ -82,15 +82,11 @@
1110 anchors.centerIn: parent
1111 }
1112
1113- ContactFetchError {
1114- id: fetchErrorDialog
1115- }
1116-
1117 ContactFetch {
1118 id: contactFetch
1119
1120 onContactRemoved: root.contactRemoved()
1121- onContactNotFound: PopupUtils.open(fetchErrorDialog, root)
1122+ onContactNotFound: PopupUtils.open(Qt.resolvedUrl("ContactFetchError.qml"), root)
1123 onContactFetched: {
1124 root.contact = contact
1125 root.contactFetched(root.contact)
1126
1127=== modified file 'src/imports/Ubuntu/Contacts/ActionButton.qml'
1128--- src/imports/Ubuntu/Contacts/ActionButton.qml 2015-10-26 13:18:11 +0000
1129+++ src/imports/Ubuntu/Contacts/ActionButton.qml 2016-11-08 15:35:55 +0000
1130@@ -30,5 +30,6 @@
1131 anchors.centerIn: parent
1132 height: root.iconSize
1133 width: root.iconSize
1134+ asynchronous: true
1135 }
1136 }
1137
1138=== modified file 'src/imports/Ubuntu/Contacts/ContactAvatar.qml'
1139--- src/imports/Ubuntu/Contacts/ContactAvatar.qml 2016-05-04 21:00:18 +0000
1140+++ src/imports/Ubuntu/Contacts/ContactAvatar.qml 2016-11-08 15:35:55 +0000
1141@@ -85,5 +85,6 @@
1142 anchors.centerIn: avatar
1143 height: units.gu(3)
1144 width: height
1145+ asynchronous: true
1146 }
1147 }
1148
1149=== modified file 'src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml'
1150--- src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml 2016-01-21 21:30:32 +0000
1151+++ src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml 2016-11-08 15:35:55 +0000
1152@@ -122,6 +122,7 @@
1153 height: units.gu(3)
1154 width: height
1155 anchors.verticalCenter: parent.verticalCenter
1156+ asynchronous: true
1157 }
1158 }
1159 }
1160
1161=== modified file 'src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml'
1162--- src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml 2016-01-21 21:30:32 +0000
1163+++ src/imports/Ubuntu/Contacts/ContactListButtonDelegate.qml 2016-11-08 15:35:55 +0000
1164@@ -52,6 +52,7 @@
1165 backgroundColor: Theme.palette.normal.overlay
1166 source: Image {
1167 source: root.expandIcon ? root.iconSource : ""
1168+ asynchronous: true
1169 }
1170 Image {
1171 anchors.centerIn: parent
1172@@ -59,6 +60,7 @@
1173 visible: !root.expandIcon
1174 width: units.gu(2)
1175 height: units.gu(2)
1176+ asynchronous: true
1177 }
1178 visible: root.showContents
1179 }
1180
1181=== modified file 'src/imports/Ubuntu/Contacts/ListItemWithActions.qml'
1182--- src/imports/Ubuntu/Contacts/ListItemWithActions.qml 2016-05-26 18:52:14 +0000
1183+++ src/imports/Ubuntu/Contacts/ListItemWithActions.qml 2016-11-08 15:35:55 +0000
1184@@ -205,6 +205,7 @@
1185 color: Theme.palette.selected.field
1186 height: units.gu(3)
1187 width: units.gu(3)
1188+ asynchronous: true
1189 }
1190 }
1191
1192@@ -247,6 +248,7 @@
1193 height: units.gu(3)
1194 name: modelData.iconName
1195 color: root.activeAction === modelData ? UbuntuColors.orange : UbuntuColors.lightGrey
1196+ asynchronous: true
1197 }
1198 }
1199 }
1200
1201=== modified file 'tests/qml/tst_ContactList.qml'
1202--- tests/qml/tst_ContactList.qml 2015-10-26 13:18:11 +0000
1203+++ tests/qml/tst_ContactList.qml 2016-11-08 15:35:55 +0000
1204@@ -38,6 +38,7 @@
1205 property string callbackApplication: ""
1206 property bool firstRun: true
1207 property bool disableOnlineAccounts: true
1208+ property bool isOnline: false
1209
1210 function elapsed()
1211 {
1212@@ -59,6 +60,12 @@
1213
1214 MainView {
1215 id: mainView
1216+ pageStack: Item {
1217+ property var contactListPage: null
1218+ readonly property int columns: 1
1219+ readonly property bool hasKeyboard: false
1220+ }
1221+
1222 anchors.fill: parent
1223 }
1224
1225@@ -86,6 +93,9 @@
1226
1227 function cleanup()
1228 {
1229+ //WORKAROUND: avoid problems with async object
1230+ //if the test run too fast it can cause problems with async objects
1231+ wait(1000)
1232 root.contactListPageObj.destroy()
1233 }
1234

Subscribers

People subscribed via source and target branches