qkeymapper.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qkeymapper.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QKeyMapper::QKeyMapper()-
6 : QObject(*new QKeyMapperPrivate, 0)-
7{-
8}
never executed: end of block
0
9-
10-
11-
12-
13QKeyMapper::~QKeyMapper()-
14{-
15}-
16-
17QList<int> QKeyMapper::possibleKeys(QKeyEvent *e)-
18{-
19 QList<int> result;-
20-
21 if (!e->nativeScanCode()
!e->nativeScanCode()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
22 if (e->key()
e->key()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(e->key() != Qt::Key_unknown)Description
TRUEnever evaluated
FALSEnever evaluated
e->key() != Qt::Key_unknown)
(e->key() != Qt::Key_unknown)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
23 result << int(e->key() + e->modifiers());
never executed: result << int(e->key() + e->modifiers());
0
24 else if (!e->text().isEmpty()
!e->text().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
25 result << int(e->text().at(0).unicode() + e->modifiers());
never executed: result << int(e->text().at(0).unicode() + e->modifiers());
0
26 return
never executed: return result;
result;
never executed: return result;
0
27 }-
28-
29 return
never executed: return instance()->d_func()->possibleKeys(e);
instance()->d_func()->possibleKeys(e);
never executed: return instance()->d_func()->possibleKeys(e);
0
30}-
31-
32extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event);-
33void QKeyMapper::changeKeyboard()-
34{-
35 instance()->d_func()->clearMappings();-
36}
never executed: end of block
0
37-
38namespace { namespace Q_QGS_keymapper { typedef QKeyMapper Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QKeyMapper, Q_QGS_keymapper::innerFunction, Q_QGS_keymapper::guard> keymapper;
0
39-
40-
41-
42-
43QKeyMapper *QKeyMapper::instance()-
44{-
45 return
never executed: return keymapper();
keymapper();
never executed: return keymapper();
0
46}-
47-
48QKeyMapperPrivate *qt_keymapper_private()-
49{-
50 return
never executed: return QKeyMapper::instance()->d_func();
QKeyMapper::instance()->d_func();
never executed: return QKeyMapper::instance()->d_func();
0
51}-
52-
53QKeyMapperPrivate::QKeyMapperPrivate()-
54{-
55 keyboardInputLocale = QLocale::system();-
56 keyboardInputDirection = keyboardInputLocale.textDirection();-
57}
never executed: end of block
0
58-
59QKeyMapperPrivate::~QKeyMapperPrivate()-
60{-
61-
62}-
63-
64void QKeyMapperPrivate::clearMappings()-
65{-
66}-
67-
68QList<int> QKeyMapperPrivate::possibleKeys(QKeyEvent *e)-
69{-
70 QList<int> result = QGuiApplicationPrivate::platformIntegration()->possibleKeys(e);-
71 if (!result.isEmpty()
!result.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
72 return
never executed: return result;
result;
never executed: return result;
0
73-
74 if (e->key()
e->key()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(e->key() != Qt::Key_unknown)Description
TRUEnever evaluated
FALSEnever evaluated
e->key() != Qt::Key_unknown)
(e->key() != Qt::Key_unknown)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
75 result << int(e->key() + e->modifiers());
never executed: result << int(e->key() + e->modifiers());
0
76 else if (!e->text().isEmpty()
!e->text().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
77 result << int(e->text().at(0).unicode() + e->modifiers());
never executed: result << int(e->text().at(0).unicode() + e->modifiers());
0
78 return
never executed: return result;
result;
never executed: return result;
0
79}-
80-
81-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9