accessible/qplatformaccessibility.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8 -
9static QFactoryLoader *bridgeloader() { static QGlobalStatic<QFactoryLoader > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QFactoryLoader *x = new QFactoryLoader ("org.qt-project.Qt.QAccessibleBridgeFactoryInterface", QLatin1String("/accessiblebridge")); if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QFactoryLoader > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }
never executed: delete x;
executed: return thisGlobalStatic.pointer.load();
Execution Count:5
partially evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5
partially evaluated: !thisGlobalStatic.pointer.load()
TRUEFALSE
yes
Evaluation Count:5
no
Evaluation Count:0
partially evaluated: !thisGlobalStatic.destroyed
TRUEFALSE
yes
Evaluation Count:5
no
Evaluation Count:0
0-5
10 -
11 -
12 -
13static QVector<QAccessibleBridge *> *bridges() { static QGlobalStatic<QVector<QAccessibleBridge *> > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QVector<QAccessibleBridge *> *x = new QVector<QAccessibleBridge *>; if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QVector<QAccessibleBridge *> > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }
never executed: delete x;
partially evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5
executed: return thisGlobalStatic.pointer.load();
Execution Count:43
evaluated: !thisGlobalStatic.pointer.load()
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:38
partially evaluated: !thisGlobalStatic.destroyed
TRUEFALSE
yes
Evaluation Count:5
no
Evaluation Count:0
0-43
14QPlatformAccessibility::QPlatformAccessibility() -
15{ -
16} -
17 -
18QPlatformAccessibility::~QPlatformAccessibility() -
19{ -
20} -
21 -
22void QPlatformAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) -
23{ -
24 initialize(); -
25 -
26 if (!bridges() || bridges()->isEmpty())
never evaluated: !bridges()
never evaluated: bridges()->isEmpty()
0
27 return;
never executed: return;
0
28 -
29 for (int i = 0; i < bridges()->count(); ++i)
never evaluated: i < bridges()->count()
0
30 bridges()->at(i)->notifyAccessibilityUpdate(event);
never executed: bridges()->at(i)->notifyAccessibilityUpdate(event);
0
31}
never executed: }
0
32 -
33void QPlatformAccessibility::setRootObject(QObject *o) -
34{ -
35 initialize(); -
36 if (bridges()->isEmpty())
partially evaluated: bridges()->isEmpty()
TRUEFALSE
yes
Evaluation Count:43
no
Evaluation Count:0
0-43
37 return;
executed: return;
Execution Count:43
43
38 -
39 if (!o)
never evaluated: !o
0
40 return;
never executed: return;
0
41 -
42 for (int i = 0; i < bridges()->count(); ++i) {
never evaluated: i < bridges()->count()
0
43 QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(o); -
44 bridges()->at(i)->setRootObject(iface); -
45 }
never executed: }
0
46}
never executed: }
0
47 -
48void QPlatformAccessibility::initialize() -
49{ -
50 static bool isInit = false; -
51 if (isInit)
evaluated: isInit
TRUEFALSE
yes
Evaluation Count:38
yes
Evaluation Count:5
5-38
52 return;
executed: return;
Execution Count:38
38
53 isInit = true; -
54 -
55 -
56 typedef QMultiMap<int, QString> PluginKeyMap; -
57 typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator; -
58 -
59 const PluginKeyMap keyMap = bridgeloader()->keyMap(); -
60 QAccessibleBridgePlugin *factory = 0; -
61 int i = -1; -
62 const PluginKeyMapConstIterator cend = keyMap.constEnd(); -
63 for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
partially evaluated: it != cend
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5
0-5
64 if (it.key() != i) {
never evaluated: it.key() != i
0
65 i = it.key(); -
66 factory = qobject_cast<QAccessibleBridgePlugin*>(bridgeloader()->instance(i)); -
67 }
never executed: }
0
68 if (factory)
never evaluated: factory
0
69 if (QAccessibleBridge *bridge = factory->create(it.value()))
never evaluated: QAccessibleBridge *bridge = factory->create(it.value())
0
70 bridges()->append(bridge);
never executed: bridges()->append(bridge);
0
71 }
never executed: }
0
72 -
73}
executed: }
Execution Count:5
5
74 -
75void QPlatformAccessibility::cleanup() -
76{ -
77 qDeleteAll(*bridges()); -
78}
never executed: }
0
79 -
80 -
81 -
82 -
83 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial