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
1=== modified file 'click/manifest.json.in'
2--- click/manifest.json.in 2014-07-07 19:46:23 +0000
3+++ click/manifest.json.in 2014-07-10 00:46:00 +0000
4@@ -18,4 +18,4 @@
5 "vcs-bzr": "lp:address-book-app",
6 "vcs-bzr-revno": "@BZR_REVNO@"
7 }
8-}
9+}
10\ No newline at end of file
11
12=== modified file 'debian/control'
13--- debian/control 2014-07-08 17:48:34 +0000
14+++ debian/control 2014-07-10 00:46:00 +0000
15@@ -32,6 +32,7 @@
16 Architecture: amd64 armhf i386
17 Depends: libqt5contacts5,
18 libqt5versit5,
19+ ubuntu-ui-toolkit-theme (>= 0.1.49+14.10.20140707),
20 qmlscene,
21 qtcontact5-galera,
22 qtdeclarative5-qtcontacts-plugin,
23@@ -51,6 +52,7 @@
24 Depends: qtdeclarative5-qtquick2-plugin,
25 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+14.10.20140527) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
26 qtdeclarative5-qtcontacts-plugin,
27+ suru-icon-theme,
28 ${misc:Depends},
29 ${shlibs:Depends},
30 Description: Qt Ubuntu Contacts Components - QML plugin
31
32=== modified file 'src/imports/ContactEdit/ContactDetailAvatarEditor.qml'
33--- src/imports/ContactEdit/ContactDetailAvatarEditor.qml 2014-06-23 18:35:43 +0000
34+++ src/imports/ContactEdit/ContactDetailAvatarEditor.qml 2014-07-10 00:46:00 +0000
35@@ -23,7 +23,7 @@
36 ContactDetailBase {
37 id: root
38
39- readonly property string defaultAvatar: "image://theme/contact"
40+ readonly property string defaultAvatar: "image://theme/add"
41
42 function isEmpty() {
43 return false;
44@@ -68,14 +68,18 @@
45
46 radius: "medium"
47 anchors.fill: parent
48- image: Image {
49+ image: avatarImage.source != defaultAvatar ? avatarImage : null
50+
51+ Image {
52 id: avatarImage
53
54 fillMode: Image.PreserveAspectCrop
55 asynchronous: true
56 source: root.getAvatar(root.detail)
57- height: units.gu(8)
58- width: units.gu(8)
59+ anchors.centerIn: visible ? avatar : undefined
60+ height: units.gu(3)
61+ width: units.gu(3)
62+ visible: source == defaultAvatar
63
64 // When updating the avatar using the content picker the temporary file returned
65 // can contain the same name as the previous one and if the cache is enabled this
66
67=== modified file 'src/imports/ContactEdit/ValueSelector.qml'
68--- src/imports/ContactEdit/ValueSelector.qml 2014-06-18 13:47:42 +0000
69+++ src/imports/ContactEdit/ValueSelector.qml 2014-07-10 00:46:00 +0000
70@@ -93,7 +93,7 @@
71 }
72
73 Icon {
74- name: "chevron"
75+ name: "go-next"
76 color: "black"
77 height: units.gu(1)
78 width: height
79@@ -164,8 +164,7 @@
80 Icon {
81 id: arrow
82
83- name: "chevron"
84- color: "white"
85+ name: "go-next"
86 height: visible ? units.gu(1) : 0
87 width: height
88 visible: index < (listView.count - 1)
89
90=== modified file 'src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml'
91--- src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml 2014-05-28 19:56:00 +0000
92+++ src/imports/Ubuntu/Contacts/ContactDetailPhoneNumberTypeModel.qml 2014-07-10 00:46:00 +0000
93@@ -41,7 +41,12 @@
94 } else if (contexts.indexOf(QtContacts.ContactDetail.ContextOther) > -1) {
95 return 4
96 } else {
97- return 2 // Default value is "Mobile"
98+ // phone without context is and voice type is other
99+ if (subTypes && subTypes.indexOf(QtContacts.PhoneNumber.Voice) > -1) {
100+ return 4
101+ } else {
102+ return 2 // Default value is "Mobile"
103+ }
104 }
105 }
106
107@@ -92,15 +97,15 @@
108
109 Component.onCompleted: {
110 append({"value": "Home", "label": i18n.dtr("address-book-app", "Home"), "icon": null,
111- "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Landline })
112+ "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Voice })
113 append({"value": "Work", "label": i18n.dtr("address-book-app", "Work"), "icon": null,
114- "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Landline })
115+ "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Voice })
116 append({"value": "Mobile", "label": i18n.dtr("address-book-app", "Mobile"), "icon": null,
117 "context": QtContacts.ContactDetail.ContextHome, "subType": QtContacts.PhoneNumber.Mobile })
118 append({"value": "Mobile-Work", "label": i18n.dtr("address-book-app", "Work Mobile"), "icon": null,
119 "context": QtContacts.ContactDetail.ContextWork, "subType": QtContacts.PhoneNumber.Mobile })
120 append({"value": "Other", "label": i18n.dtr("address-book-app", "Other"), "icon": null,
121- "context": QtContacts.ContactDetail.ContextOther, "subType": QtContacts.PhoneNumber.Landline })
122+ "context": QtContacts.ContactDetail.ContextOther, "subType": QtContacts.PhoneNumber.Voice })
123 loaded()
124 }
125 }
126
127=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
128--- src/imports/Ubuntu/Contacts/ContactListView.qml 2014-07-03 19:35:30 +0000
129+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2014-07-10 00:46:00 +0000
130@@ -373,6 +373,14 @@
131 return tag
132 }
133
134+ // if the favorite header became invisible we should move back to all contacts.
135+ onShowFavouritesChanged: {
136+ if (!showFavourites && view.favouritesIsSelected) {
137+ root.changeFilter(root.filter)
138+ view.favouritesIsSelected = false
139+ }
140+ }
141+
142 anchors {
143 top: itemHeader.bottom
144 left: parent.left
145@@ -523,22 +531,31 @@
146 IntersectionFilter {
147 id: contactsFilter
148
149- property bool active: false
150-
151- filters: {
152- var filters = []
153+ property bool active: {
154+ var filters_ = []
155 if (contactTermFilter.value.length > 0) {
156- filters.push(contactTermFilter)
157- } else if (view.showFavourites && view.favouritesIsSelected) {
158- filters.push(favouritesFilter)
159+ filters_.push(contactTermFilter)
160+ } else if (view.favouritesIsSelected) {
161+ filters_.push(favouritesFilter)
162 }
163
164 if (root.filter) {
165- filters.push(root.filter)
166- }
167-
168- active = (filters.length > 0)
169- return filters
170+ filters_.push(root.filter)
171+ }
172+
173+ // check if the filter has changed
174+ var oldFilters = contactsFilter.filters
175+ if (oldFilters.length !== filters_.length) {
176+ contactsFilter.filters = filters_
177+ } else {
178+ for(var i=0; i < oldFilters.length; i++) {
179+ if (filters_.indexOf(oldFilters[i]) === -1) {
180+ contactsFilter.filters = filters_
181+ }
182+ }
183+ }
184+
185+ return (filters_.length > 0)
186 }
187 }
188
189@@ -550,25 +567,12 @@
190 interval: 300
191 onTriggered: {
192 view.positionViewAtBeginning()
193- var needUpdate = false
194- if (root.filterTerm === "") { // if the search criteria is empty clear the list before show all contacts
195- if (contactTermFilter.value !== "") {
196- root.changeFilter(root.filter)
197- contactTermFilter.value = ""
198- needUpdate = true
199- }
200- } else {
201- if (contactTermFilter.value !== root.filterTerm) {
202- if (contactTermFilter.value === "") { // if the search starts clear the list before show results
203- root.changeFilter(root.filter)
204- }
205- contactTermFilter.value = root.filterTerm
206- needUpdate = true
207- }
208- }
209+
210+ root.changeFilter(root.filter)
211+ contactTermFilter.value = root.filterTerm
212
213 // manually update if autoUpdate is disabled
214- if (needUpdate && !root.autoUpdate) {
215+ if (!root.autoUpdate) {
216 contactsModel.update()
217 }
218 }

Subscribers

People subscribed via source and target branches