Merge lp:~renatofilho/address-book-app/release-2014-07-09 into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 215
Merged at revision: 234
Proposed branch: lp:~renatofilho/address-book-app/release-2014-07-09
Merge into: lp:address-book-app
Diff against target: 218 lines (+55/-41)
6 files modified
click/manifest.json.in (+1/-1)
debian/control (+2/-0)
src/imports/ContactEdit/ContactDetailAvatarEditor.qml (+8/-4)
src/imports/ContactEdit/ValueSelector.qml (+2/-3)
src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml (+9/-4)
src/imports/Ubuntu/Contacts/ContactListView.qml (+33/-29)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/release-2014-07-09
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+226231@code.launchpad.net

Commit message

* Show the "+" icon in contact editor mode if the image is empty.
* Fixed app crash wen starting the searching from favorite mode.

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected? NO

Is your branch in sync with latest trunk? YES

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

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

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

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

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

Did CI run pass? If not, please explain why.
Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'click/manifest.json.in'
--- click/manifest.json.in 2014-07-07 19:46:23 +0000
+++ click/manifest.json.in 2014-07-10 00:46:00 +0000
@@ -18,4 +18,4 @@
18 "vcs-bzr": "lp:address-book-app",18 "vcs-bzr": "lp:address-book-app",
19 "vcs-bzr-revno": "@BZR_REVNO@"19 "vcs-bzr-revno": "@BZR_REVNO@"
20 }20 }
21}21}
22\ No newline at end of file22\ No newline at end of file
2323
=== modified file 'debian/control'
--- debian/control 2014-07-08 17:48:34 +0000
+++ debian/control 2014-07-10 00:46:00 +0000
@@ -32,6 +32,7 @@
32Architecture: amd64 armhf i38632Architecture: amd64 armhf i386
33Depends: libqt5contacts5,33Depends: libqt5contacts5,
34 libqt5versit5,34 libqt5versit5,
35 ubuntu-ui-toolkit-theme (>= 0.1.49+14.10.20140707),
35 qmlscene,36 qmlscene,
36 qtcontact5-galera,37 qtcontact5-galera,
37 qtdeclarative5-qtcontacts-plugin,38 qtdeclarative5-qtcontacts-plugin,
@@ -51,6 +52,7 @@
51Depends: qtdeclarative5-qtquick2-plugin,52Depends: qtdeclarative5-qtquick2-plugin,
52 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+14.10.20140527) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,53 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+14.10.20140527) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
53 qtdeclarative5-qtcontacts-plugin,54 qtdeclarative5-qtcontacts-plugin,
55 suru-icon-theme,
54 ${misc:Depends},56 ${misc:Depends},
55 ${shlibs:Depends},57 ${shlibs:Depends},
56Description: Qt Ubuntu Contacts Components - QML plugin58Description: Qt Ubuntu Contacts Components - QML plugin
5759
=== modified file 'src/imports/ContactEdit/ContactDetailAvatarEditor.qml'
--- src/imports/ContactEdit/ContactDetailAvatarEditor.qml 2014-06-23 18:35:43 +0000
+++ src/imports/ContactEdit/ContactDetailAvatarEditor.qml 2014-07-10 00:46:00 +0000
@@ -23,7 +23,7 @@
23ContactDetailBase {23ContactDetailBase {
24 id: root24 id: root
2525
26 readonly property string defaultAvatar: "image://theme/contact"26 readonly property string defaultAvatar: "image://theme/add"
2727
28 function isEmpty() {28 function isEmpty() {
29 return false;29 return false;
@@ -68,14 +68,18 @@
6868
69 radius: "medium"69 radius: "medium"
70 anchors.fill: parent70 anchors.fill: parent
71 image: Image {71 image: avatarImage.source != defaultAvatar ? avatarImage : null
72
73 Image {
72 id: avatarImage74 id: avatarImage
7375
74 fillMode: Image.PreserveAspectCrop76 fillMode: Image.PreserveAspectCrop
75 asynchronous: true77 asynchronous: true
76 source: root.getAvatar(root.detail)78 source: root.getAvatar(root.detail)
77 height: units.gu(8)79 anchors.centerIn: visible ? avatar : undefined
78 width: units.gu(8)80 height: units.gu(3)
81 width: units.gu(3)
82 visible: source == defaultAvatar
7983
80 // When updating the avatar using the content picker the temporary file returned84 // When updating the avatar using the content picker the temporary file returned
81 // can contain the same name as the previous one and if the cache is enabled this85 // can contain the same name as the previous one and if the cache is enabled this
8286
=== modified file 'src/imports/ContactEdit/ValueSelector.qml'
--- src/imports/ContactEdit/ValueSelector.qml 2014-06-18 13:47:42 +0000
+++ src/imports/ContactEdit/ValueSelector.qml 2014-07-10 00:46:00 +0000
@@ -93,7 +93,7 @@
93 }93 }
9494
95 Icon {95 Icon {
96 name: "chevron"96 name: "go-next"
97 color: "black"97 color: "black"
98 height: units.gu(1)98 height: units.gu(1)
99 width: height99 width: height
@@ -164,8 +164,7 @@
164 Icon {164 Icon {
165 id: arrow165 id: arrow
166166
167 name: "chevron"167 name: "go-next"
168 color: "white"
169 height: visible ? units.gu(1) : 0168 height: visible ? units.gu(1) : 0
170 width: height169 width: height
171 visible: index < (listView.count - 1)170 visible: index < (listView.count - 1)
172171
=== modified file 'src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml'
--- src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml 2014-05-28 19:56:00 +0000
+++ src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml 2014-07-10 00:46:00 +0000
@@ -41,7 +41,12 @@
41 } else if (contexts.indexOf(QtContacts.ContactDetail.ContextOther) > -1) {41 } else if (contexts.indexOf(QtContacts.ContactDetail.ContextOther) > -1) {
42 return 442 return 4
43 } else {43 } else {
44 return 2 // Default value is "Mobile"44 // phone without context is and voice type is other
45 if (subTypes && subTypes.indexOf(QtContacts.PhoneNumber.Voice) > -1) {
46 return 4
47 } else {
48 return 2 // Default value is "Mobile"
49 }
45 }50 }
46 }51 }
4752
@@ -92,15 +97,15 @@
9297
93 Component.onCompleted: {98 Component.onCompleted: {
94 append({"value": "Home", "label": i18n.dtr("address-book-app", "Home"), "icon": null,99 append({"value": "Home", "label": i18n.dtr("address-book-app", "Home"), "icon": null,
95 "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Landline })100 "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Voice })
96 append({"value": "Work", "label": i18n.dtr("address-book-app", "Work"), "icon": null,101 append({"value": "Work", "label": i18n.dtr("address-book-app", "Work"), "icon": null,
97 "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Landline })102 "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Voice })
98 append({"value": "Mobile", "label": i18n.dtr("address-book-app", "Mobile"), "icon": null,103 append({"value": "Mobile", "label": i18n.dtr("address-book-app", "Mobile"), "icon": null,
99 "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Mobile })104 "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Mobile })
100 append({"value": "Mobile-Work", "label": i18n.dtr("address-book-app", "Work Mobile"), "icon": null,105 append({"value": "Mobile-Work", "label": i18n.dtr("address-book-app", "Work Mobile"), "icon": null,
101 "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Mobile })106 "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Mobile })
102 append({"value": "Other", "label": i18n.dtr("address-book-app", "Other"), "icon": null,107 append({"value": "Other", "label": i18n.dtr("address-book-app", "Other"), "icon": null,
103 "context": QtContacts.ContactDetail.ContextOther, "subType": QtContacts.PhoneNumber.Landline })108 "context": QtContacts.ContactDetail.ContextOther, "subType": QtContacts.PhoneNumber.Voice })
104 loaded()109 loaded()
105 }110 }
106}111}
107112
=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
--- src/imports/Ubuntu/Contacts/ContactListView.qml 2014-07-03 19:35:30 +0000
+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2014-07-10 00:46:00 +0000
@@ -373,6 +373,14 @@
373 return tag373 return tag
374 }374 }
375375
376 // if the favorite header became invisible we should move back to all contacts.
377 onShowFavouritesChanged: {
378 if (!showFavourites && view.favouritesIsSelected) {
379 root.changeFilter(root.filter)
380 view.favouritesIsSelected = false
381 }
382 }
383
376 anchors {384 anchors {
377 top: itemHeader.bottom385 top: itemHeader.bottom
378 left: parent.left386 left: parent.left
@@ -523,22 +531,31 @@
523 IntersectionFilter {531 IntersectionFilter {
524 id: contactsFilter532 id: contactsFilter
525533
526 property bool active: false534 property bool active: {
527535 var filters_ = []
528 filters: {
529 var filters = []
530 if (contactTermFilter.value.length > 0) {536 if (contactTermFilter.value.length > 0) {
531 filters.push(contactTermFilter)537 filters_.push(contactTermFilter)
532 } else if (view.showFavourites && view.favouritesIsSelected) {538 } else if (view.favouritesIsSelected) {
533 filters.push(favouritesFilter)539 filters_.push(favouritesFilter)
534 }540 }
535541
536 if (root.filter) {542 if (root.filter) {
537 filters.push(root.filter)543 filters_.push(root.filter)
538 }544 }
539545
540 active = (filters.length > 0)546 // check if the filter has changed
541 return filters547 var oldFilters = contactsFilter.filters
548 if (oldFilters.length !== filters_.length) {
549 contactsFilter.filters = filters_
550 } else {
551 for(var i=0; i < oldFilters.length; i++) {
552 if (filters_.indexOf(oldFilters[i]) === -1) {
553 contactsFilter.filters = filters_
554 }
555 }
556 }
557
558 return (filters_.length > 0)
542 }559 }
543 }560 }
544561
@@ -550,25 +567,12 @@
550 interval: 300567 interval: 300
551 onTriggered: {568 onTriggered: {
552 view.positionViewAtBeginning()569 view.positionViewAtBeginning()
553 var needUpdate = false570
554 if (root.filterTerm === "") { // if the search criteria is empty clear the list before show all contacts571 root.changeFilter(root.filter)
555 if (contactTermFilter.value !== "") {572 contactTermFilter.value = root.filterTerm
556 root.changeFilter(root.filter)
557 contactTermFilter.value = ""
558 needUpdate = true
559 }
560 } else {
561 if (contactTermFilter.value !== root.filterTerm) {
562 if (contactTermFilter.value === "") { // if the search starts clear the list before show results
563 root.changeFilter(root.filter)
564 }
565 contactTermFilter.value = root.filterTerm
566 needUpdate = true
567 }
568 }
569573
570 // manually update if autoUpdate is disabled574 // manually update if autoUpdate is disabled
571 if (needUpdate && !root.autoUpdate) {575 if (!root.autoUpdate) {
572 contactsModel.update()576 contactsModel.update()
573 }577 }
574 }578 }

Subscribers

People subscribed via source and target branches