qxcbbackingstore.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbbackingstore.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12class QXcbShmImage : public QXcbObject-
13{-
14public:-
15 QXcbShmImage(QXcbScreen *connection, const QSize &size, uint depth, QImage::Format format);-
16 ~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
17-
18 bool scroll(const QRegion &area, int dx, int dy);-
19-
20 QImage *image() { return
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
  • ...
&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
21 QPlatformGraphicsBuffer *graphicsBuffer() { return
executed 37 times by 2 tests: return m_graphics_buffer;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
m_graphics_buffer;
executed 37 times by 2 tests: return m_graphics_buffer;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
}
37
22-
23 QSize size() const { return
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
  • ...
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
24-
25 bool hasAlpha() const { return
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
  • ...
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
26 bool hasShm() const { return
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
  • ...
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
27-
28 void put(xcb_drawable_t dst, const QRegion &region, const QPoint &offset);-
29 void preparePaint(const QRegion &region);-
30-
31private:-
32 void destroy();-
33-
34 void ensureGC(xcb_drawable_t dst);-
35 void flushPixmap(const QRegion &region);-
36 void setClip(const QRegion &region);-
37-
38 xcb_shm_segment_info_t m_shm_info;-
39-
40 xcb_image_t *m_xcb_image;-
41-
42 QImage m_qimage;-
43 QPlatformGraphicsBuffer *m_graphics_buffer;-
44-
45 xcb_gcontext_t m_gc;-
46 xcb_drawable_t m_gc_drawable;-
47-
48-
49 QRegion m_dirtyShm;-
50-
51-
52-
53-
54-
55 xcb_pixmap_t m_xcb_pixmap;-
56 QRegion m_pendingFlush;-
57 QByteArray m_flushBuffer;-
58-
59 bool m_hasAlpha;-
60};-
61-
62class QXcbShmGraphicsBuffer : public QPlatformGraphicsBuffer-
63{-
64public:-
65 QXcbShmGraphicsBuffer(QImage *image)-
66 : QPlatformGraphicsBuffer(image->size(), QImage::toPixelFormat(image->format()))-
67 , m_access_lock(QPlatformGraphicsBuffer::None)-
68 , m_image(image)-
69 { }
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
70-
71 bool doLock(AccessTypes access, const QRect &rect) override-
72 {-
73 (void)rect;;-
74 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
75 return
executed 21 times by 2 tests: return false;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
false;
executed 21 times by 2 tests: return false;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
76-
77 m_access_lock |= access;-
78 return
executed 21 times by 2 tests: return true;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
true;
executed 21 times by 2 tests: return true;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
21
79 }-
80 void doUnlock() override { m_access_lock = None; }
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
17
81-
82 const uchar *data() const override { return
executed 21 times by 2 tests: return m_image->bits();
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
m_image->bits();
executed 21 times by 2 tests: return m_image->bits();
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
}
21
83 uchar *data() override { return
never executed: return m_image->bits();
m_image->bits();
never executed: return m_image->bits();
}
0
84 int bytesPerLine() const override { return
executed 42 times by 2 tests: return m_image->bytesPerLine();
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
m_image->bytesPerLine();
executed 42 times by 2 tests: return m_image->bytesPerLine();
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
}
42
85-
86 Origin origin() const override { return
executed 37 times by 2 tests: return QPlatformGraphicsBuffer::OriginTopLeft;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
QPlatformGraphicsBuffer::OriginTopLeft;
executed 37 times by 2 tests: return QPlatformGraphicsBuffer::OriginTopLeft;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
}
37
87private:-
88 AccessTypes m_access_lock;-
89 QImage *m_image;-
90};-
91-
92QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QImage::Format format)-
93 : QXcbObject(screen->connection())-
94 , m_graphics_buffer(nullptr)-
95 , m_gc(0)-
96 , m_gc_drawable(0)-
97 , m_xcb_pixmap(0)-
98{-
99 (void)connection();;-
100-
101 const xcb_format_t *fmt = connection()->formatForDepth(depth);-
102 ((!(fmt)) ? qt_assert("fmt",__FILE__,156) : qt_noop());-
103-
104 m_xcb_image = xcb_image_create(size.width(), size.height(),-
105 XCB_IMAGE_FORMAT_Z_PIXMAP,-
106 fmt->scanline_pad,-
107 fmt->depth, fmt->bits_per_pixel, 0,-
108 QSysInfo::ByteOrder == QSysInfo::BigEndian ? XCB_IMAGE_ORDER_MSB_FIRST : XCB_IMAGE_ORDER_LSB_FIRST,-
109 XCB_IMAGE_ORDER_MSB_FIRST,-
110 0, ~0, 0);-
111-
112 const int segmentSize = m_xcb_image->stride * m_xcb_image->height;-
113 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
114 return;
never executed: return;
0
115-
116 int id = shmget(((__key_t) 0), segmentSize, 01000 | 0600);-
117 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
118 QMessageLogger(__FILE__, 172, __PRETTY_FUNCTION__).warning("QXcbShmImage: shmget() failed (%d: %s) for size %d (%dx%d)",-
119 (*__errno_location ()), strerror((*__errno_location ())), segmentSize, size.width(), size.height());-
120 }
never executed: end of block
else {
0
121 m_shm_info.shmaddr = m_xcb_image->data = (quint8 *)shmat(id, 0, 0);-
122 }
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
123 m_shm_info.shmid = id;-
124 m_shm_info.shmseg = xcb_generate_id(xcb_connection());-
125-
126 const xcb_query_extension_reply_t *shm_reply = xcb_get_extension_data(xcb_connection(), &xcb_shm_id);-
127 bool shm_present = shm_reply != __null
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->present
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
128 xcb_generic_error_t *error = __null;-
129 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
130 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
131 if (!shm_present
!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
  • ...
|| error
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 == -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
132 free(error);-
133-
134 if (id != -1
id != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
135 shmdt(m_shm_info.shmaddr);-
136 shmctl(m_shm_info.shmid, 0, 0);-
137 }
never executed: end of block
0
138 m_shm_info.shmaddr = 0;-
139-
140 m_xcb_image->data = (uint8_t *)malloc(segmentSize);-
141 }
never executed: end of block
else {
0
142 if (shmctl(m_shm_info.shmid, 0, 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
143 QMessageLogger(__FILE__, 197, __PRETTY_FUNCTION__).warning("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
144 }
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
145-
146 m_hasAlpha = QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::UsesAlpha;-
147 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
148 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
149-
150 m_qimage = QImage( (uchar*) m_xcb_image->data, m_xcb_image->width, m_xcb_image->height, m_xcb_image->stride, format);-
151 m_graphics_buffer = new QXcbShmGraphicsBuffer(&m_qimage);-
152-
153 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
154 m_xcb_pixmap = xcb_generate_id(xcb_connection());-
155 xcb_create_pixmap(xcb_connection(), m_xcb_image->depth, m_xcb_pixmap, screen->screen()->root, m_xcb_image->width, m_xcb_image->height)-
156-
157-
158-
159 ;-
160 }
never executed: end of block
0
161}
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
162-
163extern void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset);-
164-
165bool QXcbShmImage::scroll(const QRegion &area, int dx, int dy)-
166{-
167 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
168 return
never executed: return false;
false;
never executed: return false;
0
169-
170 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
171 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
172-
173 const QPoint delta(dx, dy);-
174 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(area.rects())>::type> _container_((area.rects())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QRect &rect = *_container_.i; _container_.control; _container_.control = 0)-
175 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
176-
177 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
178 flushPixmap(area);-
179 ensureGC(m_xcb_pixmap);-
180 const QRect bounds(QPoint(0, 0), size());-
181 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(area.rects())>::type> _container_((area.rects())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QRect &src = *_container_.i; _container_.control; _container_.control = 0) {-
182 const QRect dst = src.translated(delta).intersected(bounds);-
183 xcb_copy_area(xcb_connection(), m_xcb_pixmap, m_xcb_pixmap, m_gc, src.x(), src.y(), dst.x(), dst.y(), dst.width(), dst.height())-
184-
185-
186-
187-
188-
189 ;-
190 }
never executed: end of block
0
191 }
never executed: end of block
0
192-
193 return
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
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
194}-
195-
196void QXcbShmImage::destroy()-
197{-
198 const int segmentSize = m_xcb_image
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
? (m_xcb_image->stride * m_xcb_image->height) : 0;
0-2681
199 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
&& 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
200 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
201-
202 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
203 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
204 shmdt(m_shm_info.shmaddr);-
205 shmctl(m_shm_info.shmid, 0, 0);-
206 }
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
  • ...
else {
2681
207 free(m_xcb_image->data);-
208 }
never executed: end of block
0
209 }-
210-
211 xcb_image_destroy(m_xcb_image);-
212-
213 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
214 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
215 delete m_graphics_buffer;-
216 m_graphics_buffer = nullptr;-
217-
218 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
219 xcb_free_pixmap(xcb_connection(), m_xcb_pixmap);-
220 m_xcb_pixmap = 0;-
221 }
never executed: end of block
0
222}
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
223-
224void QXcbShmImage::ensureGC(xcb_drawable_t dst)-
225{-
226 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
227 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
228 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
229-
230 static const uint32_t mask = XCB_GC_GRAPHICS_EXPOSURES;-
231 static const uint32_t values[] = { 0 };-
232-
233 m_gc = xcb_generate_id(xcb_connection());-
234 xcb_create_gc(xcb_connection(), m_gc, dst, mask, values);-
235-
236 m_gc_drawable = dst;-
237 }
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
238}
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
239-
240static inline void copy_unswapped(char *dst, int dstBytesPerLine, const QImage &img, const QRect &rect)-
241{-
242 const uchar *srcData = img.constBits();-
243 const int srcBytesPerLine = img.bytesPerLine();-
244-
245 const int leftOffset = rect.left() * img.depth() >> 3;-
246 const int bottom = rect.bottom() + 1;-
247-
248 for (int yy = rect.top(); yy < bottom
yy < bottomDescription
TRUEnever evaluated
FALSEnever evaluated
; ++yy) {
0
249 const uchar *src = srcData + yy * srcBytesPerLine + leftOffset;-
250 ::memmove(dst, src, dstBytesPerLine);-
251 dst += dstBytesPerLine;-
252 }
never executed: end of block
0
253}
never executed: end of block
0
254-
255template <class Pixel>-
256static inline void copy_swapped(char *dst, const int dstStride, const QImage &img, const QRect &rect)-
257{-
258 const uchar *srcData = img.constBits();-
259 const int srcBytesPerLine = img.bytesPerLine();-
260-
261 const int left = rect.left();-
262 const int width = rect.width();-
263 const int bottom = rect.bottom() + 1;-
264-
265 for (int yy = rect.top(); yy < bottom
yy < bottomDescription
TRUEnever evaluated
FALSEnever evaluated
; ++yy) {
0
266 Pixel *dstPixels = reinterpret_cast<Pixel *>(dst);-
267 const Pixel *srcPixels = reinterpret_cast<const Pixel *>(srcData + yy * srcBytesPerLine) + left;-
268-
269 for (int i = 0; i < width
i < widthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
270 dstPixels[i] = qbswap<Pixel>(*srcPixels++);
never executed: dstPixels[i] = qbswap<Pixel>(*srcPixels++);
0
271-
272 dst += dstStride;-
273 }
never executed: end of block
0
274}
never executed: end of block
0
275-
276static QImage native_sub_image(QByteArray *buffer, const int dstStride, const QImage &src, const QRect &rect, bool swap)-
277{-
278 if (!swap
!swapDescription
TRUEnever evaluated
FALSEnever evaluated
&& src.rect() == rect
src.rect() == rectDescription
TRUEnever evaluated
FALSEnever evaluated
&& src.bytesPerLine() == dstStride
src.bytesPerLi...) == dstStrideDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
279 return
never executed: return src;
src;
never executed: return src;
0
280-
281 buffer->resize(rect.height() * dstStride);-
282-
283 if (swap
swapDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
284 switch (src.depth()) {-
285 case
never executed: case 32:
32:
never executed: case 32:
0
286 copy_swapped<quint32>(buffer->data(), dstStride, src, rect);-
287 break;
never executed: break;
0
288 case
never executed: case 16:
16:
never executed: case 16:
0
289 copy_swapped<quint16>(buffer->data(), dstStride, src, rect);-
290 break;
never executed: break;
0
291 }-
292 }
never executed: end of block
else {
0
293 copy_unswapped(buffer->data(), dstStride, src, rect);-
294 }
never executed: end of block
0
295-
296 return
never executed: return QImage(reinterpret_cast<const uchar *>(buffer->constData()), rect.width(), rect.height(), dstStride, src.format());
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
297}-
298-
299static inline quint32 round_up_scanline(quint32 base, quint32 pad)-
300{-
301 return
never executed: return (base + pad - 1) & -pad;
(base + pad - 1) & -pad;
never executed: return (base + pad - 1) & -pad;
0
302}-
303-
304void QXcbShmImage::flushPixmap(const QRegion &region)-
305{-
306 const QVector<QRect> rects = m_pendingFlush.intersected(region).rects();-
307 m_pendingFlush -= region;-
308-
309 xcb_image_t xcb_subimage;-
310 memset(&xcb_subimage, 0, sizeof(xcb_image_t));-
311-
312 xcb_subimage.format = m_xcb_image->format;-
313 xcb_subimage.scanline_pad = m_xcb_image->scanline_pad;-
314 xcb_subimage.depth = m_xcb_image->depth;-
315 xcb_subimage.bpp = m_xcb_image->bpp;-
316 xcb_subimage.unit = m_xcb_image->unit;-
317 xcb_subimage.plane_mask = m_xcb_image->plane_mask;-
318 xcb_subimage.byte_order = (xcb_image_order_t) connection()->setup()->image_byte_order;-
319 xcb_subimage.bit_order = m_xcb_image->bit_order;-
320-
321 const bool needsByteSwap = xcb_subimage.byte_order != m_xcb_image->byte_order;-
322-
323 for (const QRect &rect : rects) {-
324-
325-
326 static const uint32_t req_size = sizeof(xcb_put_image_request_t);-
327 const uint32_t max_req_size = xcb_get_maximum_request_length(xcb_connection());-
328 const int rows_per_put = (max_req_size - req_size) / m_xcb_image->stride;-
329-
330-
331-
332-
333 ((!(rows_per_put > 0)) ? qt_assert("rows_per_put > 0",__FILE__,387) : qt_noop());-
334-
335-
336-
337-
338-
339 const int x = rect.x();-
340 int y = rect.y();-
341 const int width = rect.width();-
342 int height = rect.height();-
343-
344 while (height > 0
height > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
345 const int rows = std::min(height, rows_per_put);-
346 const QRect subRect(x, y, width, rows);-
347 const quint32 stride = round_up_scanline(width * m_qimage.depth(), xcb_subimage.scanline_pad) >> 3;-
348 const QImage subImage = native_sub_image(&m_flushBuffer, stride, m_qimage, subRect, needsByteSwap);-
349-
350 xcb_subimage.width = width;-
351 xcb_subimage.height = rows;-
352 xcb_subimage.data = const_cast<uint8_t *>(subImage.constBits());-
353 xcb_image_annotate(&xcb_subimage);-
354-
355 xcb_image_put(xcb_connection(),-
356 m_xcb_pixmap,-
357 m_gc,-
358 &xcb_subimage,-
359 x,-
360 y,-
361 0);-
362-
363 y += rows;-
364 height -= rows;-
365 }
never executed: end of block
0
366 }
never executed: end of block
0
367}
never executed: end of block
0
368-
369void QXcbShmImage::setClip(const QRegion &region)-
370{-
371 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
372 static const uint32_t mask = XCB_GC_CLIP_MASK;-
373 static const uint32_t values[] = { 0L };-
374 xcb_change_gc(xcb_connection(), m_gc, mask, values)-
375-
376-
377 ;-
378 }
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
  • ...
else {
10887
379 const QVector<QRect> qrects = region.rects();-
380 QVector<xcb_rectangle_t> xcb_rects(qrects.size());-
381-
382 for (int i = 0; i < qrects.size()
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
  • ...
; i++) {
10887-19508
383 xcb_rects[i].x = qrects[i].x();-
384 xcb_rects[i].y = qrects[i].y();-
385 xcb_rects[i].width = qrects[i].width();-
386 xcb_rects[i].height = qrects[i].height();-
387 }
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
388-
389 xcb_set_clip_rectangles(xcb_connection(), XCB_CLIP_ORDERING_YX_BANDED, m_gc, 0, 0, xcb_rects.size(), xcb_rects.constData())-
390-
391-
392-
393 ;-
394 }
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
395}-
396-
397void QXcbShmImage::put(xcb_drawable_t dst, const QRegion &region, const QPoint &offset)-
398{-
399 (void)connection();;-
400-
401 ensureGC(dst);-
402 setClip(region);-
403-
404 const QRect bounds = region.boundingRect();-
405 const QPoint target = bounds.topLeft();-
406 const QRect source = bounds.translated(offset);-
407-
408 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
409 xcb_shm_put_image(xcb_connection(), dst, m_gc, m_xcb_image->width, m_xcb_image->height, source.x(), source.y(), source.width(), source.height(), target.x(), target.y(), m_xcb_image->depth, m_xcb_image->format, 0, m_shm_info.shmseg, m_xcb_image->data - m_shm_info.shmaddr)-
410 ;-
411 m_dirtyShm |= region.translated(offset);-
412 }
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
  • ...
else {
10887
413 flushPixmap(region);-
414 xcb_copy_area(xcb_connection(), m_xcb_pixmap, dst, m_gc, source.x(), source.y(), target.x(), target.y(), source.width(), source.height())-
415-
416-
417-
418-
419-
420 ;-
421 }
never executed: end of block
0
422-
423 setClip(QRegion());-
424 (void)connection();;-
425}
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
426-
427void QXcbShmImage::preparePaint(const QRegion &region)-
428{-
429 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
430-
431 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
432 connection()->sync();-
433 m_dirtyShm = QRegion();-
434 }
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
435 }
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
  • ...
else {
18355
436 m_pendingFlush |= region;-
437 }
never executed: end of block
0
438}-
439-
440QXcbBackingStore::QXcbBackingStore(QWindow *window)-
441 : QPlatformBackingStore(window)-
442 , m_image(0)-
443{-
444 QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());-
445 setConnection(screen->connection());-
446}
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
447-
448QXcbBackingStore::~QXcbBackingStore()-
449{-
450 delete m_image;-
451}
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
452-
453QPaintDevice *QXcbBackingStore::paintDevice()-
454{-
455 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
456 return
never executed: return 0;
0;
never executed: return 0;
0
457 return
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
  • ...
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
458}-
459-
460void QXcbBackingStore::beginPaint(const QRegion &region)-
461{-
462 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
463 return;
never executed: return;
0
464-
465 m_paintRegions.push(region);-
466 m_image->preparePaint(region);-
467-
468 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
469 QPainter p(paintDevice());-
470 p.setCompositionMode(QPainter::CompositionMode_Source);-
471 const QVector<QRect> rects = region.rects();-
472 const QColor blank = Qt::transparent;-
473 for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end()
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
; ++it) {
3
474 p.fillRect(*it, blank);-
475 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
476 }
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
3
477}
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
478-
479void QXcbBackingStore::endPaint()-
480{-
481 if (__builtin_expect(!!(m_paintRegions.isEmpty()), false)
__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
482 QMessageLogger(__FILE__, 547, __PRETTY_FUNCTION__).warning("%s: paint regions empty!", __PRETTY_FUNCTION__);-
483 return;
never executed: return;
0
484 }-
485-
486 const QRegion region = m_paintRegions.pop();-
487 m_image->preparePaint(region);-
488-
489 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window()->handle());-
490 if (!platformWindow
!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
  • ...
|| !platformWindow->imageNeedsRgbSwap()
!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
491 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
492-
493-
494-
495 const QVector<QRect> rects = region.rects();-
496 if (rects.isEmpty()
rects.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
497 return;
never executed: return;
0
498 QPainter p(m_image->image());-
499 for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end()
it != rects.end()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
500 const QRect rect = *it;-
501 p.drawImage(rect.topLeft(), m_rgbImage.copy(rect).rgbSwapped());-
502 }
never executed: end of block
0
503}
never executed: end of block
0
504-
505-
506QImage QXcbBackingStore::toImage() const-
507{-
508 return
never executed: return m_image && m_image->image() ? *m_image->image() : QImage();
m_image && m_image->image() ? *m_image->image() : QImage();
never executed: return m_image && m_image->image() ? *m_image->image() : QImage();
0
509}-
510-
511-
512QPlatformGraphicsBuffer *QXcbBackingStore::graphicsBuffer() const-
513{-
514 return
executed 37 times by 2 tests: return m_image ? m_image->graphicsBuffer() : nullptr;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
m_image ? m_image->graphicsBuffer() : nullptr;
executed 37 times by 2 tests: return m_image ? m_image->graphicsBuffer() : nullptr;
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
37
515}-
516-
517void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)-
518{-
519 if (!m_image
!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()
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
520 return;
never executed: return;
0
521-
522 QSize imageSize = m_image->size();-
523-
524 QRegion clipped = region;-
525 clipped &= QRect(QPoint(), QHighDpi::toNativePixels(window->size(), window));-
526 clipped &= QRect(0, 0, imageSize.width(), imageSize.height()).translated(-offset);-
527-
528 QRect bounds = clipped.boundingRect();-
529-
530 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
531 return;
executed 6 times by 4 tests: return;
Executed by:
  • tst_QFiledialog
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QWidget
6
532-
533 (void)connection();;-
534-
535 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle());-
536 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
537 QMessageLogger(__FILE__, 602, __PRETTY_FUNCTION__).warning("QXcbBackingStore::flush: QWindow has no platform window (QTBUG-32681)");-
538 return;
never executed: return;
0
539 }-
540-
541 m_image->put(platformWindow->xcb_window(), clipped, offset);-
542-
543 (void)connection();;-
544-
545 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
546 platformWindow->updateSyncRequestCounter();
never executed: platformWindow->updateSyncRequestCounter();
0
547 else-
548 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
549}-
550-
551-
552void QXcbBackingStore::composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,-
553 QPlatformTextureList *textures, QOpenGLContext *context,-
554 bool translucentBackground)-
555{-
556 QPlatformBackingStore::composeAndFlush(window, region, offset, textures, context, translucentBackground);-
557-
558 (void)connection();;-
559-
560 QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle());-
561 if (platformWindow->needsSync()
platformWindow->needsSync()Description
TRUEnever evaluated
FALSEevaluated 37 times by 2 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
) {
0-37
562 platformWindow->updateSyncRequestCounter();-
563 }
never executed: end of block
else {
0
564 xcb_flush(xcb_connection());-
565 }
executed 37 times by 2 tests: end of block
Executed by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
37
566}-
567-
568-
569void QXcbBackingStore::resize(const QSize &size, const QRegion &)-
570{-
571 if (m_image
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()
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
572 return;
never executed: return;
0
573 (void)connection();;-
574-
575 QXcbScreen *screen = static_cast<QXcbScreen *>(window()->screen()->handle());-
576 QPlatformWindow *pw = window()->handle();-
577 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
578 window()->create();-
579 pw = window()->handle();-
580 }
never executed: end of block
0
581 QXcbWindow* win = static_cast<QXcbWindow *>(pw);-
582-
583 delete m_image;-
584 m_image = new QXcbShmImage(screen, size, win->depth(), win->imageFormat());-
585-
586-
587 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
588 m_rgbImage = QImage(size, win->imageFormat());-
589 }
never executed: end of block
0
590 (void)connection();;-
591}
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
592-
593bool QXcbBackingStore::scroll(const QRegion &area, int dx, int dy)-
594{-
595 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
596 return
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
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
597-
598 return
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
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
599}-
600-
601-
Switch to Source codePreprocessed file

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