qxcbbackingstore.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.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 "qxcbbackingstore.h"-
41-
42#include "qxcbconnection.h"-
43#include "qxcbscreen.h"-
44#include "qxcbwindow.h"-
45-
46#include <xcb/shm.h>-
47#include <xcb/xcb_image.h>-
48-
49#include <sys/ipc.h>-
50#include <sys/shm.h>-
51-
52#include <stdio.h>-
53#include <errno.h>-
54-
55#include <qdebug.h>-
56#include <qpainter.h>-
57#include <qscreen.h>-
58#include <QtGui/private/qhighdpiscaling_p.h>-
59#include <qpa/qplatformgraphicsbuffer.h>-
60#include <private/qimage_p.h>-
61#include <qendian.h>-
62-
63#include <algorithm>-
64QT_BEGIN_NAMESPACE-
65-
66class QXcbShmImage : public QXcbObject-
67{-
68public:-
69 QXcbShmImage(QXcbScreen *connection, const QSize &size, uint depth, QImage::Format format);-
70 ~QXcbShmImage() { destroy(); }
executed 2681 times by 106 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2681
71-
72 bool scroll(const QRegion &area, int dx, int dy);-
73-
74 QImage *image() { return &m_qimage; }
executed 23128 times by 100 tests: return &m_qimage;
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
23128
75 QPlatformGraphicsBuffer *graphicsBuffer() { return m_graphics_buffer; }
executed 37 times by 2 tests: return m_graphics_buffer;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
37
76-
77 QSize size() const { return m_qimage.size(); }
executed 22101 times by 100 tests: return m_qimage.size();
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
22101
78-
79 bool hasAlpha() const { return m_hasAlpha; }
executed 8253 times by 100 tests: return m_hasAlpha;
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
8253
80 bool hasShm() const { return m_shm_info.shmaddr != nullptr; }
executed 33773 times by 100 tests: return m_shm_info.shmaddr != nullptr;
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
33773
81-
82 void put(xcb_drawable_t dst, const QRegion &region, const QPoint &offset);-
83 void preparePaint(const QRegion &region);-
84-
85private:-
86 void destroy();-
87-
88 void ensureGC(xcb_drawable_t dst);-
89 void flushPixmap(const QRegion &region);-
90 void setClip(const QRegion &region);-
91-
92 xcb_shm_segment_info_t m_shm_info;-
93-
94 xcb_image_t *m_xcb_image;-
95-
96 QImage m_qimage;-
97 QPlatformGraphicsBuffer *m_graphics_buffer;-
98-
99 xcb_gcontext_t m_gc;-
100 xcb_drawable_t m_gc_drawable;-
101-
102 // When using shared memory this is the region currently shared with the server-
103 QRegion m_dirtyShm;-
104-
105 // When not using shared memory, we maintain a server-side pixmap with the backing-
106 // store as well as repainted content not yet flushed to the pixmap. We only flush-
107 // the regions we need and only when these are marked dirty. This way we can just-
108 // do a server-side copy on expose instead of sending the pixels every time-
109 xcb_pixmap_t m_xcb_pixmap;-
110 QRegion m_pendingFlush;-
111 QByteArray m_flushBuffer;-
112-
113 bool m_hasAlpha;-
114};-
115-
116class QXcbShmGraphicsBuffer : public QPlatformGraphicsBuffer-
117{-
118public:-
119 QXcbShmGraphicsBuffer(QImage *image)-
120 : QPlatformGraphicsBuffer(image->size(), QImage::toPixelFormat(image->format()))-
121 , m_access_lock(QPlatformGraphicsBuffer::None)-
122 , m_image(image)-
123 { }
executed 2682 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2682
124-
125 bool doLock(AccessTypes access, const QRect &rect) Q_DECL_OVERRIDE-
126 {-
127 Q_UNUSED(rect);-
128 if (access & ~(QPlatformGraphicsBuffer::SWReadAccess | QPlatformGraphicsBuffer::SWWriteAccess))
access & ~(QPl...SWWriteAccess)Description
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
FALSEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
129 return false;
executed 21 times by 2 tests: return false;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
130-
131 m_access_lock |= access;-
132 return true;
executed 21 times by 2 tests: return true;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
133 }-
134 void doUnlock() Q_DECL_OVERRIDE { m_access_lock = None; }
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
17
135-
136 const uchar *data() const Q_DECL_OVERRIDE { return m_image->bits(); }
executed 21 times by 2 tests: return m_image->bits();
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
137 uchar *data() Q_DECL_OVERRIDE { return m_image->bits(); }
never executed: return m_image->bits();
0
138 int bytesPerLine() const Q_DECL_OVERRIDE { return m_image->bytesPerLine(); }
executed 42 times by 2 tests: return m_image->bytesPerLine();
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
42
139-
140 Origin origin() const Q_DECL_OVERRIDE { return QPlatformGraphicsBuffer::OriginTopLeft; }
executed 37 times by 2 tests: return QPlatformGraphicsBuffer::OriginTopLeft;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
37
141private:-
142 AccessTypes m_access_lock;-
143 QImage *m_image;-
144};-
145-
146QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QImage::Format format)-
147 : QXcbObject(screen->connection())-
148 , m_graphics_buffer(Q_NULLPTR)-
149 , m_gc(0)-
150 , m_gc_drawable(0)-
151 , m_xcb_pixmap(0)-
152{-
153 Q_XCB_NOOP(connection());-
154-
155 const xcb_format_t *fmt = connection()->formatForDepth(depth);-
156 Q_ASSERT(fmt);-
157-
158 m_xcb_image = xcb_image_create(size.width(), size.height(),-
159 XCB_IMAGE_FORMAT_Z_PIXMAP,-
160 fmt->scanline_pad,-
161 fmt->depth, fmt->bits_per_pixel, 0,-
162 QSysInfo::ByteOrder == QSysInfo::BigEndian ? XCB_IMAGE_ORDER_MSB_FIRST : XCB_IMAGE_ORDER_LSB_FIRST,-
163 XCB_IMAGE_ORDER_MSB_FIRST,-
164 0, ~0, 0);-
165-
166 const int segmentSize = m_xcb_image->stride * m_xcb_image->height;-
167 if (!segmentSize)
!segmentSizeDescription
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
168 return;
never executed: return;
0
169-
170 int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0600);-
171 if (id == -1) {
id == -1Description
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
172 qWarning("QXcbShmImage: shmget() failed (%d: %s) for size %d (%dx%d)",-
173 errno, strerror(errno), segmentSize, size.width(), size.height());-
174 } else {
never executed: end of block
0
175 m_shm_info.shmaddr = m_xcb_image->data = (quint8 *)shmat(id, 0, 0);-
176 }
executed 2682 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2682
177 m_shm_info.shmid = id;-
178 m_shm_info.shmseg = xcb_generate_id(xcb_connection());-
179-
180 const xcb_query_extension_reply_t *shm_reply = xcb_get_extension_data(xcb_connection(), &xcb_shm_id);-
181 bool shm_present = shm_reply != NULL && shm_reply->present;
shm_reply != __nullDescription
TRUEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
shm_reply->presentDescription
TRUEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-2682
182 xcb_generic_error_t *error = NULL;-
183 if (shm_present)
shm_presentDescription
TRUEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-2682
184 error = xcb_request_check(xcb_connection(), xcb_shm_attach_checked(xcb_connection(), m_shm_info.shmseg, m_shm_info.shmid, false));
executed 2682 times by 100 tests: error = xcb_request_check(xcb_connection(), xcb_shm_attach_checked(xcb_connection(), m_shm_info.shmseg, m_shm_info.shmid, false));
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2682
185 if (!shm_present || error || id == -1) {
!shm_presentDescription
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
errorDescription
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
id == -1Description
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
186 free(error);-
187-
188 if (id != -1) {
id != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
189 shmdt(m_shm_info.shmaddr);-
190 shmctl(m_shm_info.shmid, IPC_RMID, 0);-
191 }
never executed: end of block
0
192 m_shm_info.shmaddr = 0;-
193-
194 m_xcb_image->data = (uint8_t *)malloc(segmentSize);-
195 } else {
never executed: end of block
0
196 if (shmctl(m_shm_info.shmid, IPC_RMID, 0) == -1)
shmctl(m_shm_i...d, 0, 0) == -1Description
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
197 qWarning("QXcbBackingStore: Error while marking the shared memory segment to be destroyed");
never executed: QMessageLogger(__FILE__, 197, __PRETTY_FUNCTION__).warning("QXcbBackingStore: Error while marking the shared memory segment to be destroyed");
0
198 }
executed 2682 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2682
199-
200 m_hasAlpha = QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::UsesAlpha;-
201 if (!m_hasAlpha)
!m_hasAlphaDescription
TRUEevaluated 2679 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3-2679
202 format = qt_maybeAlphaVersionWithSameDepth(format);
executed 2679 times by 100 tests: format = qt_maybeAlphaVersionWithSameDepth(format);
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2679
203-
204 m_qimage = QImage( (uchar*) m_xcb_image->data, m_xcb_image->width, m_xcb_image->height, m_xcb_image->stride, format);-
205 m_graphics_buffer = new QXcbShmGraphicsBuffer(&m_qimage);-
206-
207 if (!hasShm()) {
!hasShm()Description
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
208 m_xcb_pixmap = xcb_generate_id(xcb_connection());-
209 Q_XCB_CALL(xcb_create_pixmap(xcb_connection(),-
210 m_xcb_image->depth,-
211 m_xcb_pixmap,-
212 screen->screen()->root,-
213 m_xcb_image->width, m_xcb_image->height));-
214 }
never executed: end of block
0
215}
executed 2682 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2682
216-
217extern void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset);-
218-
219bool QXcbShmImage::scroll(const QRegion &area, int dx, int dy)-
220{-
221 if (image()->isNull())
image()->isNull()Description
TRUEnever evaluated
FALSEevaluated 1849 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
0-1849
222 return false;
never executed: return false;
0
223-
224 if (hasShm())
hasShm()Description
TRUEevaluated 1849 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
FALSEnever evaluated
0-1849
225 preparePaint(area);
executed 1849 times by 15 tests: preparePaint(area);
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
1849
226-
227 const QPoint delta(dx, dy);-
228 foreach (const QRect &rect, area.rects())-
229 qt_scrollRectInImage(*image(), rect, delta);
executed 1849 times by 15 tests: qt_scrollRectInImage(*image(), rect, delta);
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
1849
230-
231 if (m_xcb_pixmap) {
m_xcb_pixmapDescription
TRUEnever evaluated
FALSEevaluated 1849 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
0-1849
232 flushPixmap(area);-
233 ensureGC(m_xcb_pixmap);-
234 const QRect bounds(QPoint(0, 0), size());-
235 foreach (const QRect &src, area.rects()) {-
236 const QRect dst = src.translated(delta).intersected(bounds);-
237 Q_XCB_CALL(xcb_copy_area(xcb_connection(),-
238 m_xcb_pixmap,-
239 m_xcb_pixmap,-
240 m_gc,-
241 src.x(), src.y(),-
242 dst.x(), dst.y(),-
243 dst.width(), dst.height()));-
244 }
never executed: end of block
0
245 }
never executed: end of block
0
246-
247 return true;
executed 1849 times by 15 tests: return true;
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
1849
248}-
249-
250void QXcbShmImage::destroy()-
251{-
252 const int segmentSize = m_xcb_image ? (m_xcb_image->stride * m_xcb_image->height) : 0;
m_xcb_imageDescription
TRUEevaluated 2681 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-2681
253 if (segmentSize && m_shm_info.shmaddr)
segmentSizeDescription
TRUEevaluated 2681 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
m_shm_info.shmaddrDescription
TRUEevaluated 2681 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-2681
254 Q_XCB_CALL(xcb_shm_detach(xcb_connection(), m_shm_info.shmseg));
executed 2681 times by 106 tests: xcb_shm_detach(xcb_connection(), m_shm_info.shmseg);
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2681
255-
256 if (segmentSize) {
segmentSizeDescription
TRUEevaluated 2681 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-2681
257 if (m_shm_info.shmaddr) {
m_shm_info.shmaddrDescription
TRUEevaluated 2681 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-2681
258 shmdt(m_shm_info.shmaddr);-
259 shmctl(m_shm_info.shmid, IPC_RMID, 0);-
260 } else {
executed 2681 times by 106 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2681
261 free(m_xcb_image->data);-
262 }
never executed: end of block
0
263 }-
264-
265 xcb_image_destroy(m_xcb_image);-
266-
267 if (m_gc)
m_gcDescription
TRUEevaluated 2574 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 107 times by 9 tests
Evaluated by:
  • tst_QBackingStore
  • tst_QDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QWidget
  • tst_qpainter - unknown status
107-2574
268 Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
executed 2574 times by 106 tests: xcb_free_gc(xcb_connection(), m_gc);
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2574
269 delete m_graphics_buffer;-
270 m_graphics_buffer = Q_NULLPTR;-
271-
272 if (m_xcb_pixmap) {
m_xcb_pixmapDescription
TRUEnever evaluated
FALSEevaluated 2681 times by 106 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2681
273 Q_XCB_CALL(xcb_free_pixmap(xcb_connection(), m_xcb_pixmap));-
274 m_xcb_pixmap = 0;-
275 }
never executed: end of block
0
276}
executed 2681 times by 106 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2681
277-
278void QXcbShmImage::ensureGC(xcb_drawable_t dst)-
279{-
280 if (m_gc_drawable != dst) {
m_gc_drawable != dstDescription
TRUEevaluated 2677 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 8210 times by 99 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2677-8210
281 if (m_gc)
m_gcDescription
TRUEevaluated 102 times by 5 tests
Evaluated by:
  • tst_QDialog
  • tst_QMdiArea
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 2575 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
102-2575
282 Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
executed 102 times by 5 tests: xcb_free_gc(xcb_connection(), m_gc);
Executed by:
  • tst_QDialog
  • tst_QMdiArea
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
102
283-
284 static const uint32_t mask = XCB_GC_GRAPHICS_EXPOSURES;-
285 static const uint32_t values[] = { 0 };-
286-
287 m_gc = xcb_generate_id(xcb_connection());-
288 Q_XCB_CALL(xcb_create_gc(xcb_connection(), m_gc, dst, mask, values));-
289-
290 m_gc_drawable = dst;-
291 }
executed 2677 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2677
292}
executed 10887 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
293-
294static inline void copy_unswapped(char *dst, int dstBytesPerLine, const QImage &img, const QRect &rect)-
295{-
296 const uchar *srcData = img.constBits();-
297 const int srcBytesPerLine = img.bytesPerLine();-
298-
299 const int leftOffset = rect.left() * img.depth() >> 3;-
300 const int bottom = rect.bottom() + 1;-
301-
302 for (int yy = rect.top(); yy < bottom; ++yy) {
yy < bottomDescription
TRUEnever evaluated
FALSEnever evaluated
0
303 const uchar *src = srcData + yy * srcBytesPerLine + leftOffset;-
304 ::memmove(dst, src, dstBytesPerLine);-
305 dst += dstBytesPerLine;-
306 }
never executed: end of block
0
307}
never executed: end of block
0
308-
309template <class Pixel>-
310static inline void copy_swapped(char *dst, const int dstStride, const QImage &img, const QRect &rect)-
311{-
312 const uchar *srcData = img.constBits();-
313 const int srcBytesPerLine = img.bytesPerLine();-
314-
315 const int left = rect.left();-
316 const int width = rect.width();-
317 const int bottom = rect.bottom() + 1;-
318-
319 for (int yy = rect.top(); yy < bottom; ++yy) {
yy < bottomDescription
TRUEnever evaluated
FALSEnever evaluated
0
320 Pixel *dstPixels = reinterpret_cast<Pixel *>(dst);-
321 const Pixel *srcPixels = reinterpret_cast<const Pixel *>(srcData + yy * srcBytesPerLine) + left;-
322-
323 for (int i = 0; i < width; ++i)
i < widthDescription
TRUEnever evaluated
FALSEnever evaluated
0
324 dstPixels[i] = qbswap<Pixel>(*srcPixels++);
never executed: dstPixels[i] = qbswap<Pixel>(*srcPixels++);
0
325-
326 dst += dstStride;-
327 }
never executed: end of block
0
328}
never executed: end of block
0
329-
330static QImage native_sub_image(QByteArray *buffer, const int dstStride, const QImage &src, const QRect &rect, bool swap)-
331{-
332 if (!swap && src.rect() == rect && src.bytesPerLine() == dstStride)
!swapDescription
TRUEnever evaluated
FALSEnever evaluated
src.rect() == rectDescription
TRUEnever evaluated
FALSEnever evaluated
src.bytesPerLi...) == dstStrideDescription
TRUEnever evaluated
FALSEnever evaluated
0
333 return src;
never executed: return src;
0
334-
335 buffer->resize(rect.height() * dstStride);-
336-
337 if (swap) {
swapDescription
TRUEnever evaluated
FALSEnever evaluated
0
338 switch (src.depth()) {-
339 case 32:
never executed: case 32:
0
340 copy_swapped<quint32>(buffer->data(), dstStride, src, rect);-
341 break;
never executed: break;
0
342 case 16:
never executed: case 16:
0
343 copy_swapped<quint16>(buffer->data(), dstStride, src, rect);-
344 break;
never executed: break;
0
345 }-
346 } else {
never executed: end of block
0
347 copy_unswapped(buffer->data(), dstStride, src, rect);-
348 }
never executed: end of block
0
349-
350 return QImage(reinterpret_cast<const uchar *>(buffer->constData()), rect.width(), rect.height(), dstStride, src.format());
never executed: return QImage(reinterpret_cast<const uchar *>(buffer->constData()), rect.width(), rect.height(), dstStride, src.format());
0
351}-
352-
353static inline quint32 round_up_scanline(quint32 base, quint32 pad)-
354{-
355 return (base + pad - 1) & -pad;
never executed: return (base + pad - 1) & -pad;
0
356}-
357-
358void QXcbShmImage::flushPixmap(const QRegion &region)-
359{-
360 const QVector<QRect> rects = m_pendingFlush.intersected(region).rects();-
361 m_pendingFlush -= region;-
362-
363 xcb_image_t xcb_subimage;-
364 memset(&xcb_subimage, 0, sizeof(xcb_image_t));-
365-
366 xcb_subimage.format = m_xcb_image->format;-
367 xcb_subimage.scanline_pad = m_xcb_image->scanline_pad;-
368 xcb_subimage.depth = m_xcb_image->depth;-
369 xcb_subimage.bpp = m_xcb_image->bpp;-
370 xcb_subimage.unit = m_xcb_image->unit;-
371 xcb_subimage.plane_mask = m_xcb_image->plane_mask;-
372 xcb_subimage.byte_order = (xcb_image_order_t) connection()->setup()->image_byte_order;-
373 xcb_subimage.bit_order = m_xcb_image->bit_order;-
374-
375 const bool needsByteSwap = xcb_subimage.byte_order != m_xcb_image->byte_order;-
376-
377 for (const QRect &rect : rects) {-
378 // We must make sure that each request is not larger than max_req_size.-
379 // Each request takes req_size + m_xcb_image->stride * height bytes.-
380 static const uint32_t req_size = sizeof(xcb_put_image_request_t);-
381 const uint32_t max_req_size = xcb_get_maximum_request_length(xcb_connection());-
382 const int rows_per_put = (max_req_size - req_size) / m_xcb_image->stride;-
383-
384 // This assert could trigger if a single row has more pixels than fit in-
385 // a single PutImage request. However, max_req_size is guaranteed to be-
386 // at least 16384 bytes. That should be enough for quite large images.-
387 Q_ASSERT(rows_per_put > 0);-
388-
389 // If we upload the whole image in a single chunk, the result might be-
390 // larger than the server's maximum request size and stuff breaks.-
391 // To work around that, we upload the image in chunks where each chunk-
392 // is small enough for a single request.-
393 const int x = rect.x();-
394 int y = rect.y();-
395 const int width = rect.width();-
396 int height = rect.height();-
397-
398 while (height > 0) {
height > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
399 const int rows = std::min(height, rows_per_put);-
400 const QRect subRect(x, y, width, rows);-
401 const quint32 stride = round_up_scanline(width * m_qimage.depth(), xcb_subimage.scanline_pad) >> 3;-
402 const QImage subImage = native_sub_image(&m_flushBuffer, stride, m_qimage, subRect, needsByteSwap);-
403-
404 xcb_subimage.width = width;-
405 xcb_subimage.height = rows;-
406 xcb_subimage.data = const_cast<uint8_t *>(subImage.constBits());-
407 xcb_image_annotate(&xcb_subimage);-
408-
409 xcb_image_put(xcb_connection(),-
410 m_xcb_pixmap,-
411 m_gc,-
412 &xcb_subimage,-
413 x,-
414 y,-
415 0);-
416-
417 y += rows;-
418 height -= rows;-
419 }
never executed: end of block
0
420 }
never executed: end of block
0
421}
never executed: end of block
0
422-
423void QXcbShmImage::setClip(const QRegion &region)-
424{-
425 if (region.isEmpty()) {
region.isEmpty()Description
TRUEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
426 static const uint32_t mask = XCB_GC_CLIP_MASK;-
427 static const uint32_t values[] = { XCB_NONE };-
428 Q_XCB_CALL(xcb_change_gc(xcb_connection(),-
429 m_gc,-
430 mask,-
431 values));-
432 } else {
executed 10887 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
433 const QVector<QRect> qrects = region.rects();-
434 QVector<xcb_rectangle_t> xcb_rects(qrects.size());-
435-
436 for (int i = 0; i < qrects.size(); i++) {
i < qrects.size()Description
TRUEevaluated 19508 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887-19508
437 xcb_rects[i].x = qrects[i].x();-
438 xcb_rects[i].y = qrects[i].y();-
439 xcb_rects[i].width = qrects[i].width();-
440 xcb_rects[i].height = qrects[i].height();-
441 }
executed 19508 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
19508
442-
443 Q_XCB_CALL(xcb_set_clip_rectangles(xcb_connection(),-
444 XCB_CLIP_ORDERING_YX_BANDED,-
445 m_gc,-
446 0, 0,-
447 xcb_rects.size(), xcb_rects.constData()));-
448 }
executed 10887 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
449}-
450-
451void QXcbShmImage::put(xcb_drawable_t dst, const QRegion &region, const QPoint &offset)-
452{-
453 Q_XCB_NOOP(connection());-
454-
455 ensureGC(dst);-
456 setClip(region);-
457-
458 const QRect bounds = region.boundingRect();-
459 const QPoint target = bounds.topLeft();-
460 const QRect source = bounds.translated(offset);-
461-
462 if (hasShm()) {
hasShm()Description
TRUEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-10887
463 Q_XCB_CALL(xcb_shm_put_image(xcb_connection(),-
464 dst,-
465 m_gc,-
466 m_xcb_image->width,-
467 m_xcb_image->height,-
468 source.x(), source.y(),-
469 source.width(), source.height(),-
470 target.x(), target.y(),-
471 m_xcb_image->depth,-
472 m_xcb_image->format,-
473 0, // send event?-
474 m_shm_info.shmseg,-
475 m_xcb_image->data - m_shm_info.shmaddr));-
476 m_dirtyShm |= region.translated(offset);-
477 } else {
executed 10887 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
478 flushPixmap(region);-
479 Q_XCB_CALL(xcb_copy_area(xcb_connection(),-
480 m_xcb_pixmap,-
481 dst,-
482 m_gc,-
483 source.x(), source.y(),-
484 target.x(), target.y(),-
485 source.width(), source.height()));-
486 }
never executed: end of block
0
487-
488 setClip(QRegion());-
489 Q_XCB_NOOP(connection());-
490}
executed 10887 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
491-
492void QXcbShmImage::preparePaint(const QRegion &region)-
493{-
494 if (hasShm()) {
hasShm()Description
TRUEevaluated 18355 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-18355
495 // to prevent X from reading from the image region while we're writing to it-
496 if (m_dirtyShm.intersects(region)) {
m_dirtyShm.intersects(region)Description
TRUEevaluated 5569 times by 88 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • ...
FALSEevaluated 12786 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
5569-12786
497 connection()->sync();-
498 m_dirtyShm = QRegion();-
499 }
executed 5569 times by 88 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • ...
5569
500 } else {
executed 18355 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
18355
501 m_pendingFlush |= region;-
502 }
never executed: end of block
0
503}-
504-
505QXcbBackingStore::QXcbBackingStore(QWindow *window)-
506 : QPlatformBackingStore(window)-
507 , m_image(0)-
508{-
509 QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());-
510 setConnection(screen->connection());-
511}
executed 3883 times by 117 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
  • ...
3883
512-
513QXcbBackingStore::~QXcbBackingStore()-
514{-
515 delete m_image;-
516}
executed 3880 times by 127 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
  • ...
3880
517-
518QPaintDevice *QXcbBackingStore::paintDevice()-
519{-
520 if (!m_image)
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 19430 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-19430
521 return 0;
never executed: return 0;
0
522 return m_rgbImage.isNull() ? m_image->image() : &m_rgbImage;
executed 19430 times by 100 tests: return m_rgbImage.isNull() ? m_image->image() : &m_rgbImage;
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
19430
523}-
524-
525void QXcbBackingStore::beginPaint(const QRegion &region)-
526{-
527 if (!m_image)
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 8253 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-8253
528 return;
never executed: return;
0
529-
530 m_paintRegions.push(region);-
531 m_image->preparePaint(region);-
532-
533 if (m_image->hasAlpha()) {
m_image->hasAlpha()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 8250 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
3-8250
534 QPainter p(paintDevice());-
535 p.setCompositionMode(QPainter::CompositionMode_Source);-
536 const QVector<QRect> rects = region.rects();-
537 const QColor blank = Qt::transparent;-
538 for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) {
it != rects.end()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
539 p.fillRect(*it, blank);-
540 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
541 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
542}
executed 8253 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
8253
543-
544void QXcbBackingStore::endPaint()-
545{-
546 if (Q_UNLIKELY(m_paintRegions.isEmpty())) {
__builtin_expe...pty()), false)Description
TRUEnever evaluated
FALSEevaluated 8253 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-8253
547 qWarning("%s: paint regions empty!", Q_FUNC_INFO);-
548 return;
never executed: return;
0
549 }-
550-
551 const QRegion region = m_paintRegions.pop();-
552 m_image->preparePaint(region);-
553-
554 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window()->handle());-
555 if (!platformWindow || !platformWindow->imageNeedsRgbSwap())
!platformWindowDescription
TRUEnever evaluated
FALSEevaluated 8253 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
!platformWindo...NeedsRgbSwap()Description
TRUEevaluated 8253 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-8253
556 return;
executed 8253 times by 100 tests: return;
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
8253
557-
558 // Slow path: the paint device was m_rgbImage. Now copy with swapping red-
559 // and blue into m_image.-
560 const QVector<QRect> rects = region.rects();-
561 if (rects.isEmpty())
rects.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
562 return;
never executed: return;
0
563 QPainter p(m_image->image());-
564 for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) {
it != rects.end()Description
TRUEnever evaluated
FALSEnever evaluated
0
565 const QRect rect = *it;-
566 p.drawImage(rect.topLeft(), m_rgbImage.copy(rect).rgbSwapped());-
567 }
never executed: end of block
0
568}
never executed: end of block
0
569-
570#ifndef QT_NO_OPENGL-
571QImage QXcbBackingStore::toImage() const-
572{-
573 return m_image && m_image->image() ? *m_image->image() : QImage();
never executed: return m_image && m_image->image() ? *m_image->image() : QImage();
0
574}-
575#endif-
576-
577QPlatformGraphicsBuffer *QXcbBackingStore::graphicsBuffer() const-
578{-
579 return m_image ? m_image->graphicsBuffer() : Q_NULLPTR;
executed 37 times by 2 tests: return m_image ? m_image->graphicsBuffer() : nullptr;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
37
580}-
581-
582void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)-
583{-
584 if (!m_image || m_image->size().isEmpty())
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 10893 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
m_image->size().isEmpty()Description
TRUEnever evaluated
FALSEevaluated 10893 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-10893
585 return;
never executed: return;
0
586-
587 QSize imageSize = m_image->size();-
588-
589 QRegion clipped = region;-
590 clipped &= QRect(QPoint(), QHighDpi::toNativePixels(window->size(), window));-
591 clipped &= QRect(0, 0, imageSize.width(), imageSize.height()).translated(-offset);-
592-
593 QRect bounds = clipped.boundingRect();-
594-
595 if (bounds.isNull())
bounds.isNull()Description
TRUEevaluated 6 times by 4 tests
Evaluated by:
  • tst_QFiledialog
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QWidget
FALSEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
6-10887
596 return;
executed 6 times by 4 tests: return;
Executed by:
  • tst_QFiledialog
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QWidget
6
597-
598 Q_XCB_NOOP(connection());-
599-
600 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle());-
601 if (!platformWindow) {
!platformWindowDescription
TRUEnever evaluated
FALSEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-10887
602 qWarning("QXcbBackingStore::flush: QWindow has no platform window (QTBUG-32681)");-
603 return;
never executed: return;
0
604 }-
605-
606 m_image->put(platformWindow->xcb_window(), clipped, offset);-
607-
608 Q_XCB_NOOP(connection());-
609-
610 if (platformWindow->needsSync())
platformWindow->needsSync()Description
TRUEnever evaluated
FALSEevaluated 10887 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-10887
611 platformWindow->updateSyncRequestCounter();
never executed: platformWindow->updateSyncRequestCounter();
0
612 else-
613 xcb_flush(xcb_connection());
executed 10887 times by 100 tests: xcb_flush(xcb_connection());
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
10887
614}-
615-
616#ifndef QT_NO_OPENGL-
617void QXcbBackingStore::composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,-
618 QPlatformTextureList *textures, QOpenGLContext *context,-
619 bool translucentBackground)-
620{-
621 QPlatformBackingStore::composeAndFlush(window, region, offset, textures, context, translucentBackground);-
622-
623 Q_XCB_NOOP(connection());-
624-
625 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle());-
626 if (platformWindow->needsSync()) {
platformWindow->needsSync()Description
TRUEnever evaluated
FALSEevaluated 37 times by 2 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
0-37
627 platformWindow->updateSyncRequestCounter();-
628 } else {
never executed: end of block
0
629 xcb_flush(xcb_connection());-
630 }
executed 37 times by 2 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
37
631}-
632#endif // QT_NO_OPENGL-
633-
634void QXcbBackingStore::resize(const QSize &size, const QRegion &)-
635{-
636 if (m_image && size == m_image->size())
m_imageDescription
TRUEevaluated 315 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QDockWidget
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QSpinBox
  • tst_QSystemTrayIcon
  • tst_QTableView
  • tst_QWidget
  • tst_QWidget_window
  • tst_languageChange
FALSEevaluated 2367 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
size == m_image->size()Description
TRUEnever evaluated
FALSEevaluated 315 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QDockWidget
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QSpinBox
  • tst_QSystemTrayIcon
  • tst_QTableView
  • tst_QWidget
  • tst_QWidget_window
  • tst_languageChange
0-2367
637 return;
never executed: return;
0
638 Q_XCB_NOOP(connection());-
639-
640 QXcbScreen *screen = static_cast<QXcbScreen *>(window()->screen()->handle());-
641 QPlatformWindow *pw = window()->handle();-
642 if (!pw) {
!pwDescription
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
643 window()->create();-
644 pw = window()->handle();-
645 }
never executed: end of block
0
646 QXcbWindow* win = static_cast<QXcbWindow *>(pw);-
647-
648 delete m_image;-
649 m_image = new QXcbShmImage(screen, size, win->depth(), win->imageFormat());-
650 // Slow path for bgr888 VNC: Create an additional image, paint into that and-
651 // swap R and B while copying to m_image after each paint.-
652 if (win->imageNeedsRgbSwap()) {
win->imageNeedsRgbSwap()Description
TRUEnever evaluated
FALSEevaluated 2682 times by 100 tests
Evaluated 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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-2682
653 m_rgbImage = QImage(size, win->imageFormat());-
654 }
never executed: end of block
0
655 Q_XCB_NOOP(connection());-
656}
executed 2682 times by 100 tests: end of block
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_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
2682
657-
658bool QXcbBackingStore::scroll(const QRegion &area, int dx, int dy)-
659{-
660 if (m_image)
m_imageDescription
TRUEevaluated 1849 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
FALSEevaluated 129 times by 12 tests
Evaluated by:
  • tst_QCompleter
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QPainter
  • tst_QPlainTextEdit
  • tst_QTableView
  • tst_QTextEdit
  • tst_QTouchEvent
  • tst_QWidget
129-1849
661 return m_image->scroll(area, dx, dy);
executed 1849 times by 15 tests: return m_image->scroll(area, dx, dy);
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QWidget
1849
662-
663 return false;
executed 129 times by 12 tests: return false;
Executed by:
  • tst_QCompleter
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QPainter
  • tst_QPlainTextEdit
  • tst_QTableView
  • tst_QTextEdit
  • tst_QTouchEvent
  • tst_QWidget
129
664}-
665-
666QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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