OpenCoverage

qxcbcursor.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbcursor.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 "qxcbcursor.h"-
41#include "qxcbconnection.h"-
42#include "qxcbwindow.h"-
43#include "qxcbimage.h"-
44#include "qxcbxsettings.h"-
45-
46#include <QtCore/QLibrary>-
47#include <QtGui/QWindow>-
48#include <QtGui/QBitmap>-
49#include <QtGui/private/qguiapplication_p.h>-
50#include <X11/cursorfont.h>-
51#include <xcb/xfixes.h>-
52#include <xcb/xcb_image.h>-
53-
54QT_BEGIN_NAMESPACE-
55-
56typedef int (*PtrXcursorLibraryLoadCursor)(void *, const char *);-
57typedef char *(*PtrXcursorLibraryGetTheme)(void *);-
58typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);-
59typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);-
60-
61#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)-
62#include <X11/Xlib.h>-
63enum {-
64 XCursorShape = CursorShape-
65};-
66#undef CursorShape-
67-
68static PtrXcursorLibraryLoadCursor ptrXcursorLibraryLoadCursor = 0;-
69static PtrXcursorLibraryGetTheme ptrXcursorLibraryGetTheme = 0;-
70static PtrXcursorLibrarySetTheme ptrXcursorLibrarySetTheme = 0;-
71static PtrXcursorLibraryGetDefaultSize ptrXcursorLibraryGetDefaultSize = 0;-
72#endif-
73-
74static xcb_font_t cursorFont = 0;-
75static int cursorCount = 0;-
76-
77static uint8_t cur_blank_bits[] = {-
78 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
79 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
81-
82static const uint8_t cur_ver_bits[] = {-
83 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f,-
84 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xf0, 0x0f,-
85 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00 };-
86static const uint8_t mcur_ver_bits[] = {-
87 0x00, 0x00, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f, 0xf0, 0x1f, 0xf8, 0x3f,-
88 0xfc, 0x7f, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xfc, 0x7f, 0xf8, 0x3f,-
89 0xf0, 0x1f, 0xe0, 0x0f, 0xc0, 0x07, 0x80, 0x03 };-
90static const uint8_t cur_hor_bits[] = {-
91 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x30, 0x18,-
92 0x38, 0x38, 0xfc, 0x7f, 0xfc, 0x7f, 0x38, 0x38, 0x30, 0x18, 0x20, 0x08,-
93 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
94static const uint8_t mcur_hor_bits[] = {-
95 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x60, 0x0c, 0x70, 0x1c, 0x78, 0x3c,-
96 0xfc, 0x7f, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfc, 0x7f, 0x78, 0x3c,-
97 0x70, 0x1c, 0x60, 0x0c, 0x40, 0x04, 0x00, 0x00 };-
98static const uint8_t cur_bdiag_bits[] = {-
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x3e,-
100 0x00, 0x37, 0x88, 0x23, 0xd8, 0x01, 0xf8, 0x00, 0x78, 0x00, 0xf8, 0x00,-
101 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
102static const uint8_t mcur_bdiag_bits[] = {-
103 0x00, 0x00, 0xc0, 0x7f, 0x80, 0x7f, 0x00, 0x7f, 0x00, 0x7e, 0x04, 0x7f,-
104 0x8c, 0x7f, 0xdc, 0x77, 0xfc, 0x63, 0xfc, 0x41, 0xfc, 0x00, 0xfc, 0x01,-
105 0xfc, 0x03, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00 };-
106static const uint8_t cur_fdiag_bits[] = {-
107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0xf8, 0x00, 0x78, 0x00,-
108 0xf8, 0x00, 0xd8, 0x01, 0x88, 0x23, 0x00, 0x37, 0x00, 0x3e, 0x00, 0x3c,-
109 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00 };-
110static const uint8_t mcur_fdiag_bits[] = {-
111 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x01, 0xfc, 0x00,-
112 0xfc, 0x41, 0xfc, 0x63, 0xdc, 0x77, 0x8c, 0x7f, 0x04, 0x7f, 0x00, 0x7e,-
113 0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x7f, 0x00, 0x00 };-
114static const uint8_t *cursor_bits16[] = {-
115 cur_ver_bits, mcur_ver_bits, cur_hor_bits, mcur_hor_bits,-
116 cur_bdiag_bits, mcur_bdiag_bits, cur_fdiag_bits, mcur_fdiag_bits,-
117 0, 0, cur_blank_bits, cur_blank_bits };-
118-
119static const uint8_t vsplit_bits[] = {-
120 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
122 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00,-
123 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,-
124 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00,-
125 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00,-
126 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,-
127 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,-
128 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
129 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
130 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
131static const uint8_t vsplitm_bits[] = {-
132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
133 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,-
134 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00,-
135 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00,-
136 0x00, 0xc0, 0x01, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,-
137 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,-
138 0x80, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00,-
139 0x00, 0xc0, 0x01, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00,-
140 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00,-
141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
143static const uint8_t hsplit_bits[] = {-
144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
146 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,-
147 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,-
148 0x00, 0x41, 0x82, 0x00, 0x80, 0x41, 0x82, 0x01, 0xc0, 0x7f, 0xfe, 0x03,-
149 0x80, 0x41, 0x82, 0x01, 0x00, 0x41, 0x82, 0x00, 0x00, 0x40, 0x02, 0x00,-
150 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,-
151 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,-
152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
155static const uint8_t hsplitm_bits[] = {-
156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
158 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,-
159 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe2, 0x47, 0x00, 0x00, 0xe3, 0xc7, 0x00,-
160 0x80, 0xe3, 0xc7, 0x01, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07,-
161 0xc0, 0xff, 0xff, 0x03, 0x80, 0xe3, 0xc7, 0x01, 0x00, 0xe3, 0xc7, 0x00,-
162 0x00, 0xe2, 0x47, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,-
163 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,-
164 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
166 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };-
167static const uint8_t whatsthis_bits[] = {-
168 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0xf0, 0x07, 0x00,-
169 0x09, 0x18, 0x0e, 0x00, 0x11, 0x1c, 0x0e, 0x00, 0x21, 0x1c, 0x0e, 0x00,-
170 0x41, 0x1c, 0x0e, 0x00, 0x81, 0x1c, 0x0e, 0x00, 0x01, 0x01, 0x07, 0x00,-
171 0x01, 0x82, 0x03, 0x00, 0xc1, 0xc7, 0x01, 0x00, 0x49, 0xc0, 0x01, 0x00,-
172 0x95, 0xc0, 0x01, 0x00, 0x93, 0xc0, 0x01, 0x00, 0x21, 0x01, 0x00, 0x00,-
173 0x20, 0xc1, 0x01, 0x00, 0x40, 0xc2, 0x01, 0x00, 0x40, 0x02, 0x00, 0x00,-
174 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };-
179static const uint8_t whatsthism_bits[] = {-
180 0x01, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x07, 0x00, 0x07, 0xf8, 0x0f, 0x00,-
181 0x0f, 0xfc, 0x1f, 0x00, 0x1f, 0x3e, 0x1f, 0x00, 0x3f, 0x3e, 0x1f, 0x00,-
182 0x7f, 0x3e, 0x1f, 0x00, 0xff, 0x3e, 0x1f, 0x00, 0xff, 0x9d, 0x0f, 0x00,-
183 0xff, 0xc3, 0x07, 0x00, 0xff, 0xe7, 0x03, 0x00, 0x7f, 0xe0, 0x03, 0x00,-
184 0xf7, 0xe0, 0x03, 0x00, 0xf3, 0xe0, 0x03, 0x00, 0xe1, 0xe1, 0x03, 0x00,-
185 0xe0, 0xe1, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00,-
186 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };-
191static const uint8_t busy_bits[] = {-
192 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,-
193 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,-
194 0x41, 0xe0, 0xff, 0x00, 0x81, 0x20, 0x80, 0x00, 0x01, 0xe1, 0xff, 0x00,-
195 0x01, 0x42, 0x40, 0x00, 0xc1, 0x47, 0x40, 0x00, 0x49, 0x40, 0x55, 0x00,-
196 0x95, 0x80, 0x2a, 0x00, 0x93, 0x00, 0x15, 0x00, 0x21, 0x01, 0x0a, 0x00,-
197 0x20, 0x01, 0x11, 0x00, 0x40, 0x82, 0x20, 0x00, 0x40, 0x42, 0x44, 0x00,-
198 0x80, 0x41, 0x4a, 0x00, 0x00, 0x40, 0x55, 0x00, 0x00, 0xe0, 0xff, 0x00,-
199 0x00, 0x20, 0x80, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,-
200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};-
203static const uint8_t busym_bits[] = {-
204 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,-
205 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,-
206 0x7f, 0xe0, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00,-
207 0xff, 0xc3, 0x7f, 0x00, 0xff, 0xc7, 0x7f, 0x00, 0x7f, 0xc0, 0x7f, 0x00,-
208 0xf7, 0x80, 0x3f, 0x00, 0xf3, 0x00, 0x1f, 0x00, 0xe1, 0x01, 0x0e, 0x00,-
209 0xe0, 0x01, 0x1f, 0x00, 0xc0, 0x83, 0x3f, 0x00, 0xc0, 0xc3, 0x7f, 0x00,-
210 0x80, 0xc1, 0x7f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0x00,-
211 0x00, 0xe0, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,-
212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,-
214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};-
215-
216static const uint8_t * const cursor_bits32[] = {-
217 vsplit_bits, vsplitm_bits, hsplit_bits, hsplitm_bits,-
218 0, 0, 0, 0, whatsthis_bits, whatsthism_bits, busy_bits, busym_bits-
219};-
220-
221static const uint8_t forbidden_bits[] = {-
222 0x00,0x00,0x00,0x80,0x1f,0x00,0xe0,0x7f,0x00,0xf0,0xf0,0x00,0x38,0xc0,0x01,-
223 0x7c,0x80,0x03,0xec,0x00,0x03,0xce,0x01,0x07,0x86,0x03,0x06,0x06,0x07,0x06,-
224 0x06,0x0e,0x06,0x06,0x1c,0x06,0x0e,0x38,0x07,0x0c,0x70,0x03,0x1c,0xe0,0x03,-
225 0x38,0xc0,0x01,0xf0,0xe0,0x00,0xe0,0x7f,0x00,0x80,0x1f,0x00,0x00,0x00,0x00 };-
226-
227static const uint8_t forbiddenm_bits[] = {-
228 0x80,0x1f,0x00,0xe0,0x7f,0x00,0xf0,0xff,0x00,0xf8,0xff,0x01,0xfc,0xf0,0x03,-
229 0xfe,0xc0,0x07,0xfe,0x81,0x07,0xff,0x83,0x0f,0xcf,0x07,0x0f,0x8f,0x0f,0x0f,-
230 0x0f,0x1f,0x0f,0x0f,0x3e,0x0f,0x1f,0xfc,0x0f,0x1e,0xf8,0x07,0x3e,0xf0,0x07,-
231 0xfc,0xe0,0x03,0xf8,0xff,0x01,0xf0,0xff,0x00,0xe0,0x7f,0x00,0x80,0x1f,0x00};-
232-
233static const uint8_t openhand_bits[] = {-
234 0x80,0x01,0x58,0x0e,0x64,0x12,0x64,0x52,0x48,0xb2,0x48,0x92,-
235 0x16,0x90,0x19,0x80,0x11,0x40,0x02,0x40,0x04,0x40,0x04,0x20,-
236 0x08,0x20,0x10,0x10,0x20,0x10,0x00,0x00};-
237static const uint8_t openhandm_bits[] = {-
238 0x80,0x01,0xd8,0x0f,0xfc,0x1f,0xfc,0x5f,0xf8,0xff,0xf8,0xff,-
239 0xf6,0xff,0xff,0xff,0xff,0x7f,0xfe,0x7f,0xfc,0x7f,0xfc,0x3f,-
240 0xf8,0x3f,0xf0,0x1f,0xe0,0x1f,0x00,0x00};-
241static const uint8_t closedhand_bits[] = {-
242 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x0d,0x48,0x32,0x08,0x50,-
243 0x10,0x40,0x18,0x40,0x04,0x40,0x04,0x20,0x08,0x20,0x10,0x10,-
244 0x20,0x10,0x20,0x10,0x00,0x00,0x00,0x00};-
245static const uint8_t closedhandm_bits[] = {-
246 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x0d,0xf8,0x3f,0xf8,0x7f,-
247 0xf0,0x7f,0xf8,0x7f,0xfc,0x7f,0xfc,0x3f,0xf8,0x3f,0xf0,0x1f,-
248 0xe0,0x1f,0xe0,0x1f,0x00,0x00,0x00,0x00};-
249-
250static const uint8_t * const cursor_bits20[] = {-
251 forbidden_bits, forbiddenm_bits-
252};-
253-
254static const char * const cursorNames[] = {-
255 "left_ptr",-
256 "up_arrow",-
257 "cross",-
258 "wait",-
259 "ibeam",-
260 "size_ver",-
261 "size_hor",-
262 "size_bdiag",-
263 "size_fdiag",-
264 "size_all",-
265 "blank",-
266 "split_v",-
267 "split_h",-
268 "pointing_hand",-
269 "forbidden",-
270 "whats_this",-
271 "left_ptr_watch",-
272 "openhand",-
273 "closedhand",-
274 "copy",-
275 "move",-
276 "link"-
277};-
278-
279#ifndef QT_NO_CURSOR-
280-
281QXcbCursorCacheKey::QXcbCursorCacheKey(const QCursor &c)-
282 : shape(c.shape()), bitmapCacheKey(0), maskCacheKey(0)-
283{-
284 if (shape == Qt::BitmapCursor) {
shape == Qt::BitmapCursorDescription
TRUEnever evaluated
FALSEevaluated 7781 times by 114 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
  • ...
0-7781
285 const qint64 pixmapCacheKey = c.pixmap().cacheKey();-
286 if (pixmapCacheKey) {
pixmapCacheKeyDescription
TRUEnever evaluated
FALSEnever evaluated
0
287 bitmapCacheKey = pixmapCacheKey;-
288 } else {
never executed: end of block
0
289 Q_ASSERT(c.bitmap());-
290 Q_ASSERT(c.mask());-
291 bitmapCacheKey = c.bitmap()->cacheKey();-
292 maskCacheKey = c.mask()->cacheKey();-
293 }
never executed: end of block
0
294 }-
295}
executed 7781 times by 114 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_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
  • ...
7781
296-
297#endif // !QT_NO_CURSOR-
298-
299QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)-
300 : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false)-
301{-
302 if (cursorCount++)
cursorCount++Description
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
303 return;
never executed: return;
0
304-
305 cursorFont = xcb_generate_id(xcb_connection());-
306 const char *cursorStr = "cursor";-
307 xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr);-
308-
309#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)-
310 static bool function_ptrs_not_initialized = true;-
311 if (function_ptrs_not_initialized) {
function_ptrs_not_initializedDescription
TRUEevaluated 33 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 102 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
33-102
312 QLibrary xcursorLib(QLatin1String("Xcursor"), 1);-
313 bool xcursorFound = xcursorLib.load();-
314 if (!xcursorFound) { // try without the version number
!xcursorFoundDescription
TRUEnever evaluated
FALSEevaluated 33 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
0-33
315 xcursorLib.setFileName(QLatin1String("Xcursor"));-
316 xcursorFound = xcursorLib.load();-
317 }
never executed: end of block
0
318 if (xcursorFound) {
xcursorFoundDescription
TRUEevaluated 33 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-33
319 ptrXcursorLibraryLoadCursor =-
320 (PtrXcursorLibraryLoadCursor) xcursorLib.resolve("XcursorLibraryLoadCursor");-
321 ptrXcursorLibraryGetTheme =-
322 (PtrXcursorLibraryGetTheme) xcursorLib.resolve("XcursorGetTheme");-
323 ptrXcursorLibrarySetTheme =-
324 (PtrXcursorLibrarySetTheme) xcursorLib.resolve("XcursorSetTheme");-
325 ptrXcursorLibraryGetDefaultSize =-
326 (PtrXcursorLibraryGetDefaultSize) xcursorLib.resolve("XcursorGetDefaultSize");-
327 }
executed 33 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
33
328 function_ptrs_not_initialized = false;-
329 }
executed 33 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
33
330-
331#endif-
332}
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
333-
334QXcbCursor::~QXcbCursor()-
335{-
336 xcb_connection_t *conn = xcb_connection();-
337-
338 if (m_gtkCursorThemeInitialized) {
m_gtkCursorThemeInitializedDescription
TRUEevaluated 19 times by 19 tests
Evaluated by:
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qgraphicsview - unknown status
  • tst_qgraphicswidget - unknown status
  • tst_qitemview - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qprinter - unknown status
  • tst_qsizegrip - unknown status
  • tst_qstackedlayout - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtableview - unknown status
  • tst_qtextbrowser - unknown status
  • tst_qwidget - unknown status
FALSEevaluated 328 times by 200 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_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
  • tst_qcolor - unknown status
  • ...
19-328
339 m_screen->xSettings()->removeCallbackForHandle(this);-
340 }
executed 19 times by 19 tests: end of block
Executed by:
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qgraphicsview - unknown status
  • tst_qgraphicswidget - unknown status
  • tst_qitemview - unknown status
  • tst_qlineedit - unknown status
  • tst_qmainwindow - unknown status
  • tst_qmdiarea - unknown status
  • tst_qprinter - unknown status
  • tst_qsizegrip - unknown status
  • tst_qstackedlayout - unknown status
  • tst_qstylesheetstyle - unknown status
  • tst_qtableview - unknown status
  • tst_qtextbrowser - unknown status
  • tst_qwidget - unknown status
19
341-
342 if (!--cursorCount)
!--cursorCountDescription
TRUEevaluated 347 times by 219 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
  • ...
FALSEnever evaluated
0-347
343 xcb_close_font(conn, cursorFont);
executed 347 times by 219 tests: xcb_close_font(conn, cursorFont);
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
  • ...
347
344-
345#ifndef QT_NO_CURSOR-
346 for (xcb_cursor_t cursor : qAsConst(m_cursorHash))-
347 xcb_free_cursor(conn, cursor);
executed 164 times by 114 tests: xcb_free_cursor(conn, cursor);
Executed by:
  • tst_QApplication
  • tst_gestures - unknown status
  • tst_languagechange - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - 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
  • tst_qdesktopwidget - unknown status
  • tst_qdial - unknown status
  • ...
164
348#endif-
349}
executed 347 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
  • ...
347
350-
351#ifndef QT_NO_CURSOR-
352void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget)-
353{-
354 QXcbWindow *w = 0;-
355 if (widget && widget->handle())
widgetDescription
TRUEevaluated 7794 times by 114 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
widget->handle()Description
TRUEevaluated 7794 times by 114 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-7794
356 w = static_cast<QXcbWindow *>(widget->handle());
executed 7794 times by 114 tests: w = static_cast<QXcbWindow *>(widget->handle());
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
  • ...
7794
357 else-
358 // No X11 cursor control when there is no widget under the cursor-
359 return;
never executed: return;
0
360-
361 xcb_cursor_t c = XCB_CURSOR_NONE;-
362 bool isBitmapCursor = false;-
363-
364 if (cursor) {
cursorDescription
TRUEevaluated 7781 times by 114 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 13 times by 6 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QScrollBar
  • tst_QStyleSheetStyle
  • tst_QWidget
13-7781
365 const Qt::CursorShape shape = cursor->shape();-
366 isBitmapCursor = shape == Qt::BitmapCursor;-
367-
368 if (!isBitmapCursor) {
!isBitmapCursorDescription
TRUEevaluated 7781 times by 114 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-7781
369 const QXcbCursorCacheKey key(*cursor);-
370 CursorHash::iterator it = m_cursorHash.find(key);-
371 if (it == m_cursorHash.end()) {
it == m_cursorHash.end()Description
TRUEevaluated 166 times by 114 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 7615 times by 114 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
  • ...
166-7615
372 it = m_cursorHash.insert(key, createFontCursor(shape));-
373 }
executed 166 times by 114 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_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
  • ...
166
374 c = it.value();-
375 } else {
executed 7781 times by 114 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_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
  • ...
7781
376 // Do not cache bitmap cursors, as otherwise they have unclear-
377 // lifetime (we effectively leak xcb_cursor_t).-
378 c = createBitmapCursor(cursor);-
379 }
never executed: end of block
0
380 }-
381-
382 w->setCursor(c, isBitmapCursor);-
383}
executed 7794 times by 114 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_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
  • ...
7794
384-
385static int cursorIdForShape(int cshape)-
386{-
387 int cursorId = 0;-
388 switch (cshape) {-
389 case Qt::ArrowCursor:
executed 137 times by 114 tests: case Qt::ArrowCursor:
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
  • ...
137
390 cursorId = XC_left_ptr;-
391 break;
executed 137 times by 114 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
  • ...
137
392 case Qt::UpArrowCursor:
never executed: case Qt::UpArrowCursor:
0
393 cursorId = XC_center_ptr;-
394 break;
never executed: break;
0
395 case Qt::CrossCursor:
never executed: case Qt::CrossCursor:
0
396 cursorId = XC_crosshair;-
397 break;
never executed: break;
0
398 case Qt::WaitCursor:
executed 3 times by 3 tests: case Qt::WaitCursor:
Executed by:
  • tst_QMainWindow
  • tst_QTextBrowser
  • tst_QWidget
3
399 cursorId = XC_watch;-
400 break;
executed 3 times by 3 tests: break;
Executed by:
  • tst_QMainWindow
  • tst_QTextBrowser
  • tst_QWidget
3
401 case Qt::IBeamCursor:
executed 14 times by 14 tests: case Qt::IBeamCursor:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
14
402 cursorId = XC_xterm;-
403 break;
executed 14 times by 14 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
14
404 case Qt::SizeAllCursor:
executed 2 times by 2 tests: case Qt::SizeAllCursor:
Executed by:
  • tst_QGraphicsView
  • tst_QMainWindow
2
405 cursorId = XC_fleur;-
406 break;
executed 2 times by 2 tests: break;
Executed by:
  • tst_QGraphicsView
  • tst_QMainWindow
2
407 case Qt::PointingHandCursor:
executed 2 times by 2 tests: case Qt::PointingHandCursor:
Executed by:
  • tst_QGraphicsItem
  • tst_QGraphicsView
2
408 cursorId = XC_hand2;-
409 break;
executed 2 times by 2 tests: break;
Executed by:
  • tst_QGraphicsItem
  • tst_QGraphicsView
2
410 case Qt::SizeBDiagCursor:
never executed: case Qt::SizeBDiagCursor:
0
411 cursorId = XC_top_right_corner;-
412 break;
never executed: break;
0
413 case Qt::SizeFDiagCursor:
executed 2 times by 2 tests: case Qt::SizeFDiagCursor:
Executed by:
  • tst_QFileDialog2
  • tst_QGraphicsWidget
2
414 cursorId = XC_bottom_right_corner;-
415 break;
executed 2 times by 2 tests: break;
Executed by:
  • tst_QFileDialog2
  • tst_QGraphicsWidget
2
416 case Qt::SizeVerCursor:
never executed: case Qt::SizeVerCursor:
0
417 case Qt::SplitVCursor:
executed 1 time by 1 test: case Qt::SplitVCursor:
Executed by:
  • tst_QItemView
1
418 cursorId = XC_sb_v_double_arrow;-
419 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QItemView
1
420 case Qt::SizeHorCursor:
never executed: case Qt::SizeHorCursor:
0
421 case Qt::SplitHCursor:
executed 1 time by 1 test: case Qt::SplitHCursor:
Executed by:
  • tst_QItemView
1
422 cursorId = XC_sb_h_double_arrow;-
423 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QItemView
1
424 case Qt::WhatsThisCursor:
never executed: case Qt::WhatsThisCursor:
0
425 cursorId = XC_question_arrow;-
426 break;
never executed: break;
0
427 case Qt::ForbiddenCursor:
never executed: case Qt::ForbiddenCursor:
0
428 cursorId = XC_circle;-
429 break;
never executed: break;
0
430 case Qt::BusyCursor:
never executed: case Qt::BusyCursor:
0
431 cursorId = XC_watch;-
432 break;
never executed: break;
0
433 default:
executed 4 times by 3 tests: default:
Executed by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
4
434 break;
executed 4 times by 3 tests: break;
Executed by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
4
435 }-
436 return cursorId;
executed 166 times by 114 tests: return cursorId;
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
  • ...
166
437}-
438-
439xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)-
440{-
441 xcb_cursor_t cursor = 0;-
442 xcb_connection_t *conn = xcb_connection();-
443-
444 if (cshape == Qt::BlankCursor) {
cshape == Qt::BlankCursorDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QWidget
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
1-3
445 xcb_pixmap_t cp = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(), cur_blank_bits, 16, 16,-
446 1, 0, 0, 0);-
447 xcb_pixmap_t mp = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(), cur_blank_bits, 16, 16,-
448 1, 0, 0, 0);-
449 cursor = xcb_generate_id(conn);-
450 xcb_create_cursor(conn, cursor, cp, mp, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);-
451 } else if (cshape >= Qt::SizeVerCursor && cshape < Qt::SizeAllCursor) {
executed 1 time by 1 test: end of block
Executed by:
  • tst_QWidget
cshape >= Qt::SizeVerCursorDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
cshape < Qt::SizeAllCursorDescription
TRUEnever evaluated
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
0-3
452 int i = (cshape - Qt::SizeVerCursor) * 2;-
453 xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
454 const_cast<uint8_t*>(cursor_bits16[i]),-
455 16, 16, 1, 0, 0, 0);-
456 xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
457 const_cast<uint8_t*>(cursor_bits16[i + 1]),-
458 16, 16, 1, 0, 0, 0);-
459 cursor = xcb_generate_id(conn);-
460 xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);-
461 } else if ((cshape >= Qt::SplitVCursor && cshape <= Qt::SplitHCursor)
never executed: end of block
cshape >= Qt::SplitVCursorDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
cshape <= Qt::SplitHCursorDescription
TRUEnever evaluated
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
0-3
462 || cshape == Qt::WhatsThisCursor || cshape == Qt::BusyCursor) {
cshape == Qt::WhatsThisCursorDescription
TRUEnever evaluated
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
cshape == Qt::BusyCursorDescription
TRUEnever evaluated
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
0-3
463 int i = (cshape - Qt::SplitVCursor) * 2;-
464 xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
465 const_cast<uint8_t*>(cursor_bits32[i]),-
466 32, 32, 1, 0, 0, 0);-
467 xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
468 const_cast<uint8_t*>(cursor_bits32[i + 1]),-
469 32, 32, 1, 0, 0, 0);-
470 int hs = (cshape == Qt::PointingHandCursor || cshape == Qt::WhatsThisCursor
cshape == Qt::...tingHandCursorDescription
TRUEnever evaluated
FALSEnever evaluated
cshape == Qt::WhatsThisCursorDescription
TRUEnever evaluated
FALSEnever evaluated
0
471 || cshape == Qt::BusyCursor) ? 0 : 16;
cshape == Qt::BusyCursorDescription
TRUEnever evaluated
FALSEnever evaluated
0
472 cursor = xcb_generate_id(conn);-
473 xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, hs, hs);-
474 } else if (cshape == Qt::ForbiddenCursor) {
never executed: end of block
cshape == Qt::ForbiddenCursorDescription
TRUEnever evaluated
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
0-3
475 int i = (cshape - Qt::ForbiddenCursor) * 2;-
476 xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
477 const_cast<uint8_t*>(cursor_bits20[i]),-
478 20, 20, 1, 0, 0, 0);-
479 xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
480 const_cast<uint8_t*>(cursor_bits20[i + 1]),-
481 20, 20, 1, 0, 0, 0);-
482 cursor = xcb_generate_id(conn);-
483 xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 10, 10);-
484 } else if (cshape == Qt::OpenHandCursor || cshape == Qt::ClosedHandCursor) {
never executed: end of block
cshape == Qt::OpenHandCursorDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
cshape == Qt::ClosedHandCursorDescription
TRUEnever evaluated
FALSEnever evaluated
0-3
485 bool open = cshape == Qt::OpenHandCursor;-
486 xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
487 const_cast<uint8_t*>(open ? openhand_bits : closedhand_bits),-
488 16, 16, 1, 0, 0, 0);-
489 xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),-
490 const_cast<uint8_t*>(open ? openhandm_bits : closedhandm_bits),-
491 16, 16, 1, 0, 0, 0);-
492 cursor = xcb_generate_id(conn);-
493 xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);-
494 } else if (cshape == Qt::DragCopyCursor || cshape == Qt::DragMoveCursor
executed 3 times by 3 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
cshape == Qt::DragCopyCursorDescription
TRUEnever evaluated
FALSEnever evaluated
cshape == Qt::DragMoveCursorDescription
TRUEnever evaluated
FALSEnever evaluated
0-3
495 || cshape == Qt::DragLinkCursor) {
cshape == Qt::DragLinkCursorDescription
TRUEnever evaluated
FALSEnever evaluated
0
496 QImage image = QGuiApplicationPrivate::instance()->getPixmapCursor(static_cast<Qt::CursorShape>(cshape)).toImage();-
497 if (!image.isNull()) {
!image.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
498 xcb_pixmap_t pm = qt_xcb_XPixmapFromBitmap(m_screen, image);-
499 xcb_pixmap_t pmm = qt_xcb_XPixmapFromBitmap(m_screen, image.createAlphaMask());-
500 cursor = xcb_generate_id(conn);-
501 xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);-
502 xcb_free_pixmap(conn, pm);-
503 xcb_free_pixmap(conn, pmm);-
504 }
never executed: end of block
0
505 }
never executed: end of block
0
506-
507 return cursor;
executed 4 times by 3 tests: return cursor;
Executed by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
4
508}-
509-
510#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)-
511bool updateCursorTheme(void *dpy, const QByteArray &theme) {-
512 if (!ptrXcursorLibraryGetTheme
!ptrXcursorLibraryGetThemeDescription
TRUEnever evaluated
FALSEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
0-19
513 || !ptrXcursorLibrarySetTheme)
!ptrXcursorLibrarySetThemeDescription
TRUEnever evaluated
FALSEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
0-19
514 return false;
never executed: return false;
0
515 QByteArray oldTheme = ptrXcursorLibraryGetTheme(dpy);-
516 if (oldTheme == theme)
oldTheme == themeDescription
TRUEnever evaluated
FALSEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
0-19
517 return false;
never executed: return false;
0
518-
519 int setTheme = ptrXcursorLibrarySetTheme(dpy,theme.constData());-
520 return setTheme;
executed 19 times by 19 tests: return setTheme;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
19
521}-
522-
523 void QXcbCursor::cursorThemePropertyChanged(QXcbVirtualDesktop *screen, const QByteArray &name, const QVariant &property, void *handle)-
524{-
525 Q_UNUSED(screen);-
526 Q_UNUSED(name);-
527 QXcbCursor *self = static_cast<QXcbCursor *>(handle);-
528 updateCursorTheme(self->connection()->xlib_display(),property.toByteArray());-
529}
never executed: end of block
0
530-
531static xcb_cursor_t loadCursor(void *dpy, int cshape)-
532{-
533 xcb_cursor_t cursor = XCB_NONE;-
534 if (!ptrXcursorLibraryLoadCursor || !dpy)
!ptrXcursorLibraryLoadCursorDescription
TRUEnever evaluated
FALSEevaluated 185 times by 114 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
  • ...
!dpyDescription
TRUEnever evaluated
FALSEevaluated 185 times by 114 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
  • ...
0-185
535 return cursor;
never executed: return cursor;
0
536 switch (cshape) {-
537 case Qt::DragCopyCursor:
never executed: case Qt::DragCopyCursor:
0
538 cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-copy");-
539 break;
never executed: break;
0
540 case Qt::DragMoveCursor:
never executed: case Qt::DragMoveCursor:
0
541 cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-move");-
542 break;
never executed: break;
0
543 case Qt::DragLinkCursor:
never executed: case Qt::DragLinkCursor:
0
544 cursor = ptrXcursorLibraryLoadCursor(dpy, "dnd-link");-
545 break;
never executed: break;
0
546 default:
executed 185 times by 114 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
  • ...
185
547 break;
executed 185 times by 114 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
  • ...
185
548 }-
549 if (!cursor) {
!cursorDescription
TRUEevaluated 185 times by 114 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-185
550 cursor = ptrXcursorLibraryLoadCursor(dpy, cursorNames[cshape]);-
551 }
executed 185 times by 114 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_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
  • ...
185
552 return cursor;
executed 185 times by 114 tests: return cursor;
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
  • ...
185
553}-
554#endif //XCB_USE_XLIB / QT_NO_LIBRARY-
555-
556xcb_cursor_t QXcbCursor::createFontCursor(int cshape)-
557{-
558 xcb_connection_t *conn = xcb_connection();-
559 int cursorId = cursorIdForShape(cshape);-
560 xcb_cursor_t cursor = XCB_NONE;-
561-
562 // Try Xcursor first-
563#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)-
564 if (cshape >= 0 && cshape <= Qt::LastCursor) {
cshape >= 0Description
TRUEevaluated 166 times by 114 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
cshape <= Qt::LastCursorDescription
TRUEevaluated 166 times by 114 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-166
565 void *dpy = connection()->xlib_display();-
566 // special case for non-standard dnd-* cursors-
567 cursor = loadCursor(dpy, cshape);-
568 if (!cursor && !m_gtkCursorThemeInitialized && m_screen->xSettings()->initialized()) {
!cursorDescription
TRUEevaluated 29 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEevaluated 137 times by 114 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
  • ...
!m_gtkCursorThemeInitializedDescription
TRUEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEevaluated 10 times by 5 tests
Evaluated by:
  • tst_QGraphicsItem
  • tst_QGraphicsView
  • tst_QItemView
  • tst_QMainWindow
  • tst_QWidget
m_screen->xSet...>initialized()Description
TRUEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEnever evaluated
0-137
569 QByteArray gtkCursorTheme = m_screen->xSettings()->setting("Gtk/CursorThemeName").toByteArray();-
570 m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this);-
571 if (updateCursorTheme(dpy,gtkCursorTheme)) {
updateCursorTh...tkCursorTheme)Description
TRUEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEnever evaluated
0-19
572 cursor = loadCursor(dpy, cshape);-
573 }
executed 19 times by 19 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
19
574 m_gtkCursorThemeInitialized = true;-
575 }
executed 19 times by 19 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
19
576 }
executed 166 times by 114 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_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
  • ...
166
577 if (cursor)
cursorDescription
TRUEevaluated 137 times by 114 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 29 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
29-137
578 return cursor;
executed 137 times by 114 tests: return cursor;
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
  • ...
137
579 if (!cursor && cursorId) {
!cursorDescription
TRUEevaluated 29 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEnever evaluated
cursorIdDescription
TRUEevaluated 25 times by 18 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
0-29
580 cursor = XCreateFontCursor(DISPLAY_FROM_XCB(this), cursorId);-
581 if (cursor)
cursorDescription
TRUEevaluated 25 times by 18 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEnever evaluated
0-25
582 return cursor;
executed 25 times by 18 tests: return cursor;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
25
583 }
never executed: end of block
0
584-
585#endif-
586-
587 // Non-standard X11 cursors are created from bitmaps-
588 cursor = createNonStandardCursor(cshape);-
589-
590 // Create a glpyh cursor if everything else failed-
591 if (!cursor && cursorId) {
!cursorDescription
TRUEnever evaluated
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
cursorIdDescription
TRUEnever evaluated
FALSEnever evaluated
0-4
592 cursor = xcb_generate_id(conn);-
593 xcb_create_glyph_cursor(conn, cursor, cursorFont, cursorFont,-
594 cursorId, cursorId + 1,-
595 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);-
596 }
never executed: end of block
0
597-
598 if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
cursorDescription
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
cshape >= 0Description
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
cshape < Qt::LastCursorDescription
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
connection()->hasXFixes()Description
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
FALSEnever evaluated
0-4
599 const char *name = cursorNames[cshape];-
600 xcb_xfixes_set_cursor_name(conn, cursor, strlen(name), name);-
601 }
executed 4 times by 3 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
4
602-
603 return cursor;
executed 4 times by 3 tests: return cursor;
Executed by:
  • tst_QGraphicsView
  • tst_QPrinter
  • tst_QWidget
4
604}-
605-
606xcb_cursor_t QXcbCursor::createBitmapCursor(QCursor *cursor)-
607{-
608 xcb_connection_t *conn = xcb_connection();-
609 QPoint spot = cursor->hotSpot();-
610 xcb_cursor_t c = XCB_NONE;-
611 if (cursor->pixmap().depth() > 1)
cursor->pixmap().depth() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
612 c = qt_xcb_createCursorXRender(m_screen, cursor->pixmap().toImage(), spot);
never executed: c = qt_xcb_createCursorXRender(m_screen, cursor->pixmap().toImage(), spot);
0
613 if (!c) {
!cDescription
TRUEnever evaluated
FALSEnever evaluated
0
614 xcb_pixmap_t cp = qt_xcb_XPixmapFromBitmap(m_screen, cursor->bitmap()->toImage());-
615 xcb_pixmap_t mp = qt_xcb_XPixmapFromBitmap(m_screen, cursor->mask()->toImage());-
616 c = xcb_generate_id(conn);-
617 xcb_create_cursor(conn, c, cp, mp, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF,-
618 spot.x(), spot.y());-
619 xcb_free_pixmap(conn, cp);-
620 xcb_free_pixmap(conn, mp);-
621 }
never executed: end of block
0
622 return c;
never executed: return c;
0
623}-
624#endif-
625-
626void QXcbCursor::queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask)-
627{-
628 if (pos)
posDescription
TRUEevaluated 15518 times by 80 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
FALSEevaluated 722 times by 27 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qapplication - unknown status
  • ...
722-15518
629 *pos = QPoint();
executed 15518 times by 80 tests: *pos = QPoint();
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
15518
630-
631 xcb_window_t root = c->primaryVirtualDesktop()->root();-
632 xcb_query_pointer_cookie_t cookie = xcb_query_pointer(c->xcb_connection(), root);-
633 xcb_generic_error_t *err = 0;-
634 xcb_query_pointer_reply_t *reply = xcb_query_pointer_reply(c->xcb_connection(), cookie, &err);-
635 if (!err && reply) {
!errDescription
TRUEevaluated 16240 times by 83 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
FALSEnever evaluated
replyDescription
TRUEevaluated 16240 times by 83 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
FALSEnever evaluated
0-16240
636 if (virtualDesktop) {
virtualDesktopDescription
TRUEevaluated 722 times by 27 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qapplication - unknown status
  • ...
FALSEevaluated 15518 times by 80 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
722-15518
637 const auto virtualDesktops = c->virtualDesktops();-
638 for (QXcbVirtualDesktop *vd : virtualDesktops) {-
639 if (vd->root() == reply->root) {
vd->root() == reply->rootDescription
TRUEevaluated 722 times by 27 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qapplication - unknown status
  • ...
FALSEnever evaluated
0-722
640 *virtualDesktop = vd;-
641 break;
executed 722 times by 27 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qapplication - unknown status
  • ...
722
642 }-
643 }
never executed: end of block
0
644 }
executed 722 times by 27 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qapplication - unknown status
  • ...
722
645 if (pos)
posDescription
TRUEevaluated 15518 times by 80 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
FALSEevaluated 722 times by 27 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
  • tst_qapplication - unknown status
  • ...
722-15518
646 *pos = QPoint(reply->root_x, reply->root_y);
executed 15518 times by 80 tests: *pos = QPoint(reply->root_x, reply->root_y);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
15518
647 if (keybMask)
keybMaskDescription
TRUEnever evaluated
FALSEevaluated 16240 times by 83 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
0-16240
648 *keybMask = reply->mask;
never executed: *keybMask = reply->mask;
0
649 free(reply);-
650 return;
executed 16240 times by 83 tests: return;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
16240
651 }-
652 free(err);-
653 free(reply);-
654}
never executed: end of block
0
655-
656QPoint QXcbCursor::pos() const-
657{-
658 QPoint p;-
659 queryPointer(connection(), 0, &p);-
660 return p;
executed 15518 times by 80 tests: return p;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • ...
15518
661}-
662-
663void QXcbCursor::setPos(const QPoint &pos)-
664{-
665 QXcbVirtualDesktop *virtualDesktop = Q_NULLPTR;-
666 queryPointer(connection(), &virtualDesktop, 0);-
667 xcb_warp_pointer(xcb_connection(), XCB_NONE, virtualDesktop->root(), 0, 0, 0, 0, pos.x(), pos.y());-
668 xcb_flush(xcb_connection());-
669}
executed 587 times by 23 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDialog
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QItemView
  • tst_QListWidget
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QToolTip
  • tst_QWidget
  • tst_QWindow
587
670-
671QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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