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) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the plugins of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
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 http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://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 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include "qxcbbackingstore.h"-
35-
36#include "qxcbconnection.h"-
37#include "qxcbscreen.h"-
38#include "qxcbwindow.h"-
39-
40#include <xcb/shm.h>-
41#include <xcb/xcb_image.h>-
42-
43#include <sys/ipc.h>-
44#include <sys/shm.h>-
45-
46#include <stdio.h>-
47#include <errno.h>-
48-
49#include <qdebug.h>-
50#include <qpainter.h>-
51#include <qscreen.h>-
52#include <QtGui/private/qhighdpiscaling_p.h>-
53#include <qpa/qplatformgraphicsbuffer.h>-
54#include <private/qimage_p.h>-
55-
56#include <algorithm>-
57QT_BEGIN_NAMESPACE-
58-
59class QXcbShmImage : public QXcbObject-
60{-
61public:-
62 QXcbShmImage(QXcbScreen *connection, const QSize &size, uint depth, QImage::Format format);-
63 ~QXcbShmImage() { destroy(); }
executed 2732 times by 104 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
  • ...
2732
64-
65 QImage *image() { return &m_qimage; }
executed 23205 times by 98 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
  • ...
23205
66 QPlatformGraphicsBuffer *graphicsBuffer() { return m_graphics_buffer; }
executed 22 times by 2 tests: return m_graphics_buffer;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
22
67-
68 QSize size() const { return m_qimage.size(); }
executed 17545 times by 98 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
  • ...
17545
69-
70 bool hasAlpha() const { return m_hasAlpha; }
executed 8276 times by 98 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
  • ...
8276
71-
72 void put(xcb_window_t window, const QPoint &dst, const QRect &source);-
73 void preparePaint(const QRegion &region);-
74-
75private:-
76 void destroy();-
77-
78 xcb_shm_segment_info_t m_shm_info;-
79-
80 xcb_image_t *m_xcb_image;-
81-
82 QImage m_qimage;-
83 QPlatformGraphicsBuffer *m_graphics_buffer;-
84-
85 xcb_gcontext_t m_gc;-
86 xcb_window_t m_gc_window;-
87-
88 QRegion m_dirty;-
89-
90 bool m_hasAlpha;-
91};-
92-
93class QXcbShmGraphicsBuffer : public QPlatformGraphicsBuffer-
94{-
95public:-
96 QXcbShmGraphicsBuffer(QImage *image)-
97 : QPlatformGraphicsBuffer(image->size(), QImage::toPixelFormat(image->format()))-
98 , m_access_lock(QPlatformGraphicsBuffer::None)-
99 , m_image(image)-
100 { }
executed 2733 times by 98 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
  • ...
2733
101-
102 bool doLock(AccessTypes access, const QRect &rect) Q_DECL_OVERRIDE-
103 {-
104 Q_UNUSED(rect);-
105 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
106 return false;
executed 21 times by 2 tests: return false;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
107-
108 m_access_lock |= access;-
109 return true;
executed 21 times by 2 tests: return true;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
110 }-
111 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
112-
113 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
114 uchar *data() Q_DECL_OVERRIDE { return m_image->bits(); }
never executed: return m_image->bits();
0
115 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
116-
117 Origin origin() const Q_DECL_OVERRIDE { return QPlatformGraphicsBuffer::OriginTopLeft; }
executed 22 times by 2 tests: return QPlatformGraphicsBuffer::OriginTopLeft;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
22
118private:-
119 AccessTypes m_access_lock;-
120 QImage *m_image;-
121};-
122-
123QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QImage::Format format)-
124 : QXcbObject(screen->connection())-
125 , m_graphics_buffer(Q_NULLPTR)-
126 , m_gc(0)-
127 , m_gc_window(0)-
128{-
129 Q_XCB_NOOP(connection());-
130-
131 const xcb_setup_t *setup = xcb_get_setup(xcb_connection());-
132 xcb_format_t *fmt = xcb_setup_pixmap_formats(setup);-
133 xcb_format_t *fmtend = fmt + xcb_setup_pixmap_formats_length(setup);-
134 for (; fmt != fmtend; ++fmt)
fmt != fmtendDescription
TRUEevaluated 16401 times by 98 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-16401
135 if (fmt->depth == depth)
fmt->depth == depthDescription
TRUEevaluated 2733 times by 98 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 13668 times by 98 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
  • ...
2733-13668
136 break;
executed 2733 times by 98 tests: break;
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
  • ...
2733
137-
138 Q_ASSERT(fmt != fmtend);-
139-
140 m_xcb_image = xcb_image_create(size.width(), size.height(),-
141 XCB_IMAGE_FORMAT_Z_PIXMAP,-
142 fmt->scanline_pad,-
143 fmt->depth, fmt->bits_per_pixel, 0,-
144 QSysInfo::ByteOrder == QSysInfo::BigEndian ? XCB_IMAGE_ORDER_MSB_FIRST : XCB_IMAGE_ORDER_LSB_FIRST,-
145 XCB_IMAGE_ORDER_MSB_FIRST,-
146 0, ~0, 0);-
147-
148 const int segmentSize = m_xcb_image->stride * m_xcb_image->height;-
149 if (!segmentSize)
!segmentSizeDescription
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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-2733
150 return;
never executed: return;
0
151-
152 int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0600);-
153 if (id == -1) {
id == -1Description
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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-2733
154 qWarning("QXcbShmImage: shmget() failed (%d: %s) for size %d (%dx%d)",-
155 errno, strerror(errno), segmentSize, size.width(), size.height());-
156 } else {
never executed: end of block
0
157 m_shm_info.shmaddr = m_xcb_image->data = (quint8 *)shmat(id, 0, 0);-
158 }
executed 2733 times by 98 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
  • ...
2733
159 m_shm_info.shmid = id;-
160 m_shm_info.shmseg = xcb_generate_id(xcb_connection());-
161-
162 const xcb_query_extension_reply_t *shm_reply = xcb_get_extension_data(xcb_connection(), &xcb_shm_id);-
163 bool shm_present = shm_reply != NULL && shm_reply->present;
shm_reply != __nullDescription
TRUEevaluated 2733 times by 98 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 2733 times by 98 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-2733
164 xcb_generic_error_t *error = NULL;-
165 if (shm_present)
shm_presentDescription
TRUEevaluated 2733 times by 98 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-2733
166 error = xcb_request_check(xcb_connection(), xcb_shm_attach_checked(xcb_connection(), m_shm_info.shmseg, m_shm_info.shmid, false));
executed 2733 times by 98 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
  • ...
2733
167 if (!shm_present || error || id == -1) {
!shm_presentDescription
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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 2733 times by 98 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 2733 times by 98 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-2733
168 free(error);-
169-
170 if (id != -1) {
id != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
171 shmdt(m_shm_info.shmaddr);-
172 shmctl(m_shm_info.shmid, IPC_RMID, 0);-
173 }
never executed: end of block
0
174 m_shm_info.shmaddr = 0;-
175-
176 m_xcb_image->data = (uint8_t *)malloc(segmentSize);-
177 } else {
never executed: end of block
0
178 if (shmctl(m_shm_info.shmid, IPC_RMID, 0) == -1)
shmctl(m_shm_i...d, 0, 0) == -1Description
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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-2733
179 qWarning() << "QXcbBackingStore: Error while marking the shared memory segment to be destroyed";
never executed: QMessageLogger(__FILE__, 179, __PRETTY_FUNCTION__).warning() << "QXcbBackingStore: Error while marking the shared memory segment to be destroyed";
0
180 }
executed 2733 times by 98 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
  • ...
2733
181-
182 m_hasAlpha = QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::UsesAlpha;-
183 if (!m_hasAlpha)
!m_hasAlphaDescription
TRUEevaluated 2730 times by 98 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-2730
184 format = qt_maybeAlphaVersionWithSameDepth(format);
executed 2730 times by 98 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
  • ...
2730
185-
186 m_qimage = QImage( (uchar*) m_xcb_image->data, m_xcb_image->width, m_xcb_image->height, m_xcb_image->stride, format);-
187 m_graphics_buffer = new QXcbShmGraphicsBuffer(&m_qimage);-
188}
executed 2733 times by 98 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
  • ...
2733
189-
190void QXcbShmImage::destroy()-
191{-
192 const int segmentSize = m_xcb_image ? (m_xcb_image->stride * m_xcb_image->height) : 0;
m_xcb_imageDescription
TRUEevaluated 2732 times by 104 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-2732
193 if (segmentSize && m_shm_info.shmaddr)
segmentSizeDescription
TRUEevaluated 2732 times by 104 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 2732 times by 104 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-2732
194 Q_XCB_CALL(xcb_shm_detach(xcb_connection(), m_shm_info.shmseg));
executed 2732 times by 104 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
  • ...
2732
195-
196 if (segmentSize) {
segmentSizeDescription
TRUEevaluated 2732 times by 104 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-2732
197 if (m_shm_info.shmaddr) {
m_shm_info.shmaddrDescription
TRUEevaluated 2732 times by 104 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-2732
198 shmdt(m_shm_info.shmaddr);-
199 shmctl(m_shm_info.shmid, IPC_RMID, 0);-
200 } else {
executed 2732 times by 104 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
  • ...
2732
201 free(m_xcb_image->data);-
202 }
never executed: end of block
0
203 }-
204-
205 xcb_image_destroy(m_xcb_image);-
206-
207 if (m_gc)
m_gcDescription
TRUEevaluated 2625 times by 104 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-2625
208 Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
executed 2625 times by 104 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
  • ...
2625
209 delete m_graphics_buffer;-
210 m_graphics_buffer = Q_NULLPTR;-
211}
executed 2732 times by 104 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
  • ...
2732
212-
213void QXcbShmImage::put(xcb_window_t window, const QPoint &target, const QRect &source)-
214{-
215 Q_XCB_NOOP(connection());-
216 if (m_gc_window != window) {
m_gc_window != windowDescription
TRUEevaluated 2727 times by 98 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 14393 times by 86 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • 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
  • tst_QFormLayout
  • ...
2727-14393
217 if (m_gc)
m_gcDescription
TRUEevaluated 101 times by 5 tests
Evaluated by:
  • tst_QDialog
  • tst_QMdiArea
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
FALSEevaluated 2626 times by 98 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
  • ...
101-2626
218 Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
executed 101 times by 5 tests: xcb_free_gc(xcb_connection(), m_gc);
Executed by:
  • tst_QDialog
  • tst_QMdiArea
  • tst_QWidget
  • tst_QWidget_window
  • tst_QWindowContainer
101
219-
220 m_gc = xcb_generate_id(xcb_connection());-
221 Q_XCB_CALL(xcb_create_gc(xcb_connection(), m_gc, window, 0, 0));-
222-
223 m_gc_window = window;-
224 }
executed 2727 times by 98 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
  • ...
2727
225-
226 Q_XCB_NOOP(connection());-
227 if (m_shm_info.shmaddr) {
m_shm_info.shmaddrDescription
TRUEevaluated 17120 times by 98 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-17120
228 xcb_image_shm_put(xcb_connection(),-
229 window,-
230 m_gc,-
231 m_xcb_image,-
232 m_shm_info,-
233 source.x(),-
234 source.y(),-
235 target.x(),-
236 target.y(),-
237 source.width(),-
238 source.height(),-
239 false);-
240 } else {
executed 17120 times by 98 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
  • ...
17120
241 // If we upload the whole image in a single chunk, the result might be-
242 // larger than the server's maximum request size and stuff breaks.-
243 // To work around that, we upload the image in chunks where each chunk-
244 // is small enough for a single request.-
245 int src_x = source.x();-
246 int src_y = source.y();-
247 int target_x = target.x();-
248 int target_y = target.y();-
249 int width = source.width();-
250 int height = source.height();-
251-
252 // We must make sure that each request is not larger than max_req_size.-
253 // Each request takes req_size + m_xcb_image->stride * height bytes.-
254 uint32_t max_req_size = xcb_get_maximum_request_length(xcb_connection());-
255 uint32_t req_size = sizeof(xcb_put_image_request_t);-
256 int rows_per_put = (max_req_size - req_size) / m_xcb_image->stride;-
257-
258 // This assert could trigger if a single row has more pixels than fit in-
259 // a single PutImage request. However, max_req_size is guaranteed to be-
260 // at least 16384 bytes. That should be enough for quite large images.-
261 Q_ASSERT(rows_per_put > 0);-
262-
263 // Convert the image to the native byte order.-
264 xcb_image_t *converted_image = xcb_image_native(xcb_connection(), m_xcb_image, 1);-
265-
266 while (height > 0) {
height > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
267 int rows = std::min(height, rows_per_put);-
268-
269 xcb_image_t *subimage = xcb_image_subimage(converted_image, src_x, src_y, width, rows,-
270 0, 0, 0);-
271 xcb_image_put(xcb_connection(),-
272 window,-
273 m_gc,-
274 subimage,-
275 target_x,-
276 target_y,-
277 0);-
278-
279 xcb_image_destroy(subimage);-
280-
281 src_y += rows;-
282 target_y += rows;-
283 height -= rows;-
284 }
never executed: end of block
0
285-
286 if (converted_image != m_xcb_image)
converted_image != m_xcb_imageDescription
TRUEnever evaluated
FALSEnever evaluated
0
287 xcb_image_destroy(converted_image);
never executed: xcb_image_destroy(converted_image);
0
288 }
never executed: end of block
0
289 Q_XCB_NOOP(connection());-
290-
291 m_dirty = m_dirty | source;-
292}
executed 17120 times by 98 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
  • ...
17120
293-
294void QXcbShmImage::preparePaint(const QRegion &region)-
295{-
296 // to prevent X from reading from the image region while we're writing to it-
297 if (m_dirty.intersects(region)) {
m_dirty.intersects(region)Description
TRUEevaluated 5566 times by 86 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • 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
  • tst_QFormLayout
  • ...
FALSEevaluated 4595 times by 98 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
  • ...
4595-5566
298 connection()->sync();-
299 m_dirty = QRegion();-
300 }
executed 5566 times by 86 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • 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
  • tst_QFormLayout
  • ...
5566
301}
executed 10161 times by 98 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
  • ...
10161
302-
303QXcbBackingStore::QXcbBackingStore(QWindow *window)-
304 : QPlatformBackingStore(window)-
305 , m_image(0)-
306{-
307 QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());-
308 setConnection(screen->connection());-
309}
executed 3960 times by 116 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
  • ...
3960
310-
311QXcbBackingStore::~QXcbBackingStore()-
312{-
313 delete m_image;-
314}
executed 3958 times by 126 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
  • ...
3958
315-
316QPaintDevice *QXcbBackingStore::paintDevice()-
317{-
318 if (!m_image)
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 19435 times by 98 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-19435
319 return 0;
never executed: return 0;
0
320 return m_rgbImage.isNull() ? m_image->image() : &m_rgbImage;
executed 19435 times by 98 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
  • ...
m_rgbImage.isNull()Description
TRUEevaluated 19435 times by 98 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-19435
321}-
322-
323void QXcbBackingStore::beginPaint(const QRegion &region)-
324{-
325 if (!m_image && !m_size.isEmpty())
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 8276 times by 98 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_size.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0-8276
326 resize(m_size, QRegion());
never executed: resize(m_size, QRegion());
0
327-
328 if (!m_image)
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 8276 times by 98 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-8276
329 return;
never executed: return;
0
330 m_size = QSize();-
331 m_paintRegion = region;-
332 m_image->preparePaint(m_paintRegion);-
333-
334 if (m_image->hasAlpha()) {
m_image->hasAlpha()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 8273 times by 98 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-8273
335 QPainter p(paintDevice());-
336 p.setCompositionMode(QPainter::CompositionMode_Source);-
337 const QVector<QRect> rects = m_paintRegion.rects();-
338 const QColor blank = Qt::transparent;-
339 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
340 p.fillRect(*it, blank);-
341 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
342 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
343}
executed 8276 times by 98 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
  • ...
8276
344-
345void QXcbBackingStore::endPaint()-
346{-
347 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window()->handle());-
348 if (!platformWindow || !platformWindow->imageNeedsRgbSwap())
!platformWindowDescription
TRUEnever evaluated
FALSEevaluated 8276 times by 98 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 8276 times by 98 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-8276
349 return;
executed 8276 times by 98 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
  • ...
8276
350-
351 // Slow path: the paint device was m_rgbImage. Now copy with swapping red-
352 // and blue into m_image.-
353 const QVector<QRect> rects = m_paintRegion.rects();-
354 if (rects.isEmpty())
rects.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
355 return;
never executed: return;
0
356 QPainter p(m_image->image());-
357 for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) {
it != rects.end()Description
TRUEnever evaluated
FALSEnever evaluated
0
358 const QRect rect = *it;-
359 p.drawImage(rect.topLeft(), m_rgbImage.copy(rect).rgbSwapped());-
360 }
never executed: end of block
0
361}
never executed: end of block
0
362-
363#ifndef QT_NO_OPENGL-
364QImage QXcbBackingStore::toImage() const-
365{-
366 return m_image && m_image->image() ? *m_image->image() : QImage();
never executed: return m_image && m_image->image() ? *m_image->image() : QImage();
m_imageDescription
TRUEnever evaluated
FALSEnever evaluated
m_image->image()Description
TRUEnever evaluated
FALSEnever evaluated
0
367}-
368#endif-
369-
370QPlatformGraphicsBuffer *QXcbBackingStore::graphicsBuffer() const-
371{-
372 return m_image ? m_image->graphicsBuffer() : Q_NULLPTR;
executed 22 times by 2 tests: return m_image ? m_image->graphicsBuffer() : nullptr;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
m_imageDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
FALSEnever evaluated
0-22
373}-
374-
375void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)-
376{-
377 if (!m_image || m_image->size().isEmpty())
!m_imageDescription
TRUEnever evaluated
FALSEevaluated 8618 times by 98 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 8618 times by 98 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-8618
378 return;
never executed: return;
0
379-
380 QSize imageSize = m_image->size();-
381-
382 QRegion clipped = region;-
383 clipped &= QRect(QPoint(), QHighDpi::toNativePixels(window->size(), window));-
384 clipped &= QRect(0, 0, imageSize.width(), imageSize.height()).translated(-offset);-
385-
386 QRect bounds = clipped.boundingRect();-
387-
388 if (bounds.isNull())
bounds.isNull()Description
TRUEnever evaluated
FALSEevaluated 8618 times by 98 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-8618
389 return;
never executed: return;
0
390-
391 Q_XCB_NOOP(connection());-
392-
393 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle());-
394 if (!platformWindow) {
!platformWindowDescription
TRUEnever evaluated
FALSEevaluated 8618 times by 98 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-8618
395 qWarning("QXcbBackingStore::flush: QWindow has no platform window (QTBUG-32681)");-
396 return;
never executed: return;
0
397 }-
398-
399 QVector<QRect> rects = clipped.rects();-
400 for (int i = 0; i < rects.size(); ++i) {
i < rects.size()Description
TRUEevaluated 17120 times by 98 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 8618 times by 98 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
  • ...
8618-17120
401 QRect rect = QRect(rects.at(i).topLeft(), rects.at(i).size());-
402 m_image->put(platformWindow->xcb_window(), rect.topLeft(), rect.translated(offset));-
403 }
executed 17120 times by 98 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
  • ...
17120
404-
405 Q_XCB_NOOP(connection());-
406-
407 if (platformWindow->needsSync())
platformWindow->needsSync()Description
TRUEnever evaluated
FALSEevaluated 8618 times by 98 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-8618
408 platformWindow->updateSyncRequestCounter();
never executed: platformWindow->updateSyncRequestCounter();
0
409 else-
410 xcb_flush(xcb_connection());
executed 8618 times by 98 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
  • ...
8618
411}-
412-
413#ifndef QT_NO_OPENGL-
414void QXcbBackingStore::composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,-
415 QPlatformTextureList *textures, QOpenGLContext *context,-
416 bool translucentBackground)-
417{-
418 QPlatformBackingStore::composeAndFlush(window, region, offset, textures, context, translucentBackground);-
419-
420 Q_XCB_NOOP(connection());-
421-
422 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle());-
423 if (platformWindow->needsSync()) {
platformWindow->needsSync()Description
TRUEnever evaluated
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
0-22
424 platformWindow->updateSyncRequestCounter();-
425 } else {
never executed: end of block
0
426 xcb_flush(xcb_connection());-
427 }
executed 22 times by 2 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
22
428}-
429#endif // QT_NO_OPENGL-
430-
431void QXcbBackingStore::resize(const QSize &size, const QRegion &)-
432{-
433 if (m_image && size == m_image->size())
m_imageDescription
TRUEevaluated 309 times by 18 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
FALSEevaluated 2424 times by 98 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 309 times by 18 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
0-2424
434 return;
never executed: return;
0
435 Q_XCB_NOOP(connection());-
436-
437-
438 QXcbScreen *screen = window()->screen() ? static_cast<QXcbScreen *>(window()->screen()->handle()) : 0;
window()->screen()Description
TRUEevaluated 2733 times by 98 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-2733
439 QPlatformWindow *pw = window()->handle();-
440 if (!pw) {
!pwDescription
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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-2733
441 window()->create();-
442 pw = window()->handle();-
443 }
never executed: end of block
0
444 QXcbWindow* win = static_cast<QXcbWindow *>(pw);-
445-
446 delete m_image;-
447 if (!screen) {
!screenDescription
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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-2733
448 m_image = 0;-
449 m_size = size;-
450 return;
never executed: return;
0
451 }-
452 m_image = new QXcbShmImage(screen, size, win->depth(), win->imageFormat());-
453 // Slow path for bgr888 VNC: Create an additional image, paint into that and-
454 // swap R and B while copying to m_image after each paint.-
455 if (win->imageNeedsRgbSwap()) {
win->imageNeedsRgbSwap()Description
TRUEnever evaluated
FALSEevaluated 2733 times by 98 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-2733
456 m_rgbImage = QImage(size, win->imageFormat());-
457 }
never executed: end of block
0
458 Q_XCB_NOOP(connection());-
459}
executed 2733 times by 98 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
  • ...
2733
460-
461extern void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset);-
462-
463bool QXcbBackingStore::scroll(const QRegion &area, int dx, int dy)-
464{-
465 if (!m_image || m_image->image()->isNull())
!m_imageDescription
TRUEevaluated 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
FALSEevaluated 1885 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
m_image->image()->isNull()Description
TRUEnever evaluated
FALSEevaluated 1885 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-1885
466 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
467-
468 m_image->preparePaint(area);-
469-
470 QPoint delta(dx, dy);-
471 const QVector<QRect> rects = area.rects();-
472 for (int i = 0; i < rects.size(); ++i)
i < rects.size()Description
TRUEevaluated 1885 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 1885 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
1885
473 qt_scrollRectInImage(*m_image->image(), rects.at(i), delta);
executed 1885 times by 15 tests: qt_scrollRectInImage(*m_image->image(), rects.at(i), 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
1885
474 return true;
executed 1885 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
1885
475}-
476-
477QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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