OpenCoverage

qbasictimer.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qbasictimer.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3void QBasicTimer::start(int msec, QObject *obj)-
4{-
5 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();-
6 if (__builtin_expect(!!(!eventDispatcher), false)
__builtin_expe...tcher), false)Description
TRUEnever evaluated
FALSEevaluated 124026 times by 85 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
) {
0-124026
7 QMessageLogger(__FILE__, 120, __PRETTY_FUNCTION__).warning("QBasicTimer::start: QBasicTimer can only be used with threads started with QThread");-
8 return;
never executed: return;
0
9 }-
10 if (__builtin_expect(!!(obj && obj->thread() != eventDispatcher->thread()), false)
__builtin_expe...ead()), false)Description
TRUEnever evaluated
FALSEevaluated 124026 times by 85 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
) {
0-124026
11 QMessageLogger(__FILE__, 124, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Timers cannot be started from another thread");-
12 return;
never executed: return;
0
13 }-
14 if (id
idDescription
TRUEevaluated 104681 times by 51 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • ...
FALSEevaluated 19345 times by 85 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
) {
19345-104681
15 if (__builtin_expect(!!(eventDispatcher->unregisterTimer(id)), true)
__builtin_expe...er(id)), true)Description
TRUEevaluated 104681 times by 51 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • ...
FALSEnever evaluated
)
0-104681
16 QAbstractEventDispatcherPrivate::releaseTimerId(id);
executed 104681 times by 51 tests: QAbstractEventDispatcherPrivate::releaseTimerId(id);
Executed by:
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • ...
104681
17 else-
18 QMessageLogger(__FILE__, 131, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Stopping previous timer failed. Possibly trying to stop from a different thread");
never executed: QMessageLogger(__FILE__, 131, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Stopping previous timer failed. Possibly trying to stop from a different thread");
0
19 }-
20 id = 0;-
21 if (obj
objDescription
TRUEevaluated 123790 times by 85 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
FALSEevaluated 236 times by 5 tests
Evaluated by:
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_languageChange
)
236-123790
22 id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
executed 123790 times by 85 tests: id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
123790
23}
executed 124026 times by 85 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
124026
24void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj)-
25{-
26 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();-
27 if (__builtin_expect(!!(msec < 0), false)
__builtin_expe...c < 0), false)Description
TRUEnever evaluated
FALSEevaluated 155 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
) {
0-155
28 QMessageLogger(__FILE__, 153, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Timers cannot have negative timeouts");-
29 return;
never executed: return;
0
30 }-
31 if (__builtin_expect(!!(!eventDispatcher), false)
__builtin_expe...tcher), false)Description
TRUEnever evaluated
FALSEevaluated 155 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
) {
0-155
32 QMessageLogger(__FILE__, 157, __PRETTY_FUNCTION__).warning("QBasicTimer::start: QBasicTimer can only be used with threads started with QThread");-
33 return;
never executed: return;
0
34 }-
35 if (__builtin_expect(!!(obj && obj->thread() != eventDispatcher->thread()), false)
__builtin_expe...ead()), false)Description
TRUEnever evaluated
FALSEevaluated 155 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
) {
0-155
36 QMessageLogger(__FILE__, 161, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Timers cannot be started from another thread");-
37 return;
never executed: return;
0
38 }-
39 if (id
idDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 135 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
) {
20-135
40 if (__builtin_expect(!!(eventDispatcher->unregisterTimer(id)), true)
__builtin_expe...er(id)), true)Description
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
)
0-20
41 QAbstractEventDispatcherPrivate::releaseTimerId(id);
executed 20 times by 2 tests: QAbstractEventDispatcherPrivate::releaseTimerId(id);
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
20
42 else-
43 QMessageLogger(__FILE__, 168, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Stopping previous timer failed. Possibly trying to stop from a different thread");
never executed: QMessageLogger(__FILE__, 168, __PRETTY_FUNCTION__).warning("QBasicTimer::start: Stopping previous timer failed. Possibly trying to stop from a different thread");
0
44 }-
45 id = 0;-
46 if (obj
objDescription
TRUEevaluated 155 times by 12 tests
Evaluated by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
FALSEnever evaluated
)
0-155
47 id = eventDispatcher->registerTimer(msec, timerType, obj);
executed 155 times by 12 tests: id = eventDispatcher->registerTimer(msec, timerType, obj);
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
155
48}
executed 155 times by 12 tests: end of block
Executed by:
  • tst_QAbstractAnimation
  • tst_QColumnView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QParallelAnimationGroup
  • tst_QPauseAnimation
  • tst_QProgressBar
  • tst_QPropertyAnimation
  • tst_QScroller
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
  • tst_QTreeView
155
49-
50-
51-
52-
53-
54-
55void QBasicTimer::stop()-
56{-
57 if (id
idDescription
TRUEevaluated 17772 times by 99 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
FALSEevaluated 167911 times by 294 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
) {
17772-167911
58 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();-
59 if (eventDispatcher
eventDispatcherDescription
TRUEevaluated 17769 times by 96 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_qabstractanimation - unknown status
  • tst_qparallelanimationgroup - unknown status
  • tst_qsequentialanimationgroup - unknown status
) {
3-17769
60 if (__builtin_expect(!!(!eventDispatcher->unregisterTimer(id)), false)
__builtin_expe...r(id)), false)Description
TRUEnever evaluated
FALSEevaluated 17769 times by 96 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
) {
0-17769
61 QMessageLogger(__FILE__, 186, __PRETTY_FUNCTION__).warning("QBasicTimer::stop: Failed. Possibly trying to stop from a different thread");-
62 return;
never executed: return;
0
63 }-
64 QAbstractEventDispatcherPrivate::releaseTimerId(id);-
65 }
executed 17769 times by 96 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
17769
66 }
executed 17772 times by 99 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • ...
17772
67 id = 0;-
68}
executed 185683 times by 298 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
185683
69-
70-
Switch to Source codePreprocessed file

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