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:120461
0-120461
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:103116
yes
Evaluation Count:17345
17345-103116
11 eventDispatcher->unregisterTimer(id); -
12 QAbstractEventDispatcherPrivate::releaseTimerId(id); -
13 }
executed: }
Execution Count:103116
103116
14 id = 0; -
15 if (obj)
evaluated: obj
TRUEFALSE
yes
Evaluation Count:120272
yes
Evaluation Count:189
189-120272
16 id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
executed: id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
Execution Count:120272
120272
17}
executed: }
Execution Count:120461
120461
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:15779
yes
Evaluation Count:139664
15779-139664
42 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(); -
43 if (eventDispatcher)
evaluated: eventDispatcher
TRUEFALSE
yes
Evaluation Count:15776
yes
Evaluation Count:3
3-15776
44 eventDispatcher->unregisterTimer(id);
executed: eventDispatcher->unregisterTimer(id);
Execution Count:15776
15776
45 QAbstractEventDispatcherPrivate::releaseTimerId(id); -
46 }
executed: }
Execution Count:15779
15779
47 id = 0; -
48}
executed: }
Execution Count:155443
155443
49 -
50 -
51 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial