qthread.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/thread/qthread.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include "qthread.h"-
42#include "qthreadstorage.h"-
43#include "qmutex.h"-
44#include "qreadwritelock.h"-
45#include "qabstracteventdispatcher.h"-
46-
47#include <qeventloop.h>-
48-
49#include "qthread_p.h"-
50#include "private/qcoreapplication_p.h"-
51-
52QT_BEGIN_NAMESPACE-
53-
54/*-
55 QThreadData-
56*/-
57-
58QThreadData::QThreadData(int initialRefCount)-
59 : _ref(initialRefCount), loopLevel(0), scopeLevel(0), thread(0), threadId(0),-
60 eventDispatcher(0),-
61 quitNow(false), canWait(true), isAdopted(false), requiresCoreApplication(true)-
62{-
63 // fprintf(stderr, "QThreadData %p created\n", this);-
64}
executed 582058 times by 680 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
  • ...
582058
65-
66QThreadData::~QThreadData()-
67{-
68 Q_ASSERT(_ref.load() == 0);-
69-
70 // In the odd case that Qt is running on a secondary thread, the main-
71 // thread instance will have been dereffed asunder because of the deref in-
72 // QThreadData::current() and the deref in the pthread_destroy. To avoid-
73 // crashing during QCoreApplicationData's global static cleanup we need to-
74 // safeguard the main thread here.. This fix is a bit crude, but it solves-
75 // the problem...-
76 if (this->thread == QCoreApplicationPrivate::theMainThread) {
this->thread =...:theMainThreadDescription
TRUEevaluated 1087 times by 346 tests
Evaluated 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
  • ...
FALSEevaluated 580368 times by 510 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_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
1087-580368
77 QCoreApplicationPrivate::theMainThread = 0;-
78 QThreadData::clearCurrentThreadData();-
79 }
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
80-
81 QThread *t = thread;-
82 thread = 0;-
83 delete t;-
84-
85 for (int i = 0; i < postEventList.size(); ++i) {
i < postEventList.size()Description
TRUEevaluated 1502 times by 49 tests
Evaluated by:
  • tst_QDBusPendingCall
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QTcpSocket
  • tst_QThread
  • tst_Spdy
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdial - unknown status
  • tst_qdirmodel - unknown status
  • tst_qerrormessage - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • ...
FALSEevaluated 581455 times by 546 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_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
1502-581455
86 const QPostEvent &pe = postEventList.at(i);-
87 if (pe.event) {
pe.eventDescription
TRUEnever evaluated
FALSEevaluated 1502 times by 49 tests
Evaluated by:
  • tst_QDBusPendingCall
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QTcpSocket
  • tst_QThread
  • tst_Spdy
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdial - unknown status
  • tst_qdirmodel - unknown status
  • tst_qerrormessage - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • ...
0-1502
88 --pe.receiver->d_func()->postedEvents;-
89 pe.event->posted = false;-
90 delete pe.event;-
91 }
never executed: end of block
0
92 }
executed 1502 times by 49 tests: end of block
Executed by:
  • tst_QDBusPendingCall
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QTcpSocket
  • tst_QThread
  • tst_Spdy
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdial - unknown status
  • tst_qdirmodel - unknown status
  • tst_qerrormessage - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • ...
1502
93-
94 // fprintf(stderr, "QThreadData %p destroyed\n", this);-
95}
executed 581455 times by 546 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_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
581455
96-
97void QThreadData::ref()-
98{-
99#ifndef QT_NO_THREAD-
100 (void) _ref.ref();-
101 Q_ASSERT(_ref.load() != 0);-
102#endif-
103}
executed 2663175 times by 912 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
  • ...
2663175
104-
105void QThreadData::deref()-
106{-
107#ifndef QT_NO_THREAD-
108 if (!_ref.deref())
!_ref.deref()Description
TRUEevaluated 581455 times by 546 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_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
FALSEevaluated 2661634 times by 895 tests
Evaluated by:
  • 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_QAnimationGroup
  • tst_QApplication
  • tst_QAsn1Element
  • ...
581455-2661634
109 delete this;
executed 581455 times by 546 tests: delete this;
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_QFuture
  • tst_QGlobalStatic
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QLocalSocket
  • tst_QLogging
  • tst_QMetaObject
  • tst_QMetaType
  • tst_QMutex
  • tst_QMutexLocker
  • ...
581455
110#endif-
111}
executed 3243089 times by 895 tests: end of block
Executed by:
  • 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_QAnimationGroup
  • tst_QApplication
  • tst_QAsn1Element
  • ...
3243089
112-
113/*-
114 QAdoptedThread-
115*/-
116-
117QAdoptedThread::QAdoptedThread(QThreadData *data)-
118 : QThread(*new QThreadPrivate(data))-
119{-
120 // thread should be running and not finished for the lifetime-
121 // of the application (even if QCoreApplication goes away)-
122#ifndef QT_NO_THREAD-
123 d_func()->running = true;-
124 d_func()->finished = false;-
125 init();-
126#endif-
127-
128 // fprintf(stderr, "new QAdoptedThread = %p\n", this);-
129}
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
130-
131QAdoptedThread::~QAdoptedThread()-
132{-
133 // fprintf(stderr, "~QAdoptedThread = %p\n", this);-
134}-
135-
136void QAdoptedThread::run()-
137{-
138 // this function should never be called-
139 qFatal("QAdoptedThread::run(): Internal error, this implementation should never be called.");-
140}
never executed: end of block
0
141#ifndef QT_NO_THREAD-
142/*-
143 QThreadPrivate-
144*/-
145-
146QThreadPrivate::QThreadPrivate(QThreadData *d)-
147 : QObjectPrivate(), running(false), finished(false),-
148 isInFinish(false), interruptionRequested(false),-
149 exited(false), returnCode(-1),-
150 stackSize(0), priority(QThread::InheritPriority), data(d)-
151{-
152#if defined (Q_OS_WIN)-
153 handle = 0;-
154# ifndef Q_OS_WINRT-
155 id = 0;-
156# endif-
157 waiters = 0;-
158 terminationEnabled = true;-
159 terminatePending = false;-
160#endif-
161-
162 if (!data)
!dataDescription
TRUEevaluated 580705 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 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
1125-580705
163 data = new QThreadData;
executed 580705 times by 512 tests: data = new QThreadData;
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
  • ...
580705
164}
executed 581830 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
  • ...
581830
165-
166QThreadPrivate::~QThreadPrivate()-
167{-
168 data->deref();-
169}
executed 581949 times by 576 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
  • ...
581949
170-
171/*!-
172 \class QThread-
173 \inmodule QtCore-
174 \brief The QThread class provides a platform-independent way to-
175 manage threads.-
176-
177 \ingroup thread-
178-
179 A QThread object manages one thread of control within the-
180 program. QThreads begin executing in run(). By default, run() starts the-
181 event loop by calling exec() and runs a Qt event loop inside the thread.-
182-
183 You can use worker objects by moving them to the thread using-
184 QObject::moveToThread().-
185-
186 \snippet code/src_corelib_thread_qthread.cpp worker-
187-
188 The code inside the Worker's slot would then execute in a-
189 separate thread. However, you are free to connect the-
190 Worker's slots to any signal, from any object, in any thread. It-
191 is safe to connect signals and slots across different threads,-
192 thanks to a mechanism called \l{Qt::QueuedConnection}{queued-
193 connections}.-
194-
195 Another way to make code run in a separate thread, is to subclass QThread-
196 and reimplement run(). For example:-
197-
198 \snippet code/src_corelib_thread_qthread.cpp reimpl-run-
199-
200 In that example, the thread will exit after the run function has returned.-
201 There will not be any event loop running in the thread unless you call-
202 exec().-
203-
204 It is important to remember that a QThread instance \l{QObject#Thread-
205 Affinity}{lives in} the old thread that instantiated it, not in the-
206 new thread that calls run(). This means that all of QThread's queued-
207 slots will execute in the old thread. Thus, a developer who wishes to-
208 invoke slots in the new thread must use the worker-object approach; new-
209 slots should not be implemented directly into a subclassed QThread.-
210-
211 When subclassing QThread, keep in mind that the constructor executes in-
212 the old thread while run() executes in the new thread. If a member-
213 variable is accessed from both functions, then the variable is accessed-
214 from two different threads. Check that it is safe to do so.-
215-
216 \note Care must be taken when interacting with objects across different-
217 threads. See \l{Synchronizing Threads} for details.-
218-
219 \section1 Managing Threads-
220-
221 QThread will notifiy you via a signal when the thread is-
222 started() and finished(), or you can use isFinished() and-
223 isRunning() to query the state of the thread.-
224-
225 You can stop the thread by calling exit() or quit(). In extreme-
226 cases, you may want to forcibly terminate() an executing thread.-
227 However, doing so is dangerous and discouraged. Please read the-
228 documentation for terminate() and setTerminationEnabled() for-
229 detailed information.-
230-
231 From Qt 4.8 onwards, it is possible to deallocate objects that-
232 live in a thread that has just ended, by connecting the-
233 finished() signal to QObject::deleteLater().-
234-
235 Use wait() to block the calling thread, until the other thread-
236 has finished execution (or until a specified time has passed).-
237-
238 QThread also provides static, platform independent sleep-
239 functions: sleep(), msleep(), and usleep() allow full second,-
240 millisecond, and microsecond resolution respectively. These-
241 functions were made public in Qt 5.0.-
242-
243 \note wait() and the sleep() functions should be unnecessary in-
244 general, since Qt is an event-driven framework. Instead of-
245 wait(), consider listening for the finished() signal. Instead of-
246 the sleep() functions, consider using QTimer.-
247-
248 The static functions currentThreadId() and currentThread() return-
249 identifiers for the currently executing thread. The former-
250 returns a platform specific ID for the thread; the latter returns-
251 a QThread pointer.-
252-
253 To choose the name that your thread will be given (as identified-
254 by the command \c{ps -L} on Linux, for example), you can call-
255 \l{QObject::setObjectName()}{setObjectName()} before starting the thread.-
256 If you don't call \l{QObject::setObjectName()}{setObjectName()},-
257 the name given to your thread will be the class name of the runtime-
258 type of your thread object (for example, \c "RenderThread" in the case of the-
259 \l{Mandelbrot Example}, as that is the name of the QThread subclass).-
260 Note that this is currently not available with release builds on Windows.-
261-
262 \sa {Thread Support in Qt}, QThreadStorage, {Synchronizing Threads},-
263 {Mandelbrot Example}, {Semaphores Example}, {Wait Conditions Example}-
264*/-
265-
266/*!-
267 \fn Qt::HANDLE QThread::currentThreadId()-
268-
269 Returns the thread handle of the currently executing thread.-
270-
271 \warning The handle returned by this function is used for internal-
272 purposes and should not be used in any application code.-
273-
274 \warning On Windows, the returned value is a pseudo-handle for the-
275 current thread. It can't be used for numerical comparison. i.e.,-
276 this function returns the DWORD (Windows-Thread ID) returned by-
277 the Win32 function getCurrentThreadId(), not the HANDLE-
278 (Windows-Thread HANDLE) returned by the Win32 function-
279 getCurrentThread().-
280*/-
281-
282/*!-
283 \fn int QThread::idealThreadCount()-
284-
285 Returns the ideal number of threads that can be run on the system. This is done querying-
286 the number of processor cores, both real and logical, in the system. This function returns -1-
287 if the number of processor cores could not be detected.-
288*/-
289-
290/*!-
291 \fn void QThread::yieldCurrentThread()-
292-
293 Yields execution of the current thread to another runnable thread,-
294 if any. Note that the operating system decides to which thread to-
295 switch.-
296*/-
297-
298/*!-
299 \fn void QThread::start(Priority priority)-
300-
301 Begins execution of the thread by calling run(). The-
302 operating system will schedule the thread according to the \a-
303 priority parameter. If the thread is already running, this-
304 function does nothing.-
305-
306 The effect of the \a priority parameter is dependent on the-
307 operating system's scheduling policy. In particular, the \a priority-
308 will be ignored on systems that do not support thread priorities-
309 (such as on Linux, see the-
310 \l {http://linux.die.net/man/2/sched_setscheduler}{sched_setscheduler}-
311 documentation for more details).-
312-
313 \sa run(), terminate()-
314*/-
315-
316/*!-
317 \fn void QThread::started()-
318-
319 This signal is emitted from the associated thread when it starts executing,-
320 before the run() function is called.-
321-
322 \sa finished()-
323*/-
324-
325/*!-
326 \fn void QThread::finished()-
327-
328 This signal is emitted from the associated thread right before it finishes executing.-
329-
330 When this signal is emitted, the event loop has already stopped running.-
331 No more events will be processed in the thread, except for deferred deletion events.-
332 This signal can be connected to QObject::deleteLater(), to free objects in that thread.-
333-
334 \note If the associated thread was terminated using terminate(), it is undefined from-
335 which thread this signal is emitted.-
336-
337 \sa started()-
338*/-
339-
340/*!-
341 \enum QThread::Priority-
342-
343 This enum type indicates how the operating system should schedule-
344 newly created threads.-
345-
346 \value IdlePriority scheduled only when no other threads are-
347 running.-
348-
349 \value LowestPriority scheduled less often than LowPriority.-
350 \value LowPriority scheduled less often than NormalPriority.-
351-
352 \value NormalPriority the default priority of the operating-
353 system.-
354-
355 \value HighPriority scheduled more often than NormalPriority.-
356 \value HighestPriority scheduled more often than HighPriority.-
357-
358 \value TimeCriticalPriority scheduled as often as possible.-
359-
360 \value InheritPriority use the same priority as the creating-
361 thread. This is the default.-
362*/-
363-
364/*!-
365 Returns a pointer to a QThread which manages the currently-
366 executing thread.-
367*/-
368QThread *QThread::currentThread()-
369{-
370 QThreadData *data = QThreadData::current();-
371 Q_ASSERT(data != 0);-
372 return data->thread;
executed 5073604 times by 735 tests: return data->thread;
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
  • ...
5073604
373}-
374-
375/*!-
376 Constructs a new QThread to manage a new thread. The \a parent-
377 takes ownership of the QThread. The thread does not begin-
378 executing until start() is called.-
379-
380 \sa start()-
381*/-
382QThread::QThread(QObject *parent)-
383 : QObject(*(new QThreadPrivate), parent)-
384{-
385 Q_D(QThread);-
386 // fprintf(stderr, "QThreadData %p created for thread %p\n", d->data, this);-
387 d->data->thread = this;-
388}
executed 580705 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
  • ...
580705
389-
390/*!-
391 \internal-
392 */-
393QThread::QThread(QThreadPrivate &dd, QObject *parent)-
394 : QObject(dd, parent)-
395{-
396 Q_D(QThread);-
397 // fprintf(stderr, "QThreadData %p taken from private data for thread %p\n", d->data, this);-
398 d->data->thread = this;-
399}
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
400-
401/*!-
402 Destroys the QThread.-
403-
404 Note that deleting a QThread object will not stop the execution-
405 of the thread it manages. Deleting a running QThread (i.e.-
406 isFinished() returns \c false) will probably result in a program-
407 crash. Wait for the finished() signal before deleting the-
408 QThread.-
409*/-
410QThread::~QThread()-
411{-
412 Q_D(QThread);-
413 {-
414 QMutexLocker locker(&d->mutex);-
415 if (d->isInFinish) {
d->isInFinishDescription
TRUEevaluated 57 times by 5 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QDBusThreading
  • tst_QGuiApplication
  • tst_QNetworkProxyFactory
  • tst_QThread
FALSEevaluated 581892 times by 576 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
  • ...
57-581892
416 locker.unlock();-
417 wait();-
418 locker.relock();-
419 }
executed 57 times by 5 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QDBusThreading
  • tst_QGuiApplication
  • tst_QNetworkProxyFactory
  • tst_QThread
57
420 if (d->running && !d->finished && !d->data->isAdopted)
d->runningDescription
TRUEevaluated 1087 times by 346 tests
Evaluated 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
  • ...
FALSEevaluated 580862 times by 576 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->finishedDescription
TRUEevaluated 1087 times by 346 tests
Evaluated 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
  • ...
FALSEnever evaluated
!d->data->isAdoptedDescription
TRUEnever evaluated
FALSEevaluated 1087 times by 346 tests
Evaluated 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
  • ...
0-580862
421 qWarning("QThread: Destroyed while thread is still running");
never executed: QMessageLogger(__FILE__, 421, __PRETTY_FUNCTION__).warning("QThread: Destroyed while thread is still running");
0
422-
423 d->data->thread = 0;-
424 }-
425}
executed 581949 times by 576 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
  • ...
581949
426-
427/*!-
428 Returns \c true if the thread is finished; otherwise returns \c false.-
429-
430 \sa isRunning()-
431*/-
432bool QThread::isFinished() const-
433{-
434 Q_D(const QThread);-
435 QMutexLocker locker(&d->mutex);-
436 return d->finished || d->isInFinish;
executed 384051 times by 14 tests: return d->finished || d->isInFinish;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSemaphore
  • tst_QSharedMemory
  • tst_QThread
  • tst_QWaitCondition
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_spdy - unknown status
384051
437}-
438-
439/*!-
440 Returns \c true if the thread is running; otherwise returns \c false.-
441-
442 \sa isFinished()-
443*/-
444bool QThread::isRunning() const-
445{-
446 Q_D(const QThread);-
447 QMutexLocker locker(&d->mutex);-
448 return d->running && !d->isInFinish;
executed 686 times by 227 tests: return d->running && !d->isInFinish;
Executed by:
  • tst_QApplication
  • tst_QGLThreads
  • tst_QGuiApplication
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QSemaphore
  • tst_QSslSocket
  • tst_QStateMachine
  • tst_QThread
  • tst_QWaitCondition
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
686
449}-
450-
451/*!-
452 Sets the maximum stack size for the thread to \a stackSize. If \a-
453 stackSize is greater than zero, the maximum stack size is set to-
454 \a stackSize bytes, otherwise the maximum stack size is-
455 automatically determined by the operating system.-
456-
457 \warning Most operating systems place minimum and maximum limits-
458 on thread stack sizes. The thread will fail to start if the stack-
459 size is outside these limits.-
460-
461 \sa stackSize()-
462*/-
463void QThread::setStackSize(uint stackSize)-
464{-
465 Q_D(QThread);-
466 QMutexLocker locker(&d->mutex);-
467 Q_ASSERT_X(!d->running, "QThread::setStackSize",-
468 "cannot change stack size while the thread is running");-
469 d->stackSize = stackSize;-
470}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QThread
2
471-
472/*!-
473 Returns the maximum stack size for the thread (if set with-
474 setStackSize()); otherwise returns zero.-
475-
476 \sa setStackSize()-
477*/-
478uint QThread::stackSize() const-
479{-
480 Q_D(const QThread);-
481 QMutexLocker locker(&d->mutex);-
482 return d->stackSize;
executed 3 times by 1 test: return d->stackSize;
Executed by:
  • tst_QThread
3
483}-
484-
485/*!-
486 Enters the event loop and waits until exit() is called, returning the value-
487 that was passed to exit(). The value returned is 0 if exit() is called via-
488 quit().-
489-
490 This function is meant to be called from within run(). It is necessary to-
491 call this function to start event handling.-
492-
493 \sa quit(), exit()-
494*/-
495int QThread::exec()-
496{-
497 Q_D(QThread);-
498 QMutexLocker locker(&d->mutex);-
499 d->data->quitNow = false;-
500 if (d->exited) {
d->exitedDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QThread
FALSEevaluated 938 times by 173 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • ...
28-938
501 d->exited = false;-
502 return d->returnCode;
executed 28 times by 2 tests: return d->returnCode;
Executed by:
  • tst_QNetworkReply
  • tst_QThread
28
503 }-
504 locker.unlock();-
505-
506 QEventLoop eventLoop;-
507 int returnCode = eventLoop.exec();-
508-
509 locker.relock();-
510 d->exited = false;-
511 d->returnCode = -1;-
512 return returnCode;
executed 944 times by 188 tests: return returnCode;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QProcess
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • ...
944
513}-
514-
515/*!-
516 Tells the thread's event loop to exit with a return code.-
517-
518 After calling this function, the thread leaves the event loop and-
519 returns from the call to QEventLoop::exec(). The-
520 QEventLoop::exec() function returns \a returnCode.-
521-
522 By convention, a \a returnCode of 0 means success, any non-zero value-
523 indicates an error.-
524-
525 Note that unlike the C library function of the same name, this-
526 function \e does return to the caller -- it is event processing-
527 that stops.-
528-
529 No QEventLoops will be started anymore in this thread until-
530 QThread::exec() has been called again. If the eventloop in QThread::exec()-
531 is not running then the next call to QThread::exec() will also return-
532 immediately.-
533-
534 \sa quit(), QEventLoop-
535*/-
536void QThread::exit(int returnCode)-
537{-
538 Q_D(QThread);-
539 QMutexLocker locker(&d->mutex);-
540 d->exited = true;-
541 d->returnCode = returnCode;-
542 d->data->quitNow = true;-
543 for (int i = 0; i < d->data->eventLoops.size(); ++i) {
i < d->data->eventLoops.size()Description
TRUEevaluated 948 times by 188 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QProcess
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • ...
FALSEevaluated 983 times by 188 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QProcess
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • ...
948-983
544 QEventLoop *eventLoop = d->data->eventLoops.at(i);-
545 eventLoop->exit(returnCode);-
546 }
executed 948 times by 188 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QProcess
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • ...
948
547}
executed 983 times by 188 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QLocalSocket
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QProcess
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • ...
983
548-
549/*!-
550 Tells the thread's event loop to exit with return code 0 (success).-
551 Equivalent to calling QThread::exit(0).-
552-
553 This function does nothing if the thread does not have an event-
554 loop.-
555-
556 \sa exit(), QEventLoop-
557*/-
558void QThread::quit()-
559{
executed 916 times by 186 tests: exit();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • ...
exit(); }
executed 916 times by 186 tests: exit();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QStateMachine
  • tst_QTcpSocket
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • ...
916
560-
561/*!-
562 The starting point for the thread. After calling start(), the-
563 newly created thread calls this function. The default-
564 implementation simply calls exec().-
565-
566 You can reimplement this function to facilitate advanced thread-
567 management. Returning from this method will end the execution of-
568 the thread.-
569-
570 \sa start(), wait()-
571*/-
572void QThread::run()-
573{-
574 (void) exec();-
575}
executed 649 times by 38 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QEventLoop
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QMetaObject
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QStateMachine
  • tst_QThread
  • tst_QTimer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • ...
649
576-
577/*! \fn void QThread::setPriority(Priority priority)-
578 \since 4.1-
579-
580 This function sets the \a priority for a running thread. If the-
581 thread is not running, this function does nothing and returns-
582 immediately. Use start() to start a thread with a specific-
583 priority.-
584-
585 The \a priority argument can be any value in the \c-
586 QThread::Priority enum except for \c InheritPriorty.-
587-
588 The effect of the \a priority parameter is dependent on the-
589 operating system's scheduling policy. In particular, the \a priority-
590 will be ignored on systems that do not support thread priorities-
591 (such as on Linux, see http://linux.die.net/man/2/sched_setscheduler-
592 for more details).-
593-
594 \sa Priority, priority(), start()-
595*/-
596void QThread::setPriority(Priority priority)-
597{-
598 Q_D(QThread);-
599 QMutexLocker locker(&d->mutex);-
600 if (!d->running) {
!d->runningDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QThread
14
601 qWarning("QThread::setPriority: Cannot set priority, thread is not running");-
602 return;
executed 14 times by 1 test: return;
Executed by:
  • tst_QThread
14
603 }-
604 d->setPriority(priority);-
605}
executed 14 times by 1 test: end of block
Executed by:
  • tst_QThread
14
606-
607/*!-
608 \since 4.1-
609-
610 Returns the priority for a running thread. If the thread is not-
611 running, this function returns \c InheritPriority.-
612-
613 \sa Priority, setPriority(), start()-
614*/-
615QThread::Priority QThread::priority() const-
616{-
617 Q_D(const QThread);-
618 QMutexLocker locker(&d->mutex);-
619-
620 // mask off the high bits that are used for flags-
621 return Priority(d->priority & 0xffff);
executed 33 times by 1 test: return Priority(d->priority & 0xffff);
Executed by:
  • tst_QThread
33
622}-
623-
624/*!-
625 \fn void QThread::sleep(unsigned long secs)-
626-
627 Forces the current thread to sleep for \a secs seconds.-
628-
629 \sa msleep(), usleep()-
630*/-
631-
632/*!-
633 \fn void QThread::msleep(unsigned long msecs)-
634-
635 Forces the current thread to sleep for \a msecs milliseconds.-
636-
637 \sa sleep(), usleep()-
638*/-
639-
640/*!-
641 \fn void QThread::usleep(unsigned long usecs)-
642-
643 Forces the current thread to sleep for \a usecs microseconds.-
644-
645 \sa sleep(), msleep()-
646*/-
647-
648/*!-
649 \fn void QThread::terminate()-
650-
651 Terminates the execution of the thread. The thread may or may not-
652 be terminated immediately, depending on the operating system's-
653 scheduling policies. Use QThread::wait() after terminate(), to be-
654 sure.-
655-
656 When the thread is terminated, all threads waiting for the thread-
657 to finish will be woken up.-
658-
659 \warning This function is dangerous and its use is discouraged.-
660 The thread can be terminated at any point in its code path.-
661 Threads can be terminated while modifying data. There is no-
662 chance for the thread to clean up after itself, unlock any held-
663 mutexes, etc. In short, use this function only if absolutely-
664 necessary.-
665-
666 Termination can be explicitly enabled or disabled by calling-
667 QThread::setTerminationEnabled(). Calling this function while-
668 termination is disabled results in the termination being-
669 deferred, until termination is re-enabled. See the documentation-
670 of QThread::setTerminationEnabled() for more information.-
671-
672 \sa setTerminationEnabled()-
673*/-
674-
675/*!-
676 \fn bool QThread::wait(unsigned long time)-
677-
678 Blocks the thread until either of these conditions is met:-
679-
680 \list-
681 \li The thread associated with this QThread object has finished-
682 execution (i.e. when it returns from \l{run()}). This function-
683 will return true if the thread has finished. It also returns-
684 true if the thread has not been started yet.-
685 \li \a time milliseconds has elapsed. If \a time is ULONG_MAX (the-
686 default), then the wait will never timeout (the thread must-
687 return from \l{run()}). This function will return false if the-
688 wait timed out.-
689 \endlist-
690-
691 This provides similar functionality to the POSIX \c-
692 pthread_join() function.-
693-
694 \sa sleep(), terminate()-
695*/-
696-
697/*!-
698 \fn void QThread::setTerminationEnabled(bool enabled)-
699-
700 Enables or disables termination of the current thread based on the-
701 \a enabled parameter. The thread must have been started by-
702 QThread.-
703-
704 When \a enabled is false, termination is disabled. Future calls-
705 to QThread::terminate() will return immediately without effect.-
706 Instead, the termination is deferred until termination is enabled.-
707-
708 When \a enabled is true, termination is enabled. Future calls to-
709 QThread::terminate() will terminate the thread normally. If-
710 termination has been deferred (i.e. QThread::terminate() was-
711 called with termination disabled), this function will terminate-
712 the calling thread \e immediately. Note that this function will-
713 not return in this case.-
714-
715 \sa terminate()-
716*/-
717-
718/*!-
719 \since 5.5-
720 Returns the current event loop level for the thread.-
721-
722 \note This can only be called within the thread itself, i.e. when-
723 it is the current thread.-
724*/-
725-
726int QThread::loopLevel() const-
727{-
728 Q_D(const QThread);-
729 return d->data->eventLoops.size();
never executed: return d->data->eventLoops.size();
0
730}-
731-
732#else // QT_NO_THREAD-
733-
734QThread::QThread(QObject *parent)-
735 : QObject(*(new QThreadPrivate), (QObject*)0){-
736 Q_D(QThread);-
737 d->data->thread = this;-
738}-
739-
740QThread *QThread::currentThread()-
741{-
742 return QThreadData::current()->thread;-
743}-
744-
745QThreadData* QThreadData::current()-
746{-
747 static QThreadData *data = 0; // reinterpret_cast<QThreadData *>(pthread_getspecific(current_thread_data_key));-
748 if (!data) {-
749 QScopedPointer<QThreadData> newdata(new QThreadData);-
750 newdata->thread = new QAdoptedThread(newdata.data());-
751 data = newdata.take();-
752 data->deref();-
753 }-
754 return data;-
755}-
756-
757/*!-
758 \internal-
759 */-
760QThread::QThread(QThreadPrivate &dd, QObject *parent)-
761 : QObject(dd, parent)-
762{-
763 Q_D(QThread);-
764 // fprintf(stderr, "QThreadData %p taken from private data for thread %p\n", d->data, this);-
765 d->data->thread = this;-
766}-
767-
768#endif // QT_NO_THREAD-
769-
770/*!-
771 \since 5.0-
772-
773 Returns a pointer to the event dispatcher object for the thread. If no event-
774 dispatcher exists for the thread, this function returns 0.-
775*/-
776QAbstractEventDispatcher *QThread::eventDispatcher() const-
777{-
778 Q_D(const QThread);-
779 return d->data->eventDispatcher.load();
executed 193 times by 132 tests: return d->data->eventDispatcher.load();
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
193
780}-
781-
782/*!-
783 \since 5.0-
784-
785 Sets the event dispatcher for the thread to \a eventDispatcher. This is-
786 only possible as long as there is no event dispatcher installed for the-
787 thread yet. That is, before the thread has been started with start() or, in-
788 case of the main thread, before QCoreApplication has been instantiated.-
789 This method takes ownership of the object.-
790*/-
791void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)-
792{-
793 Q_D(QThread);-
794 if (d->data->hasEventDispatcher()) {
d->data->hasEventDispatcher()Description
TRUEnever evaluated
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QThread
0-3
795 qWarning("QThread::setEventDispatcher: An event dispatcher has already been created for this thread");-
796 } else {
never executed: end of block
0
797 eventDispatcher->moveToThread(this);-
798 if (eventDispatcher->thread() == this) // was the move successful?
eventDispatche...read() == thisDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QThread
FALSEnever evaluated
0-3
799 d->data->eventDispatcher = eventDispatcher;
executed 3 times by 3 tests: d->data->eventDispatcher = eventDispatcher;
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QThread
3
800 else-
801 qWarning("QThread::setEventDispatcher: Could not move event dispatcher to target thread");
never executed: QMessageLogger(__FILE__, 801, __PRETTY_FUNCTION__).warning("QThread::setEventDispatcher: Could not move event dispatcher to target thread");
0
802 }-
803}-
804-
805/*!-
806 \reimp-
807*/-
808bool QThread::event(QEvent *event)-
809{-
810 if (event->type() == QEvent::Quit) {
event->type() == QEvent::QuitDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 3073 times by 322 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
1-3073
811 quit();-
812 return true;
executed 1 time by 1 test: return true;
Executed by:
  • tst_QThread
1
813 } else {-
814 return QObject::event(event);
executed 3073 times by 322 tests: return QObject::event(event);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
3073
815 }-
816}-
817-
818/*!-
819 \since 5.2-
820-
821 Request the interruption of the thread.-
822 That request is advisory and it is up to code running on the thread to decide-
823 if and how it should act upon such request.-
824 This function does not stop any event loop running on the thread and-
825 does not terminate it in any way.-
826-
827 \sa isInterruptionRequested()-
828*/-
829-
830void QThread::requestInterruption()-
831{-
832 Q_D(QThread);-
833 QMutexLocker locker(&d->mutex);-
834 if (!d->running || d->finished || d->isInFinish)
!d->runningDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
d->finishedDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
d->isInFinishDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
0-1
835 return;
never executed: return;
0
836 if (this == QCoreApplicationPrivate::theMainThread) {
this == QCoreA...:theMainThreadDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QThread
0-1
837 qWarning("QThread::requestInterruption has no effect on the main thread");-
838 return;
never executed: return;
0
839 }-
840 d->interruptionRequested = true;-
841}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QThread
1
842-
843/*!-
844 \since 5.2-
845-
846 Return true if the task running on this thread should be stopped.-
847 An interruption can be requested by requestInterruption().-
848-
849 This function can be used to make long running tasks cleanly interruptible.-
850 Never checking or acting on the value returned by this function is safe,-
851 however it is advisable do so regularly in long running functions.-
852 Take care not to call it too often, to keep the overhead low.-
853-
854 \code-
855 void long_task() {-
856 forever {-
857 if ( QThread::currentThread()->isInterruptionRequested() ) {-
858 return;-
859 }-
860 }-
861 }-
862 \endcode-
863-
864 \sa currentThread() requestInterruption()-
865*/-
866bool QThread::isInterruptionRequested() const-
867{-
868 Q_D(const QThread);-
869 QMutexLocker locker(&d->mutex);-
870 if (!d->running || d->finished || d->isInFinish)
!d->runningDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QThread
FALSEevaluated 100 times by 1 test
Evaluated by:
  • tst_QThread
d->finishedDescription
TRUEnever evaluated
FALSEevaluated 100 times by 1 test
Evaluated by:
  • tst_QThread
d->isInFinishDescription
TRUEnever evaluated
FALSEevaluated 100 times by 1 test
Evaluated by:
  • tst_QThread
0-100
871 return false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QThread
2
872 return d->interruptionRequested;
executed 100 times by 1 test: return d->interruptionRequested;
Executed by:
  • tst_QThread
100
873}-
874-
875/*!-
876 \class QDaemonThread-
877 \since 5.5-
878 \brief The QDaemonThread provides a class to manage threads that outlive QCoreApplication-
879 \internal-
880-
881 Note: don't try to deliver events from the started() signal.-
882*/-
883QDaemonThread::QDaemonThread(QObject *parent)-
884 : QThread(parent)-
885{-
886 // QThread::started() is emitted from the thread we start-
887 connect(this, &QThread::started,-
888 [](){ QThreadData::current()->requiresCoreApplication = false; });
executed 189 times by 161 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • ...
189
889}
executed 189 times by 161 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • ...
189
890-
891QDaemonThread::~QDaemonThread()-
892{-
893}-
894-
895QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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