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-
14static_assert(bool(sizeof(pthread_t) <= sizeof(Qt::HANDLE)), "sizeof(pthread_t) <= sizeof(Qt::HANDLE)");-
15-
16enum { ThreadPriorityResetFlag = 0x80000000 };-
17static __thread QThreadData *currentThreadData = 0;-
18-
19-
20static pthread_once_t current_thread_data_once = 0;-
21static pthread_key_t current_thread_data_key;-
22-
23static void destroy_current_thread_data(void *p)-
24{-
25 pthread_setspecific(current_thread_data_key, p);-
26 QThreadData *data = static_cast<QThreadData *>(p);-
27 if (data->isAdopted
data->isAdoptedDescription
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 638678 times by 548 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_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
) {
17-638678
28 QThread *thread = data->thread;-
29 ((!(thread)) ? qt_assert("thread",__FILE__,143) : qt_noop());-
30 QThreadPrivate *thread_p = static_cast<QThreadPrivate *>(QObjectPrivate::get(thread));-
31 ((!(!thread_p->finished)) ? qt_assert("!thread_p->finished",__FILE__,145) : qt_noop());-
32 thread_p->finish(thread);-
33 }
executed 17 times by 1 test: end of block
Executed by:
  • tst_QThread
17
34 data->deref();-
35-
36-
37-
38-
39 pthread_setspecific(current_thread_data_key,-
40-
41-
42-
43 0);-
44-
45}
executed 638695 times by 548 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_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
638695
46-
47static void create_current_thread_data_key()-
48{-
49 pthread_key_create(&current_thread_data_key, destroy_current_thread_data);-
50}
executed 987 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
987
51-
52static void destroy_current_thread_data_key()-
53{-
54 pthread_once(&current_thread_data_once, create_current_thread_data_key);-
55 pthread_key_delete(current_thread_data_key);-
56-
57-
58-
59-
60 pthread_once_t pthread_once_init = 0;-
61 current_thread_data_once = pthread_once_init;-
62}
never executed: end of block
0
63namespace { 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
64-
65-
66-
67static QThreadData *get_thread_data()-
68{-
69-
70 return
executed 44576249 times by 1080 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 44576249 times by 1080 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
  • ...
44576249
71-
72-
73-
74-
75}-
76-
77static void set_thread_data(QThreadData *data)-
78{-
79-
80 currentThreadData = data;-
81-
82 pthread_once(&current_thread_data_once, create_current_thread_data_key);-
83 pthread_setspecific(current_thread_data_key, data);-
84}
executed 640087 times by 556 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
  • ...
640087
85-
86static void clear_thread_data()-
87{-
88-
89 currentThreadData = 0;-
90-
91 pthread_setspecific(current_thread_data_key, 0);-
92}
executed 893 times by 347 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
  • ...
893
93-
94template <typename T>-
95static typename QtPrivate::QEnableIf<QTypeInfo<T>::isIntegral, Qt::HANDLE>::Type to_HANDLE(T id)-
96{-
97 return
executed 14794065 times by 835 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 14794065 times by 835 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
  • ...
14794065
98}-
99-
100template <typename T>-
101static typename QtPrivate::QEnableIf<QTypeInfo<T>::isIntegral, T>::Type from_HANDLE(Qt::HANDLE id)-
102{-
103 return
executed 1277625 times by 1078 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 1277625 times by 1078 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
  • ...
1277625
104}-
105-
106template <typename T>-
107static typename QtPrivate::QEnableIf<QTypeInfo<T>::isPointer, Qt::HANDLE>::Type to_HANDLE(T id)-
108{-
109 return
never executed: return id;
id;
never executed: return id;
0
110}-
111-
112template <typename T>-
113static typename QtPrivate::QEnableIf<QTypeInfo<T>::isPointer, T>::Type from_HANDLE(Qt::HANDLE id)-
114{-
115 return
never executed: return static_cast<T>(id);
static_cast<T>(id);
never executed: return static_cast<T>(id);
0
116}-
117-
118void QThreadData::clearCurrentThreadData()-
119{-
120 clear_thread_data();-
121}
executed 893 times by 347 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
  • ...
893
122-
123QThreadData *QThreadData::current(bool createIfNecessary)-
124{-
125 QThreadData *data = get_thread_data();-
126 if (!data
!dataDescription
TRUEevaluated 1008 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 44575238 times by 1080 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 1008 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-44575238
127 data = new QThreadData;-
128 try {-
129 set_thread_data(data);-
130 data->thread = new QAdoptedThread(data);-
131 }
executed 1008 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 (...) {
1008
132 clear_thread_data();-
133 data->deref();-
134 data = 0;-
135 throw;
never executed: throw;
0
136 }-
137 data->deref();-
138 data->isAdopted = true;-
139 data->threadId = to_HANDLE(pthread_self());-
140 if (!QCoreApplicationPrivate::theMainThread
!QCoreApplicat...:theMainThreadDescription
TRUEevaluated 991 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-991
141 QCoreApplicationPrivate::theMainThread = data->thread.load();
executed 991 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
991
142 }
executed 1008 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
1008
143 return
executed 44576249 times by 1080 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 44576249 times by 1080 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
  • ...
44576249
144}-
145-
146-
147void QAdoptedThread::init()-
148{-
149}-
150-
151-
152-
153-
154-
155extern "C" {-
156typedef void*(*QtThreadCallback)(void*);-
157}-
158-
159-
160-
161void QThreadPrivate::createEventDispatcher(QThreadData *data)-
162{-
163 if (qEnvironmentVariableIsEmpty("QT_NO_GLIB")
qEnvironmentVa...("QT_NO_GLIB")Description
TRUEevaluated 639080 times by 545 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-639080
164 && qEnvironmentVariableIsEmpty("QT_NO_THREADED_GLIB")
qEnvironmentVa...HREADED_GLIB")Description
TRUEevaluated 639080 times by 545 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-639080
165 && QEventDispatcherGlib::versionSupported()
QEventDispatch...ionSupported()Description
TRUEevaluated 639080 times by 545 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-639080
166 data->eventDispatcher.storeRelease(new QEventDispatcherGlib);
executed 639080 times by 545 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
  • ...
639080
167 else-
168 data->eventDispatcher.storeRelease(new QEventDispatcherUNIX);
never executed: data->eventDispatcher.storeRelease(new QEventDispatcherUNIX);
0
169-
170-
171-
172-
173 data->eventDispatcher.load()->startingUp();-
174}
executed 639080 times by 545 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
  • ...
639080
175-
176-
177-
178-
179static void setCurrentThreadName(pthread_t threadId, const char *name)-
180{-
181-
182 (void)threadId;;-
183 prctl(15, (unsigned long)name, 0, 0, 0);-
184-
185-
186-
187-
188-
189-
190}
executed 639079 times by 545 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
  • ...
639079
191-
192-
193void *QThreadPrivate::start(void *arg)-
194{-
195-
196 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, __null);-
197-
198 do { __pthread_cleanup_class __clframe (QThreadPrivate::finish, arg);-
199-
200 QThread *thr = reinterpret_cast<QThread *>(arg);-
201 QThreadData *data = QThreadData::get2(thr);-
202-
203 {-
204 QMutexLocker locker(&thr->d_func()->mutex);-
205-
206-
207 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 639076 times by 545 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-639076
208 thr->d_func()->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag));-
209 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
3
210-
211 data->threadId = to_HANDLE(pthread_self());-
212 set_thread_data(data);-
213-
214 data->ref();-
215 data->quitNow = thr->d_func()->exited;-
216 }-
217-
218 if (data->eventDispatcher.load()
data->eventDispatcher.load()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 639078 times by 545 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-639078
219 data->eventDispatcher.load()->startingUp();
executed 1 time by 1 test: data->eventDispatcher.load()->startingUp();
Executed by:
  • tst_QThread
1
220 else-
221 createEventDispatcher(data);
executed 639078 times by 545 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
  • ...
639078
222-
223-
224 {-
225-
226 QString objectName = thr->objectName();-
227-
228 pthread_t thread_id = from_HANDLE<pthread_t>(data->threadId);-
229 if (__builtin_expect(!!(objectName.isEmpty()), true)
__builtin_expe...mpty()), true)Description
TRUEevaluated 637145 times by 545 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 1934 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
  • ...
)
1934-637145
230 setCurrentThreadName(thread_id, thr->metaObject()->className());
executed 637145 times by 545 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
  • ...
637145
231 else-
232 setCurrentThreadName(thread_id, objectName.toLocal8Bit());
executed 1934 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
  • ...
1934
233 }-
234-
235-
236 thr->started(QThread::QPrivateSignal());-
237-
238 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, __null);-
239 pthread_testcancel();-
240-
241 thr->run();-
242-
243 __clframe.__setdoit (1); } while (0);-
244-
245 return
executed 638676 times by 548 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_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
0;
executed 638676 times by 548 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_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
638676
246}-
247-
248void QThreadPrivate::finish(void *arg)-
249{-
250 QThread *thr = reinterpret_cast<QThread *>(arg);-
251 QThreadPrivate *d = thr->d_func();-
252-
253 QMutexLocker locker(&d->mutex);-
254-
255 d->isInFinish = true;-
256 d->priority = QThread::InheritPriority;-
257 void *data = &d->data->tls;-
258 locker.unlock();-
259 thr->finished(QThread::QPrivateSignal());-
260 QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);-
261 QThreadStorageData::finish((void **)data);-
262 locker.relock();-
263-
264 QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher.load();-
265 if (eventDispatcher
eventDispatcherDescription
TRUEevaluated 639248 times by 611 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-639248
266 d->data->eventDispatcher = 0;-
267 locker.unlock();-
268 eventDispatcher->closingDown();-
269 delete eventDispatcher;-
270 locker.relock();-
271 }
executed 639248 times by 611 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
  • ...
639248
272-
273 d->running = false;-
274 d->finished = true;-
275 d->interruptionRequested = false;-
276-
277 d->isInFinish = false;-
278 d->thread_done.wakeAll();-
279}
executed 639263 times by 611 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
  • ...
639263
280Qt::HANDLE QThread::currentThreadId() noexcept-
281{-
282-
283 return
executed 13514900 times by 600 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 13514900 times by 600 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
  • ...
13514900
284}-
285-
286-
287-
288-
289-
290-
291int QThread::idealThreadCount() noexcept-
292{-
293 int cores = 1;-
294 cores = (int)sysconf(_SC_NPROCESSORS_ONLN);-
295 if (cores == -1
cores == -1Description
TRUEnever evaluated
FALSEevaluated 1705 times by 448 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-1705
296 return
never executed: return 1;
1;
never executed: return 1;
0
297-
298 return
executed 1705 times by 448 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 1705 times by 448 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
  • ...
1705
299}-
300-
301void QThread::yieldCurrentThread()-
302{-
303 sched_yield();-
304}
executed 1556 times by 3 tests: end of block
Executed by:
  • tst_QSqlThread
  • tst_QVector
  • tst_QVector_StrictIterators
1556
305-
306static timespec makeTimespec(time_t secs, long nsecs)-
307{-
308 struct timespec ts;-
309 ts.tv_sec = secs;-
310 ts.tv_nsec = nsecs;-
311 return
executed 326438 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 326438 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
326438
312}-
313-
314void QThread::sleep(unsigned long secs)-
315{-
316 qt_nanosleep(makeTimespec(secs, 0));-
317}
executed 7 times by 3 tests: end of block
Executed by:
  • tst_QProcess
  • tst_QTcpServer
  • tst_QThread
7
318-
319void QThread::msleep(unsigned long msecs)-
320{-
321 qt_nanosleep(makeTimespec(msecs / 1000, msecs % 1000 * 1000 * 1000));-
322}
executed 296435 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
296435
323-
324void QThread::usleep(unsigned long usecs)-
325{-
326 qt_nanosleep(makeTimespec(usecs / 1000 / 1000, usecs % (1000*1000) * 1000));-
327}
executed 29996 times by 3 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QSharedPointer
  • tst_QThread
29996
328-
329-
330-
331-
332-
333static bool calculateUnixPriority(int priority, int *sched_policy, int *__sched_priority)-
334{-
335-
336 if (priority == QThread::IdlePriority
priority == QT...::IdlePriorityDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QReadWriteLock
  • tst_QThread
FALSEevaluated 392 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-392
337 *sched_policy = 5;-
338 *__sched_priority = 0;-
339 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
340 }-
341 const int lowestPriority = QThread::LowestPriority;-
342-
343-
344-
345 const int highestPriority = QThread::TimeCriticalPriority;-
346-
347 int prio_min;-
348 int prio_max;-
349-
350-
351-
352-
353-
354-
355-
356 {-
357 prio_min = sched_get_priority_min(*sched_policy);-
358 prio_max = sched_get_priority_max(*sched_policy);-
359 }-
360-
361 if (prio_min == -1
prio_min == -1Description
TRUEnever evaluated
FALSEevaluated 392 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 392 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-392
362 return
never executed: return false;
false;
never executed: return false;
0
363-
364 int prio;-
365-
366 prio = ((priority - lowestPriority) * (prio_max - prio_min) / highestPriority) + prio_min;-
367 prio = qMax(prio_min, qMin(prio_max, prio));-
368-
369 *__sched_priority = prio;-
370 return
executed 392 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 392 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
392
371}-
372-
373-
374void QThread::start(Priority priority)-
375{-
376 QThreadPrivate * const d = d_func();-
377 QMutexLocker locker(&d->mutex);-
378-
379 if (d->isInFinish
d->isInFinishDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 639078 times by 545 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-639078
380 d->thread_done.wait(locker.mutex());
executed 1 time by 1 test: d->thread_done.wait(locker.mutex());
Executed by:
  • tst_QThread
1
381-
382 if (d->running
d->runningDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileDialog2
FALSEevaluated 639078 times by 545 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-639078
383 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QFileDialog2
1
384-
385 d->running = true;-
386 d->finished = false;-
387 d->returnCode = 0;-
388 d->exited = false;-
389 d->interruptionRequested = false;-
390-
391 pthread_attr_t attr;-
392 pthread_attr_init(&attr);-
393 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);-
394-
395 d->priority = priority;-
396-
397-
398 switch (priority) {-
399 case
executed 638695 times by 545 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 638695 times by 545 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
  • ...
638695
400 {-
401 pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);-
402 break;
executed 638695 times by 545 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
  • ...
638695
403 }-
404-
405 default
executed 383 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 383 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
383
406 {-
407 int sched_policy;-
408 if (pthread_attr_getschedpolicy(&attr, &sched_policy) != 0
pthread_attr_g...d_policy) != 0Description
TRUEnever evaluated
FALSEevaluated 383 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-383
409-
410-
411 QMessageLogger(__FILE__, 593, __PRETTY_FUNCTION__).warning("QThread::start: Cannot determine default scheduler policy");-
412 break;
never executed: break;
0
413 }-
414-
415 int prio;-
416 if (!calculateUnixPriority(priority, &sched_policy, &prio)
!calculateUnix...policy, &prio)Description
TRUEnever evaluated
FALSEevaluated 383 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-383
417-
418-
419 QMessageLogger(__FILE__, 601, __PRETTY_FUNCTION__).warning("QThread::start: Cannot determine scheduler priority range");-
420 break;
never executed: break;
0
421 }-
422-
423 sched_param sp;-
424 sp.__sched_priority = prio;-
425-
426 if (pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) != 0
pthread_attr_s...IT_SCHED) != 0Description
TRUEnever evaluated
FALSEevaluated 383 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-383
427 || 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 380 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-380
428 || pthread_attr_setschedparam(&attr, &sp) != 0
pthread_attr_s...ttr, &sp) != 0Description
TRUEnever evaluated
FALSEevaluated 380 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-380
429-
430-
431 pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);-
432 d->priority = Priority(priority | ThreadPriorityResetFlag);-
433 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
3
434 break;
executed 383 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
383
435 }-
436 }-
437-
438-
439-
440 if (d->stackSize > 0
d->stackSize > 0Description
TRUEnever evaluated
FALSEevaluated 639078 times by 545 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-639078
441-
442 int code = pthread_attr_setstacksize(&attr, d->stackSize);-
443-
444-
445-
446-
447 if (code
codeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
448 QMessageLogger(__FILE__, 630, __PRETTY_FUNCTION__).warning("QThread::start: Thread stack size error: %s",-
449 QString(qt_error_string(code)).toLocal8Bit().constData());-
450-
451-
452-
453 d->running = false;-
454 d->finished = false;-
455 return;
never executed: return;
0
456 }-
457 }
never executed: end of block
0
458-
459 pthread_t threadId;-
460 int code = pthread_create(&threadId, &attr, QThreadPrivate::start, this);-
461 if (code == 1
code == 1Description
TRUEnever evaluated
FALSEevaluated 639078 times by 545 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-639078
462-
463-
464-
465 pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);-
466-
467 code = pthread_create(&threadId, &attr, QThreadPrivate::start, this);-
468 }
never executed: end of block
0
469 d->data->threadId = to_HANDLE(threadId);-
470-
471 pthread_attr_destroy(&attr);-
472-
473 if (code
codeDescription
TRUEnever evaluated
FALSEevaluated 639078 times by 545 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-639078
474 QMessageLogger(__FILE__, 656, __PRETTY_FUNCTION__).warning("QThread::start: Thread creation error: %s", QString(qt_error_string(code)).toLocal8Bit().constData());-
475-
476 d->running = false;-
477 d->finished = false;-
478 d->data->threadId = 0;-
479 }
never executed: end of block
0
480}
executed 639078 times by 545 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
  • ...
639078
481-
482void QThread::terminate()-
483{-
484-
485 QThreadPrivate * const d = d_func();-
486 QMutexLocker locker(&d->mutex);-
487-
488 if (!d->data->threadId
!d->data->threadIdDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QThread
)
0-2
489 return;
never executed: return;
0
490-
491 int code = pthread_cancel(from_HANDLE<pthread_t>(d->data->threadId));-
492 if (code
codeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QThread
) {
0-2
493 QMessageLogger(__FILE__, 675, __PRETTY_FUNCTION__).warning("QThread::start: Thread termination error: %s",-
494 QString(qt_error_string((code))).toLocal8Bit().constData());-
495 }
never executed: end of block
0
496-
497}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QThread
2
498-
499bool QThread::wait(unsigned long time)-
500{-
501 QThreadPrivate * const d = d_func();-
502 QMutexLocker locker(&d->mutex);-
503-
504 if (from_HANDLE<pthread_t>(d->data->threadId) == pthread_self()
from_HANDLE<pt...pthread_self()Description
TRUEnever evaluated
FALSEevaluated 638510 times by 608 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-638510
505 QMessageLogger(__FILE__, 687, __PRETTY_FUNCTION__).warning("QThread::wait: Thread tried to wait on itself");-
506 return
never executed: return false;
false;
never executed: return false;
0
507 }-
508-
509 if (d->finished
d->finishedDescription
TRUEevaluated 6747 times by 470 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • 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
  • ...
FALSEevaluated 631763 times by 231 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 631753 times by 231 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-631763
510 return
executed 6757 times by 471 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_QGuiEventLoop
  • 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
  • ...
true;
executed 6757 times by 471 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_QGuiEventLoop
  • 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
  • ...
6757
511-
512 while (d->running
d->runningDescription
TRUEevaluated 631753 times by 231 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 631680 times by 231 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
  • ...
) {
631680-631753
513 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 631680 times by 231 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-631680
514 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
515 }
executed 631680 times by 231 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
  • ...
631680
516 return
executed 631680 times by 231 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 631680 times by 231 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
  • ...
631680
517}-
518-
519void QThread::setTerminationEnabled(bool enabled)-
520{-
521 QThread *thr = currentThread();-
522 ((!(thr != 0)) ? qt_assert_x("QThread::setTerminationEnabled()", "Current thread was not started with QThread.",-
523 __FILE__-
524 ,-
525 705-
526 ) : qt_noop())-
527 ;-
528-
529 (void)thr;-
530-
531-
532-
533 pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, __null);-
534 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
535 pthread_testcancel();
executed 166 times by 2 tests: pthread_testcancel();
Executed by:
  • tst_QThread
  • tst_QWaitCondition
166
536-
537}
executed 166 times by 2 tests: end of block
Executed by:
  • tst_QThread
  • tst_QWaitCondition
166
538-
539-
540void QThreadPrivate::setPriority(QThread::Priority threadPriority)-
541{-
542 priority = threadPriority;-
543-
544-
545-
546-
547 int sched_policy;-
548 sched_param param;-
549-
550 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
551-
552-
553 QMessageLogger(__FILE__, 731, __PRETTY_FUNCTION__).warning("QThread::setPriority: Cannot get scheduler parameters");-
554 return;
never executed: return;
0
555 }-
556-
557 int prio;-
558 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
559-
560-
561 QMessageLogger(__FILE__, 739, __PRETTY_FUNCTION__).warning("QThread::setPriority: Cannot determine scheduler priority range");-
562 return;
never executed: return;
0
563 }-
564-
565 param.__sched_priority = prio;-
566 int status = pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId), sched_policy, &param);-
567-
568-
569-
570 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
571-
572 pthread_getschedparam(from_HANDLE<pthread_t>(data->threadId), &sched_policy, &param);-
573 param.__sched_priority = sched_get_priority_min(sched_policy);-
574 pthread_setschedparam(from_HANDLE<pthread_t>(data->threadId), sched_policy, &param);-
575 }
never executed: end of block
0
576-
577-
578-
579-
580}
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QReadWriteLock
  • tst_QThread
17
581-
582-
583-
584-
Switch to Source codePreprocessed file

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