Merge lp:~renatofilho/address-book-app/fix-1268042 into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 167
Merged at revision: 172
Proposed branch: lp:~renatofilho/address-book-app/fix-1268042
Merge into: lp:address-book-app
Diff against target: 30 lines (+4/-2)
1 file modified
src/imports/ContactEdit/ContactEditor.qml (+4/-2)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1268042
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+216182@code.launchpad.net

Commit message

Does not focus contact first name when opening contact edit view.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
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 (e.g. bzr pull lp:trunk -> no changes): 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? N/A
* If you changed the packaging (debian), did you subscribe a core-dev to this MP? N/A

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Looks good to me.

-------------

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
168. By Renato Araujo Oliveira Filho

Merged trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/ContactEdit/ContactEditor.qml'
2--- src/imports/ContactEdit/ContactEditor.qml 2014-04-16 14:29:23 +0000
3+++ src/imports/ContactEdit/ContactEditor.qml 2014-05-02 18:14:15 +0000
4@@ -27,6 +27,7 @@
5
6 property QtObject contact: null
7 property alias model: contactFetch.model
8+ readonly property bool isNewContact: contact && (contact.contactId === "qtcontacts:::")
9
10 // this is used to add a phone number to a existing contact
11 property string contactId: ""
12@@ -63,7 +64,7 @@
13
14 // new contact and there is only two details (name, avatar)
15 // name and avatar, are not removable details, because of that the contact will have at least 2 details
16- if ((contact.contactId === "qtcontacts:::") &&
17+ if (isNewContact &&
18 (contact.contactDetails.length === 2)) {
19
20 // if name is empty this means that the contact is empty
21@@ -329,7 +330,8 @@
22 Component.onCompleted: {
23 if (contactId !== "") {
24 contactFetch.fetchContact(contactId)
25+ } else if (isNewContact) {
26+ nameEditor.forceActiveFocus()
27 }
28- nameEditor.forceActiveFocus()
29 }
30 }

Subscribers

People subscribed via source and target branches