Merge lp:~renatofilho/address-book-app/fix-search-crash into lp:~phablet-team/address-book-app/staging

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 215
Merged at revision: 214
Proposed branch: lp:~renatofilho/address-book-app/fix-search-crash
Merge into: lp:~phablet-team/address-book-app/staging
Prerequisite: lp:~renatofilho/address-book-app/new-avatar-empty-icon-on-edit-mode
Diff against target: 103 lines (+34/-30)
2 files modified
click/manifest.json.in (+1/-1)
src/imports/Ubuntu/Contacts/ContactListView.qml (+33/-29)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-search-crash
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tiago Salem Herrmann (community) Approve
Review via email: mp+226213@code.launchpad.net

Commit message

Fixed app crash wen starting the searching from favorite mode.

To post a comment you must log in.
215. By Renato Araujo Oliveira Filho

Clear the model for every new search.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:214
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/219/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1774
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1490
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/219
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/219
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/219/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/219
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2034
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2838
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2838/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9569
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1247
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1673
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1673/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/219/rebuild

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? 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
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
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:215
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/220/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1777
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1493
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/220
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/220
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/220/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/220
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2038
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2844
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2844/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9575
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1249
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1678
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1678/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/220/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

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-09 22:25:14 +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 '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-09 22:25:14 +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