qthread_unix.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/thread/qthread_unix.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
18-
19-
20static_assert(bool(sizeof(pthread_t) <= sizeof(Qt::HANDLE)), "sizeof(pthread_t) <= sizeof(Qt::HANDLE)");-
21-
22enum { ThreadPriorityResetFlag = 0x80000000 };-
23static __thread QThreadData *currentThreadData = 0;-
24-
25-
26static pthread_once_t current_thread_data_once = 0;-
27static pthread_key_t current_thread_data_key;-
28-
29static void destroy_current_thread_data(void *p)-
30{-
31 pthread_setspecific(current_thread_data_key, p);-
32 QThreadData *data = static_cast<QThreadData *>(p);-
33 if (data->isAdopted
data->isAdoptedDescription
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 620183 times by 512 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • ...
) {
17-620183
34 QThread *thread = data->thread;-
35 ((!(thread)) ? qt_assert("thread",__FILE__,148) : qt_noop());-
36 QThreadPrivate *thread_p = static_cast<QThreadPrivate *>(QObjectPrivate::get(thread));-
37 ((!(!thread_p->finished)) ? qt_assert("!thread_p->finished",__FILE__,150) : qt_noop());-
38 thread_p->finish(thread);-
39 }
executed 17 times by 1 test: end of block
Executed by:
  • tst_QThread
17
40 data->deref();-
41-
42-
43-
44-
45 pthread_setspecific(current_thread_data_key,-
46-
47-
48-
49 0);-
50-
51}
executed 620200 times by 512 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • ...
620200
52-
53static void create_current_thread_data_key()-
54{-
55 pthread_key_create(&current_thread_data_key, destroy_current_thread_data);-
56}
executed 1104 times by 15 tests: end of block
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1104
57-
58static void destroy_current_thread_data_key()-
59{-
60 pthread_once(&current_thread_data_once, create_current_thread_data_key);-
61 pthread_key_delete(current_thread_data_key);-
62-
63-
64-
65-
66 pthread_once_t pthread_once_init = 0;-
67 current_thread_data_once = pthread_once_init;-
68}
never executed: end of block
0
69namespace { static const struct destroy_current_thread_data_key_dtor_class_ { inline destroy_current_thread_data_key_dtor_class_() { } inline ~ destroy_current_thread_data_key_dtor_class_() { destroy_current_thread_data_key(); }
never executed: end of block
} destroy_current_thread_data_key_dtor_instance_; }
0
70-
71-
72-
73static QThreadData *get_thread_data()-
74{-
75-
76 return
executed 43687172 times by 1014 tests: return currentThreadData;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
currentThreadData;
executed 43687172 times by 1014 tests: return currentThreadData;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
43687172
77-
78-
79-
80-
81}-
82-
83static void set_thread_data(QThreadData *data)-
84{-
85-
86 currentThreadData = data;-
87-
88 pthread_once(&current_thread_data_once, create_current_thread_data_key);-
89 pthread_setspecific(current_thread_data_key, data);-
90}
executed 621808 times by 523 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
621808
91-
92static void clear_thread_data()-
93{-
94-
95 currentThreadData = 0;-
96-
97 pthread_setspecific(current_thread_data_key, 0);-
98}
executed 1087 times by 346 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaction - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuffer - unknown status
  • tst_qbytearray - unknown status
  • ...
1087
99-
100template <typename T>-
101static typename QtPrivate::QEnableIf<QTypeInfo<T>::isIntegral, Qt::HANDLE>::Type to_HANDLE(T id)-
102{-
103 return
executed 14588472 times by 801 tests: return reinterpret_cast<Qt::HANDLE>(static_cast<intptr_t>(id));
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
reinterpret_cast<Qt::HANDLE>(static_cast<intptr_t>(id));
executed 14588472 times by 801 tests: return reinterpret_cast<Qt::HANDLE>(static_cast<intptr_t>(id));
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
14588472
104}-
105-
106template <typename T>-
107static typename QtPrivate::QEnableIf<QTypeInfo<T>::isIntegral, T>::Type from_HANDLE(Qt::HANDLE id)-
108{-
109 return
executed 1240826 times by 1012 tests: return static_cast<T>(reinterpret_cast<intptr_t>(id));
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
static_cast<T>(reinterpret_cast<intptr_t>(id));
executed 1240826 times by 1012 tests: return static_cast<T>(reinterpret_cast<intptr_t>(id));
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
1240826
110}-
111-
112template <typename T>-
113static typename QtPrivate::QEnableIf<QTypeInfo<T>::isPointer, Qt::HANDLE>::Type to_HANDLE(T id)-
114{-
115 return
never executed: return id;
id;
never executed: return id;
0
116}-
117-
118template <typename T>-
119static typename QtPrivate::QEnableIf<QTypeInfo<T>::isPointer, T>::Type from_HANDLE(Qt::HANDLE id)-
120{-
121 return
never executed: return static_cast<T>(id);
static_cast<T>(id);
never executed: return static_cast<T>(id);
0
122}-
123-
124void QThreadData::clearCurrentThreadData()-
125{-
126 clear_thread_data();-
127}
executed 1087 times by 346 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaction - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuffer - unknown status
  • tst_qbytearray - unknown status
  • ...
1087
128-
129QThreadData *QThreadData::current(bool createIfNecessary)-
130{-
131 QThreadData *data = get_thread_data();-
132 if (!data
!dataDescription
TRUEevaluated 1125 times by 19 tests
Evaluated by:
  • tst_QThread
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlockfile - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_qtextstream - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEevaluated 43686044 times by 1014 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
&& createIfNecessary
createIfNecessaryDescription
TRUEevaluated 1125 times by 19 tests
Evaluated by:
  • tst_QThread
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlockfile - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_qtextstream - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-43686044
133 data = new QThreadData;-
134 try {-
135 set_thread_data(data);-
136 data->thread = new QAdoptedThread(data);-
137 }
executed 1125 times by 19 tests: end of block
Executed by:
  • tst_QThread
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlockfile - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_qtextstream - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
catch (...) {
1125
138 clear_thread_data();-
139 data->deref();-
140 data = 0;-
141 throw;
never executed: throw;
0
142 }-
143 data->deref();-
144 data->isAdopted = true;-
145 data->threadId = to_HANDLE(pthread_self());-
146 if (!QCoreApplicationPrivate::theMainThread
!QCoreApplicat...:theMainThreadDescription
TRUEevaluated 1108 times by 18 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlockfile - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_qtextstream - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEevaluated 17 times by 1 test
Evaluated by:
  • tst_QThread
)
17-1108
147 QCoreApplicationPrivate::theMainThread = data->thread.load();
executed 1108 times by 18 tests: QCoreApplicationPrivate::theMainThread = data->thread.load();
Executed by:
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlockfile - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_qtextstream - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1108
148 }
executed 1125 times by 19 tests: end of block
Executed by:
  • tst_QThread
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlockfile - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_qtextstream - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1125
149 return
executed 43687169 times by 1014 tests: return data;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
data;
executed 43687169 times by 1014 tests: return data;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
43687169
150}-
151-
152-
153void QAdoptedThread::init()-
154{-
155}-
156-
157-
158-
159-
160-
161extern "C" {-
162typedef void*(*QtThreadCallback)(void*);-
163}-
164-
165-
166-
167void QThreadPrivate::createEventDispatcher(QThreadData *data)-
168{-
169 if (qEnvironmentVariableIsEmpty("QT_NO_GLIB")
qEnvironmentVa...("QT_NO_GLIB")Description
TRUEevaluated 620684 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEnever evaluated
0-620684
170 && qEnvironmentVariableIsEmpty("QT_NO_THREADED_GLIB")
qEnvironmentVa...HREADED_GLIB")Description
TRUEevaluated 620684 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEnever evaluated
0-620684
171 && QEventDispatcherGlib::versionSupported()
QEventDispatch...ionSupported()Description
TRUEevaluated 620684 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEnever evaluated
)
0-620684
172 data->eventDispatcher.storeRelease(new QEventDispatcherGlib);
executed 620684 times by 512 tests: data->eventDispatcher.storeRelease(new QEventDispatcherGlib);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620684
173 else-
174 data->eventDispatcher.storeRelease(new QEventDispatcherUNIX);
never executed: data->eventDispatcher.storeRelease(new QEventDispatcherUNIX);
0
175-
176-
177-
178-
179 data->eventDispatcher.load()->startingUp();-
180}
executed 620684 times by 512 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620684
181-
182-
183-
184-
185static void setCurrentThreadName(pthread_t threadId, const char *name)-
186{-
187-
188 (void)threadId;;-
189 prctl(15, (unsigned long)name, 0, 0, 0);-
190-
191-
192-
193-
194-
195-
196}
executed 620683 times by 512 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620683
197-
198-
199void *QThreadPrivate::start(void *arg)-
200{-
201-
202 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, __null);-
203-
204 do { __pthread_cleanup_class __clframe (QThreadPrivate::finish, arg);-
205-
206 QThread *thr = reinterpret_cast<QThread *>(arg);-
207 QThreadData *data = QThreadData::get2(thr);-
208-
209 {-
210 QMutexLocker locker(&thr->d_func()->mutex);-
211-
212-
213 if (int(thr->d_func()->priority) & ThreadPriorityResetFlag
int(thr->d_fun...orityResetFlagDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
FALSEevaluated 620680 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
) {
3-620680
214 thr->d_func()->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag));-
215 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
3
216-
217 data->threadId = to_HANDLE(pthread_self());-
218 set_thread_data(data);-
219-
220 data->ref();-
221 data->quitNow = thr->d_func()->exited;-
222 }-
223-
224 if (data->eventDispatcher.load()
data->eventDispatcher.load()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 620682 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
)
1-620682
225 data->eventDispatcher.load()->startingUp();
executed 1 time by 1 test: data->eventDispatcher.load()->startingUp();
Executed by:
  • tst_QThread
1
226 else-
227 createEventDispatcher(data);
executed 620682 times by 512 tests: createEventDispatcher(data);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620682
228-
229-
230 {-
231-
232 QString objectName = thr->objectName();-
233-
234 pthread_t thread_id = from_HANDLE<pthread_t>(data->threadId);-
235 if (__builtin_expect(!!(objectName.isEmpty()), true)
__builtin_expe...mpty()), true)Description
TRUEevaluated 618748 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEevaluated 1935 times by 45 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDBusThreading
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QFuture
  • tst_QFutureWatcher
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • ...
)
1935-618748
236 setCurrentThreadName(thread_id, thr->metaObject()->className());
executed 618748 times by 512 tests: setCurrentThreadName(thread_id, thr->metaObject()->className());
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
618748
237 else-
238 setCurrentThreadName(thread_id, objectName.toLocal8Bit());
executed 1935 times by 45 tests: setCurrentThreadName(thread_id, objectName.toLocal8Bit());
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDBusThreading
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QFuture
  • tst_QFutureWatcher
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • ...
1935
239 }-
240-
241-
242 thr->started(QThread::QPrivateSignal());-
243-
244 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, __null);-
245 pthread_testcancel();-
246-
247 thr->run();-
248-
249 __clframe.__setdoit (1); } while (0);-
250-
251 return
executed 620181 times by 512 tests: return 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • ...
0;
executed 620181 times by 512 tests: return 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • ...
620181
252}-
253-
254void QThreadPrivate::finish(void *arg)-
255{-
256 QThread *thr = reinterpret_cast<QThread *>(arg);-
257 QThreadPrivate *d = thr->d_func();-
258-
259 QMutexLocker locker(&d->mutex);-
260-
261 d->isInFinish = true;-
262 d->priority = QThread::InheritPriority;-
263 void *data = &d->data->tls;-
264 locker.unlock();-
265 thr->finished(QThread::QPrivateSignal());-
266 QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);-
267 QThreadStorageData::finish((void **)data);-
268 locker.relock();-
269-
270 QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher.load();-
271 if (eventDispatcher
eventDispatcherDescription
TRUEevaluated 620844 times by 578 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • ...
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QThread
) {
15-620844
272 d->data->eventDispatcher = 0;-
273 locker.unlock();-
274 eventDispatcher->closingDown();-
275 delete eventDispatcher;-
276 locker.relock();-
277 }
executed 620844 times by 578 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • ...
620844
278-
279 d->running = false;-
280 d->finished = true;-
281 d->interruptionRequested = false;-
282-
283 d->isInFinish = false;-
284 d->thread_done.wakeAll();-
285}
executed 620859 times by 578 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFtp
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • ...
620859
286Qt::HANDLE QThread::currentThreadId() noexcept-
287{-
288-
289 return
executed 13345982 times by 599 tests: return to_HANDLE(pthread_self());
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • ...
to_HANDLE(pthread_self());
executed 13345982 times by 599 tests: return to_HANDLE(pthread_self());
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • ...
13345982
290}-
291-
292-
293-
294-
295-
296-
297int QThread::idealThreadCount() noexcept-
298{-
299 int cores = 1;-
300 cores = (int)sysconf(_SC_NPROCESSORS_ONLN);-
301 if (cores == -1
cores == -1Description
TRUEnever evaluated
FALSEevaluated 1903 times by 447 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFreeList
  • tst_QFtp
  • tst_QFuture
  • tst_QFutureWatcher
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
)
0-1903
302 return
never executed: return 1;
1;
never executed: return 1;
0
303-
304 return
executed 1903 times by 447 tests: return cores;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFreeList
  • tst_QFtp
  • tst_QFuture
  • tst_QFutureWatcher
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
cores;
executed 1903 times by 447 tests: return cores;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFreeList
  • tst_QFtp
  • tst_QFuture
  • tst_QFutureWatcher
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
1903
305}-
306-
307void QThread::yieldCurrentThread()-
308{-
309 sched_yield();-
310}
executed 1556 times by 3 tests: end of block
Executed by:
  • tst_QSqlThread
  • tst_QVector
  • tst_QVector_StrictIterators
1556
311-
312static timespec makeTimespec(time_t secs, long nsecs)-
313{-
314 struct timespec ts;-
315 ts.tv_sec = secs;-
316 ts.tv_nsec = nsecs;-
317 return
executed 325374 times by 11 tests: return ts;
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QFuture
  • tst_QLockFile
  • tst_QMutex
  • tst_QProcess
  • tst_QProgressDialog
  • tst_QReadWriteLock
  • tst_QSharedPointer
  • tst_QTcpServer
  • tst_QThread
  • tst_QThreadPool
ts;
executed 325374 times by 11 tests: return ts;
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QFuture
  • tst_QLockFile
  • tst_QMutex
  • tst_QProcess
  • tst_QProgressDialog
  • tst_QReadWriteLock
  • tst_QSharedPointer
  • tst_QTcpServer
  • tst_QThread
  • tst_QThreadPool
325374
318}-
319-
320void QThread::sleep(unsigned long secs)-
321{-
322 qt_nanosleep(makeTimespec(secs, 0));-
323}
executed 7 times by 3 tests: end of block
Executed by:
  • tst_QProcess
  • tst_QTcpServer
  • tst_QThread
7
324-
325void QThread::msleep(unsigned long msecs)-
326{-
327 qt_nanosleep(makeTimespec(msecs / 1000, msecs % 1000 * 1000 * 1000));-
328}
executed 295269 times by 8 tests: end of block
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QFuture
  • tst_QLockFile
  • tst_QMutex
  • tst_QProgressDialog
  • tst_QReadWriteLock
  • tst_QThread
  • tst_QThreadPool
295269
329-
330void QThread::usleep(unsigned long usecs)-
331{-
332 qt_nanosleep(makeTimespec(usecs / 1000 / 1000, usecs % (1000*1000) * 1000));-
333}
executed 30079 times by 3 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QSharedPointer
  • tst_QThread
30079
334-
335-
336-
337-
338-
339static bool calculateUnixPriority(int priority, int *sched_policy, int *__sched_priority)-
340{-
341-
342 if (priority == QThread::IdlePriority
priority == QT...::IdlePriorityDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
FALSEevaluated 393 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
) {
8-393
343 *sched_policy = 5;-
344 *__sched_priority = 0;-
345 return
executed 8 times by 2 tests: return true;
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
true;
executed 8 times by 2 tests: return true;
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
8
346 }-
347 const int lowestPriority = QThread::LowestPriority;-
348-
349-
350-
351 const int highestPriority = QThread::TimeCriticalPriority;-
352-
353 int prio_min;-
354 int prio_max;-
355-
356-
357-
358-
359-
360-
361-
362 {-
363 prio_min = sched_get_priority_min(*sched_policy);-
364 prio_max = sched_get_priority_max(*sched_policy);-
365 }-
366-
367 if (prio_min == -1
prio_min == -1Description
TRUEnever evaluated
FALSEevaluated 393 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
|| prio_max == -1
prio_max == -1Description
TRUEnever evaluated
FALSEevaluated 393 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
)
0-393
368 return
never executed: return false;
false;
never executed: return false;
0
369-
370 int prio;-
371-
372 prio = ((priority - lowestPriority) * (prio_max - prio_min) / highestPriority) + prio_min;-
373 prio = qMax(prio_min, qMin(prio_max, prio));-
374-
375 *__sched_priority = prio;-
376 return
executed 393 times by 10 tests: return true;
Executed by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
true;
executed 393 times by 10 tests: return true;
Executed by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
393
377}-
378-
379-
380void QThread::start(Priority priority)-
381{-
382 QThreadPrivate * const d = d_func();-
383 QMutexLocker locker(&d->mutex);-
384-
385 if (d->isInFinish
d->isInFinishDescription
TRUEnever evaluated
FALSEevaluated 620683 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
)
0-620683
386 d->thread_done.wait(locker.mutex());
never executed: d->thread_done.wait(locker.mutex());
0
387-
388 if (d->running
d->runningDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileDialog2
FALSEevaluated 620682 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
)
1-620682
389 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QFileDialog2
1
390-
391 d->running = true;-
392 d->finished = false;-
393 d->returnCode = 0;-
394 d->exited = false;-
395 d->interruptionRequested = false;-
396-
397 pthread_attr_t attr;-
398 pthread_attr_init(&attr);-
399 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);-
400-
401 d->priority = priority;-
402-
403-
404 switch (priority) {-
405 case
executed 620298 times by 512 tests: case InheritPriority:
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
InheritPriority:
executed 620298 times by 512 tests: case InheritPriority:
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620298
406 {-
407 pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);-
408 break;
executed 620298 times by 512 tests: break;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620298
409 }-
410-
411 default
executed 384 times by 10 tests: default:
Executed by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
:
executed 384 times by 10 tests: default:
Executed by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
384
412 {-
413 int sched_policy;-
414 if (pthread_attr_getschedpolicy(&attr, &sched_policy) != 0
pthread_attr_g...d_policy) != 0Description
TRUEnever evaluated
FALSEevaluated 384 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
) {
0-384
415-
416-
417 QMessageLogger(__FILE__, 596, __PRETTY_FUNCTION__).warning("QThread::start: Cannot determine default scheduler policy");-
418 break;
never executed: break;
0
419 }-
420-
421 int prio;-
422 if (!calculateUnixPriority(priority, &sched_policy, &prio)
!calculateUnix...policy, &prio)Description
TRUEnever evaluated
FALSEevaluated 384 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
) {
0-384
423-
424-
425 QMessageLogger(__FILE__, 604, __PRETTY_FUNCTION__).warning("QThread::start: Cannot determine scheduler priority range");-
426 break;
never executed: break;
0
427 }-
428-
429 sched_param sp;-
430 sp.__sched_priority = prio;-
431-
432 if (pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) != 0
pthread_attr_s...IT_SCHED) != 0Description
TRUEnever evaluated
FALSEevaluated 384 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
0-384
433 || pthread_attr_setschedpolicy(&attr, sched_policy) != 0
pthread_attr_s...d_policy) != 0Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
FALSEevaluated 381 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
3-381
434 || pthread_attr_setschedparam(&attr, &sp) != 0
pthread_attr_s...ttr, &sp) != 0Description
TRUEnever evaluated
FALSEevaluated 381 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
) {
0-381
435-
436-
437 pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);-
438 d->priority = Priority(priority | ThreadPriorityResetFlag);-
439 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
3
440 break;
executed 384 times by 10 tests: break;
Executed by:
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QPrinter
  • tst_QReadWriteLock
  • tst_QSidebar
  • tst_QThread
  • tst_languageChange
384
441 }-
442 }-
443-
444-
445-
446 if (d->stackSize > 0
d->stackSize > 0Description
TRUEnever evaluated
FALSEevaluated 620682 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
) {
0-620682
447-
448 int code = pthread_attr_setstacksize(&attr, d->stackSize);-
449-
450-
451-
452-
453 if (code
codeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
454 QMessageLogger(__FILE__, 633, __PRETTY_FUNCTION__).warning("QThread::start: Thread stack size error: %s",-
455 QString(qt_error_string(code)).toLocal8Bit().constData());-
456-
457-
458-
459 d->running = false;-
460 d->finished = false;-
461 return;
never executed: return;
0
462 }-
463 }
never executed: end of block
0
464-
465 pthread_t threadId;-
466 int code = pthread_create(&threadId, &attr, QThreadPrivate::start, this);-
467 if (code == 1
code == 1Description
TRUEnever evaluated
FALSEevaluated 620682 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
) {
0-620682
468-
469-
470-
471 pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);-
472-
473 code = pthread_create(&threadId, &attr, QThreadPrivate::start, this);-
474 }
never executed: end of block
0
475 d->data->threadId = to_HANDLE(threadId);-
476-
477 pthread_attr_destroy(&attr);-
478-
479 if (code
codeDescription
TRUEnever evaluated
FALSEevaluated 620682 times by 512 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
) {
0-620682
480 QMessageLogger(__FILE__, 659, __PRETTY_FUNCTION__).warning("QThread::start: Thread creation error: %s", QString(qt_error_string(code)).toLocal8Bit().constData());-
481-
482 d->running = false;-
483 d->finished = false;-
484 d->data->threadId = 0;-
485 }
never executed: end of block
0
486}
executed 620682 times by 512 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
620682
487-
488void QThread::terminate()-
489{-
490-
491 QThreadPrivate * const d = d_func();-
492 QMutexLocker locker(&d->mutex);-
493-
494 if (!d->data->threadId
!d->data->threadIdDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QThread
)
0-2
495 return;
never executed: return;
0
496-
497 int code = pthread_cancel(from_HANDLE<pthread_t>(d->data->threadId));-
498 if (code
codeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QThread
) {
0-2
499 QMessageLogger(__FILE__, 678, __PRETTY_FUNCTION__).warning("QThread::start: Thread termination error: %s",-
500 QString(qt_error_string((code))).toLocal8Bit().constData());-
501 }
never executed: end of block
0
502-
503}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QThread
2
504-
505bool QThread::wait(unsigned long time)-
506{-
507 QThreadPrivate * const d = d_func();-
508 QMutexLocker locker(&d->mutex);-
509-
510 if (from_HANDLE<pthread_t>(d->data->threadId) == pthread_self()
from_HANDLE<pt...pthread_self()Description
TRUEnever evaluated
FALSEevaluated 620107 times by 575 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
) {
0-620107
511 QMessageLogger(__FILE__, 690, __PRETTY_FUNCTION__).warning("QThread::wait: Thread tried to wait on itself");-
512 return
never executed: return false;
false;
never executed: return false;
0
513 }-
514-
515 if (d->finished
d->finishedDescription
TRUEevaluated 6717 times by 427 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaType
  • tst_QMutex
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPainter
  • tst_QPrinter
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QRegExp
  • tst_QSemaphore
  • tst_QSettings
  • ...
FALSEevaluated 613390 times by 252 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
|| !d->running
!d->runningDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QSharedMemory
FALSEevaluated 613380 times by 252 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
)
10-613390
516 return
executed 6727 times by 428 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaType
  • tst_QMutex
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPainter
  • tst_QPrinter
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QRegExp
  • tst_QSemaphore
  • tst_QSettings
  • ...
true;
executed 6727 times by 428 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaType
  • tst_QMutex
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPainter
  • tst_QPrinter
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QRegExp
  • tst_QSemaphore
  • tst_QSettings
  • ...
6727
517-
518 while (d->running
d->runningDescription
TRUEevaluated 613380 times by 252 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
FALSEevaluated 613307 times by 252 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
) {
613307-613380
519 if (!d->thread_done.wait(locker.mutex(), time)
!d->thread_don...mutex(), time)Description
TRUEevaluated 73 times by 4 tests
Evaluated by:
  • tst_QMutex
  • tst_QThread
  • tst_QThreadPool
  • tst_QWaitCondition
FALSEevaluated 613307 times by 252 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
)
73-613307
520 return
executed 73 times by 4 tests: return false;
Executed by:
  • tst_QMutex
  • tst_QThread
  • tst_QThreadPool
  • tst_QWaitCondition
false;
executed 73 times by 4 tests: return false;
Executed by:
  • tst_QMutex
  • tst_QThread
  • tst_QThreadPool
  • tst_QWaitCondition
73
521 }
executed 613307 times by 252 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
613307
522 return
executed 613307 times by 252 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
true;
executed 613307 times by 252 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDnsLookup_Appless
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFreeList
  • tst_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • ...
613307
523}-
524-
525void QThread::setTerminationEnabled(bool enabled)-
526{-
527 QThread *thr = currentThread();-
528 ((!(thr != 0)) ? qt_assert_x("QThread::setTerminationEnabled()", "Current thread was not started with QThread.",-
529 __FILE__-
530 ,-
531 708-
532 ) : qt_noop())-
533 ;-
534-
535 (void)thr;-
536-
537-
538-
539 pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, __null);-
540 if (enabled
enabledDescription
TRUEevaluated 166 times by 2 tests
Evaluated by:
  • tst_QThread
  • tst_QWaitCondition
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QThread
)
2-166
541 pthread_testcancel();
executed 166 times by 2 tests: pthread_testcancel();
Executed by:
  • tst_QThread
  • tst_QWaitCondition
166
542-
543}
executed 166 times by 2 tests: end of block
Executed by:
  • tst_QThread
  • tst_QWaitCondition
166
544-
545-
546void QThreadPrivate::setPriority(QThread::Priority threadPriority)-
547{-
548 priority = threadPriority;-
549-
550-
551-
552-
553 int sched_policy;-
554 sched_param param;-
555-
556 if (pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId), &sched_policy, &param) != 0
pthread_getsch..., &param) != 0Description
TRUEnever evaluated
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
) {
0-17
557-
558-
559 QMessageLogger(__FILE__, 734, __PRETTY_FUNCTION__).warning("QThread::setPriority: Cannot get scheduler parameters");-
560 return;
never executed: return;
0
561 }-
562-
563 int prio;-
564 if (!calculateUnixPriority(priority, &sched_policy, &prio)
!calculateUnix...policy, &prio)Description
TRUEnever evaluated
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
) {
0-17
565-
566-
567 QMessageLogger(__FILE__, 742, __PRETTY_FUNCTION__).warning("QThread::setPriority: Cannot determine scheduler priority range");-
568 return;
never executed: return;
0
569 }-
570-
571 param.__sched_priority = prio;-
572 int status = pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId), sched_policy, &param);-
573-
574-
575-
576 if (status == -1
status == -1Description
TRUEnever evaluated
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
&& sched_policy == 5
sched_policy == 5Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
(*__errno_location ()) == 22Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ()) == 22
(*__errno_location ()) == 22Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-17
577-
578 pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId), &sched_policy, &param);-
579 param.__sched_priority = sched_get_priority_min(sched_policy);-
580 pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId), sched_policy, &param);-
581 }
never executed: end of block
0
582-
583-
584-
585-
586}
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
17
587-
588-
589-
590-
Switch to Source codePreprocessed file

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