Merge lp:~renatofilho/dialer-app/contacts-search into lp:dialer-app
- contacts-search
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Gustavo Pichorim Boiko |
Approved revision: | 163 |
Merged at revision: | 169 |
Proposed branch: | lp:~renatofilho/dialer-app/contacts-search |
Merge into: | lp:dialer-app |
Diff against target: |
141 lines (+112/-1) 2 files modified
src/qml/ContactsPage/ContactsPage.qml (+32/-1) src/qml/ContactsPage/KeyboardRectagle.qml (+80/-0) |
To merge this branch: | bzr merge lp:~renatofilho/dialer-app/contacts-search |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Pichorim Boiko (community) | Approve | ||
PS Jenkins bot | continuous-integration | Needs Fixing | |
Review via email:
|
Commit message
Implemented contact search on ContactsPage.qml
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
- 159. By Renato Araujo Oliveira Filho
-
Does not move the contact list while searching this will be handled by contact list code.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:158
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 160. By Renato Araujo Oliveira Filho
-
Trunk merged.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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 UI CHANGE
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:160
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 161. By Renato Araujo Oliveira Filho
-
Call message app if use click on message icon on contact list.
- 162. By Renato Araujo Oliveira Filho
-
Used KeyboardRectagle to anchor the contact list when the keyboard appears.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:162
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 163. By Renato Araujo Oliveira Filho
-
Added missing file.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:163
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
deb: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:163
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gustavo Pichorim Boiko (boiko) wrote : | # |
58 === added file 'src/qml/
59 --- src/qml/
60 +++ src/qml/
This KeyboardRectangle hack is not necessary anymore. You can use MainView's anchorToKeyboard property instead.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
The anchorToKeyboard did not work in this case. I do not know why.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gustavo Pichorim Boiko (boiko) wrote : | # |
> The anchorToKeyboard did not work in this case. I do not know why.
Ok. We can revisit the case later.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gustavo Pichorim Boiko (boiko) 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.
No, but it was a jenkins failure, not a dialer-app failure.
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes
Code looks good and works as expected!
Preview Diff
1 | === modified file 'src/qml/ContactsPage/ContactsPage.qml' |
2 | --- src/qml/ContactsPage/ContactsPage.qml 2014-06-11 21:10:27 +0000 |
3 | +++ src/qml/ContactsPage/ContactsPage.qml 2014-07-08 00:34:51 +0000 |
4 | @@ -29,14 +29,42 @@ |
5 | title: i18n.tr("Contacts") |
6 | property QtObject contact |
7 | |
8 | + __customHeaderContents: TextField { |
9 | + id: searchField |
10 | + |
11 | + anchors { |
12 | + left: parent.left |
13 | + leftMargin: units.gu(2) |
14 | + right: parent.right |
15 | + rightMargin: units.gu(2) |
16 | + topMargin: units.gu(1.5) |
17 | + bottomMargin: units.gu(1.5) |
18 | + verticalCenter: parent.verticalCenter |
19 | + } |
20 | + onTextChanged: contactList.currentIndex = -1 |
21 | + inputMethodHints: Qt.ImhNoPredictiveText |
22 | + placeholderText: i18n.tr("Type a name or phone to search") |
23 | + } |
24 | + |
25 | ContactListView { |
26 | id: contactList |
27 | - anchors.fill: parent |
28 | + |
29 | + anchors{ |
30 | + top: parent.top |
31 | + left: parent.left |
32 | + right: parent.right |
33 | + bottom: keyboardRect.top |
34 | + } |
35 | onInfoRequested: { |
36 | mainView.viewContact(contact.contactId) |
37 | } |
38 | + filterTerm: searchField.text |
39 | detailToPick: ContactDetail.PhoneNumber |
40 | onDetailClicked: { |
41 | + if (action === "message") { |
42 | + Qt.openUrlExternally("message:///" + encodeURIComponent(detail.number)) |
43 | + return |
44 | + } |
45 | pageStack.pop() |
46 | if (callManager.hasCalls) { |
47 | mainView.call(detail.number); |
48 | @@ -46,5 +74,8 @@ |
49 | } |
50 | } |
51 | |
52 | + KeyboardRectagle { |
53 | + id: keyboardRect |
54 | + } |
55 | } |
56 | |
57 | |
58 | === added file 'src/qml/ContactsPage/KeyboardRectagle.qml' |
59 | --- src/qml/ContactsPage/KeyboardRectagle.qml 1970-01-01 00:00:00 +0000 |
60 | +++ src/qml/ContactsPage/KeyboardRectagle.qml 2014-07-08 00:34:51 +0000 |
61 | @@ -0,0 +1,80 @@ |
62 | +/* |
63 | + * Copyright 2012-2014 Canonical Ltd. |
64 | + * |
65 | + * This file is part of dialer-app. |
66 | + * |
67 | + * dialer-app is free software; you can redistribute it and/or modify |
68 | + * it under the terms of the GNU General Public License as published by |
69 | + * the Free Software Foundation; version 3. |
70 | + * |
71 | + * dialer-app is distributed in the hope that it will be useful, |
72 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
73 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
74 | + * GNU General Public License for more details. |
75 | + * |
76 | + * You should have received a copy of the GNU General Public License |
77 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
78 | + */ |
79 | + |
80 | +import QtQuick 2.0 |
81 | + |
82 | +Item { |
83 | + id: keyboardRect |
84 | + |
85 | + anchors.left: parent.left |
86 | + anchors.right: parent.right |
87 | + anchors.bottom: parent.bottom |
88 | + height: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0 |
89 | + |
90 | + Behavior on height { |
91 | + NumberAnimation { |
92 | + duration: 300 |
93 | + easing.type: Easing.InOutQuad |
94 | + } |
95 | + } |
96 | + |
97 | + states: [ |
98 | + State { |
99 | + name: "hidden" |
100 | + when: keyboardRect.height == 0 |
101 | + }, |
102 | + State { |
103 | + name: "shown" |
104 | + when: keyboardRect.height == Qt.inputMethod.keyboardRectangle.height |
105 | + } |
106 | + ] |
107 | + |
108 | + function recursiveFindFocusedItem(parent) { |
109 | + if (parent.activeFocus) { |
110 | + return parent; |
111 | + } |
112 | + |
113 | + for (var i in parent.children) { |
114 | + var child = parent.children[i]; |
115 | + if (child.activeFocus) { |
116 | + return child; |
117 | + } |
118 | + |
119 | + var item = recursiveFindFocusedItem(child); |
120 | + |
121 | + if (item != null) { |
122 | + return item; |
123 | + } |
124 | + } |
125 | + |
126 | + return null; |
127 | + } |
128 | + |
129 | + Connections { |
130 | + target: Qt.inputMethod |
131 | + |
132 | + onVisibleChanged: { |
133 | + if (!Qt.inputMethod.visible) { |
134 | + var focusedItem = recursiveFindFocusedItem(keyboardRect.parent); |
135 | + if (focusedItem != null) { |
136 | + focusedItem.focus = false; |
137 | + } |
138 | + } |
139 | + } |
140 | + } |
141 | +} |
FAILED: Continuous integration, rev:158 jenkins. qa.ubuntu. com/job/ dialer- app-ci/ 266/ jenkins. qa.ubuntu. com/job/ dialer- app-utopic- amd64-ci/ 37 jenkins. qa.ubuntu. com/job/ dialer- app-utopic- armhf-ci/ 37 jenkins. qa.ubuntu. com/job/ dialer- app-utopic- armhf-ci/ 37/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ dialer- app-utopic- i386-ci/ 37 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/1376 jenkins. qa.ubuntu. com/job/ generic- mediumtests- utopic/ 1200 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/1681 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/2313 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/2313/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 9061 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-utopic/ 990 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/1343 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/1343/ artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/dialer- app-ci/ 266/rebuild
http://