kernel/qcoreevent.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4QEvent::QEvent(Type type) -
5 : d(0), t(type), posted(false), spont(false), m_accept(true) -
6{}
executed: }
Execution Count:2951276
2951276
7QEvent::QEvent(const QEvent &other) -
8 : d(other.d), t(other.t), posted(other.posted), spont(other.spont), -
9 m_accept(other.m_accept) -
10{ -
11 -
12 -
13 qt_noop(); -
14}
executed: }
Execution Count:27
27
15QEvent &QEvent::operator=(const QEvent &other) -
16{ -
17 -
18 -
19 qt_noop(); -
20 -
21 t = other.t; -
22 posted = other.posted; -
23 spont = other.spont; -
24 m_accept = other.m_accept; -
25 return *this;
executed: return *this;
Execution Count:11445
11445
26} -
27 -
28 -
29 -
30 -
31 -
32 -
33QEvent::~QEvent() -
34{ -
35 if (posted && QCoreApplication::instance())
partially evaluated: posted
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2939505
never evaluated: QCoreApplication::instance()
0-2939505
36 QCoreApplicationPrivate::removePostedEvent(this);
never executed: QCoreApplicationPrivate::removePostedEvent(this);
0
37 qt_noop(); -
38}
executed: }
Execution Count:2939329
2939329
39class QEventUserEventRegistration -
40{ -
41public: -
42 QMutex mutex; -
43 QSet<int> set; -
44}; -
45static QEventUserEventRegistration *userEventRegistrationHelper() { static QGlobalStatic<QEventUserEventRegistration > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QEventUserEventRegistration *x = new QEventUserEventRegistration; if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QEventUserEventRegistration > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }
partially evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
evaluated: !thisGlobalStatic.pointer.load()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:3
partially evaluated: !thisGlobalStatic.destroyed
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
never executed: delete x;
executed: return thisGlobalStatic.pointer.load();
Execution Count:5
0-5
46int QEvent::registerEventType(int hint) -
47{ -
48 QEventUserEventRegistration *userEventRegistration -
49 = userEventRegistrationHelper(); -
50 if (!userEventRegistration)
partially evaluated: !userEventRegistration
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5
0-5
51 return -1;
never executed: return -1;
0
52 -
53 QMutexLocker locker(&userEventRegistration->mutex); -
54 -
55 -
56 if (hint >= QEvent::User && hint <= QEvent::MaxUser && !userEventRegistration->set.contains(hint)) {
evaluated: hint >= QEvent::User
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:3
partially evaluated: hint <= QEvent::MaxUser
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
evaluated: !userEventRegistration->set.contains(hint)
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:1
0-3
57 userEventRegistration->set.insert(hint); -
58 return hint;
executed: return hint;
Execution Count:1
1
59 } -
60 -
61 -
62 int id = QEvent::MaxUser; -
63 while (userEventRegistration->set.contains(id) && id >= QEvent::User)
evaluated: userEventRegistration->set.contains(id)
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:4
partially evaluated: id >= QEvent::User
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-4
64 --id;
executed: --id;
Execution Count:3
3
65 if (id >= QEvent::User) {
partially evaluated: id >= QEvent::User
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
66 userEventRegistration->set.insert(id); -
67 return id;
executed: return id;
Execution Count:4
4
68 } -
69 return -1;
never executed: return -1;
0
70} -
71QTimerEvent::QTimerEvent(int timerId) -
72 : QEvent(Timer), id(timerId) -
73{}
executed: }
Execution Count:42121
42121
74 -
75 -
76 -
77 -
78QTimerEvent::~QTimerEvent() -
79{ -
80} -
81QChildEvent::QChildEvent(Type type, QObject *child) -
82 : QEvent(type), c(child) -
83{}
executed: }
Execution Count:202343
202343
84 -
85 -
86 -
87 -
88QChildEvent::~QChildEvent() -
89{ -
90} -
91QDynamicPropertyChangeEvent::QDynamicPropertyChangeEvent(const QByteArray &name) -
92 : QEvent(QEvent::DynamicPropertyChange), n(name) -
93{ -
94}
executed: }
Execution Count:3427
3427
95 -
96 -
97 -
98 -
99QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent() -
100{ -
101} -
102QDeferredDeleteEvent::QDeferredDeleteEvent() -
103 : QEvent(QEvent::DeferredDelete) -
104 , level(0) -
105{ }
executed: }
Execution Count:8431
8431
106 -
107 -
108 -
109 -
110QDeferredDeleteEvent::~QDeferredDeleteEvent() -
111{ } -
112 -
113 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial