kernel/qkeymapper.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4QKeyMapper::QKeyMapper() -
5 : QObject(*new QKeyMapperPrivate, 0) -
6{ -
7}
never executed: }
0
8 -
9 -
10 -
11 -
12QKeyMapper::~QKeyMapper() -
13{ -
14} -
15 -
16QList<int> QKeyMapper::possibleKeys(QKeyEvent *e) -
17{ -
18 QList<int> result; -
19 -
20 if (!e->nativeScanCode()) {
partially evaluated: !e->nativeScanCode()
TRUEFALSE
yes
Evaluation Count:236
no
Evaluation Count:0
0-236
21 if (e->key() && (e->key() != Qt::Key_unknown))
evaluated: e->key()
TRUEFALSE
yes
Evaluation Count:232
yes
Evaluation Count:4
partially evaluated: (e->key() != Qt::Key_unknown)
TRUEFALSE
yes
Evaluation Count:232
no
Evaluation Count:0
0-232
22 result << int(e->key() + e->modifiers());
executed: result << int(e->key() + e->modifiers());
Execution Count:232
232
23 else if (!e->text().isEmpty())
partially evaluated: !e->text().isEmpty()
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
24 result << int(e->text().at(0).unicode() + e->modifiers());
executed: result << int(e->text().at(0).unicode() + e->modifiers());
Execution Count:4
4
25 return result;
executed: return result;
Execution Count:236
236
26 } -
27 -
28 return instance()->d_func()->possibleKeys(e);
never executed: return instance()->d_func()->possibleKeys(e);
0
29} -
30 -
31extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); -
32void QKeyMapper::changeKeyboard() -
33{ -
34 instance()->d_func()->clearMappings(); -
35}
never executed: }
0
36 -
37static QKeyMapper *keymapper() { static QGlobalStatic<QKeyMapper > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QKeyMapper *x = new QKeyMapper; if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QKeyMapper > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }
never evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)
never evaluated: !thisGlobalStatic.pointer.load()
never evaluated: !thisGlobalStatic.destroyed
never executed: delete x;
never executed: return thisGlobalStatic.pointer.load();
0
38 -
39 -
40 -
41 -
42QKeyMapper *QKeyMapper::instance() -
43{ -
44 return keymapper();
never executed: return keymapper();
0
45} -
46 -
47QKeyMapperPrivate *qt_keymapper_private() -
48{ -
49 return QKeyMapper::instance()->d_func();
never executed: return QKeyMapper::instance()->d_func();
0
50} -
51 -
52 -
53 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial