qxcbintegration.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the plugins of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qxcbintegration.h"-
41#include "qxcbconnection.h"-
42#include "qxcbscreen.h"-
43#include "qxcbwindow.h"-
44#include "qxcbcursor.h"-
45#include "qxcbkeyboard.h"-
46#include "qxcbbackingstore.h"-
47#include "qxcbnativeinterface.h"-
48#include "qxcbclipboard.h"-
49#include "qxcbdrag.h"-
50#include "qxcbglintegration.h"-
51-
52#ifndef QT_NO_SESSIONMANAGER-
53#include "qxcbsessionmanager.h"-
54#endif-
55-
56#include <xcb/xcb.h>-
57-
58#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>-
59#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>-
60#include <QtPlatformSupport/private/qgenericunixservices_p.h>-
61-
62#include <stdio.h>-
63-
64//this has to be included before egl, since egl pulls in X headers-
65#include <QtGui/private/qguiapplication_p.h>-
66-
67#ifdef XCB_USE_EGL-
68# include <QtPlatformSupport/private/qt_egl_p.h>-
69#endif-
70-
71#ifdef XCB_USE_XLIB-
72#include <X11/Xlib.h>-
73#endif-
74-
75#include <qpa/qplatforminputcontextfactory_p.h>-
76#include <private/qgenericunixthemes_p.h>-
77#include <qpa/qplatforminputcontext.h>-
78-
79#include <QtGui/QOpenGLContext>-
80#include <QtGui/QScreen>-
81#include <QtGui/QOffscreenSurface>-
82#ifndef QT_NO_ACCESSIBILITY-
83#include <qpa/qplatformaccessibility.h>-
84#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE-
85#include "../../../platformsupport/linuxaccessibility/bridge_p.h"-
86#endif-
87#endif-
88-
89#include <QtCore/QFileInfo>-
90-
91QT_BEGIN_NAMESPACE-
92-
93// Find out if our parent process is gdb by looking at the 'exe' symlink under /proc,.-
94// or, for older Linuxes, read out 'cmdline'.-
95static bool runningUnderDebugger()-
96{-
97#if defined(QT_DEBUG) && defined(Q_OS_LINUX)-
98 const QString parentProc = QLatin1String("/proc/") + QString::number(getppid());-
99 const QFileInfo parentProcExe(parentProc + QLatin1String("/exe"));-
100 if (parentProcExe.isSymLink())
parentProcExe.isSymLink()Description
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-135
101 return parentProcExe.symLinkTarget().endsWith(QLatin1String("/gdb"));
executed 135 times by 5 tests: return parentProcExe.symLinkTarget().endsWith(QLatin1String("/gdb"));
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
102 QFile f(parentProc + QLatin1String("/cmdline"));-
103 if (!f.open(QIODevice::ReadOnly))
!f.open(QIODevice::ReadOnly)Description
TRUEnever evaluated
FALSEnever evaluated
0
104 return false;
never executed: return false;
0
105 QByteArray s;-
106 char c;-
107 while (f.getChar(&c) && c) {
f.getChar(&c)Description
TRUEnever evaluated
FALSEnever evaluated
cDescription
TRUEnever evaluated
FALSEnever evaluated
0
108 if (c == '/')
c == '/'Description
TRUEnever evaluated
FALSEnever evaluated
0
109 s.clear();
never executed: s.clear();
0
110 else-
111 s += c;
never executed: s += c;
0
112 }-
113 return s == "gdb";
never executed: return s == "gdb";
0
114#else-
115 return false;-
116#endif-
117}-
118-
119QXcbIntegration *QXcbIntegration::m_instance = Q_NULLPTR;-
120-
121QXcbIntegration::QXcbIntegration(const QStringList &parameters, int &argc, char **argv)-
122 : m_services(new QGenericUnixServices)-
123 , m_instanceName(0)-
124 , m_canGrab(true)-
125 , m_defaultVisualId(UINT_MAX)-
126{-
127 m_instance = this;-
128 qApp->setAttribute(Qt::AA_CompressHighFrequencyEvents, true);-
129-
130 qRegisterMetaType<QXcbWindow*>();-
131#ifdef XCB_USE_XLIB-
132 XInitThreads();-
133#endif-
134 m_nativeInterface.reset(new QXcbNativeInterface);-
135-
136 // Parse arguments-
137 const char *displayName = 0;-
138 bool noGrabArg = false;-
139 bool doGrabArg = false;-
140 if (argc) {
argcDescription
TRUEevaluated 63 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 72 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
63-72
141 int j = 1;-
142 for (int i = 1; i < argc; i++) {
i < argcDescription
TRUEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
FALSEevaluated 63 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
63-74
143 QByteArray arg(argv[i]);-
144 if (arg.startsWith("--"))
arg.startsWith("--")Description
TRUEnever evaluated
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
0-74
145 arg.remove(0, 1);
never executed: arg.remove(0, 1);
0
146 if (arg == "-display" && i < argc - 1)
arg == "-display"Description
TRUEnever evaluated
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
i < argc - 1Description
TRUEnever evaluated
FALSEnever evaluated
0-74
147 displayName = argv[++i];
never executed: displayName = argv[++i];
0
148 else if (arg == "-name" && i < argc - 1)
arg == "-name"Description
TRUEnever evaluated
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
i < argc - 1Description
TRUEnever evaluated
FALSEnever evaluated
0-74
149 m_instanceName = argv[++i];
never executed: m_instanceName = argv[++i];
0
150 else if (arg == "-nograb")
arg == "-nograb"Description
TRUEnever evaluated
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
0-74
151 noGrabArg = true;
never executed: noGrabArg = true;
0
152 else if (arg == "-dograb")
arg == "-dograb"Description
TRUEnever evaluated
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
0-74
153 doGrabArg = true;
never executed: doGrabArg = true;
0
154 else if (arg == "-visual" && i < argc - 1) {
arg == "-visual"Description
TRUEnever evaluated
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
i < argc - 1Description
TRUEnever evaluated
FALSEnever evaluated
0-74
155 bool ok = false;-
156 m_defaultVisualId = QByteArray(argv[++i]).toUInt(&ok, 0);-
157 if (!ok)
!okDescription
TRUEnever evaluated
FALSEnever evaluated
0
158 m_defaultVisualId = UINT_MAX;
never executed: m_defaultVisualId = (2147483647 * 2U + 1U);
0
159 }
never executed: end of block
0
160 else-
161 argv[j++] = argv[i];
executed 74 times by 3 tests: argv[j++] = argv[i];
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_selftests - unknown status
74
162 }-
163 argc = j;-
164 } // argc
executed 63 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
63
165-
166 bool underDebugger = runningUnderDebugger();-
167 if (noGrabArg && doGrabArg && underDebugger) {
noGrabArgDescription
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
doGrabArgDescription
TRUEnever evaluated
FALSEnever evaluated
underDebuggerDescription
TRUEnever evaluated
FALSEnever evaluated
0-135
168 qWarning("Both -nograb and -dograb command line arguments specified. Please pick one. -nograb takes prcedence");-
169 doGrabArg = false;-
170 }
never executed: end of block
0
171-
172#if defined(QT_DEBUG)-
173 if (!noGrabArg && !doGrabArg && underDebugger) {
!noGrabArgDescription
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
!doGrabArgDescription
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
underDebuggerDescription
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
0-135
174 qDebug("Qt: gdb: -nograb added to command-line options.\n"-
175 "\t Use the -dograb option to enforce grabbing.");-
176 }
never executed: end of block
0
177#endif-
178 m_canGrab = (!underDebugger && !noGrabArg) || (underDebugger && doGrabArg);
!underDebuggerDescription
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
!noGrabArgDescription
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
underDebuggerDescription
TRUEnever evaluated
FALSEnever evaluated
doGrabArgDescription
TRUEnever evaluated
FALSEnever evaluated
0-135
179-
180 static bool canNotGrabEnv = qEnvironmentVariableIsSet("QT_XCB_NO_GRAB_SERVER");-
181 if (canNotGrabEnv)
canNotGrabEnvDescription
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
0-135
182 m_canGrab = false;
never executed: m_canGrab = false;
0
183-
184 const int numParameters = parameters.size();-
185 m_connections.reserve(1 + numParameters / 2);-
186 m_connections << new QXcbConnection(m_nativeInterface.data(), m_canGrab, m_defaultVisualId, displayName);-
187-
188 for (int i = 0; i < numParameters - 1; i += 2) {
i < numParameters - 1Description
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
0-135
189 qCDebug(lcQpaScreen) << "connecting to additional display: " << parameters.at(i) << parameters.at(i+1);
never executed: QMessageLogger(__FILE__, 189, __PRETTY_FUNCTION__, lcQpaScreen().categoryName()).debug() << "connecting to additional display: " << parameters.at(i) << parameters.at(i+1);
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
0
190 QString display = parameters.at(i) + QLatin1Char(':') + parameters.at(i+1);-
191 m_connections << new QXcbConnection(m_nativeInterface.data(), m_canGrab, m_defaultVisualId, display.toLatin1().constData());-
192 }
never executed: end of block
0
193-
194 m_fontDatabase.reset(new QGenericUnixFontDatabase());-
195}
executed 135 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
135
196-
197QXcbIntegration::~QXcbIntegration()-
198{-
199 qDeleteAll(m_connections);-
200 m_instance = Q_NULLPTR;-
201}
executed 346 times by 219 tests: end of block
Executed 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
  • ...
346
202-
203QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const-
204{-
205 QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());-
206 QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();-
207 if (window->type() != Qt::Desktop && window->supportsOpenGL()) {
window->type() != Qt::DesktopDescription
TRUEevaluated 4107 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 298 times by 117 tests
Evaluated by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
window->supportsOpenGL()Description
TRUEevaluated 3974 times by 118 tests
Evaluated by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
FALSEevaluated 133 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QGuiApplication
  • tst_QKeyEvent
  • tst_QLineEdit
  • tst_QMouseEvent
  • tst_QRasterWindow
  • tst_QTouchEvent
  • tst_QWindow
  • tst_QWindowContainer
  • tst_qinputmethod
133-4107
208 if (glIntegration) {
glIntegrationDescription
TRUEevaluated 3974 times by 118 tests
Evaluated by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
0-3974
209 QXcbWindow *xcbWindow = glIntegration->createWindow(window);-
210 xcbWindow->create();-
211 return xcbWindow;
executed 3974 times by 118 tests: return xcbWindow;
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
3974
212 }-
213 }
never executed: end of block
0
214-
215 Q_ASSERT(window->type() == Qt::Desktop || !window->supportsOpenGL()-
216 || (!glIntegration && window->surfaceType() == QSurface::RasterGLSurface)); // for VNC-
217 QXcbWindow *xcbWindow = new QXcbWindow(window);-
218 xcbWindow->create();-
219 return xcbWindow;
executed 431 times by 124 tests: return xcbWindow;
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
431
220}-
221-
222#ifndef QT_NO_OPENGL-
223QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const-
224{-
225 QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());-
226 QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();-
227 if (!glIntegration) {
!glIntegrationDescription
TRUEnever evaluated
FALSEevaluated 57 times by 9 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGLThreads
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
0-57
228 qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled");-
229 return Q_NULLPTR;
never executed: return nullptr;
0
230 }-
231 return glIntegration->createPlatformOpenGLContext(context);
executed 57 times by 9 tests: return glIntegration->createPlatformOpenGLContext(context);
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGLThreads
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
57
232}-
233#endif-
234-
235QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const-
236{-
237 return new QXcbBackingStore(window);
executed 3883 times by 117 tests: return new QXcbBackingStore(window);
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
3883
238}-
239-
240QPlatformOffscreenSurface *QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const-
241{-
242 QXcbScreen *screen = static_cast<QXcbScreen *>(surface->screen()->handle());-
243 QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();-
244 if (!glIntegration) {
!glIntegrationDescription
TRUEnever evaluated
FALSEevaluated 26 times by 5 tests
Evaluated by:
  • tst_QGLThreads
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
0-26
245 qWarning("QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled");-
246 return Q_NULLPTR;
never executed: return nullptr;
0
247 }-
248 return glIntegration->createPlatformOffscreenSurface(surface);
executed 26 times by 5 tests: return glIntegration->createPlatformOffscreenSurface(surface);
Executed by:
  • tst_QGLThreads
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
26
249}-
250-
251bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const-
252{-
253 switch (cap) {-
254 case OpenGL:
executed 131 times by 125 tests: case OpenGL:
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
131
255 case ThreadedOpenGL:
executed 8 times by 2 tests: case ThreadedOpenGL:
Executed by:
  • tst_QGLThreads
  • tst_QOpenGlConfig
8
256 {-
257 const auto *connection = qAsConst(m_connections).first();-
258 if (const auto *integration = connection->glIntegration())
const auto *in...lIntegration()Description
TRUEevaluated 139 times by 126 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
0-139
259 return cap != ThreadedOpenGL
executed 139 times by 126 tests: return cap != ThreadedOpenGL || (connection->threadedEventHandling() && integration->supportsThreadedOpenGL());
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
139
260 || (connection->threadedEventHandling() && integration->supportsThreadedOpenGL());
executed 139 times by 126 tests: return cap != ThreadedOpenGL || (connection->threadedEventHandling() && integration->supportsThreadedOpenGL());
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
139
261 return false;
never executed: return false;
0
262 }-
263-
264 case ThreadedPixmaps:
executed 2 times by 2 tests: case ThreadedPixmaps:
Executed by:
  • tst_QOpenGlConfig
  • tst_QPixmap
2
265 case WindowMasks:
executed 2 times by 2 tests: case WindowMasks:
Executed by:
  • tst_QOpenGlConfig
  • tst_QWidget
2
266 case MultipleWindows:
executed 2 times by 1 test: case MultipleWindows:
Executed by:
  • tst_QWidget
2
267 case ForeignWindows:
never executed: case ForeignWindows:
0
268 case SyncState:
executed 9 times by 3 tests: case SyncState:
Executed by:
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
9
269 case RasterGLSurface:
executed 4277 times by 120 tests: case RasterGLSurface:
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
4277
270 return true;
executed 4292 times by 121 tests: return true;
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
4292
271-
272 case SwitchableWidgetComposition:
executed 1 time by 1 test: case SwitchableWidgetComposition:
Executed by:
  • tst_QOpenGLWidget
1
273 {-
274 return m_connections.at(0)->glIntegration()
executed 1 time by 1 test: return m_connections.at(0)->glIntegration() && m_connections.at(0)->glIntegration()->supportsSwitchableWidgetComposition();
Executed by:
  • tst_QOpenGLWidget
1
275 && m_connections.at(0)->glIntegration()->supportsSwitchableWidgetComposition();
executed 1 time by 1 test: return m_connections.at(0)->glIntegration() && m_connections.at(0)->glIntegration()->supportsSwitchableWidgetComposition();
Executed by:
  • tst_QOpenGLWidget
1
276 }-
277-
278 default: return QPlatformIntegration::hasCapability(cap);
executed 11991 times by 125 tests: return QPlatformIntegration::hasCapability(cap);
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
executed 11991 times by 125 tests: default:
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
11991
279 }-
280}-
281-
282QAbstractEventDispatcher *QXcbIntegration::createEventDispatcher() const-
283{-
284 QAbstractEventDispatcher *dispatcher = createUnixEventDispatcher();-
285 for (int i = 0; i < m_connections.size(); i++)
i < m_connections.size()Description
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
286 m_connections[i]->eventReader()->registerEventDispatcher(dispatcher);
executed 135 times by 5 tests: m_connections[i]->eventReader()->registerEventDispatcher(dispatcher);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
287 return dispatcher;
executed 135 times by 5 tests: return dispatcher;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
288}-
289-
290void QXcbIntegration::initialize()-
291{-
292 // Perform everything that may potentially need the event dispatcher (timers, socket-
293 // notifiers) here instead of the constructor.-
294 QString icStr = QPlatformInputContextFactory::requested();-
295 if (icStr.isNull())
icStr.isNull()Description
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-135
296 icStr = QLatin1String("compose");
executed 135 times by 5 tests: icStr = QLatin1String("compose");
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
297 m_inputContext.reset(QPlatformInputContextFactory::create(icStr));-
298}
executed 135 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
135
299-
300void QXcbIntegration::moveToScreen(QWindow *window, int screen)-
301{-
302 Q_UNUSED(window);-
303 Q_UNUSED(screen);-
304}
never executed: end of block
0
305-
306QPlatformFontDatabase *QXcbIntegration::fontDatabase() const-
307{-
308 return m_fontDatabase.data();
executed 35726 times by 243 tests: return m_fontDatabase.data();
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • ...
35726
309}-
310-
311QPlatformNativeInterface * QXcbIntegration::nativeInterface() const-
312{-
313 return m_nativeInterface.data();
executed 9534 times by 132 tests: return m_nativeInterface.data();
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_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
9534
314}-
315-
316#ifndef QT_NO_CLIPBOARD-
317QPlatformClipboard *QXcbIntegration::clipboard() const-
318{-
319 return m_connections.at(0)->clipboard();
executed 181 times by 7 tests: return m_connections.at(0)->clipboard();
Executed by:
  • tst_QApplication
  • tst_QClipboard
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QStyleSheetStyle
  • tst_QTextEdit
181
320}-
321#endif-
322-
323#ifndef QT_NO_DRAGANDDROP-
324QPlatformDrag *QXcbIntegration::drag() const-
325{-
326 return m_connections.at(0)->drag();
executed 105 times by 9 tests: return m_connections.at(0)->drag();
Executed by:
  • tst_QAbstractItemView
  • tst_QDataWidgetMapper
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListWidget
  • tst_QTreeView
  • tst_QWidget_window
105
327}-
328#endif-
329-
330QPlatformInputContext *QXcbIntegration::inputContext() const-
331{-
332 return m_inputContext.data();
executed 31548 times by 108 tests: return m_inputContext.data();
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • 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_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • ...
31548
333}-
334-
335#ifndef QT_NO_ACCESSIBILITY-
336QPlatformAccessibility *QXcbIntegration::accessibility() const-
337{-
338#if !defined(QT_NO_ACCESSIBILITY_ATSPI_BRIDGE)-
339 if (!m_accessibility) {
!m_accessibilityDescription
TRUEevaluated 180 times by 128 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 526585 times by 129 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_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
180-526585
340 Q_ASSERT_X(QCoreApplication::eventDispatcher(), "QXcbIntegration",-
341 "Initializing accessibility without event-dispatcher!");-
342 m_accessibility.reset(new QSpiAccessibleBridge());-
343 }
executed 180 times by 128 tests: end of block
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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
180
344#endif-
345-
346 return m_accessibility.data();
executed 526765 times by 129 tests: return m_accessibility.data();
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_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
526765
347}-
348#endif-
349-
350QPlatformServices *QXcbIntegration::services() const-
351{-
352 return m_services.data();
executed 2167 times by 125 tests: return m_services.data();
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • ...
2167
353}-
354-
355Qt::KeyboardModifiers QXcbIntegration::queryKeyboardModifiers() const-
356{-
357 int keybMask = 0;-
358 QXcbConnection *conn = m_connections.at(0);-
359 QXcbCursor::queryPointer(conn, 0, 0, &keybMask);-
360 return conn->keyboard()->translateModifiers(keybMask);
never executed: return conn->keyboard()->translateModifiers(keybMask);
0
361}-
362-
363QList<int> QXcbIntegration::possibleKeys(const QKeyEvent *e) const-
364{-
365 return m_connections.at(0)->keyboard()->possibleKeys(e);
never executed: return m_connections.at(0)->keyboard()->possibleKeys(e);
0
366}-
367-
368QStringList QXcbIntegration::themeNames() const-
369{-
370 return QGenericUnixTheme::themeNames();
executed 135 times by 5 tests: return QGenericUnixTheme::themeNames();
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
371}-
372-
373QPlatformTheme *QXcbIntegration::createPlatformTheme(const QString &name) const-
374{-
375 return QGenericUnixTheme::createUnixTheme(name);
executed 135 times by 5 tests: return QGenericUnixTheme::createUnixTheme(name);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
376}-
377-
378QVariant QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const-
379{-
380 switch (hint) {-
381 case QPlatformIntegration::CursorFlashTime:
executed 3974 times by 49 tests: case QPlatformIntegration::CursorFlashTime:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLabel
  • ...
3974
382 case QPlatformIntegration::KeyboardInputInterval:
executed 126 times by 6 tests: case QPlatformIntegration::KeyboardInputInterval:
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QListView
  • tst_QMdiArea
  • tst_QTableView
  • tst_QTreeView
126
383 case QPlatformIntegration::MouseDoubleClickInterval:
executed 919 times by 25 tests: case QPlatformIntegration::MouseDoubleClickInterval:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGestureRecognizer
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMouseEvent
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTextEdit
  • tst_QTouchEvent
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWindow
919
384 case QPlatformIntegration::StartDragTime:
never executed: case QPlatformIntegration::StartDragTime:
0
385 case QPlatformIntegration::KeyboardAutoRepeatRate:
never executed: case QPlatformIntegration::KeyboardAutoRepeatRate:
0
386 case QPlatformIntegration::PasswordMaskDelay:
executed 3628 times by 54 tests: case QPlatformIntegration::PasswordMaskDelay:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsWidget
  • ...
3628
387 case QPlatformIntegration::StartDragVelocity:
never executed: case QPlatformIntegration::StartDragVelocity:
0
388 case QPlatformIntegration::UseRtlExtensions:
executed 5 times by 4 tests: case QPlatformIntegration::UseRtlExtensions:
Executed by:
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QStyleSheetStyle
  • tst_QTextEdit
5
389 case QPlatformIntegration::PasswordMaskCharacter:
executed 1859 times by 54 tests: case QPlatformIntegration::PasswordMaskCharacter:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsWidget
  • ...
1859
390 // TODO using various xcb, gnome or KDE settings-
391 break; // Not implemented, use defaults
executed 10511 times by 71 tests: break;
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • ...
10511
392 case QPlatformIntegration::FontSmoothingGamma:
executed 135 times by 5 tests: case QPlatformIntegration::FontSmoothingGamma:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
393 // Match Qt 4.8 text rendering, and rendering of other X11 toolkits.-
394 return qreal(1.0);
executed 135 times by 5 tests: return qreal(1.0);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
395 case QPlatformIntegration::StartDragDistance: {
executed 78 times by 3 tests: case QPlatformIntegration::StartDragDistance:
Executed by:
  • tst_QGraphicsView
  • tst_QMainWindow
  • tst_QMenu
78
396 // The default (in QPlatformTheme::defaultThemeHint) is 10 pixels, but-
397 // on a high-resolution screen it makes sense to increase it.-
398 qreal dpi = 100.0;-
399 if (const QXcbScreen *screen = defaultConnection()->primaryScreen()) {
const QXcbScre...rimaryScreen()Description
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QMainWindow
  • tst_QMenu
FALSEnever evaluated
0-78
400 if (screen->logicalDpi().first > dpi)
screen->logica...().first > dpiDescription
TRUEnever evaluated
FALSEevaluated 78 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QMainWindow
  • tst_QMenu
0-78
401 dpi = screen->logicalDpi().first;
never executed: dpi = screen->logicalDpi().first;
0
402 if (screen->logicalDpi().second > dpi)
screen->logica...).second > dpiDescription
TRUEnever evaluated
FALSEevaluated 78 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QMainWindow
  • tst_QMenu
0-78
403 dpi = screen->logicalDpi().second;
never executed: dpi = screen->logicalDpi().second;
0
404 }
executed 78 times by 3 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QMainWindow
  • tst_QMenu
78
405 return 10.0 * dpi / 100.0;
executed 78 times by 3 tests: return 10.0 * dpi / 100.0;
Executed by:
  • tst_QGraphicsView
  • tst_QMainWindow
  • tst_QMenu
78
406 }-
407 case QPlatformIntegration::ShowIsFullScreen:
executed 20199 times by 121 tests: case QPlatformIntegration::ShowIsFullScreen:
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
20199
408 // X11 always has support for windows, but the-
409 // window manager could prevent it (e.g. matchbox)-
410 return false;
executed 20199 times by 121 tests: return false;
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
20199
411 case QPlatformIntegration::ReplayMousePressOutsidePopup:
never executed: case QPlatformIntegration::ReplayMousePressOutsidePopup:
0
412 return false;
never executed: return false;
0
413 default:
executed 26601 times by 122 tests: default:
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
26601
414 break;
executed 26601 times by 122 tests: break;
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
26601
415 }-
416 return QPlatformIntegration::styleHint(hint);
executed 37112 times by 125 tests: return QPlatformIntegration::styleHint(hint);
Executed by:
  • tst_Gestures
  • 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
  • tst_QDialogButtonBox
  • ...
37112
417}-
418-
419static QString argv0BaseName()-
420{-
421 QString result;-
422 const QStringList arguments = QCoreApplication::arguments();-
423 if (!arguments.isEmpty() && !arguments.front().isEmpty()) {
!arguments.isEmpty()Description
TRUEevaluated 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 102 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
!arguments.front().isEmpty()Description
TRUEevaluated 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
0-134
424 result = arguments.front();-
425 const int lastSlashPos = result.lastIndexOf(QLatin1Char('/'));-
426 if (lastSlashPos != -1)
lastSlashPos != -1Description
TRUEevaluated 132 times by 124 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QGuiApplication
2-132
427 result.remove(0, lastSlashPos + 1);
executed 132 times by 124 tests: result.remove(0, lastSlashPos + 1);
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
132
428 }
executed 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
134
429 return result;
executed 236 times by 125 tests: return result;
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
236
430}-
431-
432static const char resourceNameVar[] = "RESOURCE_NAME";-
433-
434QByteArray QXcbIntegration::wmClass() const-
435{-
436 if (m_wmClass.isEmpty()) {
m_wmClass.isEmpty()Description
TRUEevaluated 185 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 3922 times by 106 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
185-3922
437 // Instance name according to ICCCM 4.1.2.5-
438 QString name;-
439 if (m_instanceName)
m_instanceNameDescription
TRUEnever evaluated
FALSEevaluated 185 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
0-185
440 name = QString::fromLocal8Bit(m_instanceName);
never executed: name = QString::fromLocal8Bit(m_instanceName);
0
441 if (name.isEmpty() && qEnvironmentVariableIsSet(resourceNameVar))
name.isEmpty()Description
TRUEevaluated 185 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
qEnvironmentVa...sourceNameVar)Description
TRUEnever evaluated
FALSEevaluated 185 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
0-185
442 name = QString::fromLocal8Bit(qgetenv(resourceNameVar));
never executed: name = QString::fromLocal8Bit(qgetenv(resourceNameVar));
0
443 if (name.isEmpty())
name.isEmpty()Description
TRUEevaluated 185 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
0-185
444 name = argv0BaseName();
executed 185 times by 125 tests: name = argv0BaseName();
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
185
445-
446 // Note: QCoreApplication::applicationName() cannot be called from the QGuiApplication constructor,-
447 // hence this delayed initialization.-
448 QString className = QCoreApplication::applicationName();-
449 if (className.isEmpty()) {
className.isEmpty()Description
TRUEevaluated 51 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
FALSEevaluated 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
51-134
450 className = argv0BaseName();-
451 if (!className.isEmpty() && className.at(0).isLower())
!className.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 51 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
className.at(0).isLower()Description
TRUEnever evaluated
FALSEnever evaluated
0-51
452 className[0] = className.at(0).toUpper();
never executed: className[0] = className.at(0).toUpper();
0
453 }
executed 51 times by 2 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
51
454-
455 if (!name.isEmpty() && !className.isEmpty()) {
!name.isEmpty()Description
TRUEevaluated 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 51 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
!className.isEmpty()Description
TRUEevaluated 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
0-134
456 m_wmClass = name.toLocal8Bit();-
457 m_wmClass.append('\0');-
458 m_wmClass.append(className.toLocal8Bit());-
459 m_wmClass.append('\0');-
460 }
executed 134 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
134
461 }
executed 185 times by 125 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
185
462 return m_wmClass;
executed 4107 times by 125 tests: return m_wmClass;
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_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
4107
463}-
464-
465#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)-
466QPlatformSessionManager *QXcbIntegration::createPlatformSessionManager(const QString &id, const QString &key) const-
467{-
468 return new QXcbSessionManager(id, key);
executed 135 times by 5 tests: return new QXcbSessionManager(id, key);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
469}-
470#endif-
471-
472void QXcbIntegration::sync()-
473{-
474 for (int i = 0; i < m_connections.size(); i++) {
i < m_connections.size()Description
TRUEevaluated 9 times by 3 tests
Evaluated by:
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
FALSEevaluated 9 times by 3 tests
Evaluated by:
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
9
475 m_connections.at(i)->sync();-
476 }
executed 9 times by 3 tests: end of block
Executed by:
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
9
477}
executed 9 times by 3 tests: end of block
Executed by:
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindow
9
478-
479// For QApplication::beep()-
480void QXcbIntegration::beep() const-
481{-
482 QScreen *priScreen = QGuiApplication::primaryScreen();-
483 if (!priScreen)
!priScreenDescription
TRUEnever evaluated
FALSEnever evaluated
0
484 return;
never executed: return;
0
485 QPlatformScreen *screen = priScreen->handle();-
486 if (!screen)
!screenDescription
TRUEnever evaluated
FALSEnever evaluated
0
487 return;
never executed: return;
0
488 xcb_connection_t *connection = static_cast<QXcbScreen *>(screen)->xcb_connection();-
489 xcb_bell(connection, 0);-
490}
never executed: end of block
0
491-
492QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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