Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/touchyHandlers into lp:ubuntu-ui-toolkit/staging
- touchyHandlers
- Merge into staging
Status: | Rejected |
---|---|
Rejected by: | Cris Dywan |
Proposed branch: | lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/touchyHandlers |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
178 lines (+52/-7) 4 files modified
src/Ubuntu/Components/1.3/InputHandler.qml (+8/-4) src/Ubuntu/Components/1.3/TextArea.qml (+19/-0) src/Ubuntu/Components/1.3/TextCursor.qml (+5/-3) src/Ubuntu/Components/1.3/TextField.qml (+20/-0) |
To merge this branch: | bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/touchyHandlers |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Needs Fixing | |
Zsombor Egri | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+281229@code.launchpad.net |
Commit message
Only show text handlers when using touch
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
https:/
Executed test runs:
None: https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
https:/
Executed test runs:
None: https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1795
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1797
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1798
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1799
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1801
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1802
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1802
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1802
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1803
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1803
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1805
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1805
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1805
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1805
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Zsombor Egri (zsombi) wrote : | # |
Two small comments, and we're good.
Zsombor Egri (zsombi) wrote : | # |
Thanks, looks good now!
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1806
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1806
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Unmerged revisions
- 1806. By Cris Dywan
-
Specify maximumTouchPoints in MPTAs of Text components
- 1805. By Cris Dywan
-
Drop test fixes split into separate branches
- 1804. By Cris Dywan
- 1803. By Cris Dywan
-
Consistently unset mouseEnabled in all MultiPointTouch
Area's' - 1802. By Cris Dywan
-
Uncomment focus double-check in no_caret_on_click
- 1801. By Cris Dywan
-
Get all textinput touch unit tests for 1.3 passing
- 1800. By Cris Dywan
-
Merge p:ubuntu-
ui-toolkit/ staging - 1799. By Cris Dywan
-
Genuine events from TextArea as well
- 1798. By Cris Dywan
-
Only genuine events passed to InputHandler
- 1797. By Cris Dywan
-
1.3 version of textinput_touch unit test
Preview Diff
1 | === modified file 'src/Ubuntu/Components/1.3/InputHandler.qml' |
2 | --- src/Ubuntu/Components/1.3/InputHandler.qml 2015-11-20 15:18:50 +0000 |
3 | +++ src/Ubuntu/Components/1.3/InputHandler.qml 2016-02-10 18:03:33 +0000 |
4 | @@ -225,10 +225,7 @@ |
5 | |
6 | Component.onCompleted: { |
7 | state = (main.focus) ? "" : "inactive"; |
8 | - // FIXME: Qt5.3 related! mouseEnabled is a 5.3 related property which has a positive |
9 | - // default value. That value messes up teh current understanding (5.2) of the |
10 | - // MultiPointTouchArea functioning. We need to set it to false until 5.3 will be the |
11 | - // default supported Qt version, when we can have a clean property value assignment |
12 | + // FIXME: Disable mouse with Qt5.3 and later |
13 | if (inputHandler.hasOwnProperty("mouseEnabled")) { |
14 | inputHandler.mouseEnabled = false; |
15 | } |
16 | @@ -291,6 +288,8 @@ |
17 | target: main |
18 | ignoreUnknownSignals: true |
19 | onFocusChanged: { |
20 | + if (!main.focus) |
21 | + touching = false; |
22 | UbuntuApplication.inputMethod.commit() |
23 | state = (main.focus) ? "" : "inactive"; |
24 | if (main.focus) { |
25 | @@ -333,6 +332,7 @@ |
26 | |
27 | // PageUp and PageDown handling |
28 | Keys.onPressed: { |
29 | + touching = false; |
30 | if (event.key === Qt.Key_PageUp && event.modifiers === Qt.NoModifier) { |
31 | movePage(false); |
32 | } else if (event.key === Qt.Key_PageDown && event.modifiers === Qt.NoModifier) { |
33 | @@ -342,6 +342,7 @@ |
34 | |
35 | // touch and mous handling |
36 | function handlePressed(event, touch) { |
37 | + touching = touch; |
38 | if (touch) { |
39 | // we do not have longTap or double tap, therefore we need to generate those |
40 | event.touch(); |
41 | @@ -456,8 +457,11 @@ |
42 | tapCount = running; |
43 | } |
44 | } |
45 | + maximumTouchPoints: 1 |
46 | onPressed: handlePressed(touchPoints[0], true) |
47 | onReleased: handleReleased(touchPoints[0], true) |
48 | + // touch was used and not followed by mouse, keyboard or focus loss |
49 | + property bool touching: false |
50 | |
51 | property Item cursorPositionCursor: null |
52 | property Item selectionStartCursor: null |
53 | |
54 | === modified file 'src/Ubuntu/Components/1.3/TextArea.qml' |
55 | --- src/Ubuntu/Components/1.3/TextArea.qml 2016-01-13 14:25:22 +0000 |
56 | +++ src/Ubuntu/Components/1.3/TextArea.qml 2016-02-10 18:03:33 +0000 |
57 | @@ -752,8 +752,26 @@ |
58 | // activate input when pressed on the frame |
59 | preventStealing: false |
60 | Ubuntu.Mouse.forwardTo: [inputHandler] |
61 | + Ubuntu.Mouse.ignoreSynthesizedEvents: true |
62 | cursorShape: Qt.IBeamCursor |
63 | } |
64 | + MultiPointTouchArea { |
65 | + maximumTouchPoints: 1 |
66 | + onPressed: inputHandler.handlePressed(touchPoints[0], true) |
67 | + onReleased: inputHandler.handleReleased(touchPoints[0], true) |
68 | + anchors.fill: parent |
69 | + touchPoints: TouchPoint { |
70 | + function touch() { inputHandler.touchPoints[0].touch(); } |
71 | + function untouch() { inputHandler.touchPoints[0].untouch(); } |
72 | + function reset() { inputHandler.touchPoints[0].reset(); } |
73 | + } |
74 | + Component.onCompleted: { |
75 | + // FIXME: Disable mouse with Qt5.3 and later |
76 | + if (hasOwnProperty("mouseEnabled")) { |
77 | + mouseEnabled = false; |
78 | + } |
79 | + } |
80 | + } |
81 | |
82 | //internals |
83 | |
84 | @@ -886,6 +904,7 @@ |
85 | |
86 | // input selection and navigation handling |
87 | Ubuntu.Mouse.forwardTo: [inputHandler] |
88 | + Ubuntu.Mouse.ignoreSynthesizedEvents: true |
89 | InputHandler { |
90 | id: inputHandler |
91 | anchors.fill: parent |
92 | |
93 | === modified file 'src/Ubuntu/Components/1.3/TextCursor.qml' |
94 | --- src/Ubuntu/Components/1.3/TextCursor.qml 2015-12-09 19:59:50 +0000 |
95 | +++ src/Ubuntu/Components/1.3/TextCursor.qml 2016-02-10 18:03:33 +0000 |
96 | @@ -110,7 +110,7 @@ |
97 | |
98 | // if the cursor is out of the visible viewport, anchor the |
99 | // contextual menu to the input field |
100 | - var anchor = caret.visible ? draggedItem : handler.main |
101 | + var anchor = cursorItem.visible ? draggedItem : handler.main |
102 | var popup = PopupUtils.open(component, anchor, { |
103 | "target": handler.main, |
104 | }); |
105 | @@ -126,6 +126,8 @@ |
106 | |
107 | visible: handler.main.cursorVisible && |
108 | !(positionProperty === "cursorPosition" && handler.main.selectedText !== "") |
109 | + // Use opacity so we can still anchor the contextual menu to it |
110 | + opacity: (handler.touching || positionProperty === "cursorPosition") ? 1.0 : 0.01 |
111 | |
112 | // cursor visual loader |
113 | Loader { |
114 | @@ -143,7 +145,7 @@ |
115 | target: caret |
116 | when: caret |
117 | property: "visible" |
118 | - value: QuickUtils.touchScreenAvailable |
119 | + value: handler.touching |
120 | && (contextMenuVisible || !typing) |
121 | && handler.main.text !== "" |
122 | } |
123 | @@ -311,7 +313,7 @@ |
124 | // manual clipping: the caret should be visible only while the cursor's |
125 | // top/bottom falls into the text area |
126 | visible: { |
127 | - if (!caret || !cursorItem.visible || cursorItem.opacity < 1.0) |
128 | + if (!caret || !cursorItem.visible || cursorItem.opacity < 0.01) |
129 | return false; |
130 | |
131 | var pos = handler.main.mapFromItem(fakeCursor.parent, fakeCursor.x, fakeCursor.y); |
132 | |
133 | === modified file 'src/Ubuntu/Components/1.3/TextField.qml' |
134 | --- src/Ubuntu/Components/1.3/TextField.qml 2016-01-26 19:46:25 +0000 |
135 | +++ src/Ubuntu/Components/1.3/TextField.qml 2016-02-10 18:03:33 +0000 |
136 | @@ -857,8 +857,26 @@ |
137 | preventStealing: false |
138 | // forward mouse events to input so we can handle those uniformly |
139 | Ubuntu.Mouse.forwardTo: [inputHandler] |
140 | + Ubuntu.Mouse.ignoreSynthesizedEvents: true |
141 | cursorShape: Qt.IBeamCursor |
142 | } |
143 | + MultiPointTouchArea { |
144 | + maximumTouchPoints: 1 |
145 | + onPressed: inputHandler.handlePressed(touchPoints[0], true) |
146 | + onReleased: inputHandler.handleReleased(touchPoints[0], true) |
147 | + anchors.fill: parent |
148 | + touchPoints: TouchPoint { |
149 | + function touch() { inputHandler.touchPoints[0].touch(); } |
150 | + function untouch() { inputHandler.touchPoints[0].untouch(); } |
151 | + function reset() { inputHandler.touchPoints[0].reset(); } |
152 | + } |
153 | + Component.onCompleted: { |
154 | + // FIXME: Disable mouse with Qt5.3 and later |
155 | + if (hasOwnProperty("mouseEnabled")) { |
156 | + mouseEnabled = false; |
157 | + } |
158 | + } |
159 | + } |
160 | |
161 | Text { id: fontHolder } |
162 | |
163 | @@ -1004,6 +1022,7 @@ |
164 | boundsBehavior: Flickable.StopAtBounds |
165 | // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea. |
166 | Ubuntu.Mouse.forwardTo: [inputHandler] |
167 | + Ubuntu.Mouse.ignoreSynthesizedEvents: true |
168 | |
169 | clip: true |
170 | contentWidth: editor.contentWidth |
171 | @@ -1037,6 +1056,7 @@ |
172 | |
173 | // input selection and navigation handling |
174 | Ubuntu.Mouse.forwardTo: [inputHandler] |
175 | + Ubuntu.Mouse.ignoreSynthesizedEvents: true |
176 | InputHandler { |
177 | id: inputHandler |
178 | anchors.fill: parent |
PASSED: Continuous integration, rev:1790 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/2682/ jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-amd64- ci/1407 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-armhf- ci/1408 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-armhf- ci/1408/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-i386- ci/1406
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/2682/ rebuild
http://