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
=== modified file 'qml/Components/Dialogs.qml'
--- qml/Components/Dialogs.qml 2015-03-13 10:07:57 +0000
+++ qml/Components/Dialogs.qml 2015-03-26 15:39:44 +0000
@@ -51,11 +51,13 @@
51 if (!dialogLoader.active) {51 if (!dialogLoader.active) {
52 dialogLoader.sourceComponent = powerDialogComponent;52 dialogLoader.sourceComponent = powerDialogComponent;
53 dialogLoader.active = true;53 dialogLoader.active = true;
54 dialogLoader.item.forceActiveFocus();
54 }55 }
55 }56 }
56 }57 }
57 Loader {58 Loader {
58 id: dialogLoader59 id: dialogLoader
60 objectName: "dialogLoader"
59 anchors.fill: parent61 anchors.fill: parent
60 active: false62 active: false
61 }63 }
6264
=== modified file 'tests/qmltests/Components/tst_Dialogs.qml'
--- tests/qmltests/Components/tst_Dialogs.qml 2014-12-08 13:39:01 +0000
+++ tests/qmltests/Components/tst_Dialogs.qml 2015-03-26 15:39:44 +0000
@@ -79,7 +79,7 @@
79 Column {79 Column {
80 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }80 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
81 spacing: units.gu(1)81 spacing: units.gu(1)
82 Button { text: "Power dialog"; onClicked: { testCase.showPowerDialog(); } }82 Button { text: "Power dialog"; onClicked: { testCase.test_showPowerDialog(); } }
83 Button { text: "Logout Requested"; onClicked: { fakeUnitySession.logoutRequested(); } }83 Button { text: "Logout Requested"; onClicked: { fakeUnitySession.logoutRequested(); } }
84 Button { text: "Shutdown Requested"; onClicked: { fakeUnitySession.shutdownRequested(); } }84 Button { text: "Shutdown Requested"; onClicked: { fakeUnitySession.shutdownRequested(); } }
85 Button { text: "Reboot Requested"; onClicked: { fakeUnitySession.rebootRequested(); } }85 Button { text: "Reboot Requested"; onClicked: { fakeUnitySession.rebootRequested(); } }
@@ -96,9 +96,11 @@
96 name: "Dialogs"96 name: "Dialogs"
97 when: windowShown97 when: windowShown
9898
99 function showPowerDialog() {99 function test_showPowerDialog() {
100 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");100 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");
101 dialogsPrivate.showPowerDialog();101 dialogsPrivate.showPowerDialog();
102 var dialogLoader = findInvisibleChild(dialogs, "dialogLoader");
103 tryCompare(dialogLoader.item, "focus", true);
102 }104 }
103 }105 }
104}106}

Subscribers

People subscribed via source and target branches