Remove hack, newer Qt already support keyClick(char)
Approved by: Michael Zanetti, PS Jenkins bot
commit5f61e21302c8a7b88bb007d91ec3b8b10e0a00a8
authorAlbert Astals <albert.astals@canonical.com>
dateTue 13 Jan 2015, 20:57 (12 years ago)
parentf90a4605b8123d
tests/utils/modules/Unity/Test/UnityTestCase.qml+1−69
@@ -171,77 +171,9 @@ TestCase {
171171 }
172172
173173 // Type a full string instead of keyClick letter by letter
174− // TODO: this is not ugly, this is uber-ugly and does not support
175− // any special character. Remove the keyMap once keyClick(obj, char)
176− // has landed in upstream Qt.
177174 function typeString(str) {
178− var keyMap = {
179− "a": Qt.Key_A,
180− "b": Qt.Key_B,
181− "c": Qt.Key_C,
182− "d": Qt.Key_D,
183− "e": Qt.Key_E,
184− "f": Qt.Key_F,
185− "g": Qt.Key_G,
186− "h": Qt.Key_H,
187− "i": Qt.Key_I,
188− "j": Qt.Key_J,
189− "k": Qt.Key_K,
190− "l": Qt.Key_L,
191− "m": Qt.Key_M,
192− "n": Qt.Key_N,
193− "o": Qt.Key_O,
194− "p": Qt.Key_P,
195− "q": Qt.Key_Q,
196− "r": Qt.Key_R,
197− "s": Qt.Key_S,
198− "t": Qt.Key_T,
199− "u": Qt.Key_U,
200− "v": Qt.Key_V,
201− "w": Qt.Key_W,
202− "x": Qt.Key_X,
203− "y": Qt.Key_Y,
204− "z": Qt.Key_Z,
205− "A": Qt.Key_A,
206− "B": Qt.Key_B,
207− "C": Qt.Key_C,
208− "D": Qt.Key_D,
209− "E": Qt.Key_E,
210− "F": Qt.Key_F,
211− "G": Qt.Key_G,
212− "H": Qt.Key_H,
213− "I": Qt.Key_I,
214− "J": Qt.Key_J,
215− "K": Qt.Key_K,
216− "L": Qt.Key_L,
217− "M": Qt.Key_M,
218− "N": Qt.Key_N,
219− "O": Qt.Key_O,
220− "P": Qt.Key_P,
221− "Q": Qt.Key_Q,
222− "R": Qt.Key_R,
223− "S": Qt.Key_S,
224− "T": Qt.Key_T,
225− "U": Qt.Key_U,
226− "V": Qt.Key_V,
227− "W": Qt.Key_W,
228− "X": Qt.Key_X,
229− "Y": Qt.Key_Y,
230− "Z": Qt.Key_Z,
231− "0": Qt.Key_0,
232− "1": Qt.Key_1,
233− "2": Qt.Key_2,
234− "3": Qt.Key_3,
235− "4": Qt.Key_4,
236− "5": Qt.Key_5,
237− "6": Qt.Key_6,
238− "7": Qt.Key_7,
239− "8": Qt.Key_8,
240− "9": Qt.Key_9,
241− " ": Qt.Key_Space,
242− }
243175 for (var i = 0; i < str.length; i++) {
244− keyClick(keyMap[str[i]])
176+ keyClick(str[i])
245177 }
246178 }
247179