Merge lp:~tiagosh/address-book-service/fix-1235971 into lp:address-book-service

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 83
Merged at revision: 83
Proposed branch: lp:~tiagosh/address-book-service/fix-1235971
Merge into: lp:address-book-service
Diff against target: 12 lines (+2/-0)
1 file modified
qcontacts/contacts-service.cpp (+2/-0)
To merge this branch: bzr merge lp:~tiagosh/address-book-service/fix-1235971
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+189635@code.launchpad.net

Commit message

Sort by last name contacts with no first name.

Description of the change

Sort by last name contacts with no first name.

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 :

looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qcontacts/contacts-service.cpp'
2--- qcontacts/contacts-service.cpp 2013-10-01 18:50:44 +0000
3+++ qcontacts/contacts-service.cpp 2013-10-07 15:19:03 +0000
4@@ -311,6 +311,8 @@
5 QContactName detailName = contact->detail<QContactName>();
6 if (!detailName.firstName().isEmpty() && QString(detailName.firstName().at(0)).contains(QRegExp("([a-z]|[A-Z])"))) {
7 contact->addTag(detailName.firstName().at(0).toUpper());
8+ } else if (!detailName.lastName().isEmpty() && QString(detailName.lastName().at(0)).contains(QRegExp("([a-z]|[A-Z])"))) {
9+ contact->addTag(detailName.lastName().at(0).toUpper());
10 } else {
11 contact->addTag("#");
12 }

Subscribers

People subscribed via source and target branches