qcoreapplication.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Copyright (C) 2015 Intel Corporation.-
5** Contact: http://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL21$-
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 http://www.qt.io/terms-conditions. For further-
16** information use the contact form at http://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 2.1 or version 3 as published by the Free-
21** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
22** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
23** following information to ensure the GNU Lesser General Public License-
24** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
25** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
26**-
27** As a special exception, The Qt Company gives you certain additional-
28** rights. These rights are described in The Qt Company LGPL Exception-
29** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
30**-
31** $QT_END_LICENSE$-
32**-
33****************************************************************************/-
34-
35#include "qcoreapplication.h"-
36#include "qcoreapplication_p.h"-
37-
38#ifndef QT_NO_QOBJECT-
39#include "qabstracteventdispatcher.h"-
40#include "qcoreevent.h"-
41#include "qeventloop.h"-
42#endif-
43#include "qcorecmdlineargs_p.h"-
44#include <qdatastream.h>-
45#include <qdebug.h>-
46#include <qdir.h>-
47#include <qfile.h>-
48#include <qfileinfo.h>-
49#include <qmutex.h>-
50#include <private/qloggingregistry_p.h>-
51#include <qstandardpaths.h>-
52#include <qtextcodec.h>-
53#ifndef QT_NO_QOBJECT-
54#include <qthread.h>-
55#include <qthreadpool.h>-
56#include <qthreadstorage.h>-
57#include <private/qthread_p.h>-
58#endif-
59#include <qelapsedtimer.h>-
60#include <qlibraryinfo.h>-
61#include <qvarlengtharray.h>-
62#include <private/qfactoryloader_p.h>-
63#include <private/qfunctions_p.h>-
64#include <private/qlocale_p.h>-
65#include <private/qhooks_p.h>-
66-
67#ifndef QT_NO_QOBJECT-
68#if defined(Q_OS_UNIX)-
69# if defined(Q_OS_BLACKBERRY)-
70# include "qeventdispatcher_blackberry_p.h"-
71# include <process.h>-
72# include <unistd.h>-
73# elif defined(Q_OS_OSX)-
74# include "qeventdispatcher_cf_p.h"-
75# include "qeventdispatcher_unix_p.h"-
76# else-
77# if !defined(QT_NO_GLIB)-
78# include "qeventdispatcher_glib_p.h"-
79# endif-
80# include "qeventdispatcher_unix_p.h"-
81# endif-
82#endif-
83#ifdef Q_OS_WIN-
84# ifdef Q_OS_WINRT-
85# include "qeventdispatcher_winrt_p.h"-
86# include "qfunctions_winrt.h"-
87# include <wrl.h>-
88# include <Windows.ApplicationModel.core.h>-
89 using namespace ABI::Windows::ApplicationModel::Core;-
90 using namespace Microsoft::WRL;-
91# else-
92# include "qeventdispatcher_win_p.h"-
93# endif-
94#endif-
95#endif // QT_NO_QOBJECT-
96-
97#ifdef Q_OS_MAC-
98# include "qcore_mac_p.h"-
99#endif-
100-
101#include <stdlib.h>-
102-
103#ifdef Q_OS_UNIX-
104# include <locale.h>-
105# include <unistd.h>-
106# include <sys/types.h>-
107#endif-
108-
109#ifdef Q_OS_VXWORKS-
110# include <taskLib.h>-
111#endif-
112-
113#include <algorithm>-
114-
115QT_BEGIN_NAMESPACE-
116-
117#ifndef QT_NO_QOBJECT-
118class QMutexUnlocker-
119{-
120public:-
121 inline explicit QMutexUnlocker(QMutex *m)-
122 : mtx(m)-
123 { }
executed 660847 times by 492 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
660847
124 inline ~QMutexUnlocker() { unlock(); }
executed 660847 times by 492 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
660847
125 inline void unlock() { if (mtx) mtx->unlock(); mtx = 0; }
executed 1310882 times by 492 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
executed 660847 times by 492 tests: mtx->unlock();
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
mtxDescription
TRUEevaluated 660847 times by 492 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
FALSEevaluated 650035 times by 492 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
650035-1310882
126-
127private:-
128 Q_DISABLE_COPY(QMutexUnlocker)-
129-
130 QMutex *mtx;-
131};-
132#endif-
133-
134#if defined(Q_OS_WIN) || defined(Q_OS_MAC)-
135extern QString qAppFileName();-
136#endif-
137-
138#if QT_VERSION >= 0x060000-
139# error "Bump QCoreApplicatoinPrivate::app_compile_version to 0x060000"-
140#endif-
141int QCoreApplicationPrivate::app_compile_version = 0x050000; //we don't know exactly, but it's at least 5.0.0-
142-
143bool QCoreApplicationPrivate::setuidAllowed = false;-
144-
145#if !defined(Q_OS_WIN)-
146#ifdef Q_OS_MAC-
147QString QCoreApplicationPrivate::macMenuBarName()-
148{-
149 QString bundleName;-
150 CFTypeRef string = CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("CFBundleName"));-
151 if (string)-
152 bundleName = QCFString::toQString(static_cast<CFStringRef>(string));-
153 return bundleName;-
154}-
155#endif-
156QString QCoreApplicationPrivate::appName() const-
157{-
158 QString applicationName;-
159#ifdef Q_OS_MAC-
160 applicationName = macMenuBarName();-
161#endif-
162 if (applicationName.isEmpty() && argv[0]) {
applicationName.isEmpty()Description
TRUEevaluated 881 times by 26 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLockFile
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QWidget_window
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • ...
FALSEnever evaluated
argv[0]Description
TRUEevaluated 881 times by 26 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLockFile
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QWidget_window
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • ...
FALSEnever evaluated
0-881
163 char *p = strrchr(argv[0], '/');-
164 applicationName = QString::fromLocal8Bit(p ? p + 1 : argv[0]);-
165 }
executed 881 times by 26 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLockFile
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QWidget_window
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • ...
881
166-
167 return applicationName;
executed 881 times by 26 tests: return applicationName;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLockFile
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QWidget_window
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • ...
881
168}-
169#endif-
170-
171QString *QCoreApplicationPrivate::cachedApplicationFilePath = 0;-
172-
173bool QCoreApplicationPrivate::checkInstance(const char *function)-
174{-
175 bool b = (QCoreApplication::self != 0);-
176 if (!b)
!bDescription
TRUEnever evaluated
FALSEevaluated 174 times by 18 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QKeySequence
  • tst_QLockFile
  • tst_QProgressDialog
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_QTranslator
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qkeysequence - unknown status
0-174
177 qWarning("QApplication::%s: Please instantiate the QApplication object first", function);
never executed: QMessageLogger(__FILE__, 177, __PRETTY_FUNCTION__).warning("QApplication::%s: Please instantiate the QApplication object first", function);
0
178 return b;
executed 174 times by 18 tests: return b;
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QKeySequence
  • tst_QLockFile
  • tst_QProgressDialog
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_QTranslator
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qkeysequence - unknown status
174
179}-
180-
181void QCoreApplicationPrivate::processCommandLineArguments()-
182{-
183 int j = argc ? 1 : 0;
argcDescription
TRUEevaluated 769 times by 19 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnection_Delayed
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 98 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDnsLookup_Appless
  • tst_QGuiApplication
98-769
184 for (int i = 1; i < argc; ++i) {
i < argcDescription
TRUEevaluated 1628 times by 7 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 867 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
867-1628
185 if (!argv[i])
!argv[i]Description
TRUEnever evaluated
FALSEevaluated 1628 times by 7 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-1628
186 continue;
never executed: continue;
0
187 if (*argv[i] != '-') {
*argv[i] != '-'Description
TRUEevaluated 539 times by 7 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1089 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
539-1089
188 argv[j++] = argv[i];-
189 continue;
executed 539 times by 7 tests: continue;
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
539
190 }-
191 const char *arg = argv[i];-
192 if (arg[1] == '-') // startsWith("--")
arg[1] == '-'Description
TRUEnever evaluated
FALSEevaluated 1089 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
0-1089
193 ++arg;
never executed: ++arg;
0
194 if (strncmp(arg, "-qmljsdebugger=", 15) == 0) {
strncmp(arg, "...er=", 15) == 0Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 1087 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
2-1087
195 qmljs_debug_arguments = QString::fromLocal8Bit(arg + 15);-
196 } else if (strcmp(arg, "-qmljsdebugger") == 0 && i < argc - 1) {
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
strcmp(arg, "-...ebugger") == 0Description
TRUEnever evaluated
FALSEevaluated 1087 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
i < argc - 1Description
TRUEnever evaluated
FALSEnever evaluated
0-1087
197 ++i;-
198 qmljs_debug_arguments = QString::fromLocal8Bit(argv[i]);-
199 } else {
never executed: end of block
0
200 argv[j++] = argv[i];-
201 }
executed 1087 times by 3 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
1087
202 }-
203-
204 if (j < argc) {
j < argcDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 865 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
2-865
205 argv[j] = 0;-
206 argc = j;-
207 }
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
208}
executed 867 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
867
209-
210// Support for introspection-
211-
212#ifndef QT_NO_QOBJECT-
213QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set = { 0, 0, 0, 0 };-
214-
215void qt_register_signal_spy_callbacks(const QSignalSpyCallbackSet &callback_set)-
216{-
217 qt_signal_spy_callback_set = callback_set;-
218}
executed 1167 times by 541 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1167
219#endif-
220-
221extern "C" void Q_CORE_EXPORT qt_startup_hook()-
222{-
223}-
224-
225typedef QList<QtStartUpFunction> QStartUpFuncList;-
226Q_GLOBAL_STATIC(QStartUpFuncList, preRList)
executed 975 times by 420 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
executed 975 times by 420 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
executed 885 times by 37 tests: return &holder.value;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QSql
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 975 times by 420 tests
Evaluated by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
FALSEnever evaluated
0-975
227typedef QList<QtCleanUpFunction> QVFuncList;-
228Q_GLOBAL_STATIC(QVFuncList, postRList)
executed 971 times by 420 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
executed 971 times by 420 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
executed 1546 times by 485 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGestureRecognizer
  • tst_QGlobal
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 971 times by 420 tests
Evaluated by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
FALSEnever evaluated
0-1546
229#ifndef QT_NO_QOBJECT-
230static QBasicMutex globalPreRoutinesMutex;-
231#endif-
232-
233/*!-
234 \internal-
235-
236 Adds a global routine that will be called from the QCoreApplication-
237 constructor. The public API is Q_COREAPP_STARTUP_FUNCTION.-
238*/-
239void qAddPreRoutine(QtStartUpFunction p)-
240{-
241 QStartUpFuncList *list = preRList();-
242 if (!list)
!listDescription
TRUEnever evaluated
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
0-18
243 return;
never executed: return;
0
244 // Due to C++11 parallel dynamic initialization, this can be called-
245 // from multiple threads.-
246#ifndef QT_NO_THREAD-
247 QMutexLocker locker(&globalPreRoutinesMutex);-
248#endif-
249 if (QCoreApplication::instance())
QCoreApplication::instance()Description
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
0-18
250 p();
executed 18 times by 16 tests: p();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
251 list->prepend(p); // in case QCoreApplication is re-created, see qt_call_pre_routines-
252}
executed 18 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
253-
254void qAddPostRoutine(QtCleanUpFunction p)-
255{-
256 QVFuncList *list = postRList();-
257 if (!list)
!listDescription
TRUEnever evaluated
FALSEevaluated 107 times by 69 tests
Evaluated by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • ...
0-107
258 return;
never executed: return;
0
259 list->prepend(p);-
260}
executed 107 times by 69 tests: end of block
Executed by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • ...
107
261-
262void qRemovePostRoutine(QtCleanUpFunction p)-
263{-
264 QVFuncList *list = postRList();-
265 if (!list)
!listDescription
TRUEnever evaluated
FALSEnever evaluated
0
266 return;
never executed: return;
0
267 list->removeAll(p);-
268}
never executed: end of block
0
269-
270static void qt_call_pre_routines()-
271{-
272 QStartUpFuncList *list = preRList();-
273 if (!list)
!listDescription
TRUEnever evaluated
FALSEevaluated 867 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-867
274 return;
never executed: return;
0
275#ifndef QT_NO_THREAD-
276 QMutexLocker locker(&globalPreRoutinesMutex);-
277#endif-
278 // Unlike qt_call_post_routines, we don't empty the list, because-
279 // Q_COREAPP_STARTUP_FUNCTION is a macro, so the user expects-
280 // the function to be executed every time QCoreApplication is created.-
281 for (int i = 0; i < list->count(); ++i)
i < list->count()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QGlobal
  • tst_QNetworkConfigurationManager
FALSEevaluated 867 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
4-867
282 list->at(i)();
executed 4 times by 2 tests: list->at(i)();
Executed by:
  • tst_QGlobal
  • tst_QNetworkConfigurationManager
4
283}
executed 867 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
867
284-
285void Q_CORE_EXPORT qt_call_post_routines()-
286{-
287 QVFuncList *list = 0;-
288 QT_TRY {-
289 list = postRList();-
290 } QT_CATCH(const std::bad_alloc &) {
executed 1439 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1439
291 // ignore - if we can't allocate a post routine list,-
292 // there's a high probability that there's no post-
293 // routine to be executed :)-
294 }
never executed: end of block
0
295 if (!list)
!listDescription
TRUEnever evaluated
FALSEevaluated 1439 times by 421 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
0-1439
296 return;
never executed: return;
0
297 while (!list->isEmpty())
!list->isEmpty()Description
TRUEevaluated 263 times by 185 tests
Evaluated by:
  • tst_QApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • ...
FALSEevaluated 1439 times by 421 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
263-1439
298 (list->takeFirst())();
executed 263 times by 185 tests: (list->takeFirst())();
Executed by:
  • tst_QApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • ...
263
299}
executed 1439 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1439
300-
301-
302// initialized in qcoreapplication and in qtextstream autotest when setlocale is called.-
303static bool qt_locale_initialized = false;-
304-
305#ifndef QT_NO_QOBJECT-
306-
307// app starting up if false-
308bool QCoreApplicationPrivate::is_app_running = false;-
309 // app closing down if true-
310bool QCoreApplicationPrivate::is_app_closing = false;-
311-
312Q_CORE_EXPORT uint qGlobalPostedEventsCount()-
313{-
314 QThreadData *currentThreadData = QThreadData::current();-
315 return currentThreadData->postEventList.size() - currentThreadData->postEventList.startOffset;
executed 16 times by 2 tests: return currentThreadData->postEventList.size() - currentThreadData->postEventList.startOffset;
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
16
316}-
317-
318QAbstractEventDispatcher *QCoreApplicationPrivate::eventDispatcher = 0;-
319-
320#ifdef Q_OS_UNIX-
321Qt::HANDLE qt_application_thread_id = 0;-
322#endif-
323-
324#endif // QT_NO_QOBJECT-
325-
326QCoreApplication *QCoreApplication::self = 0;-
327uint QCoreApplicationPrivate::attribs = (1 << Qt::AA_SynthesizeMouseForUnhandledTouchEvents);-
328-
329struct QCoreApplicationData {-
330 QCoreApplicationData() Q_DECL_NOTHROW {-
331 applicationNameSet = false;-
332 }
executed 641 times by 24 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
641
333 ~QCoreApplicationData() {-
334#ifndef QT_NO_QOBJECT-
335 // cleanup the QAdoptedThread created for the main() thread-
336 if (QCoreApplicationPrivate::theMainThread) {
QCoreApplicati...:theMainThreadDescription
TRUEevaluated 976 times by 422 tests
Evaluated by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
FALSEnever evaluated
0-976
337 QThreadData *data = QThreadData::get2(QCoreApplicationPrivate::theMainThread);-
338 data->deref(); // deletes the data and the adopted thread-
339 }
executed 976 times by 422 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
976
340#endif-
341 }
executed 976 times by 422 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
976
342-
343#ifdef Q_OS_BLACKBERRY-
344 //The QCoreApplicationData struct is only populated on demand, because it is rarely needed and would-
345 //affect startup time-
346 void loadManifest() {-
347 static bool manifestLoadAttempt = false;-
348 if (manifestLoadAttempt)-
349 return;-
350-
351 manifestLoadAttempt = true;-
352-
353 QFile metafile(QStringLiteral("app/META-INF/MANIFEST.MF"));-
354 if (!metafile.open(QIODevice::ReadOnly)) {-
355 qWarning("Could not open application metafile for reading")-
356 } else {-
357 while (!metafile.atEnd() && (application.isEmpty() || applicationVersion.isEmpty() || orgName.isEmpty())) {-
358 QByteArray line = metafile.readLine();-
359 if (line.startsWith("Application-Name:"))-
360 application = QString::fromUtf8(line.mid(18).trimmed());-
361 else if (line.startsWith("Application-Version:"))-
362 applicationVersion = QString::fromUtf8(line.mid(21).trimmed());-
363 else if (line.startsWith("Package-Author:"))-
364 orgName = QString::fromUtf8(line.mid(16).trimmed());-
365 }-
366 metafile.close();-
367 }-
368 }-
369#endif-
370-
371 QString orgName, orgDomain;-
372 QString application; // application name, initially from argv[0], can then be modified.-
373 QString applicationVersion;-
374 bool applicationNameSet; // true if setApplicationName was called-
375-
376#ifndef QT_NO_LIBRARY-
377 QScopedPointer<QStringList> app_libpaths;-
378 QScopedPointer<QStringList> manual_libpaths;-
379#endif-
380-
381};-
382-
383Q_GLOBAL_STATIC(QCoreApplicationData, coreappdata)
executed 976 times by 422 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
executed 976 times by 422 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
executed 27777 times by 602 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 976 times by 422 tests
Evaluated by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - 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_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • ...
FALSEnever evaluated
0-27777
384-
385#ifndef QT_NO_QOBJECT-
386static bool quitLockRefEnabled = true;-
387#endif-
388-
389#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
390// Check whether the command line arguments match those passed to main()-
391// by comparing to the global __argv/__argc (MS extension).-
392// Deep comparison is required since argv/argc is rebuilt by WinMain for-
393// GUI apps or when using MinGW due to its globbing.-
394static inline bool isArgvModified(int argc, char **argv)-
395{-
396 if (__argc != argc || !__argv /* wmain() */)-
397 return true;-
398 if (__argv == argv)-
399 return false;-
400 for (int a = 0; a < argc; ++a) {-
401 if (argv[a] != __argv[a] && strcmp(argv[a], __argv[a]))-
402 return true;-
403 }-
404 return false;-
405}-
406-
407static inline bool contains(int argc, char **argv, const char *needle)-
408{-
409 for (int a = 0; a < argc; ++a) {-
410 if (!strcmp(argv[a], needle))-
411 return true;-
412 }-
413 return false;-
414}-
415#endif // Q_OS_WIN && !Q_OS_WINRT-
416-
417QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint flags)-
418 :-
419#ifndef QT_NO_QOBJECT-
420 QObjectPrivate(),-
421#endif-
422 argc(aargc)-
423 , argv(aargv)-
424#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
425 , origArgc(0)-
426 , origArgv(Q_NULLPTR)-
427#endif-
428 , application_type(QCoreApplicationPrivate::Tty)-
429#ifndef QT_NO_QOBJECT-
430 , in_exec(false)-
431 , aboutToQuitEmitted(false)-
432 , threadData_clean(false)-
433#else-
434 , q_ptr(0)-
435#endif-
436{-
437 app_compile_version = flags & 0xffffff;-
438 static const char *const empty = "";-
439 if (argc == 0 || argv == 0) {
argc == 0Description
TRUEevaluated 98 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDnsLookup_Appless
  • tst_QGuiApplication
FALSEevaluated 770 times by 19 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnection_Delayed
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
argv == 0Description
TRUEnever evaluated
FALSEevaluated 770 times by 19 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnection_Delayed
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-770
440 argc = 0;-
441 argv = const_cast<char **>(&empty);-
442 }
executed 98 times by 6 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDnsLookup_Appless
  • tst_QGuiApplication
98
443#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
444 if (!isArgvModified(argc, argv)) {-
445 origArgc = argc;-
446 origArgv = new char *[argc];-
447 std::copy(argv, argv + argc, QT_MAKE_CHECKED_ARRAY_ITERATOR(origArgv, argc));-
448 }-
449#endif // Q_OS_WIN && !Q_OS_WINRT-
450-
451#ifndef QT_NO_QOBJECT-
452 QCoreApplicationPrivate::is_app_closing = false;-
453-
454# if defined(Q_OS_UNIX)-
455 if (!setuidAllowed && (geteuid() != getuid()))
!setuidAllowedDescription
TRUEevaluated 868 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
(geteuid() != getuid())Description
TRUEnever evaluated
FALSEevaluated 868 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-868
456 qFatal("FATAL: The application binary appears to be running setuid, this is a security hole.");
never executed: QMessageLogger(__FILE__, 456, __PRETTY_FUNCTION__).fatal("FATAL: The application binary appears to be running setuid, this is a security hole.");
0
457# endif // Q_OS_UNIX-
458-
459# if defined(Q_OS_UNIX)-
460 qt_application_thread_id = QThread::currentThreadId();-
461# endif-
462-
463 QThread *cur = QThread::currentThread(); // note: this may end up setting theMainThread!-
464 if (cur != theMainThread)
cur != theMainThreadDescription
TRUEnever evaluated
FALSEevaluated 868 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-868
465 qWarning("WARNING: QApplication was not created in the main() thread.");
never executed: QMessageLogger(__FILE__, 465, __PRETTY_FUNCTION__).warning("WARNING: QApplication was not created in the main() thread.");
0
466#endif-
467}
executed 868 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
868
468-
469QCoreApplicationPrivate::~QCoreApplicationPrivate()-
470{-
471#ifndef QT_NO_QOBJECT-
472 cleanupThreadData();-
473#endif-
474#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
475 delete [] origArgv;-
476#endif-
477 QCoreApplicationPrivate::clearApplicationFilePath();-
478}
executed 1199 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1199
479-
480#ifndef QT_NO_QOBJECT-
481-
482void QCoreApplicationPrivate::cleanupThreadData()-
483{-
484 if (threadData && !threadData_clean) {
threadDataDescription
TRUEevaluated 1540 times by 421 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
FALSEnever evaluated
!threadData_cleanDescription
TRUEevaluated 1199 times by 421 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
FALSEevaluated 341 times by 220 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • 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
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
0-1540
485#ifndef QT_NO_THREAD-
486 void *data = &threadData->tls;-
487 QThreadStorageData::finish((void **)data);-
488#endif-
489-
490 // need to clear the state of the mainData, just in case a new QCoreApplication comes along.-
491 QMutexLocker locker(&threadData->postEventList.mutex);-
492 for (int i = 0; i < threadData->postEventList.size(); ++i) {
i < threadData...entList.size()Description
TRUEevaluated 11233 times by 140 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • ...
FALSEevaluated 1199 times by 421 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1199-11233
493 const QPostEvent &pe = threadData->postEventList.at(i);-
494 if (pe.event) {
pe.eventDescription
TRUEevaluated 11115 times by 137 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
FALSEevaluated 118 times by 10 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qcolumnview - unknown status
  • tst_qdbusthreading - unknown status
  • tst_qheaderview - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkinterface - unknown status
118-11115
495 --pe.receiver->d_func()->postedEvents;-
496 pe.event->posted = false;-
497 delete pe.event;-
498 }
executed 11115 times by 137 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
11115
499 }
executed 11233 times by 140 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • ...
11233
500 threadData->postEventList.clear();-
501 threadData->postEventList.recursion = 0;-
502 threadData->quitNow = false;-
503 threadData_clean = true;-
504 }
executed 1199 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1199
505}
executed 1540 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1540
506-
507void QCoreApplicationPrivate::createEventDispatcher()-
508{-
509 Q_Q(QCoreApplication);-
510#if defined(Q_OS_UNIX)-
511# if defined(Q_OS_BLACKBERRY)-
512 eventDispatcher = new QEventDispatcherBlackberry(q);-
513# elif defined(Q_OS_OSX)-
514 bool ok = false;-
515 int value = qEnvironmentVariableIntValue("QT_EVENT_DISPATCHER_CORE_FOUNDATION", &ok);-
516 if (ok && value > 0)-
517 eventDispatcher = new QEventDispatcherCoreFoundation(q);-
518 else-
519 eventDispatcher = new QEventDispatcherUNIX(q);-
520# elif !defined(QT_NO_GLIB)-
521 if (qEnvironmentVariableIsEmpty("QT_NO_GLIB") && QEventDispatcherGlib::versionSupported())
qEnvironmentVa...("QT_NO_GLIB")Description
TRUEevaluated 736 times by 21 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
QEventDispatch...ionSupported()Description
TRUEevaluated 736 times by 21 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-736
522 eventDispatcher = new QEventDispatcherGlib(q);
executed 736 times by 21 tests: eventDispatcher = new QEventDispatcherGlib(q);
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
736
523 else-
524 eventDispatcher = new QEventDispatcherUNIX(q);
never executed: eventDispatcher = new QEventDispatcherUNIX(q);
0
525# else-
526 eventDispatcher = new QEventDispatcherUNIX(q);-
527# endif-
528#elif defined(Q_OS_WINRT)-
529 eventDispatcher = new QEventDispatcherWinRT(q);-
530#elif defined(Q_OS_WIN)-
531 eventDispatcher = new QEventDispatcherWin32(q);-
532#else-
533# error "QEventDispatcher not yet ported to this platform"-
534#endif-
535}-
536-
537void QCoreApplicationPrivate::eventDispatcherReady()-
538{-
539}-
540-
541QBasicAtomicPointer<QThread> QCoreApplicationPrivate::theMainThread = Q_BASIC_ATOMIC_INITIALIZER(0);-
542QThread *QCoreApplicationPrivate::mainThread()-
543{-
544 Q_ASSERT(theMainThread.load() != 0);-
545 return theMainThread.load();
executed 3399309 times by 383 tests: return theMainThread.load();
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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
  • ...
3399309
546}-
547-
548bool QCoreApplicationPrivate::threadRequiresCoreApplication()-
549{-
550 QThreadData *data = QThreadData::current(false);-
551 if (!data)
!dataDescription
TRUEnever evaluated
FALSEevaluated 2915631 times by 528 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
0-2915631
552 return true; // default setting
never executed: return true;
0
553 return data->requiresCoreApplication;
executed 2915631 times by 528 tests: return data->requiresCoreApplication;
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
2915631
554}-
555-
556void QCoreApplicationPrivate::checkReceiverThread(QObject *receiver)-
557{-
558 QThread *currentThread = QThread::currentThread();-
559 QThread *thr = receiver->thread();-
560 Q_ASSERT_X(currentThread == thr || !thr,-
561 "QCoreApplication::sendEvent",-
562 QString::fromLatin1("Cannot send events to objects owned by a different thread. "-
563 "Current thread %1. Receiver '%2' (of type '%3') was created in thread %4")-
564 .arg(QString::number((quintptr) currentThread, 16))-
565 .arg(receiver->objectName())-
566 .arg(QLatin1String(receiver->metaObject()->className()))-
567 .arg(QString::number((quintptr) thr, 16))-
568 .toLocal8Bit().data());-
569 Q_UNUSED(currentThread);-
570 Q_UNUSED(thr);-
571}
executed 1794232 times by 490 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
1794232
572-
573#endif // QT_NO_QOBJECT-
574-
575void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()-
576{-
577#ifndef QT_NO_LIBRARY-
578 QStringList *app_libpaths = coreappdata()->app_libpaths.data();-
579 if (!app_libpaths)
!app_libpathsDescription
TRUEnever evaluated
FALSEevaluated 69 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
0-69
580 coreappdata()->app_libpaths.reset(app_libpaths = new QStringList);
never executed: coreappdata()->app_libpaths.reset(app_libpaths = new QStringList);
0
581 QString app_location = QCoreApplication::applicationFilePath();-
582 app_location.truncate(app_location.lastIndexOf(QLatin1Char('/')));-
583#ifdef Q_OS_WINRT-
584 if (app_location.isEmpty())-
585 app_location.append(QLatin1Char('/'));-
586#endif-
587 app_location = QDir(app_location).canonicalPath();-
588 if (QFile::exists(app_location) && !app_libpaths->contains(app_location))
QFile::exists(app_location)Description
TRUEevaluated 69 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEnever evaluated
!app_libpaths-...(app_location)Description
TRUEevaluated 68 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
0-69
589 app_libpaths->append(app_location);
executed 68 times by 30 tests: app_libpaths->append(app_location);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
68
590#endif-
591}
executed 69 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
69
592-
593QString qAppName()-
594{-
595 if (!QCoreApplicationPrivate::checkInstance("qAppName"))
!QCoreApplicat...ce("qAppName")Description
TRUEnever evaluated
FALSEevaluated 7 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QLockFile
0-7
596 return QString();
never executed: return QString();
0
597 return QCoreApplication::instance()->d_func()->appName();
executed 7 times by 4 tests: return QCoreApplication::instance()->d_func()->appName();
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QLockFile
7
598}-
599-
600void QCoreApplicationPrivate::initLocale()-
601{-
602 if (qt_locale_initialized)
qt_locale_initializedDescription
TRUEevaluated 229 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
FALSEevaluated 639 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
229-639
603 return;
executed 229 times by 8 tests: return;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
229
604 qt_locale_initialized = true;-
605#ifdef Q_OS_UNIX-
606 setlocale(LC_ALL, "");-
607#endif-
608}
executed 639 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
639
609-
610-
611/*!-
612 \class QCoreApplication-
613 \inmodule QtCore-
614 \brief The QCoreApplication class provides an event loop for Qt-
615 applications without UI.-
616-
617 This class is used by non-GUI applications to provide their event-
618 loop. For non-GUI application that uses Qt, there should be exactly-
619 one QCoreApplication object. For GUI applications, see-
620 QGuiApplication. For applications that use the Qt Widgets module,-
621 see QApplication.-
622-
623 QCoreApplication contains the main event loop, where all events-
624 from the operating system (e.g., timer and network events) and-
625 other sources are processed and dispatched. It also handles the-
626 application's initialization and finalization, as well as-
627 system-wide and application-wide settings.-
628-
629 \section1 The Event Loop and Event Handling-
630-
631 The event loop is started with a call to exec(). Long-running-
632 operations can call processEvents() to keep the application-
633 responsive.-
634-
635 In general, we recommend that you create a QCoreApplication,-
636 QGuiApplication or a QApplication object in your \c main()-
637 function as early as possible. exec() will not return until-
638 the event loop exits; e.g., when quit() is called.-
639-
640 Several static convenience functions are also provided. The-
641 QCoreApplication object is available from instance(). Events can-
642 be sent or posted using sendEvent(), postEvent(), and-
643 sendPostedEvents(). Pending events can be removed with-
644 removePostedEvents() or flushed with flush().-
645-
646 The class provides a quit() slot and an aboutToQuit() signal.-
647-
648 \section1 Application and Library Paths-
649-
650 An application has an applicationDirPath() and an-
651 applicationFilePath(). Library paths (see QLibrary) can be retrieved-
652 with libraryPaths() and manipulated by setLibraryPaths(), addLibraryPath(),-
653 and removeLibraryPath().-
654-
655 \section1 Internationalization and Translations-
656-
657 Translation files can be added or removed-
658 using installTranslator() and removeTranslator(). Application-
659 strings can be translated using translate(). The QObject::tr()-
660 and QObject::trUtf8() functions are implemented in terms of-
661 translate().-
662-
663 \section1 Accessing Command Line Arguments-
664-
665 The command line arguments which are passed to QCoreApplication's-
666 constructor should be accessed using the arguments() function.-
667-
668 \note QCoreApplication removes option \c -qmljsdebugger="...". It parses the-
669 argument of \c qmljsdebugger, and then removes this option plus its argument.-
670-
671 For more advanced command line option handling, create a QCommandLineParser.-
672-
673 \section1 Locale Settings-
674-
675 On Unix/Linux Qt is configured to use the system locale settings by-
676 default. This can cause a conflict when using POSIX functions, for-
677 instance, when converting between data types such as floats and-
678 strings, since the notation may differ between locales. To get-
679 around this problem, call the POSIX function \c{setlocale(LC_NUMERIC,"C")}-
680 right after initializing QApplication, QGuiApplication or QCoreApplication-
681 to reset the locale that is used for number formatting to "C"-locale.-
682-
683 \sa QGuiApplication, QAbstractEventDispatcher, QEventLoop,-
684 {Semaphores Example}, {Wait Conditions Example}-
685*/-
686-
687/*!-
688 \fn static QCoreApplication *QCoreApplication::instance()-
689-
690 Returns a pointer to the application's QCoreApplication (or-
691 QGuiApplication/QApplication) instance.-
692-
693 If no instance has been allocated, \c null is returned.-
694*/-
695-
696/*!-
697 \internal-
698 */-
699QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p)-
700#ifdef QT_NO_QOBJECT-
701 : d_ptr(&p)-
702#else-
703 : QObject(p, 0)-
704#endif-
705{-
706 d_func()->q_ptr = this;-
707 // note: it is the subclasses' job to call-
708 // QCoreApplicationPrivate::eventDispatcher->startingUp();-
709}
executed 130 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
130
710-
711#ifndef QT_NO_QOBJECT-
712/*!-
713 Flushes the platform-specific event queues.-
714-
715 If you are doing graphical changes inside a loop that does not-
716 return to the event loop on asynchronous window systems like X11-
717 or double buffered window systems like Quartz (\macos and iOS), and you want to-
718 visualize these changes immediately (e.g. Splash Screens), call-
719 this function.-
720-
721 \sa sendPostedEvents()-
722*/-
723void QCoreApplication::flush()-
724{-
725 if (self && self->d_func()->eventDispatcher)
selfDescription
TRUEevaluated 295 times by 23 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCommandLinkButton
  • tst_QDialogButtonBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QRadioButton
  • tst_QStateMachine
  • tst_QToolBar
  • tst_QToolButton
  • tst_QWidget
  • tst_QWizard
  • tst_qmouseevent_modal
FALSEnever evaluated
self->d_func()...ventDispatcherDescription
TRUEevaluated 295 times by 23 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCommandLinkButton
  • tst_QDialogButtonBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QRadioButton
  • tst_QStateMachine
  • tst_QToolBar
  • tst_QToolButton
  • tst_QWidget
  • tst_QWizard
  • tst_qmouseevent_modal
FALSEnever evaluated
0-295
726 self->d_func()->eventDispatcher->flush();
executed 295 times by 23 tests: self->d_func()->eventDispatcher->flush();
Executed by:
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCommandLinkButton
  • tst_QDialogButtonBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QRadioButton
  • tst_QStateMachine
  • tst_QToolBar
  • tst_QToolButton
  • tst_QWidget
  • tst_QWizard
  • tst_qmouseevent_modal
295
727}
executed 295 times by 23 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCommandLinkButton
  • tst_QDialogButtonBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QRadioButton
  • tst_QStateMachine
  • tst_QToolBar
  • tst_QToolButton
  • tst_QWidget
  • tst_QWizard
  • tst_qmouseevent_modal
295
728#endif-
729-
730/*!-
731 Constructs a Qt core application. Core applications are applications without-
732 a graphical user interface. Such applications are used at the console or as-
733 server processes.-
734-
735 The \a argc and \a argv arguments are processed by the application,-
736 and made available in a more convenient form by the arguments()-
737 function.-
738-
739 \warning The data referred to by \a argc and \a argv must stay valid-
740 for the entire lifetime of the QCoreApplication object. In addition,-
741 \a argc must be greater than zero and \a argv must contain at least-
742 one valid character string.-
743*/-
744QCoreApplication::QCoreApplication(int &argc, char **argv-
745#ifndef Q_QDOC-
746 , int _internal-
747#endif-
748 )-
749#ifdef QT_NO_QOBJECT-
750 : d_ptr(new QCoreApplicationPrivate(argc, argv, _internal))-
751#else-
752 : QObject(*new QCoreApplicationPrivate(argc, argv, _internal))-
753#endif-
754{-
755 d_func()->q_ptr = this;-
756 d_func()->init();-
757#ifndef QT_NO_QOBJECT-
758 QCoreApplicationPrivate::eventDispatcher->startingUp();-
759#endif-
760}
executed 738 times by 21 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
738
761-
762-
763void QCoreApplicationPrivate::init()-
764{-
765 Q_Q(QCoreApplication);-
766-
767 initLocale();-
768-
769 Q_ASSERT_X(!QCoreApplication::self, "QCoreApplication", "there should be only one application object");-
770 QCoreApplication::self = q;-
771-
772 // Store app name (so it's still available after QCoreApplication is destroyed)-
773 if (!coreappdata()->applicationNameSet)
!coreappdata()...icationNameSetDescription
TRUEevaluated 866 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2-866
774 coreappdata()->application = appName();
executed 866 times by 22 tests: coreappdata()->application = appName();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
866
775-
776 QLoggingRegistry::instance()->init();-
777-
778#ifndef QT_NO_LIBRARY-
779 // Reset the lib paths, so that they will be recomputed, taking the availability of argv[0]-
780 // into account. If necessary, recompute right away and replay the manual changes on top of the-
781 // new lib paths.-
782 QStringList *appPaths = coreappdata()->app_libpaths.take();-
783 QStringList *manualPaths = coreappdata()->manual_libpaths.take();-
784 if (appPaths) {
appPathsDescription
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 863 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
4-863
785 if (manualPaths) {
manualPathsDescription
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEnever evaluated
0-4
786 // Replay the delta. As paths can only be prepended to the front or removed from-
787 // anywhere in the list, we can just linearly scan the lists and find the items that-
788 // have been removed. Once the original list is exhausted we know all the remaining-
789 // items have been added.-
790 QStringList newPaths(q->libraryPaths());-
791 for (int i = manualPaths->length(), j = appPaths->length(); i > 0 || j > 0; qt_noop()) {
i > 0Description
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
j > 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
0-8
792 if (--j < 0) {
--j < 0Description
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
4
793 newPaths.prepend((*manualPaths)[--i]);-
794 } else if (--i < 0) {
executed 4 times by 3 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
--i < 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
0-4
795 newPaths.removeAll((*appPaths)[j]);-
796 } else if ((*manualPaths)[i] != (*appPaths)[j]) {
never executed: end of block
(*manualPaths)...(*appPaths)[j]Description
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
0-3
797 newPaths.removeAll((*appPaths)[j]);-
798 ++i; // try again with next item.-
799 }
executed 3 times by 3 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
3
800 }
executed 8 times by 3 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
8
801 delete manualPaths;-
802 coreappdata()->manual_libpaths.reset(new QStringList(newPaths));-
803 }
executed 4 times by 3 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
4
804 delete appPaths;-
805 }
executed 4 times by 3 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
4
806#endif-
807-
808#ifndef QT_NO_QOBJECT-
809 // use the event dispatcher created by the app programmer (if any)-
810 if (!eventDispatcher)
!eventDispatcherDescription
TRUEevaluated 867 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-867
811 eventDispatcher = threadData->eventDispatcher.load();
executed 867 times by 22 tests: eventDispatcher = threadData->eventDispatcher.load();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
867
812 // otherwise we create one-
813 if (!eventDispatcher)
!eventDispatcherDescription
TRUEevaluated 865 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2-865
814 createEventDispatcher();
executed 865 times by 22 tests: createEventDispatcher();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
865
815 Q_ASSERT(eventDispatcher);-
816-
817 if (!eventDispatcher->parent()) {
!eventDispatcher->parent()Description
TRUEevaluated 131 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 736 times by 21 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
131-736
818 eventDispatcher->moveToThread(threadData->thread);-
819 eventDispatcher->setParent(q);-
820 }
executed 131 times by 6 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
131
821-
822 threadData->eventDispatcher = eventDispatcher;-
823 eventDispatcherReady();-
824#endif-
825-
826#ifdef QT_EVAL-
827 extern void qt_core_eval_init(QCoreApplicationPrivate::Type);-
828 qt_core_eval_init(application_type);-
829#endif-
830-
831 processCommandLineArguments();-
832-
833 qt_call_pre_routines();-
834 qt_startup_hook();-
835#ifndef QT_BOOTSTRAPPED-
836 if (Q_UNLIKELY(qtHookData[QHooks::Startup]))
__builtin_expe...rtup]), false)Description
TRUEnever evaluated
FALSEevaluated 867 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-867
837 reinterpret_cast<QHooks::StartupCallback>(qtHookData[QHooks::Startup])();
never executed: reinterpret_cast<QHooks::StartupCallback>(qtHookData[QHooks::Startup])();
0
838#endif-
839-
840#ifndef QT_NO_QOBJECT-
841 is_app_running = true; // No longer starting up.-
842#endif-
843}
executed 867 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
867
844-
845/*!-
846 Destroys the QCoreApplication object.-
847*/-
848QCoreApplication::~QCoreApplication()-
849{-
850 qt_call_post_routines();-
851-
852 self = 0;-
853#ifndef QT_NO_QOBJECT-
854 QCoreApplicationPrivate::is_app_closing = true;-
855 QCoreApplicationPrivate::is_app_running = false;-
856#endif-
857-
858#if !defined(QT_NO_THREAD)-
859 // Synchronize and stop the global thread pool threads.-
860 QThreadPool *globalThreadPool = 0;-
861 QT_TRY {-
862 globalThreadPool = QThreadPool::globalInstance();-
863 } QT_CATCH (...) {
executed 1199 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1199
864 // swallow the exception, since destructors shouldn't throw-
865 }
never executed: end of block
0
866 if (globalThreadPool)
globalThreadPoolDescription
TRUEevaluated 1199 times by 421 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
FALSEnever evaluated
0-1199
867 globalThreadPool->waitForDone();
executed 1199 times by 421 tests: globalThreadPool->waitForDone();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1199
868#endif-
869-
870#ifndef QT_NO_QOBJECT-
871 d_func()->threadData->eventDispatcher = 0;-
872 if (QCoreApplicationPrivate::eventDispatcher)
QCoreApplicati...ventDispatcherDescription
TRUEevaluated 858 times by 205 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qbuffer - unknown status
  • tst_qbytearray - unknown status
  • ...
FALSEevaluated 341 times by 220 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • 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
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
341-858
873 QCoreApplicationPrivate::eventDispatcher->closingDown();
executed 858 times by 205 tests: QCoreApplicationPrivate::eventDispatcher->closingDown();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qbuffer - unknown status
  • tst_qbytearray - unknown status
  • ...
858
874 QCoreApplicationPrivate::eventDispatcher = 0;-
875#endif-
876-
877#ifndef QT_NO_LIBRARY-
878 coreappdata()->app_libpaths.reset();-
879 coreappdata()->manual_libpaths.reset();-
880#endif-
881}
executed 1199 times by 421 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • ...
1199
882-
883/*!-
884 \since 5.3-
885-
886 Allows the application to run setuid on UNIX platforms if \a allow-
887 is true.-
888-
889 If \a allow is false (the default) and Qt detects the application is-
890 running with an effective user id different than the real user id,-
891 the application will be aborted when a QCoreApplication instance is-
892 created.-
893-
894 Qt is not an appropriate solution for setuid programs due to its-
895 large attack surface. However some applications may be required-
896 to run in this manner for historical reasons. This flag will-
897 prevent Qt from aborting the application when this is detected,-
898 and must be set before a QCoreApplication instance is created.-
899-
900 \note It is strongly recommended not to enable this option since-
901 it introduces security risks.-
902*/-
903void QCoreApplication::setSetuidAllowed(bool allow)-
904{-
905 QCoreApplicationPrivate::setuidAllowed = allow;-
906}
never executed: end of block
0
907-
908/*!-
909 \since 5.3-
910-
911 Returns true if the application is allowed to run setuid on UNIX-
912 platforms.-
913-
914 \sa QCoreApplication::setSetuidAllowed()-
915*/-
916bool QCoreApplication::isSetuidAllowed()-
917{-
918 return QCoreApplicationPrivate::setuidAllowed;
never executed: return QCoreApplicationPrivate::setuidAllowed;
0
919}-
920-
921-
922/*!-
923 Sets the attribute \a attribute if \a on is true;-
924 otherwise clears the attribute.-
925-
926 \sa testAttribute()-
927*/-
928void QCoreApplication::setAttribute(Qt::ApplicationAttribute attribute, bool on)-
929{-
930 if (on)
onDescription
TRUEevaluated 625 times by 9 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QTextDocument
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
9-625
931 QCoreApplicationPrivate::attribs |= 1 << attribute;
executed 625 times by 9 tests: QCoreApplicationPrivate::attribs |= 1 << attribute;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QTextDocument
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
625
932 else-
933 QCoreApplicationPrivate::attribs &= ~(1 << attribute);
executed 9 times by 5 tests: QCoreApplicationPrivate::attribs &= ~(1 << attribute);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
9
934}-
935-
936/*!-
937 Returns \c true if attribute \a attribute is set;-
938 otherwise returns \c false.-
939-
940 \sa setAttribute()-
941 */-
942bool QCoreApplication::testAttribute(Qt::ApplicationAttribute attribute)-
943{-
944 return QCoreApplicationPrivate::testAttribute(attribute);
executed 1146365 times by 167 tests: return QCoreApplicationPrivate::testAttribute(attribute);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • ...
1146365
945}-
946-
947-
948#ifndef QT_NO_QOBJECT-
949-
950/*!-
951 \property QCoreApplication::quitLockEnabled-
952-
953 \brief Whether the use of the QEventLoopLocker feature can cause the-
954 application to quit.-
955-
956 The default is \c true.-
957-
958 \sa QEventLoopLocker-
959*/-
960-
961bool QCoreApplication::isQuitLockEnabled()-
962{-
963 return quitLockRefEnabled;
executed 186 times by 25 tests: return quitLockRefEnabled;
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QDialog
  • tst_QGuiApplication
  • tst_QKeyEvent
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QMouseEvent
  • tst_QOpenGLWindow
  • tst_QRasterWindow
  • tst_QTouchEvent
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
  • tst_QWindowContainer
  • tst_qdoublespinbox - unknown status
  • tst_qgraphicsgridlayout - unknown status
  • tst_qgraphicsscene - unknown status
  • tst_qinputmethod
  • tst_qpainter - unknown status
  • tst_qpushbutton - unknown status
  • tst_qsizegrip - unknown status
  • tst_qsplitter - unknown status
  • tst_qtreewidget - unknown status
186
964}-
965-
966static bool doNotify(QObject *, QEvent *);-
967-
968void QCoreApplication::setQuitLockEnabled(bool enabled)-
969{-
970 quitLockRefEnabled = enabled;-
971}
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QGuiApplication
  • tst_QWidget_window
5
972-
973/*!-
974 \internal-
975 \deprecated-
976-
977 This function is here to make it possible for Qt extensions to-
978 hook into event notification without subclassing QApplication-
979*/-
980bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)-
981{-
982 return notifyInternal2(receiver, event);
never executed: return notifyInternal2(receiver, event);
0
983}-
984-
985/*!-
986 \internal-
987 \since 5.6-
988-
989 This function is here to make it possible for Qt extensions to-
990 hook into event notification without subclassing QApplication.-
991*/-
992bool QCoreApplication::notifyInternal2(QObject *receiver, QEvent *event)-
993{-
994 bool selfRequired = QCoreApplicationPrivate::threadRequiresCoreApplication();-
995 if (!self && selfRequired)
!selfDescription
TRUEevaluated 1607 times by 169 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_NoApplication
  • tst_QGuiApplication
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • ...
FALSEevaluated 1773351 times by 517 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
selfRequiredDescription
TRUEevaluated 48 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_NoApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qfilesystemwatcher - unknown status
  • tst_qguiapplication - unknown status
FALSEevaluated 1559 times by 167 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_NoApplication
  • tst_QGuiApplication
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • ...
48-1773351
996 return false;
executed 48 times by 8 tests: return false;
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_NoApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qfilesystemwatcher - unknown status
  • tst_qguiapplication - unknown status
48
997-
998 // Make it possible for Qt Script to hook into events even-
999 // though QApplication is subclassed...-
1000 bool result = false;-
1001 void *cbdata[] = { receiver, event, &result };-
1002 if (QInternal::activateCallbacks(QInternal::EventNotifyCallback, cbdata)) {
QInternal::act...lback, cbdata)Description
TRUEnever evaluated
FALSEevaluated 1774910 times by 526 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
0-1774910
1003 return result;
never executed: return result;
0
1004 }-
1005-
1006 // Qt enforces the rule that events can only be sent to objects in-
1007 // the current thread, so receiver->d_func()->threadData is-
1008 // equivalent to QThreadData::current(), just without the function-
1009 // call overhead.-
1010 QObjectPrivate *d = receiver->d_func();-
1011 QThreadData *threadData = d->threadData;-
1012 QScopedLoopLevelCounter loopLevelCounter(threadData);-
1013 if (!selfRequired)
!selfRequiredDescription
TRUEevaluated 22369 times by 325 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 1752541 times by 494 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
22369-1752541
1014 return doNotify(receiver, event);
executed 22369 times by 325 tests: return doNotify(receiver, 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
  • ...
22369
1015 return self->notify(receiver, event);
executed 1752541 times by 494 tests: return self->notify(receiver, event);
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
1752541
1016}-
1017-
1018/*!-
1019 Sends \a event to \a receiver: \a {receiver}->event(\a event).-
1020 Returns the value that is returned from the receiver's event-
1021 handler. Note that this function is called for all events sent to-
1022 any object in any thread.-
1023-
1024 For certain types of events (e.g. mouse and key events),-
1025 the event will be propagated to the receiver's parent and so on up to-
1026 the top-level object if the receiver is not interested in the event-
1027 (i.e., it returns \c false).-
1028-
1029 There are five different ways that events can be processed;-
1030 reimplementing this virtual function is just one of them. All five-
1031 approaches are listed below:-
1032 \list 1-
1033 \li Reimplementing \l {QWidget::}{paintEvent()}, \l {QWidget::}{mousePressEvent()} and so-
1034 on. This is the most common, easiest, and least powerful way.-
1035-
1036 \li Reimplementing this function. This is very powerful, providing-
1037 complete control; but only one subclass can be active at a time.-
1038-
1039 \li Installing an event filter on QCoreApplication::instance(). Such-
1040 an event filter is able to process all events for all widgets, so-
1041 it's just as powerful as reimplementing notify(); furthermore, it's-
1042 possible to have more than one application-global event filter.-
1043 Global event filters even see mouse events for-
1044 \l{QWidget::isEnabled()}{disabled widgets}. Note that application-
1045 event filters are only called for objects that live in the main-
1046 thread.-
1047-
1048 \li Reimplementing QObject::event() (as QWidget does). If you do-
1049 this you get Tab key presses, and you get to see the events before-
1050 any widget-specific event filters.-
1051-
1052 \li Installing an event filter on the object. Such an event filter gets all-
1053 the events, including Tab and Shift+Tab key press events, as long as they-
1054 do not change the focus widget.-
1055 \endlist-
1056-
1057 \b{Future direction:} This function will not be called for objects that live-
1058 outside the main thread in Qt 6. Applications that need that functionality-
1059 should find other solutions for their event inspection needs in the meantime.-
1060 The change may be extended to the main thread, causing this function to be-
1061 deprecated.-
1062-
1063 \warning If you override this function, you must ensure all threads that-
1064 process events stop doing so before your application object begins-
1065 destruction. This includes threads started by other libraries that you may be-
1066 using, but does not apply to Qt's own threads.-
1067-
1068 \sa QObject::event(), installNativeEventFilter()-
1069*/-
1070-
1071bool QCoreApplication::notify(QObject *receiver, QEvent *event)-
1072{-
1073 // no events are delivered after ~QCoreApplication() has started-
1074 if (QCoreApplicationPrivate::is_app_closing)
QCoreApplicati...is_app_closingDescription
TRUEevaluated 240 times by 158 tests
Evaluated by:
  • tst_QApplication
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • ...
FALSEevaluated 635952 times by 197 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractTextDocumentLayout
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBuffer
  • tst_QClipboard
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusLocalCalls
  • tst_QDBusMarshall
  • ...
240-635952
1075 return true;
executed 240 times by 158 tests: return true;
Executed by:
  • tst_QApplication
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • ...
240
1076 return doNotify(receiver, event);
executed 635952 times by 197 tests: return doNotify(receiver, event);
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractTextDocumentLayout
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBuffer
  • tst_QClipboard
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusLocalCalls
  • tst_QDBusMarshall
  • ...
635952
1077}-
1078-
1079static bool doNotify(QObject *receiver, QEvent *event)-
1080{-
1081 if (receiver == 0) { // serious error
receiver == 0Description
TRUEnever evaluated
FALSEevaluated 658321 times by 468 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • ...
0-658321
1082 qWarning("QCoreApplication::notify: Unexpected null receiver");-
1083 return true;
never executed: return true;
0
1084 }-
1085-
1086#ifndef QT_NO_DEBUG-
1087 QCoreApplicationPrivate::checkReceiverThread(receiver);-
1088#endif-
1089-
1090 return receiver->isWidgetType() ? false : QCoreApplicationPrivate::notify_helper(receiver, event);
executed 658321 times by 468 tests: return receiver->isWidgetType() ? false : QCoreApplicationPrivate::notify_helper(receiver, event);
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • ...
receiver->isWidgetType()Description
TRUEnever evaluated
FALSEevaluated 658321 times by 468 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • ...
0-658321
1091}-
1092-
1093bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiver, QEvent *event)-
1094{-
1095 // We can't access the application event filters outside of the main thread (race conditions)-
1096 Q_ASSERT(receiver->d_func()->threadData->thread == mainThread());-
1097-
1098 if (extraData) {
extraDataDescription
TRUEevaluated 186455 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
  • tst_qpushbutton - unknown status
  • tst_qwindow - unknown status
FALSEevaluated 1376052 times by 337 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
186455-1376052
1099 // application event filters are only called for objects in the GUI thread-
1100 for (int i = 0; i < extraData->eventFilters.size(); ++i) {
i < extraData-...Filters.size()Description
TRUEevaluated 218310 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
  • tst_qpushbutton - unknown status
  • tst_qwindow - unknown status
FALSEevaluated 186440 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
  • tst_qpushbutton - unknown status
  • tst_qwindow - unknown status
186440-218310
1101 QObject *obj = extraData->eventFilters.at(i);-
1102 if (!obj)
!objDescription
TRUEevaluated 74936 times by 17 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qpushbutton - unknown status
  • tst_qwindow - unknown status
FALSEevaluated 143374 times by 20 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
74936-143374
1103 continue;
executed 74936 times by 17 tests: continue;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qpushbutton - unknown status
  • tst_qwindow - unknown status
74936
1104 if (obj->d_func()->threadData != threadData) {
obj->d_func()-... != threadDataDescription
TRUEnever evaluated
FALSEevaluated 143374 times by 20 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
0-143374
1105 qWarning("QCoreApplication: Application event filter cannot be in a different thread.");-
1106 continue;
never executed: continue;
0
1107 }-
1108 if (obj->eventFilter(receiver, event))
obj->eventFilt...ceiver, event)Description
TRUEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QMdiArea
FALSEevaluated 143359 times by 20 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
15-143359
1109 return true;
executed 15 times by 2 tests: return true;
Executed by:
  • tst_QCalendarWidget
  • tst_QMdiArea
15
1110 }
executed 143359 times by 20 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
143359
1111 }
executed 186440 times by 22 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QPushButton
  • tst_QSizeGrip
  • tst_QSplitter
  • tst_QStateMachine
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTranslator
  • tst_QWidget
  • tst_QWindow
  • tst_qpushbutton - unknown status
  • tst_qwindow - unknown status
186440
1112 return false;
executed 1562492 times by 340 tests: return false;
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
1562492
1113}-
1114-
1115bool QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject *receiver, QEvent *event)-
1116{-
1117 if (receiver != QCoreApplication::instance() && receiver->d_func()->extraData) {
receiver != QC...on::instance()Description
TRUEevaluated 1796653 times by 427 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
FALSEevaluated 2323 times by 235 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • ...
receiver->d_func()->extraDataDescription
TRUEevaluated 638916 times by 358 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_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
FALSEevaluated 1157737 times by 423 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
2323-1796653
1118 for (int i = 0; i < receiver->d_func()->extraData->eventFilters.size(); ++i) {
i < receiver->...Filters.size()Description
TRUEevaluated 218334 times by 91 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusFrame
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • ...
FALSEevaluated 620547 times by 358 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_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
218334-620547
1119 QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);-
1120 if (!obj)
!objDescription
TRUEevaluated 16575 times by 84 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusFrame
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • ...
FALSEevaluated 201759 times by 90 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • ...
16575-201759
1121 continue;
executed 16575 times by 84 tests: continue;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusFrame
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • ...
16575
1122 if (obj->d_func()->threadData != receiver->d_func()->threadData) {
obj->d_func()-...()->threadDataDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QObject
FALSEevaluated 201758 times by 90 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • ...
1-201758
1123 qWarning("QCoreApplication: Object event filter cannot be in a different thread.");-
1124 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QObject
1
1125 }-
1126 if (obj->eventFilter(receiver, event))
obj->eventFilt...ceiver, event)Description
TRUEevaluated 18369 times by 67 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • ...
FALSEevaluated 183389 times by 90 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • ...
18369-183389
1127 return true;
executed 18369 times by 67 tests: return true;
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • ...
18369
1128 }
executed 183389 times by 90 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • ...
183389
1129 }
executed 620547 times by 358 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_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
620547
1130 return false;
executed 1780607 times by 490 tests: return false;
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • ...
1780607
1131}-
1132-
1133/*!-
1134 \internal-
1135-
1136 Helper function called by QCoreApplicationPrivate::notify() and qapplication.cpp-
1137 */-
1138bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event)-
1139{-
1140 // send to all application event filters (only does anything in the main thread)-
1141 if (QCoreApplication::self
QCoreApplication::selfDescription
TRUEevaluated 656762 times by 341 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • ...
FALSEevaluated 1559 times by 167 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_NoApplication
  • tst_QGuiApplication
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • ...
1559-656762
1142 && receiver->d_func()->threadData->thread == mainThread()
receiver->d_fu...= mainThread()Description
TRUEevaluated 424134 times by 195 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractTextDocumentLayout
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBuffer
  • tst_QClipboard
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusLocalCalls
  • tst_QDBusMarshall
  • ...
FALSEevaluated 232628 times by 205 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
  • ...
232628-424134
1143 && QCoreApplication::self->d_func()->sendThroughApplicationEventFilters(receiver, event))
QCoreApplicati...ceiver, event)Description
TRUEnever evaluated
FALSEevaluated 424134 times by 195 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractTextDocumentLayout
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBuffer
  • tst_QClipboard
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusLocalCalls
  • tst_QDBusMarshall
  • ...
0-424134
1144 return true;
never executed: return true;
0
1145 // send to all receiver event filters-
1146 if (sendThroughObjectEventFilters(receiver, event))
sendThroughObj...ceiver, event)Description
TRUEnever evaluated
FALSEevaluated 658321 times by 468 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • ...
0-658321
1147 return true;
never executed: return true;
0
1148 // deliver the event-
1149 return receiver->event(event);
executed 658321 times by 468 tests: return receiver->event(event);
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • ...
658321
1150}-
1151-
1152/*!-
1153 Returns \c true if an application object has not been created yet;-
1154 otherwise returns \c false.-
1155-
1156 \sa closingDown()-
1157*/-
1158-
1159bool QCoreApplication::startingUp()-
1160{-
1161 return !QCoreApplicationPrivate::is_app_running;
executed 267 times by 6 tests: return !QCoreApplicationPrivate::is_app_running;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_QScreen
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
267
1162}-
1163-
1164/*!-
1165 Returns \c true if the application objects are being destroyed;-
1166 otherwise returns \c false.-
1167-
1168 \sa startingUp()-
1169*/-
1170-
1171bool QCoreApplication::closingDown()-
1172{-
1173 return QCoreApplicationPrivate::is_app_closing;
executed 78069 times by 278 tests: return QCoreApplicationPrivate::is_app_closing;
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_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
78069
1174}-
1175-
1176-
1177/*!-
1178 Processes all pending events for the calling thread according to-
1179 the specified \a flags until there are no more events to process.-
1180-
1181 You can call this function occasionally when your program is busy-
1182 performing a long operation (e.g. copying a file).-
1183-
1184 In the event that you are running a local loop which calls this function-
1185 continuously, without an event loop, the-
1186 \l{QEvent::DeferredDelete}{DeferredDelete} events will-
1187 not be processed. This can affect the behaviour of widgets,-
1188 e.g. QToolTip, that rely on \l{QEvent::DeferredDelete}{DeferredDelete}-
1189 events to function properly. An alternative would be to call-
1190 \l{QCoreApplication::sendPostedEvents()}{sendPostedEvents()} from-
1191 within that local loop.-
1192-
1193 Calling this function processes events only for the calling thread.-
1194-
1195 \threadsafe-
1196-
1197 \sa exec(), QTimer, QEventLoop::processEvents(), flush(), sendPostedEvents()-
1198*/-
1199void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags)-
1200{-
1201 QThreadData *data = QThreadData::current();-
1202 if (!data->hasEventDispatcher())
!data->hasEventDispatcher()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
FALSEevaluated 2085783 times by 98 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QEventDispatcher
  • tst_QEventLoop
  • ...
1-2085783
1203 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QApplication
1
1204 data->eventDispatcher.load()->processEvents(flags);-
1205}
executed 2085783 times by 98 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QEventDispatcher
  • tst_QEventLoop
  • ...
2085783
1206-
1207/*!-
1208 \overload processEvents()-
1209-
1210 Processes pending events for the calling thread for \a maxtime-
1211 milliseconds or until there are no more events to process,-
1212 whichever is shorter.-
1213-
1214 You can call this function occasionally when your program is busy-
1215 doing a long operation (e.g. copying a file).-
1216-
1217 Calling this function processes events only for the calling thread.-
1218-
1219 \threadsafe-
1220-
1221 \sa exec(), QTimer, QEventLoop::processEvents()-
1222*/-
1223void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime)-
1224{-
1225 QThreadData *data = QThreadData::current();-
1226 if (!data->hasEventDispatcher())
!data->hasEventDispatcher()Description
TRUEnever evaluated
FALSEevaluated 1250722 times by 147 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
0-1250722
1227 return;
never executed: return;
0
1228 QElapsedTimer start;-
1229 start.start();-
1230 while (data->eventDispatcher.load()->processEvents(flags & ~QEventLoop::WaitForMoreEvents)) {
data->eventDis...ForMoreEvents)Description
TRUEevaluated 41723 times by 147 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
FALSEevaluated 1250449 times by 146 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
41723-1250449
1231 if (start.elapsed() > maxtime)
start.elapsed() > maxtimeDescription
TRUEevaluated 273 times by 48 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QHttpNetworkConnection
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • ...
FALSEevaluated 41450 times by 146 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
273-41450
1232 break;
executed 273 times by 48 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QHttpNetworkConnection
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • ...
273
1233 }
executed 41450 times by 146 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
41450
1234}
executed 1250722 times by 147 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
1250722
1235-
1236/*****************************************************************************-
1237 Main event loop wrappers-
1238 *****************************************************************************/-
1239-
1240/*!-
1241 Enters the main event loop and waits until exit() is called. Returns-
1242 the value that was passed to exit() (which is 0 if exit() is called via-
1243 quit()).-
1244-
1245 It is necessary to call this function to start event handling. The-
1246 main event loop receives events from the window system and-
1247 dispatches these to the application widgets.-
1248-
1249 To make your application perform idle processing (by executing a-
1250 special function whenever there are no pending events), use a-
1251 QTimer with 0 timeout. More advanced idle processing schemes can-
1252 be achieved using processEvents().-
1253-
1254 We recommend that you connect clean-up code to the-
1255 \l{QCoreApplication::}{aboutToQuit()} signal, instead of putting it in-
1256 your application's \c{main()} function because on some platforms the-
1257 exec() call may not return. For example, on Windows-
1258 when the user logs off, the system terminates the process after Qt-
1259 closes all top-level windows. Hence, there is no guarantee that the-
1260 application will have time to exit its event loop and execute code at-
1261 the end of the \c{main()} function after the exec()-
1262 call.-
1263-
1264 \sa quit(), exit(), processEvents(), QApplication::exec()-
1265*/-
1266int QCoreApplication::exec()-
1267{-
1268 if (!QCoreApplicationPrivate::checkInstance("exec"))
!QCoreApplicat...stance("exec")Description
TRUEnever evaluated
FALSEevaluated 85 times by 12 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
0-85
1269 return -1;
never executed: return -1;
0
1270-
1271 QThreadData *threadData = self->d_func()->threadData;-
1272 if (threadData != QThreadData::current()) {
threadData != ...ata::current()Description
TRUEnever evaluated
FALSEevaluated 85 times by 12 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
0-85
1273 qWarning("%s::exec: Must be called from the main thread", self->metaObject()->className());-
1274 return -1;
never executed: return -1;
0
1275 }-
1276 if (!threadData->eventLoops.isEmpty()) {
!threadData->e...oops.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 85 times by 12 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
0-85
1277 qWarning("QCoreApplication::exec: The event loop is already running");-
1278 return -1;
never executed: return -1;
0
1279 }-
1280-
1281 threadData->quitNow = false;-
1282 QEventLoop eventLoop;-
1283 self->d_func()->in_exec = true;-
1284 self->d_func()->aboutToQuitEmitted = false;-
1285 int returnCode = eventLoop.exec();-
1286 threadData->quitNow = false;-
1287 if (self) {
selfDescription
TRUEevaluated 84 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
FALSEnever evaluated
0-84
1288 self->d_func()->in_exec = false;-
1289 if (!self->d_func()->aboutToQuitEmitted)
!self->d_func(...tToQuitEmittedDescription
TRUEevaluated 84 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
FALSEnever evaluated
0-84
1290 emit self->aboutToQuit(QPrivateSignal());
executed 84 times by 11 tests: self->aboutToQuit(QPrivateSignal());
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
84
1291 self->d_func()->aboutToQuitEmitted = true;-
1292 sendPostedEvents(0, QEvent::DeferredDelete);-
1293 }
executed 84 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
84
1294-
1295 return returnCode;
executed 84 times by 11 tests: return returnCode;
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
84
1296}-
1297-
1298-
1299/*!-
1300 Tells the application to exit with a return code.-
1301-
1302 After this function has been called, the application leaves the-
1303 main event loop and returns from the call to exec(). The exec()-
1304 function returns \a returnCode. If the event loop is not running,-
1305 this function does nothing.-
1306-
1307 By convention, a \a returnCode of 0 means success, and any non-zero-
1308 value indicates an error.-
1309-
1310 Note that unlike the C library function of the same name, this-
1311 function \e does return to the caller -- it is event processing that-
1312 stops.-
1313-
1314 \sa quit(), exec()-
1315*/-
1316void QCoreApplication::exit(int returnCode)-
1317{-
1318 if (!self)
!selfDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 92 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
2-92
1319 return;
executed 2 times by 2 tests: return;
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
1320 QThreadData *data = self->d_func()->threadData;-
1321 data->quitNow = true;-
1322 for (int i = 0; i < data->eventLoops.size(); ++i) {
i < data->eventLoops.size()Description
TRUEevaluated 91 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
FALSEevaluated 92 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
91-92
1323 QEventLoop *eventLoop = data->eventLoops.at(i);-
1324 eventLoop->exit(returnCode);-
1325 }
executed 91 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
91
1326#ifdef Q_OS_WINRT-
1327 qWarning("QCoreApplication::exit: It is not recommended to explicitly exit an application on Windows Store Apps");-
1328 ComPtr<ICoreApplication> app;-
1329 HRESULT hr = RoGetActivationFactory(Wrappers::HString::MakeReference(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication).Get(),-
1330 IID_PPV_ARGS(&app));-
1331 RETURN_VOID_IF_FAILED("Could not acquire ICoreApplication object");-
1332 ComPtr<ICoreApplicationExit> appExit;-
1333-
1334 hr = app.As(&appExit);-
1335 RETURN_VOID_IF_FAILED("Could not acquire ICoreApplicationExit object");-
1336 hr = appExit->Exit();-
1337 RETURN_VOID_IF_FAILED("Could not exit application");-
1338#endif // Q_OS_WINRT-
1339}
executed 92 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
92
1340-
1341/*****************************************************************************-
1342 QCoreApplication management of posted events-
1343 *****************************************************************************/-
1344-
1345/*!-
1346 \fn bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)-
1347-
1348 Sends event \a event directly to receiver \a receiver, using the-
1349 notify() function. Returns the value that was returned from the-
1350 event handler.-
1351-
1352 The event is \e not deleted when the event has been sent. The normal-
1353 approach is to create the event on the stack, for example:-
1354-
1355 \snippet code/src_corelib_kernel_qcoreapplication.cpp 0-
1356-
1357 \sa postEvent(), notify()-
1358*/-
1359-
1360/*!-
1361 \since 4.3-
1362-
1363 Adds the event \a event, with the object \a receiver as the-
1364 receiver of the event, to an event queue and returns immediately.-
1365-
1366 The event must be allocated on the heap since the post event queue-
1367 will take ownership of the event and delete it once it has been-
1368 posted. It is \e {not safe} to access the event after-
1369 it has been posted.-
1370-
1371 When control returns to the main event loop, all events that are-
1372 stored in the queue will be sent using the notify() function.-
1373-
1374 Events are sorted in descending \a priority order, i.e. events-
1375 with a high \a priority are queued before events with a lower \a-
1376 priority. The \a priority can be any integer value, i.e. between-
1377 INT_MAX and INT_MIN, inclusive; see Qt::EventPriority for more-
1378 details. Events with equal \a priority will be processed in the-
1379 order posted.-
1380-
1381 \threadsafe-
1382-
1383 \sa sendEvent(), notify(), sendPostedEvents(), Qt::EventPriority-
1384*/-
1385void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)-
1386{-
1387 if (receiver == 0) {
receiver == 0Description
TRUEnever evaluated
FALSEevaluated 660847 times by 492 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
0-660847
1388 qWarning("QCoreApplication::postEvent: Unexpected null receiver");-
1389 delete event;-
1390 return;
never executed: return;
0
1391 }-
1392-
1393 QThreadData * volatile * pdata = &receiver->d_func()->threadData;-
1394 QThreadData *data = *pdata;-
1395 if (!data) {
!dataDescription
TRUEnever evaluated
FALSEevaluated 660847 times by 492 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
0-660847
1396 // posting during destruction? just delete the event to prevent a leak-
1397 delete event;-
1398 return;
never executed: return;
0
1399 }-
1400-
1401 // lock the post event mutex-
1402 data->postEventList.mutex.lock();-
1403-
1404 // if object has moved to another thread, follow it-
1405 while (data != *pdata) {
data != *pdataDescription
TRUEnever evaluated
FALSEevaluated 660847 times by 492 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
0-660847
1406 data->postEventList.mutex.unlock();-
1407-
1408 data = *pdata;-
1409 if (!data) {
!dataDescription
TRUEnever evaluated
FALSEnever evaluated
0
1410 // posting during destruction? just delete the event to prevent a leak-
1411 delete event;-
1412 return;
never executed: return;
0
1413 }-
1414-
1415 data->postEventList.mutex.lock();-
1416 }
never executed: end of block
0
1417-
1418 QMutexUnlocker locker(&data->postEventList.mutex);-
1419-
1420 // if this is one of the compressible events, do compression-
1421 if (receiver->d_func()->postedEvents
receiver->d_fu...->postedEventsDescription
TRUEevaluated 192986 times by 422 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
FALSEevaluated 467861 times by 492 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
192986-467861
1422 && self && self->compressEvent(event, receiver, &data->postEventList)) {
selfDescription
TRUEevaluated 192248 times by 224 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
FALSEevaluated 738 times by 221 tests
Evaluated by:
  • tst_QApplication
  • tst_QDBusConnection_NoApplication
  • tst_QGuiApplication
  • 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
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • ...
self->compress...postEventList)Description
TRUEevaluated 10812 times by 107 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 181436 times by 223 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
738-192248
1423 return;
executed 10812 times by 107 tests: return;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
10812
1424 }-
1425-
1426 if (event->type() == QEvent::DeferredDelete && data == QThreadData::current()) {
event->type() ...DeferredDeleteDescription
TRUEevaluated 11043 times by 213 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 638992 times by 468 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • ...
data == QThreadData::current()Description
TRUEevaluated 9990 times by 192 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 1053 times by 37 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_Spdy
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • ...
1053-638992
1427 // remember the current running eventloop for DeferredDelete-
1428 // events posted in the receiver's thread-
1429 static_cast<QDeferredDeleteEvent *>(event)->level = data->loopLevel;-
1430 }
executed 9990 times by 192 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
9990
1431-
1432 // delete the event on exceptions to protect against memory leaks till the event is-
1433 // properly owned in the postEventList-
1434 QScopedPointer<QEvent> eventDeleter(event);-
1435 data->postEventList.addEvent(QPostEvent(receiver, event, priority));-
1436 eventDeleter.take();-
1437 event->posted = true;-
1438 ++receiver->d_func()->postedEvents;-
1439 data->canWait = false;-
1440 locker.unlock();-
1441-
1442 QAbstractEventDispatcher* dispatcher = data->eventDispatcher.loadAcquire();-
1443 if (dispatcher)
dispatcherDescription
TRUEevaluated 646015 times by 399 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
FALSEevaluated 4020 times by 386 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
  • ...
4020-646015
1444 dispatcher->wakeUp();
executed 646015 times by 399 tests: dispatcher->wakeUp();
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
646015
1445}
executed 650035 times by 492 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
650035
1446-
1447/*!-
1448 \internal-
1449 Returns \c true if \a event was compressed away (possibly deleted) and should not be added to the list.-
1450*/-
1451bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventList *postedEvents)-
1452{-
1453#ifdef Q_OS_WIN-
1454 Q_ASSERT(event);-
1455 Q_ASSERT(receiver);-
1456 Q_ASSERT(postedEvents);-
1457-
1458 // compress posted timers to this object.-
1459 if (event->type() == QEvent::Timer && receiver->d_func()->postedEvents > 0) {-
1460 int timerId = ((QTimerEvent *) event)->timerId();-
1461 for (int i=0; i<postedEvents->size(); ++i) {-
1462 const QPostEvent &e = postedEvents->at(i);-
1463 if (e.receiver == receiver && e.event && e.event->type() == QEvent::Timer-
1464 && ((QTimerEvent *) e.event)->timerId() == timerId) {-
1465 delete event;-
1466 return true;-
1467 }-
1468 }-
1469 } else-
1470#endif-
1471 if ((event->type() == QEvent::DeferredDelete
event->type() ...DeferredDeleteDescription
TRUEevaluated 881 times by 36 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • ...
FALSEevaluated 157460 times by 217 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
881-157460
1472 || event->type() == QEvent::Quit)
event->type() == QEvent::QuitDescription
TRUEnever evaluated
FALSEevaluated 157460 times by 217 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
0-157460
1473 && receiver->d_func()->postedEvents > 0) {
receiver->d_fu...stedEvents > 0Description
TRUEevaluated 881 times by 36 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • ...
FALSEnever evaluated
0-881
1474 for (int i = 0; i < postedEvents->size(); ++i) {
i < postedEvents->size()Description
TRUEevaluated 17125 times by 36 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • ...
FALSEevaluated 712 times by 34 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • tst_QTcpServer
  • tst_QTextEdit
  • ...
712-17125
1475 const QPostEvent &cur = postedEvents->at(i);-
1476 if (cur.receiver != receiver
cur.receiver != receiverDescription
TRUEevaluated 15415 times by 31 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDialog
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • tst_QTcpServer
  • tst_QTextEdit
  • tst_QToolBar
  • tst_QToolBox
  • ...
FALSEevaluated 1710 times by 36 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • ...
1710-15415
1477 || cur.event == 0
cur.event == 0Description
TRUEevaluated 420 times by 9 tests
Evaluated by:
  • tst_QApplication
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDialog
  • tst_QMainWindow
  • tst_QNetworkConfigurationManager
  • tst_QNetworkReply
  • tst_QTreeView
  • tst_Spdy
FALSEevaluated 1290 times by 36 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • ...
420-1290
1478 || cur.event->type() != event->type())
cur.event->typ... event->type()Description
TRUEevaluated 1121 times by 34 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • tst_QTcpServer
  • tst_QTextEdit
  • ...
FALSEevaluated 169 times by 9 tests
Evaluated by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_Spdy
169-1121
1479 continue;
executed 16956 times by 34 tests: continue;
Executed by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • tst_QTcpServer
  • tst_QTextEdit
  • ...
16956
1480 // found an event for this receiver-
1481 delete event;-
1482 return true;
executed 169 times by 9 tests: return true;
Executed by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_Spdy
169
1483 }-
1484 }
executed 712 times by 34 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QGridLayout
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTableWidget
  • tst_QTcpServer
  • tst_QTextEdit
  • ...
712
1485 return false;
executed 158172 times by 218 tests: return false;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
158172
1486}-
1487-
1488/*!-
1489 Immediately dispatches all events which have been previously queued-
1490 with QCoreApplication::postEvent() and which are for the object \a receiver-
1491 and have the event type \a event_type.-
1492-
1493 Events from the window system are \e not dispatched by this-
1494 function, but by processEvents().-
1495-
1496 If \a receiver is null, the events of \a event_type are sent for all-
1497 objects. If \a event_type is 0, all the events are sent for \a receiver.-
1498-
1499 \note This method must be called from the thread in which its QObject-
1500 parameter, \a receiver, lives.-
1501-
1502 \sa flush(), postEvent()-
1503*/-
1504void QCoreApplication::sendPostedEvents(QObject *receiver, int event_type)-
1505{-
1506 QThreadData *data = QThreadData::current();-
1507-
1508 QCoreApplicationPrivate::sendPostedEvents(receiver, event_type, data);-
1509}
executed 1087000 times by 772 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
1087000
1510-
1511void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type,-
1512 QThreadData *data)-
1513{-
1514 if (event_type == -1) {
event_type == -1Description
TRUEnever evaluated
FALSEevaluated 1087000 times by 774 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
0-1087000
1515 // we were called by an obsolete event dispatcher.-
1516 event_type = 0;-
1517 }
never executed: end of block
0
1518-
1519 if (receiver && receiver->d_func()->threadData != data) {
receiverDescription
TRUEevaluated 1913 times by 30 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QObject
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • ...
FALSEevaluated 1085087 times by 774 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
receiver->d_fu...adData != dataDescription
TRUEnever evaluated
FALSEevaluated 1913 times by 30 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QObject
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • ...
0-1085087
1520 qWarning("QCoreApplication::sendPostedEvents: Cannot send "-
1521 "posted events for objects in another thread");-
1522 return;
never executed: return;
0
1523 }-
1524-
1525 ++data->postEventList.recursion;-
1526-
1527 QMutexLocker locker(&data->postEventList.mutex);-
1528-
1529 // by default, we assume that the event dispatcher can go to sleep after-
1530 // processing all events. if any new events are posted while we send-
1531 // events, canWait will be set to false.-
1532 data->canWait = (data->postEventList.size() == 0);-
1533-
1534 if (data->postEventList.size() == 0 || (receiver && !receiver->d_func()->postedEvents)) {
data->postEven...st.size() == 0Description
TRUEevaluated 706752 times by 741 tests
Evaluated by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • ...
FALSEevaluated 380248 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
receiverDescription
TRUEevaluated 1913 times by 30 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QObject
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • ...
FALSEevaluated 378335 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
!receiver->d_f...->postedEventsDescription
TRUEevaluated 52 times by 8 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QDBusPendingCall
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QTableView
  • tst_QTreeWidget
FALSEevaluated 1861 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QObject
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • ...
52-706752
1535 --data->postEventList.recursion;-
1536 return;
executed 706804 times by 741 tests: return;
Executed by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAtomicInt
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • ...
706804
1537 }-
1538-
1539 data->canWait = true;-
1540-
1541 // okay. here is the tricky loop. be careful about optimizing-
1542 // this, it looks the way it does for good reasons.-
1543 int startOffset = data->postEventList.startOffset;-
1544 int &i = (!event_type && !receiver) ? data->postEventList.startOffset : startOffset;
!event_typeDescription
TRUEevaluated 375636 times by 353 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 4560 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • ...
!receiverDescription
TRUEevaluated 375598 times by 353 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 38 times by 6 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QTreeView
38-375636
1545 data->postEventList.insertionOffset = data->postEventList.size();-
1546-
1547 // Exception-safe cleaning up without the need for a try/catch block-
1548 struct CleanUp {-
1549 QObject *receiver;-
1550 int event_type;-
1551 QThreadData *data;-
1552 bool exceptionCaught;-
1553-
1554 inline CleanUp(QObject *receiver, int event_type, QThreadData *data) :-
1555 receiver(receiver), event_type(event_type), data(data), exceptionCaught(true)-
1556 {}
executed 380196 times by 354 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
380196
1557 inline ~CleanUp()-
1558 {-
1559 if (exceptionCaught) {
exceptionCaughtDescription
TRUEnever evaluated
FALSEevaluated 380196 times by 355 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
0-380196
1560 // since we were interrupted, we need another pass to make sure we clean everything up-
1561 data->canWait = false;-
1562 }
never executed: end of block
0
1563-
1564 --data->postEventList.recursion;-
1565 if (!data->postEventList.recursion && !data->canWait && data->hasEventDispatcher())
!data->postEventList.recursionDescription
TRUEevaluated 377125 times by 355 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 3071 times by 29 tests
Evaluated by:
  • tst_Gestures
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QDialog
  • tst_QEventLoop
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QObject
  • tst_QOpenGLWidget
  • ...
!data->canWaitDescription
TRUEevaluated 30205 times by 202 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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
  • ...
FALSEevaluated 346920 times by 355 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
data->hasEventDispatcher()Description
TRUEevaluated 30205 times by 202 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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
  • ...
FALSEnever evaluated
0-377125
1566 data->eventDispatcher.load()->wakeUp();
executed 30205 times by 202 tests: data->eventDispatcher.load()->wakeUp();
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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
  • ...
30205
1567-
1568 // clear the global list, i.e. remove everything that was-
1569 // delivered.-
1570 if (!event_type && !receiver && data->postEventList.startOffset >= 0) {
!event_typeDescription
TRUEevaluated 375636 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 4560 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • ...
!receiverDescription
TRUEevaluated 375598 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 38 times by 6 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QTreeView
data->postEven...artOffset >= 0Description
TRUEevaluated 375598 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEnever evaluated
0-375636
1571 const QPostEventList::iterator it = data->postEventList.begin();-
1572 data->postEventList.erase(it, it + data->postEventList.startOffset);-
1573 data->postEventList.insertionOffset -= data->postEventList.startOffset;-
1574 Q_ASSERT(data->postEventList.insertionOffset >= 0);-
1575 data->postEventList.startOffset = 0;-
1576 }
executed 375598 times by 354 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
375598
1577 }
executed 380196 times by 355 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
380196
1578 };-
1579 CleanUp cleanup(receiver, event_type, data);-
1580-
1581 while (i < data->postEventList.size()) {
i < data->postEventList.size()Description
TRUEevaluated 697487 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 350698 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
350698-697487
1582 // avoid live-lock-
1583 if (i >= data->postEventList.insertionOffset)
i >= data->pos...nsertionOffsetDescription
TRUEevaluated 29498 times by 204 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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
  • ...
FALSEevaluated 667989 times by 354 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
29498-667989
1584 break;
executed 29498 times by 204 tests: break;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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
  • ...
29498
1585-
1586 const QPostEvent &pe = data->postEventList.at(i);-
1587 ++i;-
1588-
1589 if (!pe.event)
!pe.eventDescription
TRUEevaluated 68943 times by 131 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusPendingCall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsAnchorLayout
  • ...
FALSEevaluated 599046 times by 353 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
68943-599046
1590 continue;
executed 68943 times by 131 tests: continue;
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusPendingCall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsAnchorLayout
  • ...
68943
1591 if ((receiver && receiver != pe.receiver) || (event_type && event_type != pe.event->type())) {
receiverDescription
TRUEevaluated 32659 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QObject
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • ...
FALSEevaluated 566387 times by 353 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
receiver != pe.receiverDescription
TRUEevaluated 28394 times by 26 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • tst_QTouchEvent
  • tst_QTreeView
  • ...
FALSEevaluated 4265 times by 28 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QMainWindow
  • tst_QObject
  • tst_QOpenGLWidget
  • tst_QPainter
  • tst_QPrinter
  • ...
event_typeDescription
TRUEevaluated 13843 times by 75 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • ...
FALSEevaluated 556809 times by 353 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
event_type != pe.event->type()Description
TRUEevaluated 11190 times by 55 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • ...
FALSEevaluated 2653 times by 58 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • ...
2653-566387
1592 data->canWait = false;-
1593 continue;
executed 39584 times by 58 tests: continue;
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsLayout
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
39584
1594 }-
1595-
1596 if (pe.event->type() == QEvent::DeferredDelete) {
pe.event->type...DeferredDeleteDescription
TRUEevaluated 5870 times by 174 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_NoApplication
  • ...
FALSEevaluated 553592 times by 351 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
5870-553592
1597 // DeferredDelete events are only sent when we are explicitly asked to-
1598 // (s.a. QEvent::DeferredDelete), and then only if the event loop that-
1599 // posted the event has returned.-
1600 int loopLevel = static_cast<QDeferredDeleteEvent *>(pe.event)->loopLevel();-
1601 const bool allowDeferredDelete =-
1602 (loopLevel > data->loopLevel
loopLevel > data->loopLevelDescription
TRUEevaluated 2273 times by 151 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • ...
FALSEevaluated 3597 times by 73 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • ...
2273-3597
1603 || (!loopLevel && data->loopLevel > 0)
!loopLevelDescription
TRUEevaluated 3513 times by 72 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • ...
FALSEevaluated 84 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QItemDelegate
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QTcpSocket
data->loopLevel > 0Description
TRUEevaluated 1207 times by 41 tests
Evaluated by:
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPointer
  • tst_QProcess
  • tst_QSslSocket
  • tst_QToolButton
  • tst_Spdy
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • ...
FALSEevaluated 2306 times by 39 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPrinter
  • tst_QProcess
  • ...
84-3513
1604 || (event_type == QEvent::DeferredDelete
event_type == ...DeferredDeleteDescription
TRUEevaluated 794 times by 37 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPrinter
  • tst_QProcess
  • tst_QShortcut
  • ...
FALSEevaluated 1596 times by 34 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QShortcut
  • ...
794-1596
1605 && loopLevel == data->loopLevel));
loopLevel == data->loopLevelDescription
TRUEevaluated 793 times by 37 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPrinter
  • tst_QProcess
  • tst_QShortcut
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
1-793
1606 if (!allowDeferredDelete) {
!allowDeferredDeleteDescription
TRUEevaluated 1597 times by 34 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QShortcut
  • ...
FALSEevaluated 4273 times by 173 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_NoApplication
  • ...
1597-4273
1607 // cannot send deferred delete-
1608 if (!event_type && !receiver) {
!event_typeDescription
TRUEevaluated 1596 times by 34 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QShortcut
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
!receiverDescription
TRUEevaluated 1596 times by 34 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QShortcut
  • ...
FALSEnever evaluated
0-1596
1609 // we must copy it first; we want to re-post the event-
1610 // with the event pointer intact, but we can't delay-
1611 // nulling the event ptr until after re-posting, as-
1612 // addEvent may invalidate pe.-
1613 QPostEvent pe_copy = pe;-
1614-
1615 // null out the event so if sendPostedEvents recurses, it-
1616 // will ignore this one, as it's been re-posted.-
1617 const_cast<QPostEvent &>(pe).event = 0;-
1618-
1619 // re-post the copied event so it isn't lost-
1620 data->postEventList.addEvent(pe_copy);-
1621 }
executed 1596 times by 34 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QShortcut
  • ...
1596
1622 continue;
executed 1597 times by 34 tests: continue;
Executed by:
  • tst_Gestures
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QShortcut
  • ...
1597
1623 }-
1624 }
executed 4273 times by 173 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_NoApplication
  • ...
4273
1625-
1626 // first, we diddle the event so that we can deliver-
1627 // it, and that no one will try to touch it later.-
1628 pe.event->posted = false;-
1629 QEvent *e = pe.event;-
1630 QObject * r = pe.receiver;-
1631-
1632 --r->d_func()->postedEvents;-
1633 Q_ASSERT(r->d_func()->postedEvents >= 0);-
1634-
1635 // next, update the data structure so that we're ready-
1636 // for the next event.-
1637 const_cast<QPostEvent &>(pe).event = 0;-
1638-
1639 struct MutexUnlocker-
1640 {-
1641 QMutexLocker &m;-
1642 MutexUnlocker(QMutexLocker &m) : m(m) { m.unlock(); }
executed 557865 times by 352 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
557865
1643 ~MutexUnlocker() { m.relock(); }
executed 557865 times by 353 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
557865
1644 };-
1645 MutexUnlocker unlocker(locker);-
1646-
1647 QScopedPointer<QEvent> event_deleter(e); // will delete the event (with the mutex unlocked)-
1648-
1649 // after all that work, it's time to deliver the event.-
1650 QCoreApplication::sendEvent(r, e);-
1651-
1652 // careful when adding anything below this point - the-
1653 // sendEvent() call might invalidate any invariants this-
1654 // function depends on.-
1655 }
executed 557864 times by 352 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
557864
1656-
1657 cleanup.exceptionCaught = false;-
1658}
executed 380196 times by 355 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • 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_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
380196
1659-
1660/*!-
1661 \since 4.3-
1662-
1663 Removes all events of the given \a eventType that were posted-
1664 using postEvent() for \a receiver.-
1665-
1666 The events are \e not dispatched, instead they are removed from-
1667 the queue. You should never need to call this function. If you do-
1668 call it, be aware that killing events may cause \a receiver to-
1669 break one or more invariants.-
1670-
1671 If \a receiver is null, the events of \a eventType are removed for-
1672 all objects. If \a eventType is 0, all the events are removed for-
1673 \a receiver. You should never call this function with \a eventType-
1674 of 0. If you do call it in this way, be aware that killing events-
1675 may cause \a receiver to break one or more invariants.-
1676-
1677 \threadsafe-
1678*/-
1679-
1680void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)-
1681{-
1682 QThreadData *data = receiver ? receiver->d_func()->threadData : QThreadData::current();
receiverDescription
TRUEevaluated 78902 times by 474 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • ...
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
4-78902
1683 QMutexLocker locker(&data->postEventList.mutex);-
1684-
1685 // the QObject destructor calls this function directly. this can-
1686 // happen while the event loop is in the middle of posting events,-
1687 // and when we get here, we may not have any more posted events-
1688 // for this object.-
1689 if (receiver && !receiver->d_func()->postedEvents)
receiverDescription
TRUEevaluated 78902 times by 474 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • ...
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
!receiver->d_f...->postedEventsDescription
TRUEevaluated 26697 times by 276 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
FALSEevaluated 52205 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
4-78902
1690 return;
executed 26697 times by 276 tests: return;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
26697
1691-
1692 //we will collect all the posted events for the QObject-
1693 //and we'll delete after the mutex was unlocked-
1694 QVarLengthArray<QEvent*> events;-
1695 int n = data->postEventList.size();-
1696 int j = 0;-
1697-
1698 for (int i = 0; i < n; ++i) {
i < nDescription
TRUEevaluated 7008461 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 52209 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
52209-7008461
1699 const QPostEvent &pe = data->postEventList.at(i);-
1700-
1701 if ((!receiver || pe.receiver == receiver)
!receiverDescription
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 7008437 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
pe.receiver == receiverDescription
TRUEevaluated 82218 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 6926219 times by 210 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • 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_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
24-7008437
1702 && (pe.event && (eventType == 0 || pe.event->type() == eventType))) {
pe.eventDescription
TRUEevaluated 81187 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 1055 times by 37 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGraphicsScene
  • tst_QHeaderView
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QProgressBar
  • ...
eventType == 0Description
TRUEevaluated 80894 times by 455 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 293 times by 7 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_SpyHook
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QMessageBox
  • tst_QWidget
pe.event->type() == eventTypeDescription
TRUEevaluated 162 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QMessageBox
  • tst_QWidget
FALSEevaluated 131 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_SpyHook
  • tst_QGuiApplication
  • tst_QMessageBox
  • tst_QWidget
131-81187
1703 --pe.receiver->d_func()->postedEvents;-
1704 pe.event->posted = false;-
1705 events.append(pe.event);-
1706 const_cast<QPostEvent &>(pe).event = 0;-
1707 } else if (!data->postEventList.recursion) {
executed 81056 times by 456 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
!data->postEventList.recursionDescription
TRUEevaluated 6915131 times by 192 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • 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_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 12274 times by 55 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGuiApplication
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QProgressBar
  • ...
12274-6915131
1708 if (i != j)
i != jDescription
TRUEevaluated 1151376 times by 167 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • ...
FALSEevaluated 5763755 times by 178 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • 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_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
1151376-5763755
1709 qSwap(data->postEventList[i], data->postEventList[j]);
executed 1151376 times by 167 tests: qSwap(data->postEventList[i], data->postEventList[j]);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • ...
1151376
1710 ++j;-
1711 }
executed 6915131 times by 192 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • 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_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
6915131
1712 }
executed 7008461 times by 456 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
7008461
1713-
1714#ifdef QT_DEBUG-
1715 if (receiver && eventType == 0) {
receiverDescription
TRUEevaluated 52205 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
eventType == 0Description
TRUEevaluated 52074 times by 455 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 131 times by 7 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QDBusConnection_SpyHook
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QMessageBox
  • tst_QWidget
4-52205
1716 Q_ASSERT(!receiver->d_func()->postedEvents);-
1717 }
executed 52074 times by 455 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
52074
1718#endif-
1719-
1720 if (!data->postEventList.recursion) {
!data->postEventList.recursionDescription
TRUEevaluated 51027 times by 453 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 1182 times by 55 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGuiApplication
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QProgressBar
  • ...
1182-51027
1721 // truncate list-
1722 data->postEventList.erase(data->postEventList.begin() + j, data->postEventList.end());-
1723 }
executed 51027 times by 453 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
51027
1724-
1725 locker.unlock();-
1726 for (int i = 0; i < events.count(); ++i) {
i < events.count()Description
TRUEevaluated 81056 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 52209 times by 456 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
52209-81056
1727 delete events[i];-
1728 }
executed 81056 times by 456 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
81056
1729}
executed 52209 times by 456 tests: end of block
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
52209
1730-
1731/*!-
1732 Removes \a event from the queue of posted events, and emits a-
1733 warning message if appropriate.-
1734-
1735 \warning This function can be \e really slow. Avoid using it, if-
1736 possible.-
1737-
1738 \threadsafe-
1739*/-
1740-
1741void QCoreApplicationPrivate::removePostedEvent(QEvent * event)-
1742{-
1743 if (!event || !event->posted)
!eventDescription
TRUEnever evaluated
FALSEnever evaluated
!event->postedDescription
TRUEnever evaluated
FALSEnever evaluated
0
1744 return;
never executed: return;
0
1745-
1746 QThreadData *data = QThreadData::current();-
1747-
1748 QMutexLocker locker(&data->postEventList.mutex);-
1749-
1750 if (data->postEventList.size() == 0) {
data->postEven...st.size() == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1751#if defined(QT_DEBUG)-
1752 qDebug("QCoreApplication::removePostedEvent: Internal error: %p %d is posted",-
1753 (void*)event, event->type());-
1754 return;
never executed: return;
0
1755#endif-
1756 }-
1757-
1758 for (int i = 0; i < data->postEventList.size(); ++i) {
i < data->postEventList.size()Description
TRUEnever evaluated
FALSEnever evaluated
0
1759 const QPostEvent & pe = data->postEventList.at(i);-
1760 if (pe.event == event) {
pe.event == eventDescription
TRUEnever evaluated
FALSEnever evaluated
0
1761#ifndef QT_NO_DEBUG-
1762 qWarning("QCoreApplication::removePostedEvent: Event of type %d deleted while posted to %s %s",-
1763 event->type(),-
1764 pe.receiver->metaObject()->className(),-
1765 pe.receiver->objectName().toLocal8Bit().data());-
1766#endif-
1767 --pe.receiver->d_func()->postedEvents;-
1768 pe.event->posted = false;-
1769 delete pe.event;-
1770 const_cast<QPostEvent &>(pe).event = 0;-
1771 return;
never executed: return;
0
1772 }-
1773 }
never executed: end of block
0
1774}
never executed: end of block
0
1775-
1776/*!\reimp-
1777-
1778*/-
1779bool QCoreApplication::event(QEvent *e)-
1780{-
1781 if (e->type() == QEvent::Quit) {
e->type() == QEvent::QuitDescription
TRUEevaluated 17 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QSystemTrayIcon
FALSEevaluated 2306 times by 235 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • ...
17-2306
1782 quit();-
1783 return true;
executed 17 times by 6 tests: return true;
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QSystemTrayIcon
17
1784 }-
1785 return QObject::event(e);
executed 2306 times by 235 tests: return QObject::event(e);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnectionNoBus
  • ...
2306
1786}-
1787-
1788/*! \enum QCoreApplication::Encoding-
1789 \obsolete-
1790-
1791 This enum type used to define the 8-bit encoding of character string-
1792 arguments to translate(). This enum is now obsolete and UTF-8 will be-
1793 used in all cases.-
1794-
1795 \value UnicodeUTF8 UTF-8.-
1796 \omitvalue Latin1-
1797 \omitvalue DefaultCodec UTF-8.-
1798 \omitvalue CodecForTr-
1799-
1800 \sa QObject::tr(), QString::fromUtf8()-
1801*/-
1802-
1803void QCoreApplicationPrivate::ref()-
1804{-
1805 quitLockRef.ref();-
1806}
executed 12 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
12
1807-
1808void QCoreApplicationPrivate::deref()-
1809{-
1810 if (!quitLockRef.deref())
!quitLockRef.deref()Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2-10
1811 maybeQuit();
executed 2 times by 2 tests: maybeQuit();
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
1812}
executed 12 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
12
1813-
1814void QCoreApplicationPrivate::maybeQuit()-
1815{-
1816 if (quitLockRef.load() == 0 && in_exec && quitLockRefEnabled && shouldQuit())
quitLockRef.load() == 0Description
TRUEevaluated 2992 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
in_execDescription
TRUEevaluated 22 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QSystemTrayIcon
FALSEevaluated 2970 times by 117 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QErrorMessage
  • ...
quitLockRefEnabledDescription
TRUEevaluated 22 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QSystemTrayIcon
FALSEnever evaluated
shouldQuit()Description
TRUEevaluated 21 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QSystemTrayIcon
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
0-2992
1817 QCoreApplication::postEvent(QCoreApplication::instance(), new QEvent(QEvent::Quit));
executed 21 times by 6 tests: QCoreApplication::postEvent(QCoreApplication::instance(), new QEvent(QEvent::Quit));
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QSystemTrayIcon
21
1818}
executed 2992 times by 120 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
2992
1819-
1820/*!-
1821 Tells the application to exit with return code 0 (success).-
1822 Equivalent to calling QCoreApplication::exit(0).-
1823-
1824 It's common to connect the QGuiApplication::lastWindowClosed() signal-
1825 to quit(), and you also often connect e.g. QAbstractButton::clicked() or-
1826 signals in QAction, QMenu, or QMenuBar to it.-
1827-
1828 Example:-
1829-
1830 \snippet code/src_corelib_kernel_qcoreapplication.cpp 1-
1831-
1832 \sa exit(), aboutToQuit(), QGuiApplication::lastWindowClosed()-
1833*/-
1834-
1835void QCoreApplication::quit()-
1836{-
1837 exit(0);
executed 88 times by 11 tests: exit(0);
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QStateMachine
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
88
1838}-
1839-
1840/*!-
1841 \fn void QCoreApplication::aboutToQuit()-
1842-
1843 This signal is emitted when the application is about to quit the-
1844 main event loop, e.g. when the event loop level drops to zero.-
1845 This may happen either after a call to quit() from inside the-
1846 application or when the user shuts down the entire desktop session.-
1847-
1848 The signal is particularly useful if your application has to do some-
1849 last-second cleanup. Note that no user interaction is possible in-
1850 this state.-
1851-
1852 \sa quit()-
1853*/-
1854-
1855#endif // QT_NO_QOBJECT-
1856-
1857#ifndef QT_NO_TRANSLATION-
1858/*!-
1859 Adds the translation file \a translationFile to the list of-
1860 translation files to be used for translations.-
1861-
1862 Multiple translation files can be installed. Translations are-
1863 searched for in the reverse order in which they were installed,-
1864 so the most recently installed translation file is searched first-
1865 and the first translation file installed is searched last.-
1866 The search stops as soon as a translation containing a matching-
1867 string is found.-
1868-
1869 Installing or removing a QTranslator, or changing an installed QTranslator-
1870 generates a \l{QEvent::LanguageChange}{LanguageChange} event for the-
1871 QCoreApplication instance. A QGuiApplication instance will propagate the event-
1872 to all toplevel windows, where a reimplementation of changeEvent can-
1873 re-translate the user interface by passing user-visible strings via the-
1874 tr() function to the respective property setters. User-interface classes-
1875 generated by Qt Designer provide a \c retranslateUi() function that can be-
1876 called.-
1877-
1878 The function returns \c true on success and false on failure.-
1879-
1880 \sa removeTranslator(), translate(), QTranslator::load(), {Dynamic Translation}-
1881*/-
1882-
1883bool QCoreApplication::installTranslator(QTranslator *translationFile)-
1884{-
1885 if (!translationFile)
!translationFileDescription
TRUEnever evaluated
FALSEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
0-35
1886 return false;
never executed: return false;
0
1887-
1888 if (!QCoreApplicationPrivate::checkInstance("installTranslator"))
!QCoreApplicat...llTranslator")Description
TRUEnever evaluated
FALSEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
0-35
1889 return false;
never executed: return false;
0
1890 QCoreApplicationPrivate *d = self->d_func();-
1891 d->translators.prepend(translationFile);-
1892-
1893#ifndef QT_NO_TRANSLATION_BUILDER-
1894 if (translationFile->isEmpty())
translationFile->isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTranslator
FALSEevaluated 34 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
1-34
1895 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QTranslator
1
1896#endif-
1897-
1898#ifndef QT_NO_QOBJECT-
1899 QEvent ev(QEvent::LanguageChange);-
1900 QCoreApplication::sendEvent(self, &ev);-
1901#endif-
1902-
1903 return true;
executed 34 times by 4 tests: return true;
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
34
1904}-
1905-
1906/*!-
1907 Removes the translation file \a translationFile from the list of-
1908 translation files used by this application. (It does not delete the-
1909 translation file from the file system.)-
1910-
1911 The function returns \c true on success and false on failure.-
1912-
1913 \sa installTranslator(), translate(), QObject::tr()-
1914*/-
1915-
1916bool QCoreApplication::removeTranslator(QTranslator *translationFile)-
1917{-
1918 if (!translationFile)
!translationFileDescription
TRUEnever evaluated
FALSEevaluated 47 times by 5 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
  • tst_qkeysequence - unknown status
0-47
1919 return false;
never executed: return false;
0
1920 if (!QCoreApplicationPrivate::checkInstance("removeTranslator"))
!QCoreApplicat...veTranslator")Description
TRUEnever evaluated
FALSEevaluated 47 times by 5 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
  • tst_qkeysequence - unknown status
0-47
1921 return false;
never executed: return false;
0
1922 QCoreApplicationPrivate *d = self->d_func();-
1923 if (d->translators.removeAll(translationFile)) {
d->translators...anslationFile)Description
TRUEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_qkeysequence - unknown status
12-35
1924#ifndef QT_NO_QOBJECT-
1925 if (!self->closingDown()) {
!self->closingDown()Description
TRUEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
FALSEnever evaluated
0-35
1926 QEvent ev(QEvent::LanguageChange);-
1927 QCoreApplication::sendEvent(self, &ev);-
1928 }
executed 35 times by 4 tests: end of block
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
35
1929#endif-
1930 return true;
executed 35 times by 4 tests: return true;
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
35
1931 }-
1932 return false;
executed 12 times by 3 tests: return false;
Executed by:
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_qkeysequence - unknown status
12
1933}-
1934-
1935static void replacePercentN(QString *result, int n)-
1936{-
1937 if (n >= 0) {
n >= 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTranslator
FALSEevaluated 358502 times by 194 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
6-358502
1938 int percentPos = 0;-
1939 int len = 0;-
1940 while ((percentPos = result->indexOf(QLatin1Char('%'), percentPos + len)) != -1) {
(percentPos = ... + len)) != -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTranslator
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTranslator
6
1941 len = 1;-
1942 QString fmt;-
1943 if (result->at(percentPos + len) == QLatin1Char('L')) {
result->at(per...atin1Char('L')Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTranslator
0-6
1944 ++len;-
1945 fmt = QLatin1String("%L1");-
1946 } else {
never executed: end of block
0
1947 fmt = QLatin1String("%1");-
1948 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QTranslator
6
1949 if (result->at(percentPos + len) == QLatin1Char('n')) {
result->at(per...atin1Char('n')Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTranslator
FALSEnever evaluated
0-6
1950 fmt = fmt.arg(n);-
1951 ++len;-
1952 result->replace(percentPos, len, fmt);-
1953 len = fmt.length();-
1954 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QTranslator
6
1955 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QTranslator
6
1956 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QTranslator
6
1957}
executed 358508 times by 194 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
358508
1958-
1959/*!-
1960 \reentrant-
1961-
1962 Returns the translation text for \a sourceText, by querying the-
1963 installed translation files. The translation files are searched-
1964 from the most recently installed file back to the first-
1965 installed file.-
1966-
1967 QObject::tr() provides this functionality more conveniently.-
1968-
1969 \a context is typically a class name (e.g., "MyDialog") and \a-
1970 sourceText is either English text or a short identifying text.-
1971-
1972 \a disambiguation is an identifying string, for when the same \a-
1973 sourceText is used in different roles within the same context. By-
1974 default, it is null.-
1975-
1976 See the \l QTranslator and \l QObject::tr() documentation for-
1977 more information about contexts, disambiguations and comments.-
1978-
1979 \a n is used in conjunction with \c %n to support plural forms.-
1980 See QObject::tr() for details.-
1981-
1982 If none of the translation files contain a translation for \a-
1983 sourceText in \a context, this function returns a QString-
1984 equivalent of \a sourceText.-
1985-
1986 This function is not virtual. You can use alternative translation-
1987 techniques by subclassing \l QTranslator.-
1988-
1989 \warning This method is reentrant only if all translators are-
1990 installed \e before calling this method. Installing or removing-
1991 translators while performing translations is not supported. Doing-
1992 so will most likely result in crashes or other undesirable-
1993 behavior.-
1994-
1995 \sa QObject::tr(), installTranslator()-
1996*/-
1997QString QCoreApplication::translate(const char *context, const char *sourceText,-
1998 const char *disambiguation, int n)-
1999{-
2000 QString result;-
2001-
2002 if (!sourceText)
!sourceTextDescription
TRUEnever evaluated
FALSEevaluated 358508 times by 194 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
0-358508
2003 return result;
never executed: return result;
0
2004-
2005 if (self && !self->d_func()->translators.isEmpty()) {
selfDescription
TRUEevaluated 358474 times by 191 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
FALSEevaluated 34 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QDnsLookup_Appless
  • tst_QPageLayout
  • tst_QPageSize
!self->d_func(...tors.isEmpty()Description
TRUEevaluated 377 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
FALSEevaluated 358097 times by 190 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
34-358474
2006 QList<QTranslator*>::ConstIterator it;-
2007 QTranslator *translationFile;-
2008 for (it = self->d_func()->translators.constBegin(); it != self->d_func()->translators.constEnd(); ++it) {
it != self->d_...ors.constEnd()Description
TRUEevaluated 422 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
FALSEevaluated 66 times by 2 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QTranslator
66-422
2009 translationFile = *it;-
2010 result = translationFile->translate(context, sourceText, disambiguation, n);-
2011 if (!result.isNull())
!result.isNull()Description
TRUEevaluated 311 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
FALSEevaluated 111 times by 2 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QTranslator
111-311
2012 break;
executed 311 times by 4 tests: break;
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
311
2013 }
executed 111 times by 2 tests: end of block
Executed by:
  • tst_QKeySequence
  • tst_QTranslator
111
2014 }
executed 377 times by 4 tests: end of block
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
377
2015-
2016 if (result.isNull())
result.isNull()Description
TRUEevaluated 358197 times by 194 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
FALSEevaluated 311 times by 4 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
311-358197
2017 result = QString::fromUtf8(sourceText);
executed 358197 times by 194 tests: result = QString::fromUtf8(sourceText);
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
358197
2018-
2019 replacePercentN(&result, n);-
2020 return result;
executed 358508 times by 194 tests: return result;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
358508
2021}-
2022-
2023/*! \fn static QString QCoreApplication::translate(const char *context, const char *key, const char *disambiguation, Encoding encoding, int n = -1)-
2024-
2025 \obsolete-
2026*/-
2027-
2028// Declared in qglobal.h-
2029QString qtTrId(const char *id, int n)-
2030{-
2031 return QCoreApplication::translate(0, id, 0, n);
never executed: return QCoreApplication::translate(0, id, 0, n);
0
2032}-
2033-
2034bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator)-
2035{-
2036 return QCoreApplication::self
executed 38 times by 5 tests: return QCoreApplication::self && QCoreApplication::self->d_func()->translators.contains(translator);
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
  • tst_qkeysequence - unknown status
QCoreApplication::selfDescription
TRUEevaluated 38 times by 5 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
  • tst_qkeysequence - unknown status
FALSEnever evaluated
0-38
2037 && QCoreApplication::self->d_func()->translators.contains(translator);
executed 38 times by 5 tests: return QCoreApplication::self && QCoreApplication::self->d_func()->translators.contains(translator);
Executed by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
  • tst_qkeysequence - unknown status
QCoreApplicati...ns(translator)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTranslator
FALSEevaluated 35 times by 5 tests
Evaluated by:
  • tst_QKeySequence
  • tst_QProgressDialog
  • tst_QTranslator
  • tst_languageChange
  • tst_qkeysequence - unknown status
3-38
2038}-
2039-
2040#else-
2041-
2042QString QCoreApplication::translate(const char *context, const char *sourceText,-
2043 const char *disambiguation, int n)-
2044{-
2045 Q_UNUSED(context)-
2046 Q_UNUSED(disambiguation)-
2047 QString ret = QString::fromUtf8(sourceText);-
2048 if (n >= 0)-
2049 ret.replace(QLatin1String("%n"), QString::number(n));-
2050 return ret;-
2051}-
2052-
2053#endif //QT_NO_TRANSLATE-
2054-
2055// Makes it possible to point QCoreApplication to a custom location to ensure-
2056// the directory is added to the patch, and qt.conf and deployed plugins are-
2057// found from there. This is for use cases in which QGuiApplication is-
2058// instantiated by a library and not by an application executable, for example,-
2059// Active X servers.-
2060-
2061void QCoreApplicationPrivate::setApplicationFilePath(const QString &path)-
2062{-
2063 if (QCoreApplicationPrivate::cachedApplicationFilePath)
QCoreApplicati...cationFilePathDescription
TRUEnever evaluated
FALSEevaluated 744 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-744
2064 *QCoreApplicationPrivate::cachedApplicationFilePath = path;
never executed: *QCoreApplicationPrivate::cachedApplicationFilePath = path;
0
2065 else-
2066 QCoreApplicationPrivate::cachedApplicationFilePath = new QString(path);
executed 744 times by 22 tests: QCoreApplicationPrivate::cachedApplicationFilePath = new QString(path);
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
744
2067}-
2068-
2069/*!-
2070 Returns the directory that contains the application executable.-
2071-
2072 For example, if you have installed Qt in the \c{C:\Qt}-
2073 directory, and you run the \c{regexp} example, this function will-
2074 return "C:/Qt/examples/tools/regexp".-
2075-
2076 On \macos and iOS this will point to the directory actually containing-
2077 the executable, which may be inside an application bundle (if the-
2078 application is bundled).-
2079-
2080 \warning On Linux, this function will try to get the path from the-
2081 \c {/proc} file system. If that fails, it assumes that \c-
2082 {argv[0]} contains the absolute file name of the executable. The-
2083 function also assumes that the current directory has not been-
2084 changed by the application.-
2085-
2086 \sa applicationFilePath()-
2087*/-
2088QString QCoreApplication::applicationDirPath()-
2089{-
2090 if (!self) {
!selfDescription
TRUEnever evaluated
FALSEevaluated 1956 times by 91 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • ...
0-1956
2091 qWarning("QCoreApplication::applicationDirPath: Please instantiate the QApplication object first");-
2092 return QString();
never executed: return QString();
0
2093 }-
2094-
2095 QCoreApplicationPrivate *d = self->d_func();-
2096 if (d->cachedApplicationDirPath.isNull())
d->cachedAppli...rPath.isNull()Description
TRUEevaluated 743 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1213 times by 73 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
743-1213
2097 d->cachedApplicationDirPath = QFileInfo(applicationFilePath()).path();
executed 743 times by 22 tests: d->cachedApplicationDirPath = QFileInfo(applicationFilePath()).path();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
743
2098 return d->cachedApplicationDirPath;
executed 1955 times by 91 tests: return d->cachedApplicationDirPath;
Executed by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • ...
1955
2099}-
2100-
2101/*!-
2102 Returns the file path of the application executable.-
2103-
2104 For example, if you have installed Qt in the \c{/usr/local/qt}-
2105 directory, and you run the \c{regexp} example, this function will-
2106 return "/usr/local/qt/examples/tools/regexp/regexp".-
2107-
2108 \warning On Linux, this function will try to get the path from the-
2109 \c {/proc} file system. If that fails, it assumes that \c-
2110 {argv[0]} contains the absolute file name of the executable. The-
2111 function also assumes that the current directory has not been-
2112 changed by the application.-
2113-
2114 \sa applicationDirPath()-
2115*/-
2116QString QCoreApplication::applicationFilePath()-
2117{-
2118 if (!self) {
!selfDescription
TRUEnever evaluated
FALSEevaluated 822 times by 51 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • ...
0-822
2119 qWarning("QCoreApplication::applicationFilePath: Please instantiate the QApplication object first");-
2120 return QString();
never executed: return QString();
0
2121 }-
2122-
2123 QCoreApplicationPrivate *d = self->d_func();-
2124-
2125 if (d->argc) {
d->argcDescription
TRUEevaluated 740 times by 48 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnection_Delayed
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • ...
FALSEevaluated 82 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDnsLookup_Appless
  • tst_QGuiApplication
82-740
2126 static const char *procName = d->argv[0];-
2127 if (qstrcmp(procName, d->argv[0]) != 0) {
qstrcmp(procNa...>argv[0]) != 0Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
FALSEevaluated 735 times by 48 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnection_Delayed
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • ...
5-735
2128 // clear the cache if the procname changes, so we reprocess it.-
2129 QCoreApplicationPrivate::clearApplicationFilePath();-
2130 procName = d->argv[0];-
2131 }
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
5
2132 }
executed 740 times by 48 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnection_Delayed
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • ...
740
2133-
2134 if (QCoreApplicationPrivate::cachedApplicationFilePath)
QCoreApplicati...cationFilePathDescription
TRUEevaluated 77 times by 36 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • ...
FALSEevaluated 745 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
77-745
2135 return *QCoreApplicationPrivate::cachedApplicationFilePath;
executed 77 times by 36 tests: return *QCoreApplicationPrivate::cachedApplicationFilePath;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • ...
77
2136-
2137#if defined(Q_OS_WIN)-
2138 QCoreApplicationPrivate::setApplicationFilePath(QFileInfo(qAppFileName()).filePath());-
2139 return *QCoreApplicationPrivate::cachedApplicationFilePath;-
2140#elif defined(Q_OS_BLACKBERRY)-
2141 if (!arguments().isEmpty()) { // args is never empty, but the navigator can change behaviour some day-
2142 QFileInfo fileInfo(arguments().at(0));-
2143 const bool zygotized = fileInfo.exists();-
2144 if (zygotized) {-
2145 // Handle the zygotized case:-
2146 QCoreApplicationPrivate::setApplicationFilePath(QDir::cleanPath(fileInfo.absoluteFilePath()));-
2147 return *QCoreApplicationPrivate::cachedApplicationFilePath;-
2148 }-
2149 }-
2150-
2151 // Handle the non-zygotized case:-
2152 const size_t maximum_path = static_cast<size_t>(pathconf("/",_PC_PATH_MAX));-
2153 char buff[maximum_path+1];-
2154 if (_cmdname(buff)) {-
2155 QCoreApplicationPrivate::setApplicationFilePath(QDir::cleanPath(QString::fromLocal8Bit(buff)));-
2156 } else {-
2157 qWarning("QCoreApplication::applicationFilePath: _cmdname() failed");-
2158 // _cmdname() won't fail, but just in case, fallback to the old method-
2159 QDir dir(QStringLiteral("./app/native/"));-
2160 QStringList executables = dir.entryList(QDir::Executable | QDir::Files);-
2161 if (!executables.empty()) {-
2162 //We assume that there is only one executable in the folder-
2163 QCoreApplicationPrivate::setApplicationFilePath(dir.absoluteFilePath(executables.first()));-
2164 }-
2165 }-
2166 return *QCoreApplicationPrivate::cachedApplicationFilePath;-
2167#elif defined(Q_OS_MAC)-
2168 QString qAppFileName_str = qAppFileName();-
2169 if(!qAppFileName_str.isEmpty()) {-
2170 QFileInfo fi(qAppFileName_str);-
2171 if (fi.exists()) {-
2172 QCoreApplicationPrivate::setApplicationFilePath(fi.canonicalFilePath());-
2173 return *QCoreApplicationPrivate::cachedApplicationFilePath;-
2174 }-
2175 return QString();-
2176 }-
2177#endif-
2178#if defined( Q_OS_UNIX )-
2179# if defined(Q_OS_LINUX) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))-
2180 // Try looking for a /proc/<pid>/exe symlink first which points to-
2181 // the absolute path of the executable-
2182 QFileInfo pfi(QString::fromLatin1("/proc/%1/exe").arg(getpid()));-
2183 if (pfi.exists() && pfi.isSymLink()) {
pfi.exists()Description
TRUEevaluated 745 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
pfi.isSymLink()Description
TRUEevaluated 745 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-745
2184 QCoreApplicationPrivate::setApplicationFilePath(pfi.canonicalFilePath());-
2185 return *QCoreApplicationPrivate::cachedApplicationFilePath;
executed 744 times by 22 tests: return *QCoreApplicationPrivate::cachedApplicationFilePath;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
744
2186 }-
2187# endif-
2188 if (!arguments().isEmpty()) {
!arguments().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
2189 QString argv0 = QFile::decodeName(arguments().at(0).toLocal8Bit());-
2190 QString absPath;-
2191-
2192 if (!argv0.isEmpty() && argv0.at(0) == QLatin1Char('/')) {
!argv0.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
argv0.at(0) ==...atin1Char('/')Description
TRUEnever evaluated
FALSEnever evaluated
0
2193 /*-
2194 If argv0 starts with a slash, it is already an absolute-
2195 file path.-
2196 */-
2197 absPath = argv0;-
2198 } else if (argv0.contains(QLatin1Char('/'))) {
never executed: end of block
argv0.contains...tin1Char('/'))Description
TRUEnever evaluated
FALSEnever evaluated
0
2199 /*-
2200 If argv0 contains one or more slashes, it is a file path-
2201 relative to the current directory.-
2202 */-
2203 absPath = QDir::current().absoluteFilePath(argv0);-
2204 } else {
never executed: end of block
0
2205 /*-
2206 Otherwise, the file path has to be determined using the-
2207 PATH environment variable.-
2208 */-
2209 absPath = QStandardPaths::findExecutable(argv0);-
2210 }
never executed: end of block
0
2211-
2212 absPath = QDir::cleanPath(absPath);-
2213-
2214 QFileInfo fi(absPath);-
2215 if (fi.exists()) {
fi.exists()Description
TRUEnever evaluated
FALSEnever evaluated
0
2216 QCoreApplicationPrivate::setApplicationFilePath(fi.canonicalFilePath());-
2217 return *QCoreApplicationPrivate::cachedApplicationFilePath;
never executed: return *QCoreApplicationPrivate::cachedApplicationFilePath;
0
2218 }-
2219 }
never executed: end of block
0
2220-
2221 return QString();
never executed: return QString();
0
2222#endif-
2223 Q_UNREACHABLE();
dead code: do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,2223) : qt_noop()); __builtin_unreachable(); } while (0);
-
2224}-
2225-
2226/*!-
2227 \since 4.4-
2228-
2229 Returns the current process ID for the application.-
2230*/-
2231qint64 QCoreApplication::applicationPid()-
2232{-
2233#if defined(Q_OS_WIN)-
2234 return GetCurrentProcessId();-
2235#elif defined(Q_OS_VXWORKS)-
2236 return (pid_t) taskIdCurrent;-
2237#else-
2238 return getpid();
executed 2767 times by 28 tests: return getpid();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QCoreApplication
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStorageInfo
  • tst_QTemporaryFile
  • ...
2767
2239#endif-
2240}-
2241-
2242/*!-
2243 \since 4.1-
2244-
2245 Returns the list of command-line arguments.-
2246-
2247 Usually arguments().at(0) is the program name, arguments().at(1)-
2248 is the first argument, and arguments().last() is the last-
2249 argument. See the note below about Windows.-
2250-
2251 Calling this function is slow - you should store the result in a variable-
2252 when parsing the command line.-
2253-
2254 \warning On Unix, this list is built from the argc and argv parameters passed-
2255 to the constructor in the main() function. The string-data in argv is-
2256 interpreted using QString::fromLocal8Bit(); hence it is not possible to-
2257 pass, for example, Japanese command line arguments on a system that runs in a-
2258 Latin1 locale. Most modern Unix systems do not have this limitation, as they are-
2259 Unicode-based.-
2260-
2261 On Windows, the list is built from the argc and argv parameters only if-
2262 modified argv/argc parameters are passed to the constructor. In that case,-
2263 encoding problems might occur.-
2264-
2265 Otherwise, the arguments() are constructed from the return value of-
2266 \l{http://msdn2.microsoft.com/en-us/library/ms683156(VS.85).aspx}{GetCommandLine()}.-
2267 As a result of this, the string given by arguments().at(0) might not be-
2268 the program name on Windows, depending on how the application was started.-
2269-
2270 \sa applicationFilePath(), QCommandLineParser-
2271*/-
2272-
2273QStringList QCoreApplication::arguments()-
2274{-
2275 QStringList list;-
2276-
2277 if (!self) {
!selfDescription
TRUEnever evaluated
FALSEevaluated 336 times by 130 tests
Evaluated by:
  • tst_Gestures
  • 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-336
2278 qWarning("QCoreApplication::arguments: Please instantiate the QApplication object first");-
2279 return list;
never executed: return list;
0
2280 }-
2281 const int ac = self->d_func()->argc;-
2282 char ** const av = self->d_func()->argv;-
2283 list.reserve(ac);-
2284-
2285#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
2286 // On Windows, it is possible to pass Unicode arguments on-
2287 // the command line. To restore those, we split the command line-
2288 // and filter out arguments that were deleted by derived application-
2289 // classes by index.-
2290 QString cmdline = QString::fromWCharArray(GetCommandLine());-
2291-
2292#if defined(Q_OS_WINCE)-
2293 wchar_t tempFilename[MAX_PATH+1];-
2294 if (GetModuleFileName(0, tempFilename, MAX_PATH)) {-
2295 tempFilename[MAX_PATH] = 0;-
2296 cmdline.prepend(QLatin1Char('\"') + QString::fromWCharArray(tempFilename) + QLatin1String("\" "));-
2297 }-
2298#endif // Q_OS_WINCE-
2299-
2300 const QCoreApplicationPrivate *d = self->d_func();-
2301 if (d->origArgv) {-
2302 const QStringList allArguments = qWinCmdArgs(cmdline);-
2303 Q_ASSERT(allArguments.size() == d->origArgc);-
2304 for (int i = 0; i < d->origArgc; ++i) {-
2305 if (contains(ac, av, d->origArgv[i]))-
2306 list.append(allArguments.at(i));-
2307 }-
2308 return list;-
2309 } // Fall back to rebuilding from argv/argc when a modified argv was passed.-
2310#endif // defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
2311-
2312 for (int a = 0; a < ac; ++a) {
a < acDescription
TRUEevaluated 358 times by 130 tests
Evaluated by:
  • tst_Gestures
  • 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 336 times by 130 tests
Evaluated by:
  • tst_Gestures
  • 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
336-358
2313 list << QString::fromLocal8Bit(av[a]);-
2314 }
executed 358 times by 130 tests: end of block
Executed by:
  • tst_Gestures
  • 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
358
2315-
2316 return list;
executed 336 times by 130 tests: return list;
Executed by:
  • tst_Gestures
  • 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
336
2317}-
2318-
2319/*!-
2320 \property QCoreApplication::organizationName-
2321 \brief the name of the organization that wrote this application-
2322-
2323 The value is used by the QSettings class when it is constructed-
2324 using the empty constructor. This saves having to repeat this-
2325 information each time a QSettings object is created.-
2326-
2327 On Mac, QSettings uses \l {QCoreApplication::}{organizationDomain()} as the organization-
2328 if it's not an empty string; otherwise it uses-
2329 organizationName(). On all other platforms, QSettings uses-
2330 organizationName() as the organization.-
2331-
2332 On BlackBerry this property is read-only. It is obtained from the-
2333 BAR application descriptor file.-
2334-
2335 \sa organizationDomain, applicationName-
2336*/-
2337-
2338/*!-
2339 \fn void QCoreApplication::organizationNameChanged()-
2340 \internal-
2341-
2342 While not useful from C++ due to how organizationName is normally set once on-
2343 startup, this is still needed for QML so that bindings are reevaluated after-
2344 that initial change.-
2345*/-
2346void QCoreApplication::setOrganizationName(const QString &orgName)-
2347{-
2348 if (coreappdata()->orgName == orgName)
coreappdata()-...ame == orgNameDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSettings
FALSEevaluated 7 times by 3 tests
Evaluated by:
  • tst_QSettings
  • tst_qdesktopservices
  • tst_qstandardpaths
1-7
2349 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QSettings
1
2350 coreappdata()->orgName = orgName;-
2351#ifndef QT_NO_QOBJECT-
2352 if (QCoreApplication::self)
QCoreApplication::selfDescription
TRUEevaluated 7 times by 3 tests
Evaluated by:
  • tst_QSettings
  • tst_qdesktopservices
  • tst_qstandardpaths
FALSEnever evaluated
0-7
2353 emit QCoreApplication::self->organizationNameChanged();
executed 7 times by 3 tests: QCoreApplication::self->organizationNameChanged();
Executed by:
  • tst_QSettings
  • tst_qdesktopservices
  • tst_qstandardpaths
7
2354#endif-
2355}
executed 7 times by 3 tests: end of block
Executed by:
  • tst_QSettings
  • tst_qdesktopservices
  • tst_qstandardpaths
7
2356-
2357QString QCoreApplication::organizationName()-
2358{-
2359#ifdef Q_OS_BLACKBERRY-
2360 coreappdata()->loadManifest();-
2361#endif-
2362 return coreappdata()->orgName;
executed 46 times by 3 tests: return coreappdata()->orgName;
Executed by:
  • tst_QSettings
  • tst_qdesktopservices
  • tst_qstandardpaths
46
2363}-
2364-
2365/*!-
2366 \property QCoreApplication::organizationDomain-
2367 \brief the Internet domain of the organization that wrote this application-
2368-
2369 The value is used by the QSettings class when it is constructed-
2370 using the empty constructor. This saves having to repeat this-
2371 information each time a QSettings object is created.-
2372-
2373 On Mac, QSettings uses organizationDomain() as the organization-
2374 if it's not an empty string; otherwise it uses organizationName().-
2375 On all other platforms, QSettings uses organizationName() as the-
2376 organization.-
2377-
2378 \sa organizationName, applicationName, applicationVersion-
2379*/-
2380/*!-
2381 \fn void QCoreApplication::organizationDomainChanged()-
2382 \internal-
2383-
2384 Primarily for QML, see organizationNameChanged.-
2385*/-
2386void QCoreApplication::setOrganizationDomain(const QString &orgDomain)-
2387{-
2388 if (coreappdata()->orgDomain == orgDomain)
coreappdata()-...n == orgDomainDescription
TRUEnever evaluated
FALSEnever evaluated
0
2389 return;
never executed: return;
0
2390 coreappdata()->orgDomain = orgDomain;-
2391#ifndef QT_NO_QOBJECT-
2392 if (QCoreApplication::self)
QCoreApplication::selfDescription
TRUEnever evaluated
FALSEnever evaluated
0
2393 emit QCoreApplication::self->organizationDomainChanged();
never executed: QCoreApplication::self->organizationDomainChanged();
0
2394#endif-
2395}
never executed: end of block
0
2396-
2397QString QCoreApplication::organizationDomain()-
2398{-
2399 return coreappdata()->orgDomain;
executed 8 times by 3 tests: return coreappdata()->orgDomain;
Executed by:
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QSettings
8
2400}-
2401-
2402/*!-
2403 \property QCoreApplication::applicationName-
2404 \brief the name of this application-
2405-
2406 The value is used by the QSettings class when it is constructed-
2407 using the empty constructor. This saves having to repeat this-
2408 information each time a QSettings object is created.-
2409-
2410 If not set, the application name defaults to the executable name (since 5.0).-
2411-
2412 On BlackBerry this property is read-only. It is obtained from the-
2413 BAR application descriptor file.-
2414-
2415 \sa organizationName, organizationDomain, applicationVersion, applicationFilePath()-
2416*/-
2417/*!-
2418 \fn void QCoreApplication::applicationNameChanged()-
2419 \internal-
2420-
2421 Primarily for QML, see organizationNameChanged.-
2422*/-
2423void QCoreApplication::setApplicationName(const QString &application)-
2424{-
2425 coreappdata()->applicationNameSet = !application.isEmpty();-
2426 QString newAppName = application;-
2427 if (newAppName.isEmpty() && QCoreApplication::self)
newAppName.isEmpty()Description
TRUEevaluated 10 times by 5 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QSettings
  • tst_QWidget_window
  • tst_qstandardpaths
FALSEevaluated 27 times by 10 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QWidget_window
  • tst_qdesktopservices
  • tst_qlogging - unknown status
  • tst_qstandardpaths
QCoreApplication::selfDescription
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_QSettings
  • tst_QWidget_window
  • tst_qstandardpaths
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2-27
2428 newAppName = QCoreApplication::self->d_func()->appName();
executed 8 times by 3 tests: newAppName = QCoreApplication::self->d_func()->appName();
Executed by:
  • tst_QSettings
  • tst_QWidget_window
  • tst_qstandardpaths
8
2429 if (coreappdata()->application == newAppName)
coreappdata()-... == newAppNameDescription
TRUEevaluated 10 times by 4 tests
Evaluated by:
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QWidget_window
FALSEevaluated 27 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QSettings
  • tst_QWidget_window
  • tst_qdesktopservices
  • tst_qlogging - unknown status
  • tst_qstandardpaths
10-27
2430 return;
executed 10 times by 4 tests: return;
Executed by:
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QWidget_window
10
2431 coreappdata()->application = newAppName;-
2432#ifndef QT_NO_QOBJECT-
2433 if (QCoreApplication::self)
QCoreApplication::selfDescription
TRUEevaluated 23 times by 6 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QSettings
  • tst_QWidget_window
  • tst_qdesktopservices
  • tst_qlogging - unknown status
  • tst_qstandardpaths
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
4-23
2434 emit QCoreApplication::self->applicationNameChanged();
executed 23 times by 6 tests: QCoreApplication::self->applicationNameChanged();
Executed by:
  • tst_QAccessibility
  • tst_QSettings
  • tst_QWidget_window
  • tst_qdesktopservices
  • tst_qlogging - unknown status
  • tst_qstandardpaths
23
2435#endif-
2436}
executed 27 times by 8 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QSettings
  • tst_QWidget_window
  • tst_qdesktopservices
  • tst_qlogging - unknown status
  • tst_qstandardpaths
27
2437-
2438QString QCoreApplication::applicationName()-
2439{-
2440#ifdef Q_OS_BLACKBERRY-
2441 coreappdata()->loadManifest();-
2442#endif-
2443 return coreappdata() ? coreappdata()->application : QString();
executed 10101 times by 156 tests: return coreappdata() ? coreappdata()->application : QString();
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • 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_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • ...
coreappdata()Description
TRUEevaluated 10100 times by 155 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • 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_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlockfile - unknown status
1-10101
2444}-
2445-
2446// Exported for QDesktopServices (Qt4 behavior compatibility)-
2447Q_CORE_EXPORT QString qt_applicationName_noFallback()-
2448{-
2449 return coreappdata()->applicationNameSet ? coreappdata()->application : QString();
executed 2 times by 1 test: return coreappdata()->applicationNameSet ? coreappdata()->application : QString();
Executed by:
  • tst_qdesktopservices
coreappdata()-...icationNameSetDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdesktopservices
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdesktopservices
1-2
2450}-
2451-
2452/*!-
2453 \property QCoreApplication::applicationVersion-
2454 \since 4.4-
2455 \brief the version of this application-
2456-
2457 On BlackBerry this property is read-only. It is obtained from the-
2458 BAR application descriptor file.-
2459-
2460 \sa applicationName, organizationName, organizationDomain-
2461*/-
2462/*!-
2463 \fn void QCoreApplication::applicationVersionChanged()-
2464 \internal-
2465-
2466 Primarily for QML, see organizationNameChanged.-
2467*/-
2468void QCoreApplication::setApplicationVersion(const QString &version)-
2469{-
2470 if (coreappdata()->applicationVersion == version)
coreappdata()-...ion == versionDescription
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
0-4
2471 return;
never executed: return;
0
2472 coreappdata()->applicationVersion = version;-
2473#ifndef QT_NO_QOBJECT-
2474 if (QCoreApplication::self)
QCoreApplication::selfDescription
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
0-4
2475 emit QCoreApplication::self->applicationVersionChanged();
never executed: QCoreApplication::self->applicationVersionChanged();
0
2476#endif-
2477}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
4
2478-
2479QString QCoreApplication::applicationVersion()-
2480{-
2481#ifdef Q_OS_BLACKBERRY-
2482 coreappdata()->loadManifest();-
2483#endif-
2484 return coreappdata()->applicationVersion;
executed 8 times by 2 tests: return coreappdata()->applicationVersion;
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
8
2485}-
2486-
2487#ifndef QT_NO_LIBRARY-
2488-
2489Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
executed 270 times by 248 tests: end of block
Executed by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
executed 270 times by 248 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
executed 479 times by 147 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 270 times by 248 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - 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
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
FALSEnever evaluated
0-479
2490-
2491/*!-
2492 Returns a list of paths that the application will search when-
2493 dynamically loading libraries.-
2494-
2495 The return value of this function may change when a QCoreApplication-
2496 is created. It is not recommended to call it before creating a-
2497 QCoreApplication. The directory of the application executable (\b not-
2498 the working directory) is part of the list if it is known. In order-
2499 to make it known a QCoreApplication has to be constructed as it will-
2500 use \c {argv[0]} to find it.-
2501-
2502 Qt provides default library paths, but they can also be set using-
2503 a \l{Using qt.conf}{qt.conf} file. Paths specified in this file-
2504 will override default values. Note that if the qt.conf file is in-
2505 the directory of the application executable, it may not be found-
2506 until a QCoreApplication is created. If it is not found when calling-
2507 this function, the default library paths will be used.-
2508-
2509 The list will include the installation directory for plugins if-
2510 it exists (the default installation directory for plugins is \c-
2511 INSTALL/plugins, where \c INSTALL is the directory where Qt was-
2512 installed). The colon separated entries of the \c QT_PLUGIN_PATH-
2513 environment variable are always added. The plugin installation-
2514 directory (and its existence) may change when the directory of-
2515 the application executable becomes known.-
2516-
2517 If you want to iterate over the list, you can use the \l foreach-
2518 pseudo-keyword:-
2519-
2520 \snippet code/src_corelib_kernel_qcoreapplication.cpp 2-
2521-
2522 \sa setLibraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary,-
2523 {How to Create Qt Plugins}-
2524*/-
2525QStringList QCoreApplication::libraryPaths()-
2526{-
2527 QMutexLocker locker(libraryPathMutex());-
2528-
2529 if (coreappdata()->manual_libpaths)
coreappdata()->manual_libpathsDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QGuiApplication
  • tst_QPluginLoader
FALSEevaluated 411 times by 147 tests
Evaluated by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
52-411
2530 return *(coreappdata()->manual_libpaths);
executed 52 times by 5 tests: return *(coreappdata()->manual_libpaths);
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QGuiApplication
  • tst_QPluginLoader
52
2531-
2532 if (!coreappdata()->app_libpaths) {
!coreappdata()->app_libpathsDescription
TRUEevaluated 73 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEevaluated 338 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • ...
73-338
2533 QStringList *app_libpaths = new QStringList;-
2534 coreappdata()->app_libpaths.reset(app_libpaths);-
2535-
2536 const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");-
2537 if (!libPathEnv.isEmpty()) {
!libPathEnv.isEmpty()Description
TRUEevaluated 49 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_qapplication - unknown status
  • tst_selftests - unknown status
24-49
2538 QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);-
2539 for (QStringList::const_iterator it = paths.constBegin(); it != paths.constEnd(); ++it) {
it != paths.constEnd()Description
TRUEevaluated 51 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEevaluated 49 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
49-51
2540 QString canonicalPath = QDir(*it).canonicalPath();-
2541 if (!canonicalPath.isEmpty()
!canonicalPath.isEmpty()Description
TRUEevaluated 49 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QApplication
2-49
2542 && !app_libpaths->contains(canonicalPath)) {
!app_libpaths-...canonicalPath)Description
TRUEevaluated 49 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEnever evaluated
0-49
2543 app_libpaths->append(canonicalPath);-
2544 }
executed 49 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
49
2545 }
executed 51 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
51
2546 }
executed 49 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
49
2547-
2548 QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath);-
2549 if (QFile::exists(installPathPlugins)) {
QFile::exists(...llPathPlugins)Description
TRUEevaluated 73 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEnever evaluated
0-73
2550 // Make sure we convert from backslashes to slashes.-
2551 installPathPlugins = QDir(installPathPlugins).canonicalPath();-
2552 if (!app_libpaths->contains(installPathPlugins))
!app_libpaths-...llPathPlugins)Description
TRUEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_qapplication - unknown status
  • tst_selftests - unknown status
FALSEevaluated 46 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
27-46
2553 app_libpaths->append(installPathPlugins);
executed 27 times by 3 tests: app_libpaths->append(installPathPlugins);
Executed by:
  • tst_QApplication
  • tst_qapplication - unknown status
  • tst_selftests - unknown status
27
2554 }
executed 73 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
73
2555-
2556 // If QCoreApplication is not yet instantiated,-
2557 // make sure we add the application path when we construct the QCoreApplication-
2558 if (self) self->d_func()->appendApplicationPathToLibraryPaths();
executed 69 times by 30 tests: self->d_func()->appendApplicationPathToLibraryPaths();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
selfDescription
TRUEevaluated 69 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
4-69
2559 }
executed 73 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QPluginLoader
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlRelationalTableModel
  • tst_QSqlThread
  • tst_QTcpServer
  • tst_QUdpSocket
  • ...
73
2560 return *(coreappdata()->app_libpaths);
executed 411 times by 147 tests: return *(coreappdata()->app_libpaths);
Executed by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
411
2561}-
2562-
2563-
2564-
2565/*!-
2566-
2567 Sets the list of directories to search when loading libraries to-
2568 \a paths. All existing paths will be deleted and the path list-
2569 will consist of the paths given in \a paths.-
2570-
2571 The library paths are reset to the default when an instance of-
2572 QCoreApplication is destructed.-
2573-
2574 \sa libraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary-
2575 */-
2576void QCoreApplication::setLibraryPaths(const QStringList &paths)-
2577{-
2578 QMutexLocker locker(libraryPathMutex());-
2579-
2580 // setLibraryPaths() is considered a "remove everything and then add some new ones" operation.-
2581 // When the application is constructed it should still amend the paths. So we keep the originals-
2582 // around, and even create them if they don't exist, yet.-
2583 if (!coreappdata()->app_libpaths)
!coreappdata()->app_libpathsDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QFactoryLoader
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
2-3
2584 libraryPaths();
executed 2 times by 2 tests: libraryPaths();
Executed by:
  • tst_QApplication
  • tst_QFactoryLoader
2
2585-
2586 if (coreappdata()->manual_libpaths)
coreappdata()->manual_libpathsDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QFactoryLoader
2-3
2587 *(coreappdata()->manual_libpaths) = paths;
executed 2 times by 2 tests: *(coreappdata()->manual_libpaths) = paths;
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
2588 else-
2589 coreappdata()->manual_libpaths.reset(new QStringList(paths));
executed 3 times by 2 tests: coreappdata()->manual_libpaths.reset(new QStringList(paths));
Executed by:
  • tst_QApplication
  • tst_QFactoryLoader
3
2590-
2591 locker.unlock();-
2592 QFactoryLoader::refreshAll();-
2593}
executed 5 times by 4 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QFactoryLoader
  • tst_QGuiApplication
5
2594-
2595/*!-
2596 Prepends \a path to the beginning of the library path list, ensuring that-
2597 it is searched for libraries first. If \a path is empty or already in the-
2598 path list, the path list is not changed.-
2599-
2600 The default path list consists of a single entry, the installation-
2601 directory for plugins. The default installation directory for plugins-
2602 is \c INSTALL/plugins, where \c INSTALL is the directory where Qt was-
2603 installed.-
2604-
2605 The library paths are reset to the default when an instance of-
2606 QCoreApplication is destructed.-
2607-
2608 \sa removeLibraryPath(), libraryPaths(), setLibraryPaths()-
2609 */-
2610void QCoreApplication::addLibraryPath(const QString &path)-
2611{-
2612 if (path.isEmpty())
path.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 9 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QPluginLoader
0-9
2613 return;
never executed: return;
0
2614-
2615 QString canonicalPath = QDir(path).canonicalPath();-
2616 if (canonicalPath.isEmpty())
canonicalPath.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 9 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QPluginLoader
0-9
2617 return;
never executed: return;
0
2618-
2619 QMutexLocker locker(libraryPathMutex());-
2620-
2621 QStringList *libpaths = coreappdata()->manual_libpaths.data();-
2622 if (libpaths) {
libpathsDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
FALSEevaluated 8 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QPluginLoader
1-8
2623 if (libpaths->contains(canonicalPath))
libpaths->cont...canonicalPath)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QApplication
FALSEnever evaluated
0-1
2624 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QApplication
1
2625 } else {
never executed: end of block
0
2626 // make sure that library paths are initialized-
2627 libraryPaths();-
2628 QStringList *app_libpaths = coreappdata()->app_libpaths.data();-
2629 if (app_libpaths->contains(canonicalPath))
app_libpaths->...canonicalPath)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QApplication
FALSEevaluated 5 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QPluginLoader
3-5
2630 return;
executed 3 times by 1 test: return;
Executed by:
  • tst_QApplication
3
2631-
2632 coreappdata()->manual_libpaths.reset(libpaths = new QStringList(*app_libpaths));-
2633 }
executed 5 times by 4 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QPluginLoader
5
2634-
2635 libpaths->prepend(canonicalPath);-
2636 locker.unlock();-
2637 QFactoryLoader::refreshAll();-
2638}
executed 5 times by 4 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCoreApplication
  • tst_QGuiApplication
  • tst_QPluginLoader
5
2639-
2640/*!-
2641 Removes \a path from the library path list. If \a path is empty or not-
2642 in the path list, the list is not changed.-
2643-
2644 The library paths are reset to the default when an instance of-
2645 QCoreApplication is destructed.-
2646-
2647 \sa addLibraryPath(), libraryPaths(), setLibraryPaths()-
2648*/-
2649void QCoreApplication::removeLibraryPath(const QString &path)-
2650{-
2651 if (path.isEmpty())
path.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
0-2
2652 return;
never executed: return;
0
2653-
2654 QString canonicalPath = QDir(path).canonicalPath();-
2655 if (canonicalPath.isEmpty())
canonicalPath.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
0-2
2656 return;
never executed: return;
0
2657-
2658 QMutexLocker locker(libraryPathMutex());-
2659-
2660 QStringList *libpaths = coreappdata()->manual_libpaths.data();-
2661 if (libpaths) {
libpathsDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
FALSEnever evaluated
0-2
2662 if (libpaths->removeAll(canonicalPath) == 0)
libpaths->remo...icalPath) == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
0-2
2663 return;
never executed: return;
0
2664 } else {
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
2665 // make sure that library paths is initialized-
2666 libraryPaths();-
2667 QStringList *app_libpaths = coreappdata()->app_libpaths.data();-
2668 if (!app_libpaths->contains(canonicalPath))
!app_libpaths-...canonicalPath)Description
TRUEnever evaluated
FALSEnever evaluated
0
2669 return;
never executed: return;
0
2670-
2671 coreappdata()->manual_libpaths.reset(libpaths = new QStringList(*app_libpaths));-
2672 libpaths->removeAll(canonicalPath);-
2673 }
never executed: end of block
0
2674-
2675 locker.unlock();-
2676 QFactoryLoader::refreshAll();-
2677}
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
2678-
2679#endif //QT_NO_LIBRARY-
2680-
2681#ifndef QT_NO_QOBJECT-
2682-
2683/*!-
2684 Installs an event filter \a filterObj for all native events-
2685 received by the application in the main thread.-
2686-
2687 The event filter \a filterObj receives events via its \l {QAbstractNativeEventFilter::}{nativeEventFilter()}-
2688 function, which is called for all native events received in the main thread.-
2689-
2690 The QAbstractNativeEventFilter::nativeEventFilter() function should-
2691 return true if the event should be filtered, i.e. stopped. It should-
2692 return false to allow normal Qt processing to continue: the native-
2693 event can then be translated into a QEvent and handled by the standard-
2694 Qt \l{QEvent} {event} filtering, e.g. QObject::installEventFilter().-
2695-
2696 If multiple event filters are installed, the filter that was-
2697 installed last is activated first.-
2698-
2699 \note The filter function set here receives native messages,-
2700 i.e. MSG or XCB event structs.-
2701-
2702 \note Native event filters will be disabled in the application when the-
2703 Qt::AA_MacPluginApplication attribute is set.-
2704-
2705 For maximum portability, you should always try to use QEvent-
2706 and QObject::installEventFilter() whenever possible.-
2707-
2708 \sa QObject::installEventFilter()-
2709-
2710 \since 5.0-
2711*/-
2712void QCoreApplication::installNativeEventFilter(QAbstractNativeEventFilter *filterObj)-
2713{-
2714 if (QCoreApplication::testAttribute(Qt::AA_MacPluginApplication)) {
QCoreApplicati...inApplication)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QWidget
0-1
2715 qWarning("Native event filters are not applied when the Qt::AA_MacPluginApplication attribute is set");-
2716 return;
never executed: return;
0
2717 }-
2718-
2719 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(QCoreApplicationPrivate::theMainThread);-
2720 if (!filterObj || !eventDispatcher)
!filterObjDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QWidget
!eventDispatcherDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QWidget
0-1
2721 return;
never executed: return;
0
2722 eventDispatcher->installNativeEventFilter(filterObj);-
2723}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QWidget
1
2724-
2725/*!-
2726 Removes an event \a filterObject from this object. The-
2727 request is ignored if such an event filter has not been installed.-
2728-
2729 All event filters for this object are automatically removed when-
2730 this object is destroyed.-
2731-
2732 It is always safe to remove an event filter, even during event-
2733 filter activation (i.e. from the nativeEventFilter() function).-
2734-
2735 \sa installNativeEventFilter()-
2736 \since 5.0-
2737*/-
2738void QCoreApplication::removeNativeEventFilter(QAbstractNativeEventFilter *filterObject)-
2739{-
2740 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();-
2741 if (!filterObject || !eventDispatcher)
!filterObjectDescription
TRUEnever evaluated
FALSEnever evaluated
!eventDispatcherDescription
TRUEnever evaluated
FALSEnever evaluated
0
2742 return;
never executed: return;
0
2743 eventDispatcher->removeNativeEventFilter(filterObject);-
2744}
never executed: end of block
0
2745-
2746/*!-
2747 \deprecated-
2748-
2749 This function returns \c true if there are pending events; otherwise-
2750 returns \c false. Pending events can be either from the window-
2751 system or posted events using postEvent().-
2752-
2753 \note this function is not thread-safe. It may only be called in the main-
2754 thread and only if there are no other threads running in the application-
2755 (including threads Qt starts for its own purposes).-
2756-
2757 \sa QAbstractEventDispatcher::hasPendingEvents()-
2758*/-
2759#if QT_DEPRECATED_SINCE(5, 3)-
2760bool QCoreApplication::hasPendingEvents()-
2761{-
2762 QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();-
2763 if (eventDispatcher)
eventDispatcherDescription
TRUEnever evaluated
FALSEnever evaluated
0
2764 return eventDispatcher->hasPendingEvents();
never executed: return eventDispatcher->hasPendingEvents();
0
2765 return false;
never executed: return false;
0
2766}-
2767#endif-
2768-
2769/*!-
2770 Returns a pointer to the event dispatcher object for the main thread. If no-
2771 event dispatcher exists for the thread, this function returns 0.-
2772*/-
2773QAbstractEventDispatcher *QCoreApplication::eventDispatcher()-
2774{-
2775 if (QCoreApplicationPrivate::theMainThread)
QCoreApplicati...:theMainThreadDescription
TRUEevaluated 189 times by 131 tests
Evaluated 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
  • ...
FALSEnever evaluated
0-189
2776 return QCoreApplicationPrivate::theMainThread.load()->eventDispatcher();
executed 189 times by 131 tests: return QCoreApplicationPrivate::theMainThread.load()->eventDispatcher();
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
  • ...
189
2777 return 0;
never executed: return 0;
0
2778}-
2779-
2780/*!-
2781 Sets the event dispatcher for the main thread to \a eventDispatcher. This-
2782 is only possible as long as there is no event dispatcher installed yet. That-
2783 is, before QCoreApplication has been instantiated. This method takes-
2784 ownership of the object.-
2785*/-
2786void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)-
2787{-
2788 QThread *mainThread = QCoreApplicationPrivate::theMainThread;-
2789 if (!mainThread)
!mainThreadDescription
TRUEnever evaluated
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QGuiApplication
0-2
2790 mainThread = QThread::currentThread(); // will also setup theMainThread
never executed: mainThread = QThread::currentThread();
0
2791 mainThread->setEventDispatcher(eventDispatcher);-
2792}
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QGuiApplication
2
2793-
2794#endif // QT_NO_QOBJECT-
2795-
2796/*!-
2797 \macro Q_COREAPP_STARTUP_FUNCTION(QtStartUpFunction ptr)-
2798 \since 5.1-
2799 \relates QCoreApplication-
2800 \reentrant-
2801-
2802 Adds a global function that will be called from the QCoreApplication-
2803 constructor. This macro is normally used to initialize libraries-
2804 for program-wide functionality, without requiring the application to-
2805 call into the library for initialization.-
2806-
2807 The function specified by \a ptr should take no arguments and should-
2808 return nothing. For example:-
2809-
2810 \snippet code/src_corelib_kernel_qcoreapplication.cpp 3-
2811-
2812 Note that the startup function will run at the end of the QCoreApplication constructor,-
2813 before any GUI initialization. If GUI code is required in the function,-
2814 use a timer (or a queued invocation) to perform the initialization later on,-
2815 from the event loop.-
2816-
2817 If QCoreApplication is deleted and another QCoreApplication is created,-
2818 the startup function will be invoked again.-
2819*/-
2820-
2821/*!-
2822 \fn void qAddPostRoutine(QtCleanUpFunction ptr)-
2823 \relates QCoreApplication-
2824-
2825 Adds a global routine that will be called from the QCoreApplication-
2826 destructor. This function is normally used to add cleanup routines-
2827 for program-wide functionality.-
2828-
2829 The cleanup routines are called in the reverse order of their addition.-
2830-
2831 The function specified by \a ptr should take no arguments and should-
2832 return nothing. For example:-
2833-
2834 \snippet code/src_corelib_kernel_qcoreapplication.cpp 4-
2835-
2836 Note that for an application- or module-wide cleanup, qaddPostRoutine()-
2837 is often not suitable. For example, if the program is split into dynamically-
2838 loaded modules, the relevant module may be unloaded long before the-
2839 QCoreApplication destructor is called. In such cases, if using qaddPostRoutine()-
2840 is still desirable, qRemovePostRoutine() can be used to prevent a routine-
2841 from being called by the QCoreApplication destructor. For example, if that-
2842 routine was called before the module was unloaded.-
2843-
2844 For modules and libraries, using a reference-counted-
2845 initialization manager or Qt's parent-child deletion mechanism may-
2846 be better. Here is an example of a private class that uses the-
2847 parent-child mechanism to call a cleanup function at the right-
2848 time:-
2849-
2850 \snippet code/src_corelib_kernel_qcoreapplication.cpp 5-
2851-
2852 By selecting the right parent object, this can often be made to-
2853 clean up the module's data at the right moment.-
2854-
2855 \sa qRemovePostRoutine()-
2856*/-
2857-
2858/*!-
2859 \fn void qRemovePostRoutine(QtCleanUpFunction ptr)-
2860 \relates QCoreApplication-
2861 \since 5.3-
2862-
2863 Removes the cleanup routine specified by \a ptr from the list of-
2864 routines called by the QCoreApplication destructor. The routine-
2865 must have been previously added to the list by a call to-
2866 qAddPostRoutine(), otherwise this function has no effect.-
2867-
2868 \sa qAddPostRoutine()-
2869*/-
2870-
2871/*!-
2872 \macro Q_DECLARE_TR_FUNCTIONS(context)-
2873 \relates QCoreApplication-
2874-
2875 The Q_DECLARE_TR_FUNCTIONS() macro declares and implements two-
2876 translation functions, \c tr() and \c trUtf8(), with these-
2877 signatures:-
2878-
2879 \snippet code/src_corelib_kernel_qcoreapplication.cpp 6-
2880-
2881 This macro is useful if you want to use QObject::tr() or-
2882 QObject::trUtf8() in classes that don't inherit from QObject.-
2883-
2884 Q_DECLARE_TR_FUNCTIONS() must appear at the very top of the-
2885 class definition (before the first \c{public:} or \c{protected:}).-
2886 For example:-
2887-
2888 \snippet code/src_corelib_kernel_qcoreapplication.cpp 7-
2889-
2890 The \a context parameter is normally the class name, but it can-
2891 be any text.-
2892-
2893 \sa Q_OBJECT, QObject::tr(), QObject::trUtf8()-
2894*/-
2895-
2896QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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