Merge lp:~renatofilho/telephony-service/fix-1400468 into lp:telephony-service

Proposed by Renato Araujo Oliveira Filho
Status: Work in progress
Proposed branch: lp:~renatofilho/telephony-service/fix-1400468
Merge into: lp:telephony-service
Diff against target: 18 lines (+7/-1)
1 file modified
Ubuntu/Telephony/contactwatcher.cpp (+7/-1)
To merge this branch: bzr merge lp:~renatofilho/telephony-service/fix-1400468
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+244345@code.launchpad.net

Commit message

Update contact watch to search partial phone number in any position of the stored phone number field.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

975. By Renato Araujo Oliveira Filho

Update contact watch to search partial phone number in any position of the stored phone number field.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Ubuntu/Telephony/contactwatcher.cpp'
2--- Ubuntu/Telephony/contactwatcher.cpp 2014-09-02 17:42:20 +0000
3+++ Ubuntu/Telephony/contactwatcher.cpp 2014-12-10 19:07:32 +0000
4@@ -69,7 +69,13 @@
5 }
6
7 mRequest = new QContactFetchRequest(this);
8- mRequest->setFilter(QContactPhoneNumber::match(phoneNumber));
9+ // we want all contacts that contains the partial number in any position of the phone number
10+ // using QContactPhoneNumber::match() will return a filter for phone numbers that ends with the search term
11+ QContactDetailFilter phoneFilter;
12+ phoneFilter.setDetailType(QContactPhoneNumber::Type, QContactPhoneNumber::FieldNumber);
13+ phoneFilter.setValue(phoneNumber);
14+ phoneFilter.setMatchFlags(QContactFilter::MatchPhoneNumber | QContactFilter::MatchContains);
15+ mRequest->setFilter(phoneFilter);
16 connect(mRequest, SIGNAL(stateChanged(QContactAbstractRequest::State)),
17 SLOT(onRequestStateChanged(QContactAbstractRequest::State)));
18 connect(mRequest, SIGNAL(resultsAvailable()), SLOT(resultsAvailable()));

Subscribers

People subscribed via source and target branches