qasciikey.cpp

Source codeSwitch to Preprocessed file
LineSource CodeCoverage
1/**************************************************************************** -
2** -
3** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -
4** Contact: http://www.qt-project.org/legal -
5** -
6** This file is part of the QtTest module of the Qt Toolkit. -
7** -
8** $QT_BEGIN_LICENSE:LGPL$ -
9** Commercial License Usage -
10** Licensees holding valid commercial Qt licenses may use this file in -
11** accordance with the commercial license agreement provided with the -
12** Software or, alternatively, in accordance with the terms contained in -
13** a written agreement between you and Digia. For licensing terms and -
14** conditions see http://qt.digia.com/licensing. For further information -
15** use the contact form at http://qt.digia.com/contact-us. -
16** -
17** GNU Lesser General Public License Usage -
18** Alternatively, this file may be used under the terms of the GNU Lesser -
19** General Public License version 2.1 as published by the Free Software -
20** Foundation and appearing in the file LICENSE.LGPL included in the -
21** packaging of this file. Please review the following information to -
22** ensure the GNU Lesser General Public License version 2.1 requirements -
23** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -
24** -
25** In addition, as a special exception, Digia gives you certain additional -
26** rights. These rights are described in the Digia Qt LGPL Exception -
27** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -
28** -
29** GNU General Public License Usage -
30** Alternatively, this file may be used under the terms of the GNU -
31** General Public License version 3.0 as published by the Free Software -
32** Foundation and appearing in the file LICENSE.GPL included in the -
33** packaging of this file. Please review the following information to -
34** ensure the GNU General Public License version 3.0 requirements will be -
35** met: http://www.gnu.org/copyleft/gpl.html. -
36** -
37** -
38** $QT_END_LICENSE$ -
39** -
40****************************************************************************/ -
41 -
42#include <QtTest/qtestcase.h> -
43#include <QtTest/qtestassert.h> -
44 -
45QT_BEGIN_NAMESPACE -
46 -
47/*! \internal -
48 Convert an ascii char key value to a Qt Key value. -
49 If the key is unknown a 0 is returned. -
50 -
51 Note: this may happen more than you like since not all known -
52 ascii keys _are_ converted already. So feel free to add all the keys you need. -
53 */ -
54Qt::Key QTest::asciiToKey(char ascii) -
55{ -
56 switch ((unsigned char)ascii) { -
57 case 0x08: return Qt::Key_Backspace;
never executed: return Qt::Key_Backspace;
0
58 case 0x09: return Qt::Key_Tab;
never executed: return Qt::Key_Tab;
0
59 case 0x0b: return Qt::Key_Backtab;
never executed: return Qt::Key_Backtab;
0
60 case 0x0d: return Qt::Key_Return;
never executed: return Qt::Key_Return;
0
61 case 0x1b: return Qt::Key_Escape;
never executed: return Qt::Key_Escape;
0
62 case 0x13: return Qt::Key_Up;
never executed: return Qt::Key_Up;
0
63 case 0x15: return Qt::Key_Down;
never executed: return Qt::Key_Down;
0
64 case 0x20: return Qt::Key_Space;
executed: return Qt::Key_Space;
Execution Count:64
64
65 case 0x21: return Qt::Key_Exclam;
executed: return Qt::Key_Exclam;
Execution Count:5
5
66 case 0x22: return Qt::Key_QuoteDbl;
executed: return Qt::Key_QuoteDbl;
Execution Count:2
2
67 case 0x23: return Qt::Key_NumberSign;
executed: return Qt::Key_NumberSign;
Execution Count:3
3
68 case 0x24: return Qt::Key_Dollar;
executed: return Qt::Key_Dollar;
Execution Count:2
2
69 case 0x25: return Qt::Key_Percent;
executed: return Qt::Key_Percent;
Execution Count:2
2
70 case 0x26: return Qt::Key_Ampersand;
executed: return Qt::Key_Ampersand;
Execution Count:2
2
71 case 0x27: return Qt::Key_Apostrophe;
executed: return Qt::Key_Apostrophe;
Execution Count:2
2
72 case 0x28: return Qt::Key_ParenLeft;
executed: return Qt::Key_ParenLeft;
Execution Count:2
2
73 case 0x29: return Qt::Key_ParenRight;
executed: return Qt::Key_ParenRight;
Execution Count:2
2
74 case 0x2a: return Qt::Key_Asterisk;
executed: return Qt::Key_Asterisk;
Execution Count:2
2
75 case 0x2b: return Qt::Key_Plus;
executed: return Qt::Key_Plus;
Execution Count:2
2
76 case 0x2c: return Qt::Key_Comma;
executed: return Qt::Key_Comma;
Execution Count:2
2
77 case 0x2d: return Qt::Key_Minus;
executed: return Qt::Key_Minus;
Execution Count:51
51
78 case 0x2e: return Qt::Key_Period;
executed: return Qt::Key_Period;
Execution Count:78
78
79 case 0x2f: return Qt::Key_Slash;
executed: return Qt::Key_Slash;
Execution Count:6
6
80 case 0x30: return Qt::Key_0;
executed: return Qt::Key_0;
Execution Count:179
179
81 case 0x31: return Qt::Key_1;
executed: return Qt::Key_1;
Execution Count:106
106
82 case 0x32: return Qt::Key_2;
executed: return Qt::Key_2;
Execution Count:86
86
83 case 0x33: return Qt::Key_3;
executed: return Qt::Key_3;
Execution Count:13
13
84 case 0x34: return Qt::Key_4;
executed: return Qt::Key_4;
Execution Count:18
18
85 case 0x35: return Qt::Key_5;
executed: return Qt::Key_5;
Execution Count:53
53
86 case 0x36: return Qt::Key_6;
executed: return Qt::Key_6;
Execution Count:7
7
87 case 0x37: return Qt::Key_7;
executed: return Qt::Key_7;
Execution Count:9
9
88 case 0x38: return Qt::Key_8;
executed: return Qt::Key_8;
Execution Count:7
7
89 case 0x39: return Qt::Key_9;
executed: return Qt::Key_9;
Execution Count:24
24
90 case 0x3a: return Qt::Key_Colon;
executed: return Qt::Key_Colon;
Execution Count:7
7
91 case 0x3b: return Qt::Key_Semicolon;
executed: return Qt::Key_Semicolon;
Execution Count:3
3
92 case 0x3c: return Qt::Key_Less;
executed: return Qt::Key_Less;
Execution Count:2
2
93 case 0x3d: return Qt::Key_Equal;
executed: return Qt::Key_Equal;
Execution Count:2
2
94 case 0x3e: return Qt::Key_Greater;
executed: return Qt::Key_Greater;
Execution Count:2
2
95 case 0x3f: return Qt::Key_Question;
executed: return Qt::Key_Question;
Execution Count:2
2
96 case 0x40: return Qt::Key_At;
executed: return Qt::Key_At;
Execution Count:2
2
97 case 0x41: return Qt::Key_A;
executed: return Qt::Key_A;
Execution Count:27
27
98 case 0x42: return Qt::Key_B;
executed: return Qt::Key_B;
Execution Count:10
10
99 case 0x43: return Qt::Key_C;
executed: return Qt::Key_C;
Execution Count:14
14
100 case 0x44: return Qt::Key_D;
executed: return Qt::Key_D;
Execution Count:6
6
101 case 0x45: return Qt::Key_E;
executed: return Qt::Key_E;
Execution Count:13
13
102 case 0x46: return Qt::Key_F;
executed: return Qt::Key_F;
Execution Count:3
3
103 case 0x47: return Qt::Key_G;
executed: return Qt::Key_G;
Execution Count:4
4
104 case 0x48: return Qt::Key_H;
executed: return Qt::Key_H;
Execution Count:3
3
105 case 0x49: return Qt::Key_I;
executed: return Qt::Key_I;
Execution Count:3
3
106 case 0x4a: return Qt::Key_J;
never executed: return Qt::Key_J;
0
107 case 0x4b: return Qt::Key_K;
executed: return Qt::Key_K;
Execution Count:2
2
108 case 0x4c: return Qt::Key_L;
never executed: return Qt::Key_L;
0
109 case 0x4d: return Qt::Key_M;
never executed: return Qt::Key_M;
0
110 case 0x4e: return Qt::Key_N;
never executed: return Qt::Key_N;
0
111 case 0x4f: return Qt::Key_O;
executed: return Qt::Key_O;
Execution Count:1
1
112 case 0x50: return Qt::Key_P;
executed: return Qt::Key_P;
Execution Count:2
2
113 case 0x51: return Qt::Key_Q;
never executed: return Qt::Key_Q;
0
114 case 0x52: return Qt::Key_R;
executed: return Qt::Key_R;
Execution Count:2
2
115 case 0x53: return Qt::Key_S;
executed: return Qt::Key_S;
Execution Count:2
2
116 case 0x54: return Qt::Key_T;
executed: return Qt::Key_T;
Execution Count:4
4
117 case 0x55: return Qt::Key_U;
never executed: return Qt::Key_U;
0
118 case 0x56: return Qt::Key_V;
executed: return Qt::Key_V;
Execution Count:1
1
119 case 0x57: return Qt::Key_W;
executed: return Qt::Key_W;
Execution Count:2
2
120 case 0x58: return Qt::Key_X;
never executed: return Qt::Key_X;
0
121 case 0x59: return Qt::Key_Y;
executed: return Qt::Key_Y;
Execution Count:1
1
122 case 0x5a: return Qt::Key_Z;
executed: return Qt::Key_Z;
Execution Count:7
7
123 case 0x5b: return Qt::Key_BracketLeft;
executed: return Qt::Key_BracketLeft;
Execution Count:2
2
124 case 0x5c: return Qt::Key_Backslash;
executed: return Qt::Key_Backslash;
Execution Count:2
2
125 case 0x5d: return Qt::Key_BracketRight;
executed: return Qt::Key_BracketRight;
Execution Count:2
2
126 case 0x5e: return Qt::Key_AsciiCircum;
executed: return Qt::Key_AsciiCircum;
Execution Count:2
2
127 case 0x5f: return Qt::Key_Underscore;
executed: return Qt::Key_Underscore;
Execution Count:2
2
128 case 0x60: return Qt::Key_QuoteLeft;
executed: return Qt::Key_QuoteLeft;
Execution Count:2
2
129 case 0x61: return Qt::Key_A;
executed: return Qt::Key_A;
Execution Count:56
56
130 case 0x62: return Qt::Key_B;
executed: return Qt::Key_B;
Execution Count:43
43
131 case 0x63: return Qt::Key_C;
executed: return Qt::Key_C;
Execution Count:13
13
132 case 0x64: return Qt::Key_D;
executed: return Qt::Key_D;
Execution Count:18
18
133 case 0x65: return Qt::Key_E;
executed: return Qt::Key_E;
Execution Count:29
29
134 case 0x66: return Qt::Key_F;
executed: return Qt::Key_F;
Execution Count:40
40
135 case 0x67: return Qt::Key_G;
executed: return Qt::Key_G;
Execution Count:7
7
136 case 0x68: return Qt::Key_H;
executed: return Qt::Key_H;
Execution Count:21
21
137 case 0x69: return Qt::Key_I;
executed: return Qt::Key_I;
Execution Count:27
27
138 case 0x6a: return Qt::Key_J;
executed: return Qt::Key_J;
Execution Count:3
3
139 case 0x6b: return Qt::Key_K;
executed: return Qt::Key_K;
Execution Count:3
3
140 case 0x6c: return Qt::Key_L;
executed: return Qt::Key_L;
Execution Count:10
10
141 case 0x6d: return Qt::Key_M;
executed: return Qt::Key_M;
Execution Count:4
4
142 case 0x6e: return Qt::Key_N;
executed: return Qt::Key_N;
Execution Count:16
16
143 case 0x6f: return Qt::Key_O;
executed: return Qt::Key_O;
Execution Count:61
61
144 case 0x70: return Qt::Key_P;
executed: return Qt::Key_P;
Execution Count:3
3
145 case 0x71: return Qt::Key_Q;
executed: return Qt::Key_Q;
Execution Count:3
3
146 case 0x72: return Qt::Key_R;
executed: return Qt::Key_R;
Execution Count:42
42
147 case 0x73: return Qt::Key_S;
executed: return Qt::Key_S;
Execution Count:26
26
148 case 0x74: return Qt::Key_T;
executed: return Qt::Key_T;
Execution Count:25
25
149 case 0x75: return Qt::Key_U;
executed: return Qt::Key_U;
Execution Count:7
7
150 case 0x76: return Qt::Key_V;
executed: return Qt::Key_V;
Execution Count:2
2
151 case 0x77: return Qt::Key_W;
executed: return Qt::Key_W;
Execution Count:2
2
152 case 0x78: return Qt::Key_X;
executed: return Qt::Key_X;
Execution Count:4
4
153 case 0x79: return Qt::Key_Y;
executed: return Qt::Key_Y;
Execution Count:3
3
154 case 0x7a: return Qt::Key_Z;
executed: return Qt::Key_Z;
Execution Count:3
3
155 case 0x7b: return Qt::Key_BraceLeft;
executed: return Qt::Key_BraceLeft;
Execution Count:2
2
156 case 0x7c: return Qt::Key_Bar;
executed: return Qt::Key_Bar;
Execution Count:2
2
157 case 0x7d: return Qt::Key_BraceRight;
executed: return Qt::Key_BraceRight;
Execution Count:2
2
158 case 0x7e: return Qt::Key_AsciiTilde;
executed: return Qt::Key_AsciiTilde;
Execution Count:2
2
159 -
160 // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06 -
161 case 0xa0: return Qt::Key_nobreakspace;
never executed: return Qt::Key_nobreakspace;
0
162 case 0xa1: return Qt::Key_exclamdown;
never executed: return Qt::Key_exclamdown;
0
163 case 0xa2: return Qt::Key_cent;
never executed: return Qt::Key_cent;
0
164 case 0xa3: return Qt::Key_sterling;
never executed: return Qt::Key_sterling;
0
165 case 0xa4: return Qt::Key_currency;
never executed: return Qt::Key_currency;
0
166 case 0xa5: return Qt::Key_yen;
never executed: return Qt::Key_yen;
0
167 case 0xa6: return Qt::Key_brokenbar;
never executed: return Qt::Key_brokenbar;
0
168 case 0xa7: return Qt::Key_section;
never executed: return Qt::Key_section;
0
169 case 0xa8: return Qt::Key_diaeresis;
never executed: return Qt::Key_diaeresis;
0
170 case 0xa9: return Qt::Key_copyright;
never executed: return Qt::Key_copyright;
0
171 case 0xaa: return Qt::Key_ordfeminine;
never executed: return Qt::Key_ordfeminine;
0
172 case 0xab: return Qt::Key_guillemotleft;
never executed: return Qt::Key_guillemotleft;
0
173 case 0xac: return Qt::Key_notsign;
never executed: return Qt::Key_notsign;
0
174 case 0xad: return Qt::Key_hyphen;
never executed: return Qt::Key_hyphen;
0
175 case 0xae: return Qt::Key_registered;
never executed: return Qt::Key_registered;
0
176 case 0xaf: return Qt::Key_macron;
never executed: return Qt::Key_macron;
0
177 case 0xb0: return Qt::Key_degree;
never executed: return Qt::Key_degree;
0
178 case 0xb1: return Qt::Key_plusminus;
never executed: return Qt::Key_plusminus;
0
179 case 0xb2: return Qt::Key_twosuperior;
never executed: return Qt::Key_twosuperior;
0
180 case 0xb3: return Qt::Key_threesuperior;
never executed: return Qt::Key_threesuperior;
0
181 case 0xb4: return Qt::Key_acute;
never executed: return Qt::Key_acute;
0
182 case 0xb5: return Qt::Key_mu;
never executed: return Qt::Key_mu;
0
183 case 0xb6: return Qt::Key_paragraph;
never executed: return Qt::Key_paragraph;
0
184 case 0xb7: return Qt::Key_periodcentered;
never executed: return Qt::Key_periodcentered;
0
185 case 0xb8: return Qt::Key_cedilla;
never executed: return Qt::Key_cedilla;
0
186 case 0xb9: return Qt::Key_onesuperior;
never executed: return Qt::Key_onesuperior;
0
187 case 0xba: return Qt::Key_masculine;
never executed: return Qt::Key_masculine;
0
188 case 0xbb: return Qt::Key_guillemotright;
never executed: return Qt::Key_guillemotright;
0
189 case 0xbc: return Qt::Key_onequarter;
never executed: return Qt::Key_onequarter;
0
190 case 0xbd: return Qt::Key_onehalf;
never executed: return Qt::Key_onehalf;
0
191 case 0xbe: return Qt::Key_threequarters;
never executed: return Qt::Key_threequarters;
0
192 case 0xbf: return Qt::Key_questiondown;
never executed: return Qt::Key_questiondown;
0
193 case 0xc0: return Qt::Key_Agrave;
never executed: return Qt::Key_Agrave;
0
194 case 0xc1: return Qt::Key_Aacute;
never executed: return Qt::Key_Aacute;
0
195 case 0xc2: return Qt::Key_Acircumflex;
never executed: return Qt::Key_Acircumflex;
0
196 case 0xc3: return Qt::Key_Atilde;
never executed: return Qt::Key_Atilde;
0
197 case 0xc4: return Qt::Key_Adiaeresis;
never executed: return Qt::Key_Adiaeresis;
0
198 case 0xc5: return Qt::Key_Aring;
never executed: return Qt::Key_Aring;
0
199 case 0xc6: return Qt::Key_AE;
never executed: return Qt::Key_AE;
0
200 case 0xc7: return Qt::Key_Ccedilla;
never executed: return Qt::Key_Ccedilla;
0
201 case 0xc8: return Qt::Key_Egrave;
never executed: return Qt::Key_Egrave;
0
202 case 0xc9: return Qt::Key_Eacute;
never executed: return Qt::Key_Eacute;
0
203 case 0xca: return Qt::Key_Ecircumflex;
never executed: return Qt::Key_Ecircumflex;
0
204 case 0xcb: return Qt::Key_Ediaeresis;
never executed: return Qt::Key_Ediaeresis;
0
205 case 0xcc: return Qt::Key_Igrave;
never executed: return Qt::Key_Igrave;
0
206 case 0xcd: return Qt::Key_Iacute;
never executed: return Qt::Key_Iacute;
0
207 case 0xce: return Qt::Key_Icircumflex;
never executed: return Qt::Key_Icircumflex;
0
208 case 0xcf: return Qt::Key_Idiaeresis;
never executed: return Qt::Key_Idiaeresis;
0
209 case 0xd0: return Qt::Key_ETH;
never executed: return Qt::Key_ETH;
0
210 case 0xd1: return Qt::Key_Ntilde;
never executed: return Qt::Key_Ntilde;
0
211 case 0xd2: return Qt::Key_Ograve;
never executed: return Qt::Key_Ograve;
0
212 case 0xd3: return Qt::Key_Oacute;
never executed: return Qt::Key_Oacute;
0
213 case 0xd4: return Qt::Key_Ocircumflex;
never executed: return Qt::Key_Ocircumflex;
0
214 case 0xd5: return Qt::Key_Otilde;
never executed: return Qt::Key_Otilde;
0
215 case 0xd6: return Qt::Key_Odiaeresis;
never executed: return Qt::Key_Odiaeresis;
0
216 case 0xd7: return Qt::Key_multiply;
never executed: return Qt::Key_multiply;
0
217 case 0xd8: return Qt::Key_Ooblique;
never executed: return Qt::Key_Ooblique;
0
218 case 0xd9: return Qt::Key_Ugrave;
never executed: return Qt::Key_Ugrave;
0
219 case 0xda: return Qt::Key_Uacute;
never executed: return Qt::Key_Uacute;
0
220 case 0xdb: return Qt::Key_Ucircumflex;
never executed: return Qt::Key_Ucircumflex;
0
221 case 0xdc: return Qt::Key_Udiaeresis;
never executed: return Qt::Key_Udiaeresis;
0
222 case 0xdd: return Qt::Key_Yacute;
never executed: return Qt::Key_Yacute;
0
223 case 0xde: return Qt::Key_THORN;
never executed: return Qt::Key_THORN;
0
224 case 0xdf: return Qt::Key_ssharp;
never executed: return Qt::Key_ssharp;
0
225 case 0xe5: return Qt::Key_Aring;
never executed: return Qt::Key_Aring;
0
226 case 0xe6: return Qt::Key_AE;
never executed: return Qt::Key_AE;
0
227 case 0xf7: return Qt::Key_division;
never executed: return Qt::Key_division;
0
228 case 0xf8: return Qt::Key_Ooblique;
never executed: return Qt::Key_Ooblique;
0
229 case 0xff: return Qt::Key_ydiaeresis;
never executed: return Qt::Key_ydiaeresis;
0
230 default: QTEST_ASSERT(false); return Qt::Key(0);
never executed: qt_assert("false","qasciikey.cpp",230);
never executed: }
never executed: return Qt::Key(0);
never evaluated: !(false)
never evaluated: 0
0
231 } -
232}
never executed: }
0
233 -
234/*! \internal -
235 Convert a Qt Key to an ascii char value. -
236 If the Qt key is unknown a 0 is returned. -
237 -
238 Note: this may happen more than you like since not all known -
239 Qt keys _are_ converted already. So feel free to add all the keys you need. -
240*/ -
241char QTest::keyToAscii(Qt::Key key) -
242{ -
243 switch (key) { -
244 case Qt::Key_Backspace: return 0x8; //BS
executed: return 0x8;
Execution Count:150
150
245 case Qt::Key_Tab: return 0x09; // HT
executed: return 0x09;
Execution Count:147
147
246 case Qt::Key_Backtab: return 0x0b; // VT
executed: return 0x0b;
Execution Count:21
21
247 case Qt::Key_Enter: -
248 case Qt::Key_Return: return 0x0d; // CR
executed: return 0x0d;
Execution Count:405
405
249 case Qt::Key_Escape: return 0x1b; // ESC
executed: return 0x1b;
Execution Count:15
15
250 case Qt::Key_Space: return 0x20; // 7 bit printable ASCII
executed: return 0x20;
Execution Count:19
19
251 case Qt::Key_Exclam: return 0x21;
executed: return 0x21;
Execution Count:2
2
252 case Qt::Key_QuoteDbl: return 0x22;
never executed: return 0x22;
0
253 case Qt::Key_NumberSign: return 0x23;
never executed: return 0x23;
0
254 case Qt::Key_Dollar: return 0x24;
never executed: return 0x24;
0
255 case Qt::Key_Percent: return 0x25;
never executed: return 0x25;
0
256 case Qt::Key_Ampersand: return 0x26;
never executed: return 0x26;
0
257 case Qt::Key_Apostrophe: return 0x27;
never executed: return 0x27;
0
258 case Qt::Key_ParenLeft: return 0x28;
never executed: return 0x28;
0
259 case Qt::Key_ParenRight: return 0x29;
never executed: return 0x29;
0
260 case Qt::Key_Asterisk: return 0x2a;
never executed: return 0x2a;
0
261 case Qt::Key_Plus: return 0x2b;
executed: return 0x2b;
Execution Count:6
6
262 case Qt::Key_Comma: return 0x2c;
executed: return 0x2c;
Execution Count:1
1
263 case Qt::Key_Minus: return 0x2d;
executed: return 0x2d;
Execution Count:3
3
264 case Qt::Key_Period: return 0x2e;
executed: return 0x2e;
Execution Count:4
4
265 case Qt::Key_Slash: return 0x2f;
executed: return 0x2f;
Execution Count:1
1
266 case Qt::Key_0: return 0x30;
executed: return 0x30;
Execution Count:8
8
267 case Qt::Key_1: return 0x31;
executed: return 0x31;
Execution Count:77
77
268 case Qt::Key_2: return 0x32;
executed: return 0x32;
Execution Count:59
59
269 case Qt::Key_3: return 0x33;
executed: return 0x33;
Execution Count:14
14
270 case Qt::Key_4: return 0x34;
executed: return 0x34;
Execution Count:5
5
271 case Qt::Key_5: return 0x35;
executed: return 0x35;
Execution Count:8
8
272 case Qt::Key_6: return 0x36;
executed: return 0x36;
Execution Count:1
1
273 case Qt::Key_7: return 0x37;
executed: return 0x37;
Execution Count:4
4
274 case Qt::Key_8: return 0x38;
never executed: return 0x38;
0
275 case Qt::Key_9: return 0x39;
executed: return 0x39;
Execution Count:1
1
276 case Qt::Key_Colon: return 0x3a;
never executed: return 0x3a;
0
277 case Qt::Key_Semicolon: return 0x3b;
never executed: return 0x3b;
0
278 case Qt::Key_Less: return 0x3c;
never executed: return 0x3c;
0
279 case Qt::Key_Equal: return 0x3d;
never executed: return 0x3d;
0
280 case Qt::Key_Greater: return 0x3e;
never executed: return 0x3e;
0
281 case Qt::Key_Question: return 0x3f;
never executed: return 0x3f;
0
282 case Qt::Key_At: return 0x40;
executed: return 0x40;
Execution Count:1
1
283 case Qt::Key_A: return 0x61; // 0x41 == 'A', 0x61 == 'a'
executed: return 0x61;
Execution Count:57
57
284 case Qt::Key_B: return 0x62;
executed: return 0x62;
Execution Count:22
22
285 case Qt::Key_C: return 0x63;
executed: return 0x63;
Execution Count:17
17
286 case Qt::Key_D: return 0x64;
executed: return 0x64;
Execution Count:4
4
287 case Qt::Key_E: return 0x65;
executed: return 0x65;
Execution Count:7
7
288 case Qt::Key_F: return 0x66;
executed: return 0x66;
Execution Count:6
6
289 case Qt::Key_G: return 0x67;
never executed: return 0x67;
0
290 case Qt::Key_H: return 0x68;
never executed: return 0x68;
0
291 case Qt::Key_I: return 0x69;
executed: return 0x69;
Execution Count:3
3
292 case Qt::Key_J: return 0x6a;
executed: return 0x6a;
Execution Count:3
3
293 case Qt::Key_K: return 0x6b;
executed: return 0x6b;
Execution Count:1
1
294 case Qt::Key_L: return 0x6c;
never executed: return 0x6c;
0
295 case Qt::Key_M: return 0x6d;
executed: return 0x6d;
Execution Count:4
4
296 case Qt::Key_N: return 0x6e;
executed: return 0x6e;
Execution Count:4
4
297 case Qt::Key_O: return 0x6f;
executed: return 0x6f;
Execution Count:4
4
298 case Qt::Key_P: return 0x70;
executed: return 0x70;
Execution Count:1
1
299 case Qt::Key_Q: return 0x71;
never executed: return 0x71;
0
300 case Qt::Key_R: return 0x72;
executed: return 0x72;
Execution Count:2
2
301 case Qt::Key_S: return 0x73;
executed: return 0x73;
Execution Count:3
3
302 case Qt::Key_T: return 0x74;
executed: return 0x74;
Execution Count:11
11
303 case Qt::Key_U: return 0x75;
executed: return 0x75;
Execution Count:5
5
304 case Qt::Key_V: return 0x76;
executed: return 0x76;
Execution Count:1
1
305 case Qt::Key_W: return 0x77;
never executed: return 0x77;
0
306 case Qt::Key_X: return 0x78;
executed: return 0x78;
Execution Count:5
5
307 case Qt::Key_Y: return 0x79;
executed: return 0x79;
Execution Count:1
1
308 case Qt::Key_Z: return 0x7a;
executed: return 0x7a;
Execution Count:2
2
309 case Qt::Key_BracketLeft: return 0x5b;
never executed: return 0x5b;
0
310 case Qt::Key_Backslash: return 0x5c;
executed: return 0x5c;
Execution Count:3
3
311 case Qt::Key_BracketRight: return 0x5d;
never executed: return 0x5d;
0
312 case Qt::Key_AsciiCircum: return 0x5e;
never executed: return 0x5e;
0
313 case Qt::Key_Underscore: return 0x5f;
never executed: return 0x5f;
0
314 case Qt::Key_QuoteLeft: return 0x60;
never executed: return 0x60;
0
315 -
316 case Qt::Key_BraceLeft: return 0x7b;
never executed: return 0x7b;
0
317 case Qt::Key_Bar: return 0x7c;
never executed: return 0x7c;
0
318 case Qt::Key_BraceRight: return 0x7d;
never executed: return 0x7d;
0
319 case Qt::Key_AsciiTilde: return 0x7e;
never executed: return 0x7e;
0
320 -
321 case Qt::Key_Delete: return 0;
executed: return 0;
Execution Count:80
80
322 case Qt::Key_Insert: return 0; // = 0x1006,
never executed: return 0;
0
323 case Qt::Key_Pause: return 0; // = 0x1008,
never executed: return 0;
0
324 case Qt::Key_Print: return 0; // = 0x1009,
never executed: return 0;
0
325 case Qt::Key_SysReq: return 0; // = 0x100a,
never executed: return 0;
0
326 -
327 case Qt::Key_Clear: return 0; // = 0x100b,
never executed: return 0;
0
328 -
329 case Qt::Key_Home: return 0; // = 0x1010, // cursor movement
executed: return 0;
Execution Count:92
92
330 case Qt::Key_End: return 0; // = 0x1011,
executed: return 0;
Execution Count:47
47
331 case Qt::Key_Left: return 0; // = 0x1012,
executed: return 0;
Execution Count:444
444
332 case Qt::Key_Up: return 0; // = 0x1013,
executed: return 0;
Execution Count:1087
1087
333 case Qt::Key_Right: return 0; // = 0x1014,
executed: return 0;
Execution Count:394
394
334 case Qt::Key_Down: return 0; // = 0x1015,
executed: return 0;
Execution Count:523
523
335 case Qt::Key_PageUp: return 0; // = 0x1016,
executed: return 0;
Execution Count:16
16
336 case Qt::Key_PageDown: return 0; // = 0x1017,
executed: return 0;
Execution Count:26
26
337 case Qt::Key_Shift: return 0; // = 0x1020, // modifiers
executed: return 0;
Execution Count:1
1
338 case Qt::Key_Control: return 0; // = 0x1021,
executed: return 0;
Execution Count:9
9
339 case Qt::Key_Meta: return 0; // = 0x1022,
executed: return 0;
Execution Count:1
1
340 case Qt::Key_Alt: return 0; // = 0x1023,
executed: return 0;
Execution Count:2
2
341 case Qt::Key_CapsLock: return 0; // = 0x1024,
never executed: return 0;
0
342 case Qt::Key_NumLock: return 0; // = 0x1025,
never executed: return 0;
0
343 case Qt::Key_ScrollLock: return 0; // = 0x1026,
never executed: return 0;
0
344 case Qt::Key_F1: return 0; // = 0x1030, // function keys
never executed: return 0;
0
345 case Qt::Key_F2: return 0; // = 0x1031,
executed: return 0;
Execution Count:5
5
346 case Qt::Key_F3: return 0; // = 0x1032,
never executed: return 0;
0
347 case Qt::Key_F4: return 0; // = 0x1033,
never executed: return 0;
0
348 case Qt::Key_F5: return 0; // = 0x1034,
never executed: return 0;
0
349 case Qt::Key_F6: return 0; // = 0x1035,
never executed: return 0;
0
350 case Qt::Key_F7: return 0; // = 0x1036,
never executed: return 0;
0
351 case Qt::Key_F8: return 0; // = 0x1037,
never executed: return 0;
0
352 case Qt::Key_F9: return 0; // = 0x1038,
never executed: return 0;
0
353 case Qt::Key_F10: return 0; // = 0x1039,
never executed: return 0;
0
354 case Qt::Key_F11: return 0; // = 0x103a,
never executed: return 0;
0
355 case Qt::Key_F12: return 0; // = 0x103b,
never executed: return 0;
0
356 case Qt::Key_F13: return 0; // = 0x103c,
never executed: return 0;
0
357 case Qt::Key_F14: return 0; // = 0x103d,
never executed: return 0;
0
358 case Qt::Key_F15: return 0; // = 0x103e,
never executed: return 0;
0
359 case Qt::Key_F16: return 0; // = 0x103f,
never executed: return 0;
0
360 case Qt::Key_F17: return 0; // = 0x1040,
never executed: return 0;
0
361 case Qt::Key_F18: return 0; // = 0x1041,
never executed: return 0;
0
362 case Qt::Key_F19: return 0; // = 0x1042,
never executed: return 0;
0
363 case Qt::Key_F20: return 0; // = 0x1043,
never executed: return 0;
0
364 case Qt::Key_F21: return 0; // = 0x1044,
never executed: return 0;
0
365 case Qt::Key_F22: return 0; // = 0x1045,
never executed: return 0;
0
366 case Qt::Key_F23: return 0; // = 0x1046,
never executed: return 0;
0
367 case Qt::Key_F24: return 0; // = 0x1047,
never executed: return 0;
0
368 case Qt::Key_F25: return 0; // = 0x1048, // F25 .. F35 only on X11
never executed: return 0;
0
369 case Qt::Key_F26: return 0; // = 0x1049,
never executed: return 0;
0
370 case Qt::Key_F27: return 0; // = 0x104a,
never executed: return 0;
0
371 case Qt::Key_F28: return 0; // = 0x104b,
never executed: return 0;
0
372 case Qt::Key_F29: return 0; // = 0x104c,
never executed: return 0;
0
373 case Qt::Key_F30: return 0; // = 0x104d,
never executed: return 0;
0
374 case Qt::Key_F31: return 0; // = 0x104e,
never executed: return 0;
0
375 case Qt::Key_F32: return 0; // = 0x104f,
never executed: return 0;
0
376 case Qt::Key_F33: return 0; // = 0x1050,
never executed: return 0;
0
377 case Qt::Key_F34: return 0; // = 0x1051,
never executed: return 0;
0
378 case Qt::Key_F35: return 0; // = 0x1052,
never executed: return 0;
0
379 case Qt::Key_Super_L: return 0; // = 0x1053, // extra keys
never executed: return 0;
0
380 case Qt::Key_Super_R: return 0; // = 0x1054,
never executed: return 0;
0
381 case Qt::Key_Menu: return 0; // = 0x1055,
never executed: return 0;
0
382 case Qt::Key_Hyper_L: return 0; // = 0x1056,
never executed: return 0;
0
383 case Qt::Key_Hyper_R: return 0; // = 0x1057,
never executed: return 0;
0
384 case Qt::Key_Help: return 0; // = 0x1058,
never executed: return 0;
0
385 case Qt::Key_Direction_L: return 0; // = 0x1059,
never executed: return 0;
0
386 case Qt::Key_Direction_R: return 0; // = 0x1060,
never executed: return 0;
0
387 -
388 // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06 -
389 case Qt::Key_nobreakspace: return char(0xa0);
never executed: return char(0xa0);
0
390 case Qt::Key_exclamdown: return char(0xa1);
never executed: return char(0xa1);
0
391 case Qt::Key_cent: return char(0xa2);
never executed: return char(0xa2);
0
392 case Qt::Key_sterling: return char(0xa3);
never executed: return char(0xa3);
0
393 case Qt::Key_currency: return char(0xa4);
never executed: return char(0xa4);
0
394 case Qt::Key_yen: return char(0xa5);
never executed: return char(0xa5);
0
395 case Qt::Key_brokenbar: return char(0xa6);
never executed: return char(0xa6);
0
396 case Qt::Key_section: return char(0xa7);
never executed: return char(0xa7);
0
397 case Qt::Key_diaeresis: return char(0xa8);
never executed: return char(0xa8);
0
398 case Qt::Key_copyright: return char(0xa9);
never executed: return char(0xa9);
0
399 case Qt::Key_ordfeminine: return char(0xaa);
never executed: return char(0xaa);
0
400 case Qt::Key_guillemotleft: return char(0xab); // left angle quotation mar
never executed: return char(0xab);
0
401 case Qt::Key_notsign: return char(0xac);
never executed: return char(0xac);
0
402 case Qt::Key_hyphen: return char(0xad);
never executed: return char(0xad);
0
403 case Qt::Key_registered: return char(0xae);
never executed: return char(0xae);
0
404 case Qt::Key_macron: return char(0xaf);
never executed: return char(0xaf);
0
405 case Qt::Key_degree: return char(0xb0);
never executed: return char(0xb0);
0
406 case Qt::Key_plusminus: return char(0xb1);
never executed: return char(0xb1);
0
407 case Qt::Key_twosuperior: return char(0xb2);
never executed: return char(0xb2);
0
408 case Qt::Key_threesuperior: return char(0xb3);
never executed: return char(0xb3);
0
409 case Qt::Key_acute: return char(0xb4);
never executed: return char(0xb4);
0
410 case Qt::Key_mu: return char(0xb5);
never executed: return char(0xb5);
0
411 case Qt::Key_paragraph: return char(0xb6);
never executed: return char(0xb6);
0
412 case Qt::Key_periodcentered: return char(0xb7);
never executed: return char(0xb7);
0
413 case Qt::Key_cedilla: return char(0xb8);
never executed: return char(0xb8);
0
414 case Qt::Key_onesuperior: return char(0xb9);
never executed: return char(0xb9);
0
415 case Qt::Key_masculine: return char(0xba);
never executed: return char(0xba);
0
416 case Qt::Key_guillemotright: return char(0xbb); // right angle quotation mar
never executed: return char(0xbb);
0
417 case Qt::Key_onequarter: return char(0xbc);
never executed: return char(0xbc);
0
418 case Qt::Key_onehalf: return char(0xbd);
never executed: return char(0xbd);
0
419 case Qt::Key_threequarters: return char(0xbe);
never executed: return char(0xbe);
0
420 case Qt::Key_questiondown: return char(0xbf);
never executed: return char(0xbf);
0
421 case Qt::Key_Agrave: return char(0xc0);
never executed: return char(0xc0);
0
422 case Qt::Key_Aacute: return char(0xc1);
never executed: return char(0xc1);
0
423 case Qt::Key_Acircumflex: return char(0xc2);
never executed: return char(0xc2);
0
424 case Qt::Key_Atilde: return char(0xc3);
never executed: return char(0xc3);
0
425 case Qt::Key_Adiaeresis: return char(0xc4);
never executed: return char(0xc4);
0
426 case Qt::Key_Aring: return char(0xe5);
never executed: return char(0xe5);
0
427 case Qt::Key_AE: return char(0xe6);
never executed: return char(0xe6);
0
428 case Qt::Key_Ccedilla: return char(0xc7);
never executed: return char(0xc7);
0
429 case Qt::Key_Egrave: return char(0xc8);
never executed: return char(0xc8);
0
430 case Qt::Key_Eacute: return char(0xc9);
never executed: return char(0xc9);
0
431 case Qt::Key_Ecircumflex: return char(0xca);
never executed: return char(0xca);
0
432 case Qt::Key_Ediaeresis: return char(0xcb);
never executed: return char(0xcb);
0
433 case Qt::Key_Igrave: return char(0xcc);
never executed: return char(0xcc);
0
434 case Qt::Key_Iacute: return char(0xcd);
never executed: return char(0xcd);
0
435 case Qt::Key_Icircumflex: return char(0xce);
never executed: return char(0xce);
0
436 case Qt::Key_Idiaeresis: return char(0xcf);
never executed: return char(0xcf);
0
437 case Qt::Key_ETH: return char(0xd0);
never executed: return char(0xd0);
0
438 case Qt::Key_Ntilde: return char(0xd1);
never executed: return char(0xd1);
0
439 case Qt::Key_Ograve: return char(0xd2);
never executed: return char(0xd2);
0
440 case Qt::Key_Oacute: return char(0xd3);
never executed: return char(0xd3);
0
441 case Qt::Key_Ocircumflex: return char(0xd4);
never executed: return char(0xd4);
0
442 case Qt::Key_Otilde: return char(0xd5);
never executed: return char(0xd5);
0
443 case Qt::Key_Odiaeresis: return char(0xd6);
never executed: return char(0xd6);
0
444 case Qt::Key_multiply: return char(0xd7);
never executed: return char(0xd7);
0
445 case Qt::Key_Ooblique: return char(0xf8);
never executed: return char(0xf8);
0
446 case Qt::Key_Ugrave: return char(0xd9);
never executed: return char(0xd9);
0
447 case Qt::Key_Uacute: return char(0xda);
never executed: return char(0xda);
0
448 case Qt::Key_Ucircumflex: return char(0xdb);
never executed: return char(0xdb);
0
449 case Qt::Key_Udiaeresis: return char(0xdc);
never executed: return char(0xdc);
0
450 case Qt::Key_Yacute: return char(0xdd);
never executed: return char(0xdd);
0
451 case Qt::Key_THORN: return char(0xde);
never executed: return char(0xde);
0
452 case Qt::Key_ssharp: return char(0xdf);
never executed: return char(0xdf);
0
453 case Qt::Key_division: return char(0xf7);
never executed: return char(0xf7);
0
454 case Qt::Key_ydiaeresis: return char(0xff);
never executed: return char(0xff);
0
455 -
456 // multimedia/internet keys - ignored by default - see QKeyEvent c'tor -
457 -
458 case Qt::Key_Back : return 0; // = 0x1061,
never executed: return 0;
0
459 case Qt::Key_Forward : return 0; // = 0x1062,
never executed: return 0;
0
460 case Qt::Key_Stop : return 0; // = 0x1063,
never executed: return 0;
0
461 case Qt::Key_Refresh : return 0; // = 0x1064,
never executed: return 0;
0
462 -
463 case Qt::Key_VolumeDown: return 0; // = 0x1070,
never executed: return 0;
0
464 case Qt::Key_VolumeMute : return 0; // = 0x1071,
never executed: return 0;
0
465 case Qt::Key_VolumeUp: return 0; // = 0x1072,
never executed: return 0;
0
466 case Qt::Key_BassBoost: return 0; // = 0x1073,
never executed: return 0;
0
467 case Qt::Key_BassUp: return 0; // = 0x1074,
never executed: return 0;
0
468 case Qt::Key_BassDown: return 0; // = 0x1075,
never executed: return 0;
0
469 case Qt::Key_TrebleUp: return 0; // = 0x1076,
never executed: return 0;
0
470 case Qt::Key_TrebleDown: return 0; // = 0x1077,
never executed: return 0;
0
471 -
472 case Qt::Key_MediaPlay : return 0; // = 0x1080,
never executed: return 0;
0
473 case Qt::Key_MediaStop : return 0; // = 0x1081,
never executed: return 0;
0
474 case Qt::Key_MediaPrevious : return 0; // = 0x1082,
never executed: return 0;
0
475 case Qt::Key_MediaNext : return 0; // = 0x1083,
never executed: return 0;
0
476 case Qt::Key_MediaRecord: return 0; // = 0x1084,
never executed: return 0;
0
477 -
478 case Qt::Key_HomePage : return 0; // = 0x1090,
never executed: return 0;
0
479 case Qt::Key_Favorites : return 0; // = 0x1091,
never executed: return 0;
0
480 case Qt::Key_Search : return 0; // = 0x1092,
never executed: return 0;
0
481 case Qt::Key_Standby: return 0; // = 0x1093,
never executed: return 0;
0
482 case Qt::Key_OpenUrl: return 0; // = 0x1094,
never executed: return 0;
0
483 -
484 case Qt::Key_LaunchMail : return 0; // = 0x10a0,
never executed: return 0;
0
485 case Qt::Key_LaunchMedia: return 0; // = 0x10a1,
never executed: return 0;
0
486 case Qt::Key_Launch0 : return 0; // = 0x10a2,
never executed: return 0;
0
487 case Qt::Key_Launch1 : return 0; // = 0x10a3,
never executed: return 0;
0
488 case Qt::Key_Launch2 : return 0; // = 0x10a4,
never executed: return 0;
0
489 case Qt::Key_Launch3 : return 0; // = 0x10a5,
never executed: return 0;
0
490 case Qt::Key_Launch4 : return 0; // = 0x10a6,
never executed: return 0;
0
491 case Qt::Key_Launch5 : return 0; // = 0x10a7,
never executed: return 0;
0
492 case Qt::Key_Launch6 : return 0; // = 0x10a8,
never executed: return 0;
0
493 case Qt::Key_Launch7 : return 0; // = 0x10a9,
never executed: return 0;
0
494 case Qt::Key_Launch8 : return 0; // = 0x10aa,
never executed: return 0;
0
495 case Qt::Key_Launch9 : return 0; // = 0x10ab,
never executed: return 0;
0
496 case Qt::Key_LaunchA : return 0; // = 0x10ac,
never executed: return 0;
0
497 case Qt::Key_LaunchB : return 0; // = 0x10ad,
never executed: return 0;
0
498 case Qt::Key_LaunchC : return 0; // = 0x10ae,
never executed: return 0;
0
499 case Qt::Key_LaunchD : return 0; // = 0x10af,
never executed: return 0;
0
500 case Qt::Key_LaunchE : return 0; // = 0x10b0,
never executed: return 0;
0
501 case Qt::Key_LaunchF : return 0; // = 0x10b1,
never executed: return 0;
0
502 -
503 default: QTEST_ASSERT(false); return 0;
never executed: qt_assert("false","qasciikey.cpp",503);
never executed: }
never executed: return 0;
never evaluated: !(false)
never evaluated: 0
0
504 } -
505}
never executed: }
0
506 -
507QT_END_NAMESPACE -
508 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial