Merge lp:~aacid/unity8/passphrase_kewboard into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1692
Merged at revision: 1713
Proposed branch: lp:~aacid/unity8/passphrase_kewboard
Merge into: lp:unity8
Diff against target: 43 lines (+6/-2)
2 files modified
qml/Components/Dialogs.qml (+2/-0)
tests/qmltests/Components/tst_Dialogs.qml (+4/-2)
To merge this branch: bzr merge lp:~aacid/unity8/passphrase_kewboard
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michael Zanetti (community) Approve
Review via email: mp+253657@code.launchpad.net

Commit message

Focus the shutdown dialog

This way the keyboard will hide and we won't have a weird situation in which the keyaboard is half shown in shutdown dialog when we try get it on the passphrase dialog in the LockScreen

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

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
Michael Zanetti (mzanetti) wrote :

can you please add a tryCompare(dialog, "activeFocus", true) to the test after it opens the dialog?

review: Needs Fixing
lp:~aacid/unity8/passphrase_kewboard updated
1691. By Albert Astals Cid

test item gets the focus as suggested by mzanetti

Revision history for this message
Albert Astals Cid (aacid) wrote :

Done

lp:~aacid/unity8/passphrase_kewboard updated
1692. By Albert Astals Cid

unbreak tryDialogs

Revision history for this message
Michael Zanetti (mzanetti) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?

yes

 * Did CI run pass? If not, please explain why.

as much as it can. qmltests are fine. AP not affected by this afaict.

 * Did you make sure that the branch does not contain spurious tags?

yes

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Components/Dialogs.qml'
2--- qml/Components/Dialogs.qml 2015-03-13 10:07:57 +0000
3+++ qml/Components/Dialogs.qml 2015-03-26 15:39:44 +0000
4@@ -51,11 +51,13 @@
5 if (!dialogLoader.active) {
6 dialogLoader.sourceComponent = powerDialogComponent;
7 dialogLoader.active = true;
8+ dialogLoader.item.forceActiveFocus();
9 }
10 }
11 }
12 Loader {
13 id: dialogLoader
14+ objectName: "dialogLoader"
15 anchors.fill: parent
16 active: false
17 }
18
19=== modified file 'tests/qmltests/Components/tst_Dialogs.qml'
20--- tests/qmltests/Components/tst_Dialogs.qml 2014-12-08 13:39:01 +0000
21+++ tests/qmltests/Components/tst_Dialogs.qml 2015-03-26 15:39:44 +0000
22@@ -79,7 +79,7 @@
23 Column {
24 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
25 spacing: units.gu(1)
26- Button { text: "Power dialog"; onClicked: { testCase.showPowerDialog(); } }
27+ Button { text: "Power dialog"; onClicked: { testCase.test_showPowerDialog(); } }
28 Button { text: "Logout Requested"; onClicked: { fakeUnitySession.logoutRequested(); } }
29 Button { text: "Shutdown Requested"; onClicked: { fakeUnitySession.shutdownRequested(); } }
30 Button { text: "Reboot Requested"; onClicked: { fakeUnitySession.rebootRequested(); } }
31@@ -96,9 +96,11 @@
32 name: "Dialogs"
33 when: windowShown
34
35- function showPowerDialog() {
36+ function test_showPowerDialog() {
37 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");
38 dialogsPrivate.showPowerDialog();
39+ var dialogLoader = findInvisibleChild(dialogs, "dialogLoader");
40+ tryCompare(dialogLoader.item, "focus", true);
41 }
42 }
43 }

Subscribers

People subscribed via source and target branches