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