kernel/qbasictimer.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3void QBasicTimer::start(int msec, QObject *obj) -
4{ -
5 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(); -
6 if (!eventDispatcher) {
partially evaluated: !eventDispatcher
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:117317
0-117317
7 QMessageLogger("kernel/qbasictimer.cpp", 122, __PRETTY_FUNCTION__).warning("QBasicTimer::start: QBasicTimer can only be used with threads started with QThread"); -
8 return;
never executed: return;
0
9 } -
10 if (id) {
evaluated: id
TRUEFALSE
yes
Evaluation Count:101813
yes
Evaluation Count:15504
15504-101813
11 eventDispatcher->unregisterTimer(id); -
12 QAbstractEventDispatcherPrivate::releaseTimerId(id); -
13 }
executed: }
Execution Count:101813
101813
14 id = 0; -
15 if (obj)
evaluated: obj
TRUEFALSE
yes
Evaluation Count:117151
yes
Evaluation Count:166
166-117151
16 id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
executed: id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
Execution Count:117151
117151
17}
executed: }
Execution Count:117317
117317
18void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj) -
19{ -
20 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(); -
21 if (!eventDispatcher) {
partially evaluated: !eventDispatcher
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:114
0-114
22 QMessageLogger("kernel/qbasictimer.cpp", 149, __PRETTY_FUNCTION__).warning("QBasicTimer::start: QBasicTimer can only be used with threads started with QThread"); -
23 return;
never executed: return;
0
24 } -
25 if (id) {
evaluated: id
TRUEFALSE
yes
Evaluation Count:19
yes
Evaluation Count:95
19-95
26 eventDispatcher->unregisterTimer(id); -
27 QAbstractEventDispatcherPrivate::releaseTimerId(id); -
28 }
executed: }
Execution Count:19
19
29 id = 0; -
30 if (obj)
partially evaluated: obj
TRUEFALSE
yes
Evaluation Count:114
no
Evaluation Count:0
0-114
31 id = eventDispatcher->registerTimer(msec, timerType, obj);
executed: id = eventDispatcher->registerTimer(msec, timerType, obj);
Execution Count:114
114
32}
executed: }
Execution Count:114
114
33 -
34 -
35 -
36 -
37 -
38 -
39void QBasicTimer::stop() -
40{ -
41 if (id) {
evaluated: id
TRUEFALSE
yes
Evaluation Count:13949
yes
Evaluation Count:100969
13949-100969
42 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(); -
43 if (eventDispatcher)
evaluated: eventDispatcher
TRUEFALSE
yes
Evaluation Count:13946
yes
Evaluation Count:3
3-13946
44 eventDispatcher->unregisterTimer(id);
executed: eventDispatcher->unregisterTimer(id);
Execution Count:13946
13946
45 QAbstractEventDispatcherPrivate::releaseTimerId(id); -
46 }
executed: }
Execution Count:13949
13949
47 id = 0; -
48}
executed: }
Execution Count:114918
114918
49 -
50 -
51 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial