Merge lp:~renatofilho/address-book-app/improve-vcard-import into lp:address-book-app
- improve-vcard-import
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~renatofilho/address-book-app/improve-vcard-import |
Merge into: | lp:address-book-app |
Diff against target: |
403 lines (+103/-132) 6 files modified
src/imports/ABContactListPage.qml (+97/-26) src/imports/BottomEdge.qml (+1/-1) src/imports/CMakeLists.txt (+0/-1) src/imports/Ubuntu/Contacts/ContactListView.qml (+1/-6) src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+4/-4) src/imports/VCardImportDialog.qml (+0/-94) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/improve-vcard-import |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Ubuntu Phablet Team | Pending | ||
Review via email: mp+277918@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-11-20.
Commit message
Show a list of imported contacts when importing vcards.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
- 502. By Renato Araujo Oliveira Filho
- 503. By Renato Araujo Oliveira Filho
-
Removed old file from cmake file.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:502
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:503
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 504. By Renato Araujo Oliveira Filho
-
Merged: ~renatofilho/
address- book-app/ vcard-does- not-export- uid - 505. By Renato Araujo Oliveira Filho
-
Merged: ~renatofilho/
address- book-app/ contact- view-editable - 506. By Renato Araujo Oliveira Filho
-
Does not reset contact list state after edit a contact while importing contacts.
- 507. By Renato Araujo Oliveira Filho
-
Show a 'busy' dialog while importing contacts.
- 508. By Renato Araujo Oliveira Filho
-
Make sure that the contact list is cleared before apply a new filter to avoid delays on contact populte.
- 509. By Renato Araujo Oliveira Filho
-
Trunk merged.
- 510. By Renato Araujo Oliveira Filho
-
Trunk merged.
- 511. By Renato Araujo Oliveira Filho
-
Show a error message if the contact import fails.
- 512. By Renato Araujo Oliveira Filho
-
Test import vcard.
- 513. By Renato Araujo Oliveira Filho
-
Typo fixed.
- 514. By Renato Araujo Oliveira Filho
-
Only try to stop maliit if it is running already.
- 515. By Renato Araujo Oliveira Filho
-
Avoid switch to importVcard state while loading test data.
- 516. By Renato Araujo Oliveira Filho
-
Update import from sim autopilot test.
Unmerged revisions
Preview Diff
1 | === modified file 'src/imports/ABContactListPage.qml' | |||
2 | --- src/imports/ABContactListPage.qml 2015-10-26 13:18:11 +0000 | |||
3 | +++ src/imports/ABContactListPage.qml 2015-11-19 14:41:33 +0000 | |||
4 | @@ -89,7 +89,11 @@ | |||
5 | 89 | 89 | ||
6 | 90 | function showContact(contact) | 90 | function showContact(contact) |
7 | 91 | { | 91 | { |
9 | 92 | mainPage.state = "default"; | 92 | // go back to normal state if not searching |
10 | 93 | if ((state !== "searching") && | ||
11 | 94 | (state !== "vcardImported")) { | ||
12 | 95 | mainPage.state = "default"; | ||
13 | 96 | } | ||
14 | 93 | openViewPage({model: contactList.listModel, | 97 | openViewPage({model: contactList.listModel, |
15 | 94 | contact: contact}); | 98 | contact: contact}); |
16 | 95 | } | 99 | } |
17 | @@ -109,13 +113,10 @@ | |||
18 | 109 | 113 | ||
19 | 110 | function importContact(urls) | 114 | function importContact(urls) |
20 | 111 | { | 115 | { |
28 | 112 | if (urls.length > 0) { | 116 | for(var i=0, iMax=urls.length; i < iMax; i++) { |
29 | 113 | var importDialog = Qt.createQmlObject("VCardImportDialog{}", | 117 | var url = urls[i] |
30 | 114 | mainPage, | 118 | if (url && url != "") |
31 | 115 | "VCardImportDialog") | 119 | contactList.listModel.importContacts(url) |
25 | 116 | if (importDialog) { | ||
26 | 117 | importDialog.importVCards(contactList.listModel, urls) | ||
27 | 118 | } | ||
32 | 119 | } | 120 | } |
33 | 120 | } | 121 | } |
34 | 121 | 122 | ||
35 | @@ -129,6 +130,11 @@ | |||
36 | 129 | 130 | ||
37 | 130 | function moveListToContact(contact) | 131 | function moveListToContact(contact) |
38 | 131 | { | 132 | { |
39 | 133 | // skipt it if searching | ||
40 | 134 | if (state === "searching") { | ||
41 | 135 | return | ||
42 | 136 | } | ||
43 | 137 | |||
44 | 132 | contactIndex = contact | 138 | contactIndex = contact |
45 | 133 | mainPage.state = "default" | 139 | mainPage.state = "default" |
46 | 134 | // this means a new contact was created | 140 | // this means a new contact was created |
47 | @@ -176,15 +182,11 @@ | |||
48 | 176 | filterTerm: searchField.text | 182 | filterTerm: searchField.text |
49 | 177 | multiSelectionEnabled: true | 183 | multiSelectionEnabled: true |
50 | 178 | multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode | 184 | multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode |
54 | 179 | highlightedContact: contactViewPage ? contactViewPage.contact : | 185 | highlightSelected: pageStack.columns > 1 |
52 | 180 | contactEditorPage ? contactEditorPage.contact : null | ||
53 | 181 | |||
55 | 182 | onAddContactClicked: mainPage.createContactWithPhoneNumber(label) | 186 | onAddContactClicked: mainPage.createContactWithPhoneNumber(label) |
56 | 183 | onAddNewContactClicked: mainPage.createContactWithPhoneNumber(mainPage.newPhoneToAdd) | 187 | onAddNewContactClicked: mainPage.createContactWithPhoneNumber(mainPage.newPhoneToAdd) |
57 | 184 | 188 | ||
61 | 185 | onContactClicked: { | 189 | onContactClicked: mainPage.showContact(contact) |
59 | 186 | showContact(contact); | ||
60 | 187 | } | ||
62 | 188 | onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default" | 190 | onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default" |
63 | 189 | onSelectionCanceled: { | 191 | onSelectionCanceled: { |
64 | 190 | if (pickMode) { | 192 | if (pickMode) { |
65 | @@ -209,10 +211,15 @@ | |||
66 | 209 | right: parent.right | 211 | right: parent.right |
67 | 210 | rightMargin: units.gu(2) | 212 | rightMargin: units.gu(2) |
68 | 211 | } | 213 | } |
70 | 212 | visible: mainPage.searching | 214 | focus: false |
71 | 215 | visible: false | ||
72 | 213 | onTextChanged: contactList.currentIndex = -1 | 216 | onTextChanged: contactList.currentIndex = -1 |
73 | 214 | inputMethodHints: Qt.ImhNoPredictiveText | 217 | inputMethodHints: Qt.ImhNoPredictiveText |
74 | 215 | placeholderText: i18n.tr("Search...") | 218 | placeholderText: i18n.tr("Search...") |
75 | 219 | onFocusChanged: { | ||
76 | 220 | if (visible && focus) | ||
77 | 221 | searchField.forceActiveFocus() | ||
78 | 222 | } | ||
79 | 216 | } | 223 | } |
80 | 217 | 224 | ||
81 | 218 | Connections { | 225 | Connections { |
82 | @@ -289,6 +296,10 @@ | |||
83 | 289 | target: searchField | 296 | target: searchField |
84 | 290 | text: "" | 297 | text: "" |
85 | 291 | } | 298 | } |
86 | 299 | PropertyChanges { | ||
87 | 300 | target: contactList | ||
88 | 301 | filter: null | ||
89 | 302 | } | ||
90 | 292 | }, | 303 | }, |
91 | 293 | PageHeadState { | 304 | PageHeadState { |
92 | 294 | id: searchingState | 305 | id: searchingState |
93 | @@ -305,6 +316,11 @@ | |||
94 | 305 | } | 316 | } |
95 | 306 | 317 | ||
96 | 307 | PropertyChanges { | 318 | PropertyChanges { |
97 | 319 | target: bottomEdge | ||
98 | 320 | enabled: false | ||
99 | 321 | } | ||
100 | 322 | |||
101 | 323 | PropertyChanges { | ||
102 | 308 | target: mainPage.head | 324 | target: mainPage.head |
103 | 309 | backAction: searchingState.backAction | 325 | backAction: searchingState.backAction |
104 | 310 | contents: searchField | 326 | contents: searchField |
105 | @@ -314,6 +330,12 @@ | |||
106 | 314 | target: searchField | 330 | target: searchField |
107 | 315 | text: "" | 331 | text: "" |
108 | 316 | } | 332 | } |
109 | 333 | |||
110 | 334 | PropertyChanges { | ||
111 | 335 | target: searchField | ||
112 | 336 | visible: true | ||
113 | 337 | focus: true | ||
114 | 338 | } | ||
115 | 317 | }, | 339 | }, |
116 | 318 | PageHeadState { | 340 | PageHeadState { |
117 | 319 | id: selectionState | 341 | id: selectionState |
118 | @@ -418,12 +440,50 @@ | |||
119 | 418 | target: bottomEdge | 440 | target: bottomEdge |
120 | 419 | enabled: false | 441 | enabled: false |
121 | 420 | } | 442 | } |
122 | 443 | }, | ||
123 | 444 | PageHeadState { | ||
124 | 445 | id: varctImportedState | ||
125 | 446 | |||
126 | 447 | name: "vcardImported" | ||
127 | 448 | backAction: Action { | ||
128 | 449 | iconName: "back" | ||
129 | 450 | text: i18n.tr("Back") | ||
130 | 451 | onTriggered: { | ||
131 | 452 | contactList.forceActiveFocus() | ||
132 | 453 | mainPage.state = "default" | ||
133 | 454 | importedIdsFilter.ids = [] | ||
134 | 455 | } | ||
135 | 456 | } | ||
136 | 457 | PropertyChanges { | ||
137 | 458 | target: mainPage.head | ||
138 | 459 | backAction: varctImportedState.backAction | ||
139 | 460 | } | ||
140 | 461 | PropertyChanges { | ||
141 | 462 | target: bottomEdge | ||
142 | 463 | enabled: false | ||
143 | 464 | } | ||
144 | 465 | PropertyChanges { | ||
145 | 466 | target: contactList | ||
146 | 467 | filter: importedIdsFilter | ||
147 | 468 | } | ||
148 | 469 | PropertyChanges { | ||
149 | 470 | target: mainPage | ||
150 | 471 | title: i18n.tr("Imported contacts") | ||
151 | 472 | } | ||
152 | 421 | } | 473 | } |
153 | 422 | ] | 474 | ] |
154 | 475 | |||
155 | 423 | onActiveChanged: { | 476 | onActiveChanged: { |
156 | 424 | if (active && contactList.showAddNewButton) { | 477 | if (active && contactList.showAddNewButton) { |
157 | 425 | contactList.positionViewAtBeginning() | 478 | contactList.positionViewAtBeginning() |
158 | 426 | } | 479 | } |
159 | 480 | if (active && (state === "searching")) { | ||
160 | 481 | searchField.forceActiveFocus() | ||
161 | 482 | } | ||
162 | 483 | } | ||
163 | 484 | |||
164 | 485 | IdFilter { | ||
165 | 486 | id: importedIdsFilter | ||
166 | 427 | } | 487 | } |
167 | 428 | 488 | ||
168 | 429 | KeyboardRectangle { | 489 | KeyboardRectangle { |
169 | @@ -478,16 +538,6 @@ | |||
170 | 478 | } | 538 | } |
171 | 479 | } | 539 | } |
172 | 480 | 540 | ||
173 | 481 | Connections { | ||
174 | 482 | target: mainPage.contactModel | ||
175 | 483 | onContactsChanged: { | ||
176 | 484 | if (contactIndex) { | ||
177 | 485 | contactList.positionViewAtContact(mainPage.contactIndex) | ||
178 | 486 | mainPage.contactIndex = null | ||
179 | 487 | } | ||
180 | 488 | } | ||
181 | 489 | } | ||
182 | 490 | |||
183 | 491 | ContactExporter { | 541 | ContactExporter { |
184 | 492 | id: contactExporter | 542 | id: contactExporter |
185 | 493 | 543 | ||
186 | @@ -538,7 +588,7 @@ | |||
187 | 538 | 588 | ||
188 | 539 | Component.onCompleted: { | 589 | Component.onCompleted: { |
189 | 540 | application.elapsed() | 590 | application.elapsed() |
191 | 541 | if ((typeof(TEST_DATA) !== "undefined") && (TEST_DATA !== "")) { | 591 | if ((typeof(TEST_DATA) !== "undefined") && (TEST_DATA != "")) { |
192 | 542 | contactList.listModel.importContacts("file://" + TEST_DATA) | 592 | contactList.listModel.importContacts("file://" + TEST_DATA) |
193 | 543 | } | 593 | } |
194 | 544 | 594 | ||
195 | @@ -647,6 +697,27 @@ | |||
196 | 647 | } | 697 | } |
197 | 648 | 698 | ||
198 | 649 | Connections { | 699 | Connections { |
199 | 700 | target: mainPage.contactModel | ||
200 | 701 | onContactsChanged: { | ||
201 | 702 | if (contactIndex) { | ||
202 | 703 | contactList.positionViewAtContact(mainPage.contactIndex) | ||
203 | 704 | mainPage.contactIndex = null | ||
204 | 705 | } | ||
205 | 706 | } | ||
206 | 707 | onImportCompleted: { | ||
207 | 708 | if (error !== ContactModel.ImportNoError) { | ||
208 | 709 | console.error("Fail to import vcard:" + error) | ||
209 | 710 | } else { | ||
210 | 711 | var importedIds = ids | ||
211 | 712 | importedIds.concat(importedIdsFilter.ids) | ||
212 | 713 | importedIdsFilter.ids = importedIds | ||
213 | 714 | console.debug("Imported ids:" + importedIds) | ||
214 | 715 | mainPage.state = "vcardImported" | ||
215 | 716 | } | ||
216 | 717 | } | ||
217 | 718 | } | ||
218 | 719 | |||
219 | 720 | Connections { | ||
220 | 650 | target: mainPage.contactViewPage | 721 | target: mainPage.contactViewPage |
221 | 651 | onEditContact: { | 722 | onEditContact: { |
222 | 652 | openEditPage(editPageProperties, mainPage.contactViewPage); | 723 | openEditPage(editPageProperties, mainPage.contactViewPage); |
223 | 653 | 724 | ||
224 | === modified file 'src/imports/BottomEdge.qml' | |||
225 | --- src/imports/BottomEdge.qml 2015-10-23 14:32:47 +0000 | |||
226 | +++ src/imports/BottomEdge.qml 2015-11-19 14:41:33 +0000 | |||
227 | @@ -89,10 +89,10 @@ | |||
228 | 89 | id: bottomEdgeLoader | 89 | id: bottomEdgeLoader |
229 | 90 | sourceComponent: bottomEdge.contentComponent | 90 | sourceComponent: bottomEdge.contentComponent |
230 | 91 | asynchronous: true | 91 | asynchronous: true |
231 | 92 | active: bottomEdge.enabled | ||
232 | 92 | } | 93 | } |
233 | 93 | } | 94 | } |
234 | 94 | 95 | ||
235 | 95 | |||
236 | 96 | BottomEdgeHint { | 96 | BottomEdgeHint { |
237 | 97 | id: bottomEdgeHint | 97 | id: bottomEdgeHint |
238 | 98 | 98 | ||
239 | 99 | 99 | ||
240 | === modified file 'src/imports/CMakeLists.txt' | |||
241 | --- src/imports/CMakeLists.txt 2015-10-16 13:37:25 +0000 | |||
242 | +++ src/imports/CMakeLists.txt 2015-11-19 14:41:33 +0000 | |||
243 | @@ -6,7 +6,6 @@ | |||
244 | 6 | ABContactViewPage.qml | 6 | ABContactViewPage.qml |
245 | 7 | ContentHubProxy.qml | 7 | ContentHubProxy.qml |
246 | 8 | MainWindow.qml | 8 | MainWindow.qml |
247 | 9 | VCardImportDialog.qml | ||
248 | 10 | BottomEdgeShadow.qml | 9 | BottomEdgeShadow.qml |
249 | 11 | BottomEdge.qml | 10 | BottomEdge.qml |
250 | 12 | ) | 11 | ) |
251 | 13 | 12 | ||
252 | === modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml' | |||
253 | --- src/imports/Ubuntu/Contacts/ContactListView.qml 2015-10-28 01:07:59 +0000 | |||
254 | +++ src/imports/Ubuntu/Contacts/ContactListView.qml 2015-11-19 14:41:33 +0000 | |||
255 | @@ -248,12 +248,8 @@ | |||
256 | 248 | This property holds the vertical velocity of the list | 248 | This property holds the vertical velocity of the list |
257 | 249 | */ | 249 | */ |
258 | 250 | readonly property real verticalVelocity: view.verticalVelocity | 250 | readonly property real verticalVelocity: view.verticalVelocity |
259 | 251 | /*! | ||
260 | 252 | \qmlproperty Contact highlightedContact | ||
261 | 253 | 251 | ||
265 | 254 | This property holds a reference to the Contact that should be highlighted | 252 | property alias highlightSelected: view.highlightSelected |
263 | 255 | */ | ||
264 | 256 | property Contact highlightedContact: null | ||
266 | 257 | 253 | ||
267 | 258 | property var _busyDialog: null | 254 | property var _busyDialog: null |
268 | 259 | 255 | ||
269 | @@ -382,7 +378,6 @@ | |||
270 | 382 | property bool showFavourites: true | 378 | property bool showFavourites: true |
271 | 383 | property alias favouritesIsSelected: contactsModel.onlyFavorites | 379 | property alias favouritesIsSelected: contactsModel.onlyFavorites |
272 | 384 | property bool contactsLoaded: false | 380 | property bool contactsLoaded: false |
273 | 385 | highlightedContact: root.highlightedContact | ||
274 | 386 | 381 | ||
275 | 387 | function getSectionText(index) { | 382 | function getSectionText(index) { |
276 | 388 | var tag = listModel.contacts[index].tag.tag | 383 | var tag = listModel.contacts[index].tag.tag |
277 | 389 | 384 | ||
278 | === modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml' | |||
279 | --- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-10-26 13:18:11 +0000 | |||
280 | +++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-11-19 14:41:33 +0000 | |||
281 | @@ -145,11 +145,11 @@ | |||
282 | 145 | property list<Action> rightSideActions | 145 | property list<Action> rightSideActions |
283 | 146 | 146 | ||
284 | 147 | /*! | 147 | /*! |
286 | 148 | \qmlproperty Contact highlightedContact | 148 | \qmlproperty highlightSelected |
287 | 149 | 149 | ||
289 | 150 | This property holds a reference to the Contact that should be highlighted | 150 | This property holds if the current contact should be highlighted or not |
290 | 151 | */ | 151 | */ |
292 | 152 | property Contact highlightedContact: null | 152 | property bool highlightSelected: false |
293 | 153 | 153 | ||
294 | 154 | /* internal */ | 154 | /* internal */ |
295 | 155 | property var _currentSwipedItem: null | 155 | property var _currentSwipedItem: null |
296 | @@ -269,7 +269,7 @@ | |||
297 | 269 | flicking: contactListView.flicking | 269 | flicking: contactListView.flicking |
298 | 270 | width: parent.width | 270 | width: parent.width |
299 | 271 | selected: (contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate)) | 271 | selected: (contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate)) |
301 | 272 | || (contactListView.highlightedContact && contactListView.highlightedContact.contactId == contact.contactId) | 272 | || (contactListView.highlightSelected && (contactListView.currentIndex == index)) |
302 | 273 | selectionMode: contactListView.isInSelectionMode | 273 | selectionMode: contactListView.isInSelectionMode |
303 | 274 | defaultAvatarUrl: contactListView.defaultAvatarImageUrl | 274 | defaultAvatarUrl: contactListView.defaultAvatarImageUrl |
304 | 275 | isCurrentItem: ListView.isCurrentItem | 275 | isCurrentItem: ListView.isCurrentItem |
305 | 276 | 276 | ||
306 | === removed file 'src/imports/VCardImportDialog.qml' | |||
307 | --- src/imports/VCardImportDialog.qml 2015-10-26 13:18:11 +0000 | |||
308 | +++ src/imports/VCardImportDialog.qml 1970-01-01 00:00:00 +0000 | |||
309 | @@ -1,94 +0,0 @@ | |||
310 | 1 | /* | ||
311 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
312 | 3 | * | ||
313 | 4 | * This program is free software; you can redistribute it and/or modify | ||
314 | 5 | * it under the terms of the GNU General Public License as published by | ||
315 | 6 | * the Free Software Foundation; version 3. | ||
316 | 7 | * | ||
317 | 8 | * This program is distributed in the hope that it will be useful, | ||
318 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
319 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
320 | 11 | * GNU General Public License for more details. | ||
321 | 12 | * | ||
322 | 13 | * You should have received a copy of the GNU General Public License | ||
323 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
324 | 15 | */ | ||
325 | 16 | |||
326 | 17 | import QtQuick 2.4 | ||
327 | 18 | import QtContacts 5.0 | ||
328 | 19 | import Ubuntu.Components 1.3 | ||
329 | 20 | import Ubuntu.Components.Popups 1.3 as Popups | ||
330 | 21 | |||
331 | 22 | Item { | ||
332 | 23 | id: root | ||
333 | 24 | |||
334 | 25 | property alias model: modelConnections.target | ||
335 | 26 | property var vcards: [] | ||
336 | 27 | property var importedVcards: [] | ||
337 | 28 | property var importErrors: [] | ||
338 | 29 | property var dialog: null | ||
339 | 30 | |||
340 | 31 | signal finished() | ||
341 | 32 | |||
342 | 33 | function importVCards(model, vcards) | ||
343 | 34 | { | ||
344 | 35 | if (dialog || vcards.length === 0) { | ||
345 | 36 | return | ||
346 | 37 | } | ||
347 | 38 | |||
348 | 39 | root.model = model | ||
349 | 40 | root.vcards = vcards | ||
350 | 41 | dialog = Popups.PopupUtils.open(importDialogComponent, root) | ||
351 | 42 | |||
352 | 43 | for(var i=0, iMax=vcards.length; i < iMax; i++) { | ||
353 | 44 | var vcardUrl = vcards[i] | ||
354 | 45 | model.importContacts(vcardUrl) | ||
355 | 46 | } | ||
356 | 47 | } | ||
357 | 48 | |||
358 | 49 | Connections { | ||
359 | 50 | id: modelConnections | ||
360 | 51 | |||
361 | 52 | onImportCompleted: { | ||
362 | 53 | var imported = root.importedVcards | ||
363 | 54 | var importErrors = root.importErrors | ||
364 | 55 | imported.push(url) | ||
365 | 56 | if (error !== ContactModel.ImportNoError) { | ||
366 | 57 | root.importErrors.push(error) | ||
367 | 58 | console.error("Fail to import vcard:" + error) | ||
368 | 59 | } | ||
369 | 60 | root.importedVcards = imported | ||
370 | 61 | root.importErrors = importErrors | ||
371 | 62 | } | ||
372 | 63 | } | ||
373 | 64 | |||
374 | 65 | Component { | ||
375 | 66 | id: importDialogComponent | ||
376 | 67 | |||
377 | 68 | Popups.Dialog { | ||
378 | 69 | id: importDialog | ||
379 | 70 | |||
380 | 71 | title: i18n.tr("Import vCards") | ||
381 | 72 | text: root.importedVcards.length === 0 ? i18n.tr("Importing...") : i18n.tr("%1 vCards imported").arg(root.importedVcards.length) | ||
382 | 73 | |||
383 | 74 | Button { | ||
384 | 75 | anchors { | ||
385 | 76 | left: parent.left | ||
386 | 77 | right: parent.right | ||
387 | 78 | margins: units.gu(1) | ||
388 | 79 | } | ||
389 | 80 | text: i18n.tr("Close") | ||
390 | 81 | enabled: (root.importedVcards.length === root.vcards.length) | ||
391 | 82 | onClicked: { | ||
392 | 83 | root.dialog = null | ||
393 | 84 | Popups.PopupUtils.close(importDialog) | ||
394 | 85 | } | ||
395 | 86 | } | ||
396 | 87 | |||
397 | 88 | Component.onDestruction: root.destroy() | ||
398 | 89 | } | ||
399 | 90 | } | ||
400 | 91 | } | ||
401 | 92 | |||
402 | 93 | |||
403 | 94 |
FAILED: Continuous integration, rev:501 jenkins. qa.ubuntu. com/job/ address- book-app- ci/1009/ jenkins. qa.ubuntu. com/job/ address- book-app- vivid-i386- ci/312/ console jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 5253/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 5273/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/address- book-app- ci/1009/ rebuild
http://