OpenCoverage

qtimer.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qtimer.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static const int INV_TIMER = -1;-
4-
5-
6-
7-
8-
9QTimer::QTimer(QObject *parent)-
10 : QObject(parent), id(INV_TIMER), inter(0), del(0), single(0), nulltimer(0), type(Qt::CoarseTimer)-
11{-
12}
executed 5261 times by 65 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLabel
  • ...
5261
13-
14-
15-
16-
17-
18-
19QTimer::~QTimer()-
20{-
21 if (id != INV_TIMER
id != INV_TIMERDescription
TRUEevaluated 326 times by 41 tests
Evaluated by:
  • tst_QApplication
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QStateMachine
  • tst_QStatusBar
  • tst_QTabBar
  • tst_QTcpSocket
  • tst_QTextEdit
  • tst_QTimer
  • tst_QTreeView
  • tst_languageChange
  • ...
FALSEevaluated 4922 times by 58 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLabel
  • tst_QMenu
  • tst_QMovie
  • ...
)
326-4922
22 stop();
executed 326 times by 41 tests: stop();
Executed by:
  • tst_QApplication
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QStateMachine
  • tst_QStatusBar
  • tst_QTabBar
  • tst_QTcpSocket
  • tst_QTextEdit
  • tst_QTimer
  • tst_QTreeView
  • tst_languageChange
  • ...
326
23}
executed 5248 times by 79 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLabel
  • tst_QLineEdit
  • ...
5248
24void QTimer::start()-
25{-
26 if (id != INV_TIMER
id != INV_TIMERDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QFileSystemWatcher
  • tst_QProgressDialog
FALSEevaluated 5017 times by 57 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • ...
)
22-5017
27 stop();
executed 22 times by 2 tests: stop();
Executed by:
  • tst_QFileSystemWatcher
  • tst_QProgressDialog
22
28 nulltimer = (!inter
!interDescription
TRUEevaluated 378 times by 11 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_languageChange
FALSEevaluated 4661 times by 54 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • ...
&& single
singleDescription
TRUEevaluated 369 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QTimer
  • tst_languageChange
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QSocketNotifier
  • tst_QTimer
);
9-4661
29 id = QObject::startTimer(inter, Qt::TimerType(type));-
30}
executed 5039 times by 57 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • ...
5039
31void QTimer::start(int msec)-
32{-
33 inter = msec;-
34 start();-
35}
executed 4917 times by 45 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMovie
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • ...
4917
36void QTimer::stop()-
37{-
38 if (id != INV_TIMER
id != INV_TIMERDescription
TRUEevaluated 5038 times by 68 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • ...
FALSEevaluated 5615 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QMovie
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
) {
5038-5615
39 QObject::killTimer(id);-
40 id = INV_TIMER;-
41 }
executed 5038 times by 68 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • ...
5038
42}
executed 10653 times by 69 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • ...
10653
43-
44-
45-
46-
47-
48void QTimer::timerEvent(QTimerEvent *e)-
49{-
50 if (e->timerId() == id
e->timerId() == idDescription
TRUEevaluated 12783 times by 31 tests
Evaluated by:
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QPrinter
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QStateMachine
  • tst_QStatusBar
  • tst_QTextEdit
  • ...
FALSEnever evaluated
) {
0-12783
51 if (single
singleDescription
TRUEevaluated 380 times by 19 tests
Evaluated by:
  • tst_QApplication
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QLabel
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QPrinter
  • tst_QStateMachine
  • tst_QTimer
  • tst_QUdpSocket
  • tst_languageChange
FALSEevaluated 12403 times by 20 tests
Evaluated by:
  • tst_QApplication
  • tst_QEventLoop
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QLabel
  • tst_QLineEdit
  • tst_QNetworkReply
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QStatusBar
  • tst_QTextEdit
  • tst_QTimer
  • tst_QToolButton
  • tst_QTreeView
  • tst_languageChange
  • tst_qapplication - unknown status
)
380-12403
52 stop();
executed 380 times by 19 tests: stop();
Executed by:
  • tst_QApplication
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QLabel
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QPrinter
  • tst_QStateMachine
  • tst_QTimer
  • tst_QUdpSocket
  • tst_languageChange
380
53 timeout(QPrivateSignal());-
54 }
executed 12782 times by 31 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QPrinter
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QStateMachine
  • tst_QStatusBar
  • tst_QTextEdit
  • ...
12782
55}
executed 12782 times by 31 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMenu
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QPrinter
  • tst_QProgressDialog
  • tst_QSocketNotifier
  • tst_QStateMachine
  • tst_QStatusBar
  • tst_QTextEdit
  • ...
12782
56-
57class QSingleShotTimer : public QObject-
58{-
59 public: template <typename ThisObject> inline void qt_check_for_QOBJECT_macro(const ThisObject &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i + 1; }-
60#pragma GCC diagnostic push-
61 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
62#pragma GCC diagnostic pop-
63 struct QPrivateSignal {};-
64 int timerId;-
65 bool hasValidReceiver;-
66 QPointer<const QObject> receiver;-
67 QtPrivate::QSlotObjectBase *slotObj;-
68public:-
69 ~QSingleShotTimer();-
70 QSingleShotTimer(int msec, Qt::TimerType timerType, const QObject *r, const char * m);-
71 QSingleShotTimer(int msec, Qt::TimerType timerType, const QObject *r, QtPrivate::QSlotObjectBase *slotObj);-
72-
73public :-
74 void timeout();-
75protected:-
76 void timerEvent(QTimerEvent *) override;-
77};-
78-
79QSingleShotTimer::QSingleShotTimer(int msec, Qt::TimerType timerType, const QObject *r, const char *member)-
80 : QObject(QAbstractEventDispatcher::instance()), hasValidReceiver(true), slotObj(0)-
81{-
82 timerId = startTimer(msec, timerType);-
83 connect(this, qFlagLocation("2""timeout()" "\0" __FILE__ ":" "280"), r, member);-
84}
executed 1247 times by 32 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • ...
1247
85-
86QSingleShotTimer::QSingleShotTimer(int msec, Qt::TimerType timerType, const QObject *r, QtPrivate::QSlotObjectBase *slotObj)-
87 : QObject(QAbstractEventDispatcher::instance()), hasValidReceiver(r), receiver(r), slotObj(slotObj)-
88{-
89 timerId = startTimer(msec, timerType);-
90 if (r
rDescription
TRUEevaluated 20016 times by 4 tests
Evaluated by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTimer
&& thread() != r->thread()
thread() != r->thread()Description
TRUEevaluated 20006 times by 1 test
Evaluated by:
  • tst_QTimer
FALSEevaluated 10 times by 4 tests
Evaluated by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
) {
6-20016
91-
92 connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &QObject::deleteLater);-
93 setParent(0);-
94 moveToThread(r->thread());-
95 }
executed 20006 times by 1 test: end of block
Executed by:
  • tst_QTimer
20006
96}
executed 20022 times by 4 tests: end of block
Executed by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
20022
97-
98QSingleShotTimer::~QSingleShotTimer()-
99{-
100 if (timerId > 0
timerId > 0Description
TRUEevaluated 138 times by 10 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QNetworkReply
  • tst_qcolordialog - unknown status
  • tst_qimagereader - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsystemtrayicon - unknown status
  • tst_qthread - unknown status
  • tst_qtoolbutton - unknown status
FALSEevaluated 21126 times by 33 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
)
138-21126
101 killTimer(timerId);
executed 138 times by 10 tests: killTimer(timerId);
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QNetworkReply
  • tst_qcolordialog - unknown status
  • tst_qimagereader - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsystemtrayicon - unknown status
  • tst_qthread - unknown status
  • tst_qtoolbutton - unknown status
138
102 if (slotObj
slotObjDescription
TRUEevaluated 20022 times by 4 tests
Evaluated by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
FALSEevaluated 1242 times by 36 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • ...
)
1242-20022
103 slotObj->destroyIfLastRef();
executed 20022 times by 4 tests: slotObj->destroyIfLastRef();
Executed by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
20022
104}
executed 21264 times by 39 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
21264
105-
106void QSingleShotTimer::timerEvent(QTimerEvent *)-
107{-
108-
109-
110 if (timerId > 0
timerId > 0Description
TRUEevaluated 21126 times by 33 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
FALSEnever evaluated
)
0-21126
111 killTimer(timerId);
executed 21126 times by 33 tests: killTimer(timerId);
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
21126
112 timerId = -1;-
113-
114 if (slotObj
slotObjDescription
TRUEevaluated 20022 times by 4 tests
Evaluated by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
FALSEevaluated 1104 times by 30 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • ...
) {
1104-20022
115-
116 if (__builtin_expect(!!(!receiver.isNull() || !hasValidReceiver), true)
__builtin_expe...ceiver), true)Description
TRUEevaluated 20020 times by 4 tests
Evaluated by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTimer
) {
2-20020
117-
118-
119 void *args[1] = { 0 };-
120 slotObj->call(const_cast<QObject*>(receiver.data()), args);-
121 }
executed 20020 times by 4 tests: end of block
Executed by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
20020
122 }
executed 20022 times by 4 tests: end of block
Executed by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
else {
20022
123 timeout();-
124 }
executed 1104 times by 30 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • ...
1104
125-
126-
127-
128-
129 qDeleteInEventHandler(this);-
130}
executed 21126 times by 33 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
21126
131void QTimer::singleShotImpl(int msec, Qt::TimerType timerType,-
132 const QObject *receiver,-
133 QtPrivate::QSlotObjectBase *slotObj)-
134{-
135 new QSingleShotTimer(msec, timerType, receiver, slotObj);-
136}
executed 20022 times by 4 tests: end of block
Executed by:
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QTimer
  • tst_QtConcurrentRun
20022
137void QTimer::singleShot(int msec, const QObject *receiver, const char *member)-
138{-
139-
140-
141-
142 singleShot(msec, msec >= 2000 ? Qt::CoarseTimer : Qt::PreciseTimer, receiver, member);-
143}
executed 4560 times by 173 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
4560
144void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member)-
145{-
146 if (__builtin_expect(!!(msec < 0), false)
__builtin_expe...c < 0), false)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
FALSEevaluated 4559 times by 173 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
) {
1-4559
147 QMessageLogger(__FILE__, 393, __PRETTY_FUNCTION__).warning("QTimer::singleShot: Timers cannot have negative timeouts");-
148 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QApplication
1
149 }-
150 if (receiver
receiverDescription
TRUEevaluated 4559 times by 173 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEnever evaluated
&& member
memberDescription
TRUEevaluated 4559 times by 173 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEnever evaluated
) {
0-4559
151 if (msec == 0
msec == 0Description
TRUEevaluated 3312 times by 168 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 1247 times by 32 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • ...
) {
1247-3312
152-
153 const char* bracketPosition = strchr(member, '(');-
154 if (!bracketPosition
!bracketPositionDescription
TRUEnever evaluated
FALSEevaluated 3312 times by 168 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
|| !(member[0] >= '0'
member[0] >= '0'Description
TRUEevaluated 3312 times by 168 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEnever evaluated
&& member[0] <= '2'
member[0] <= '2'Description
TRUEevaluated 3312 times by 168 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEnever evaluated
)) {
0-3312
155 QMessageLogger(__FILE__, 401, __PRETTY_FUNCTION__).warning("QTimer::singleShot: Invalid slot specification");-
156 return;
never executed: return;
0
157 }-
158 QByteArray methodName(member+1, bracketPosition - 1 - member);-
159 QMetaObject::invokeMethod(const_cast<QObject *>(receiver), methodName.constData(), Qt::QueuedConnection);-
160 return;
executed 3312 times by 168 tests: return;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
3312
161 }-
162 (void) new QSingleShotTimer(msec, timerType, receiver, member);-
163 }
executed 1247 times by 32 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • ...
1247
164}
executed 1247 times by 32 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QSignalSpy
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • ...
1247
165void QTimer::setInterval(int msec)-
166{-
167 inter = msec;-
168 if (id != INV_TIMER
id != INV_TIMERDescription
TRUEnever evaluated
FALSEevaluated 71 times by 34 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QMenu
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QSocketNotifier
  • ...
) {
0-71
169 QObject::killTimer(id);-
170 id = QObject::startTimer(msec, Qt::TimerType(type));-
171 }
never executed: end of block
0
172}
executed 71 times by 34 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QMenu
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QSocketNotifier
  • ...
71
173int QTimer::remainingTime() const-
174{-
175 if (id != INV_TIMER
id != INV_TIMERDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTimer
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTimer
) {
4
176 return
executed 4 times by 1 test: return QAbstractEventDispatcher::instance()->remainingTime(id);
Executed by:
  • tst_QTimer
QAbstractEventDispatcher::instance()->remainingTime(id);
executed 4 times by 1 test: return QAbstractEventDispatcher::instance()->remainingTime(id);
Executed by:
  • tst_QTimer
4
177 }-
178-
179 return
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTimer
-1;
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTimer
4
180}-
181-
182-
Switch to Source codePreprocessed file

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