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

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Ken VanDine
Approved revision: 453
Merged at revision: 455
Proposed branch: lp:~renatofilho/address-book-app/fix-1470196
Merge into: lp:address-book-app
Diff against target: 60 lines (+32/-2)
2 files modified
src/imports/MainWindow.qml (+2/-2)
tests/qml/tst_ContactList.qml (+30/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1470196
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+263563@code.launchpad.net

Commit message

Make sure that the contact list enter in single selection mode when requested by content hub.

Description of the change

Make sure that the contact list enter in single selection mode when requested by content hub.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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?
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 CHANGED

If you changed UI labels, did you update the pot file?
NO LABELS CHANGED

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
NO PACKAGING CHANGED

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Code looks good and I confirmed that single select is chosen when it should

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/imports/MainWindow.qml'
--- src/imports/MainWindow.qml 2015-04-28 16:29:44 +0000
+++ src/imports/MainWindow.qml 2015-07-01 17:53:42 +0000
@@ -61,14 +61,14 @@
61 function pick(single)61 function pick(single)
62 {62 {
63 console.debug("Pick mode:" + single)63 console.debug("Pick mode:" + single)
64 pickWithTransfer(single, null)64 pickWithTransfer(single === "true", null)
65 }65 }
6666
67 function pickWithTransfer(single, activeTransfer)67 function pickWithTransfer(single, activeTransfer)
68 {68 {
69 mainStack.resetStack()69 mainStack.resetStack()
70 if (mainStack.contactListPage) {70 if (mainStack.contactListPage) {
71 mainStack.contactListPage.startPickMode(single === "true", activeTransfer)71 mainStack.contactListPage.startPickMode(single, activeTransfer)
72 } else {72 } else {
73 console.error("Pick mode requested but ContactListPage not loaded")73 console.error("Pick mode requested but ContactListPage not loaded")
74 }74 }
7575
=== modified file 'tests/qml/tst_ContactList.qml'
--- tests/qml/tst_ContactList.qml 2015-04-29 14:22:40 +0000
+++ tests/qml/tst_ContactList.qml 2015-07-01 17:53:42 +0000
@@ -99,5 +99,35 @@
99 {99 {
100 tryCompare(root.contactListPageObj, "contactManager", "memory")100 tryCompare(root.contactListPageObj, "contactManager", "memory")
101 }101 }
102
103 function test_pickMode()
104 {
105 var listView = findChild(root.contactListPageObj, "contactListView")
106 // check initial state
107 compare(root.contactListPageObj.pickMode, false)
108 compare(root.contactListPageObj.pickMultipleContacts, false)
109
110 // by default the list accepts multi-selection but the selection mode is disabled
111 compare(listView.multipleSelection, true)
112 compare(listView.isInSelectionMode, false)
113
114 // start multi-selection pick mode
115 root.contactListPageObj.startPickMode(false /*isSingle*/, null)
116
117 // check multi-selection mode
118 compare(root.contactListPageObj.pickMode, true)
119 compare(root.contactListPageObj.pickMultipleContacts, true)
120 compare(listView.multipleSelection, true)
121 compare(listView.isInSelectionMode, true)
122
123 // start single-selection pick mode
124 root.contactListPageObj.startPickMode(true /*isSingle*/, null)
125
126 // check single-selection mode
127 compare(root.contactListPageObj.pickMode, true)
128 compare(root.contactListPageObj.pickMultipleContacts, false)
129 compare(listView.multipleSelection, false)
130 compare(listView.isInSelectionMode, true)
131 }
102 }132 }
103}133}

Subscribers

People subscribed via source and target branches