qxcbscreen.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t *screen, int number)-
9 : QXcbObject(connection)-
10 , m_screen(screen)-
11 , m_number(number)-
12 , m_xSettings(nullptr)-
13{-
14 QByteArray cmAtomName("_NET_WM_CM_S");-
15 cmAtomName += QByteArray::number(m_number);-
16 m_net_wm_cm_atom = connection->internAtom(cmAtomName.constData());-
17 m_compositingActive = connection->getSelectionOwner(m_net_wm_cm_atom);-
18-
19 m_workArea = getWorkArea();-
20}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
21-
22QXcbVirtualDesktop::~QXcbVirtualDesktop()-
23{-
24 delete m_xSettings;-
25}
executed 341 times by 220 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
341
26-
27QXcbScreen *QXcbVirtualDesktop::screenAt(const QPoint &pos) const-
28{-
29 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(connection()->screens())>::type> _container_((connection()->screens())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QXcbScreen *screen = *_container_.i; _container_.control; _container_.control = 0) {-
30 if (screen->virtualDesktop() == this
screen->virtua...ktop() == thisDescription
TRUEnever evaluated
FALSEnever evaluated
&& screen->geometry().contains(pos)
screen->geomet....contains(pos)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
31 return
never executed: return screen;
screen;
never executed: return screen;
0
32 }
never executed: end of block
0
33 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
34}-
35-
36void QXcbVirtualDesktop::addScreen(QPlatformScreen *s)-
37{-
38 ((QXcbScreen *) s)->isPrimary() ? m_screens.prepend(s) : m_screens.append(s);-
39}
never executed: end of block
0
40-
41void QXcbVirtualDesktop::setPrimaryScreen(QPlatformScreen *s)-
42{-
43 const int idx = m_screens.indexOf(s);-
44 ((!(idx > -1)) ? qt_assert("idx > -1",__FILE__,87) : qt_noop());-
45 m_screens.swap(0, idx);-
46}
never executed: end of block
0
47-
48QXcbXSettings *QXcbVirtualDesktop::xSettings() const-
49{-
50 if (!m_xSettings
!m_xSettingsDescription
TRUEevaluated 19 times by 19 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
FALSEevaluated 57 times by 38 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • ...
) {
19-57
51 QXcbVirtualDesktop *self = const_cast<QXcbVirtualDesktop *>(this);-
52 self->m_xSettings = new QXcbXSettings(self);-
53 }
executed 19 times by 19 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
19
54 return
executed 76 times by 38 tests: return m_xSettings;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • ...
m_xSettings;
executed 76 times by 38 tests: return m_xSettings;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • ...
76
55}-
56-
57bool QXcbVirtualDesktop::compositingActive() const-
58{-
59 if (connection()->hasXFixes()
connection()->hasXFixes()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
60 return
never executed: return m_compositingActive;
m_compositingActive;
never executed: return m_compositingActive;
0
61 else-
62 return
never executed: return connection()->getSelectionOwner(m_net_wm_cm_atom);
connection()->getSelectionOwner(m_net_wm_cm_atom);
never executed: return connection()->getSelectionOwner(m_net_wm_cm_atom);
0
63}-
64-
65void QXcbVirtualDesktop::handleXFixesSelectionNotify(xcb_xfixes_selection_notify_event_t *notify_event)-
66{-
67 if (notify_event->selection == m_net_wm_cm_atom
notify_event->...net_wm_cm_atomDescription
TRUEnever evaluated
FALSEevaluated 67 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QClipboard
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QTextEdit
)
0-67
68 m_compositingActive = notify_event->owner;
never executed: m_compositingActive = notify_event->owner;
0
69}
executed 67 times by 6 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QClipboard
  • tst_QGraphicsProxyWidget
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QTextEdit
67
70-
71void QXcbVirtualDesktop::subscribeToXFixesSelectionNotify()-
72{-
73 if (connection()->hasXFixes()
connection()->hasXFixes()Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
74 const uint32_t mask = XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER |-
75 XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY |-
76 XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE;-
77 xcb_xfixes_select_selection_input_checked(xcb_connection(), connection()->getQtSelectionOwner(), m_net_wm_cm_atom, mask);-
78 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
79}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
80-
81QRect QXcbVirtualDesktop::getWorkArea() const-
82{-
83 QRect r;-
84 xcb_get_property_reply_t * workArea =-
85 xcb_get_property_reply(xcb_connection(),-
86 xcb_get_property_unchecked(xcb_connection(), false, screen()->root,-
87 atom(QXcbAtom::_NET_WORKAREA),-
88 XCB_ATOM_CARDINAL, 0, 1024), __null);-
89 if (workArea
workAreaDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& workArea->type == XCB_ATOM_CARDINAL
workArea->type..._ATOM_CARDINALDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& workArea->format == 32
workArea->format == 32Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& workArea->value_len >= 4
workArea->value_len >= 4Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
90-
91-
92-
93-
94-
95-
96 uint32_t *geom = (uint32_t*)xcb_get_property_value(workArea);-
97 r = QRect(geom[0], geom[1], geom[2], geom[3]);-
98 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else {
129
99 r = QRect(QPoint(), size());-
100 }
never executed: end of block
0
101 free(workArea);-
102 return
executed 129 times by 5 tests: return r;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
r;
executed 129 times by 5 tests: return r;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
103}-
104-
105void QXcbVirtualDesktop::updateWorkArea()-
106{-
107 QRect workArea = getWorkArea();-
108 if (m_workArea != workArea
m_workArea != workAreaDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
109 m_workArea = workArea;-
110 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(m_screens)>::type> _container_((m_screens)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QPlatformScreen *screen = *_container_.i; _container_.control; _container_.control = 0)-
111 ((
never executed: ((QXcbScreen *)screen)->updateAvailableGeometry();
QXcbScreen *)screen)->updateAvailableGeometry();
never executed: ((QXcbScreen *)screen)->updateAvailableGeometry();
0
112 }
never executed: end of block
0
113}
never executed: end of block
0
114-
115static inline QSizeF sizeInMillimeters(const QSize &size, const QDpi &dpi)-
116{-
117 return
executed 129 times by 5 tests: return QSizeF(Q_MM_PER_INCH * size.width() / dpi.first, Q_MM_PER_INCH * size.height() / dpi.second);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
QSizeF(Q_MM_PER_INCH * size.width() / dpi.first,
executed 129 times by 5 tests: return QSizeF(Q_MM_PER_INCH * size.width() / dpi.first, Q_MM_PER_INCH * size.height() / dpi.second);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
118 Q_MM_PER_INCH * size.height() / dpi.second);
executed 129 times by 5 tests: return QSizeF(Q_MM_PER_INCH * size.width() / dpi.first, Q_MM_PER_INCH * size.height() / dpi.second);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
119}-
120-
121QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop,-
122 xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output,-
123 const xcb_xinerama_screen_info_t *xineramaScreenInfo, int xineramaScreenIdx)-
124 : QXcbObject(connection)-
125 , m_virtualDesktop(virtualDesktop)-
126 , m_output(outputId)-
127 , m_crtc(output ? output->crtc : 0L)-
128 , m_mode(0L)-
129 , m_primary(false)-
130 , m_rotation(XCB_RANDR_ROTATION_ROTATE_0)-
131 , m_outputName(getOutputName(output))-
132 , m_outputSizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize())-
133 , m_virtualSize(virtualDesktop->size())-
134 , m_virtualSizeMillimeters(virtualDesktop->physicalSize())-
135 , m_orientation(Qt::PrimaryOrientation)-
136 , m_refreshRate(60)-
137 , m_forcedDpi(-1)-
138 , m_pixelDensity(1)-
139 , m_hintStyle(QFontEngine::HintStyle(-1))-
140 , m_noFontHinting(false)-
141 , m_subpixelType(QFontEngine::SubpixelAntialiasingType(-1))-
142 , m_antialiasingEnabled(-1)-
143{-
144 if (connection->hasXRandr()
connection->hasXRandr()Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
145 xcb_randr_select_input(xcb_connection(), screen()->root, true);-
146 xcb_randr_get_crtc_info_cookie_t crtcCookie =-
147 xcb_randr_get_crtc_info_unchecked(xcb_connection(), m_crtc, output ? output->timestamp : 0);-
148 xcb_randr_get_crtc_info_reply_t *crtc =-
149 xcb_randr_get_crtc_info_reply(xcb_connection(), crtcCookie, __null);-
150 if (crtc
crtcDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
151 updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation);-
152 updateRefreshRate(crtc->mode);-
153 free(crtc);-
154 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
155 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (xineramaScreenInfo
xineramaScreenInfoDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-129
156 m_geometry = QRect(xineramaScreenInfo->x_org, xineramaScreenInfo->y_org,-
157 xineramaScreenInfo->width, xineramaScreenInfo->height);-
158 m_availableGeometry = m_geometry & m_virtualDesktop->workArea();-
159 m_sizeMillimeters = sizeInMillimeters(m_geometry.size(), virtualDpi());-
160 if (xineramaScreenIdx > -1
xineramaScreenIdx > -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
161 m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx);
never executed: m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx);
0
162 }
never executed: end of block
0
163-
164 if (m_geometry.isEmpty()
m_geometry.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
165 m_geometry = QRect(QPoint(), m_virtualSize);
never executed: m_geometry = QRect(QPoint(), m_virtualSize);
0
166-
167 if (m_availableGeometry.isEmpty()
m_availableGeometry.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
168 m_availableGeometry = m_geometry & m_virtualDesktop->workArea();
never executed: m_availableGeometry = m_geometry & m_virtualDesktop->workArea();
0
169-
170 if (m_sizeMillimeters.isEmpty()
m_sizeMillimeters.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
171 m_sizeMillimeters = m_virtualSizeMillimeters;
never executed: m_sizeMillimeters = m_virtualSizeMillimeters;
0
172-
173 readXResources();-
174-
175 QScopedPointer<xcb_get_window_attributes_reply_t, QScopedPointerPodDeleter> rootAttribs(-
176 xcb_get_window_attributes_reply(xcb_connection(),-
177 xcb_get_window_attributes_unchecked(xcb_connection(), screen()->root), __null));-
178 const quint32 existingEventMask = rootAttribs.isNull()
rootAttribs.isNull()Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
? 0 : rootAttribs->your_event_mask;
0-129
179-
180 const quint32 mask = XCB_CW_EVENT_MASK;-
181 const quint32 values[] = {-
182-
183 XCB_EVENT_MASK_ENTER_WINDOW-
184 | XCB_EVENT_MASK_LEAVE_WINDOW-
185 | XCB_EVENT_MASK_PROPERTY_CHANGE-
186 | XCB_EVENT_MASK_STRUCTURE_NOTIFY-
187 | existingEventMask-
188 };-
189-
190 xcb_change_window_attributes(xcb_connection(), screen()->root, mask, values);-
191-
192 xcb_get_property_reply_t *reply =-
193 xcb_get_property_reply(xcb_connection(),-
194 xcb_get_property_unchecked(xcb_connection(), false, screen()->root,-
195 atom(QXcbAtom::_NET_SUPPORTING_WM_CHECK),-
196 XCB_ATOM_WINDOW, 0, 1024), __null);-
197-
198 if (reply
replyDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& reply->format == 32
reply->format == 32Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& reply->type == XCB_ATOM_WINDOW
reply->type == XCB_ATOM_WINDOWDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
199 xcb_window_t windowManager = *((xcb_window_t *)xcb_get_property_value(reply));-
200-
201 if (windowManager != XCB_WINDOW_NONE
windowManager ...CB_WINDOW_NONEDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
202 xcb_get_property_reply_t *windowManagerReply =-
203 xcb_get_property_reply(xcb_connection(),-
204 xcb_get_property_unchecked(xcb_connection(), false, windowManager,-
205 atom(QXcbAtom::_NET_WM_NAME),-
206 atom(QXcbAtom::UTF8_STRING), 0, 1024), __null);-
207 if (windowManagerReply
windowManagerReplyDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& windowManagerReply->format == 8
windowManagerR...y->format == 8Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& windowManagerReply->type == atom(QXcbAtom::UTF8_STRING)
windowManagerR...::UTF8_STRING)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
208 m_windowManagerName = QString::fromUtf8((const char *)xcb_get_property_value(windowManagerReply), xcb_get_property_value_length(windowManagerReply));-
209 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
210-
211 free(windowManagerReply);-
212 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
213 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
214 free(reply);-
215-
216 const xcb_query_extension_reply_t *sync_reply = xcb_get_extension_data(xcb_connection(), &xcb_sync_id);-
217 if (!sync_reply
!sync_replyDescription
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| !sync_reply->present
!sync_reply->presentDescription
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
218 m_syncRequestSupported = false;
never executed: m_syncRequestSupported = false;
0
219 else-
220 m_syncRequestSupported = true;
executed 129 times by 5 tests: m_syncRequestSupported = true;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
221-
222 xcb_depth_iterator_t depth_iterator =-
223 xcb_screen_allowed_depths_iterator(screen());-
224-
225 while (depth_iterator.rem
depth_iterator.remDescription
TRUEevaluated 903 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
129-903
226 xcb_depth_t *depth = depth_iterator.data;-
227 xcb_visualtype_iterator_t visualtype_iterator =-
228 xcb_depth_visuals_iterator(depth);-
229-
230 while (visualtype_iterator.rem
visualtype_iterator.remDescription
TRUEevaluated 15480 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 903 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
903-15480
231 xcb_visualtype_t *visualtype = visualtype_iterator.data;-
232 m_visuals.insert(visualtype->visual_id, *visualtype);-
233 m_visualDepths.insert(visualtype->visual_id, depth->depth);-
234 xcb_visualtype_next(&visualtype_iterator);-
235 }
executed 15480 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
15480
236-
237 xcb_depth_next(&depth_iterator);-
238 }
executed 903 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
903
239-
240 m_cursor = new QXcbCursor(connection, this);-
241}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
242-
243QXcbScreen::~QXcbScreen()-
244{-
245 delete m_cursor;-
246}
executed 341 times by 220 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
341
247-
248QString QXcbScreen::getOutputName(xcb_randr_get_output_info_reply_t *outputInfo)-
249{-
250 QString name;-
251 if (outputInfo
outputInfoDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
252 name = QString::fromUtf8((const char*)xcb_randr_get_output_info_name(outputInfo),-
253 xcb_randr_get_output_info_name_length(outputInfo));-
254 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else {
129
255 QByteArray displayName = connection()->displayName();-
256 int dotPos = displayName.lastIndexOf('.');-
257 if (dotPos != -1
dotPos != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
258 displayName.truncate(dotPos);
never executed: displayName.truncate(dotPos);
0
259 name = QString::fromLocal8Bit(displayName) + QLatin1Char('.')-
260 + QString::number(m_virtualDesktop->number());-
261 }
never executed: end of block
0
262 return
executed 129 times by 5 tests: return name;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
name;
executed 129 times by 5 tests: return name;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
263}-
264-
265QWindow *QXcbScreen::topLevelAt(const QPoint &p) const-
266{-
267 xcb_window_t root = screen()->root;-
268-
269 int x = p.x();-
270 int y = p.y();-
271-
272 xcb_window_t parent = root;-
273 xcb_window_t child = root;-
274-
275 do {-
276 xcb_translate_coordinates_cookie_t translate_cookie =-
277 xcb_translate_coordinates_unchecked(xcb_connection(), parent, child, x, y);-
278-
279 xcb_translate_coordinates_reply_t *translate_reply =-
280 xcb_translate_coordinates_reply(xcb_connection(), translate_cookie, __null);-
281-
282 if (!translate_reply
!translate_replyDescription
TRUEnever evaluated
FALSEevaluated 583 times by 19 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
) {
0-583
283 return
never executed: return 0;
0;
never executed: return 0;
0
284 }-
285-
286 parent = child;-
287 child = translate_reply->child;-
288 x = translate_reply->dst_x;-
289 y = translate_reply->dst_y;-
290-
291 free(translate_reply);-
292-
293 if (!child
!childDescription
TRUEevaluated 210 times by 17 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
FALSEevaluated 373 times by 19 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
|| child == root
child == rootDescription
TRUEnever evaluated
FALSEevaluated 373 times by 19 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
)
0-373
294 return
executed 210 times by 17 tests: return 0;
Executed by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
0;
executed 210 times by 17 tests: return 0;
Executed by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
210
295-
296 QPlatformWindow *platformWindow = connection()->platformWindowFromId(child);-
297 if (platformWindow
platformWindowDescription
TRUEevaluated 69 times by 6 tests
Evaluated by:
  • tst_Gestures
  • tst_QApplication
  • tst_QGestureRecognizer
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QWidget
  • tst_QWindow
FALSEevaluated 304 times by 19 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
)
69-304
298 return
executed 69 times by 6 tests: return platformWindow->window();
Executed by:
  • tst_Gestures
  • tst_QApplication
  • tst_QGestureRecognizer
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QWidget
  • tst_QWindow
platformWindow->window();
executed 69 times by 6 tests: return platformWindow->window();
Executed by:
  • tst_Gestures
  • tst_QApplication
  • tst_QGestureRecognizer
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QWidget
  • tst_QWindow
69
299 }
executed 304 times by 19 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
while (parent != child
parent != childDescription
TRUEevaluated 304 times by 19 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractScrollArea
  • tst_QApplication
  • tst_QColorDialog
  • tst_QDialog
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGuiApplication
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QScroller
  • tst_QWidget
  • tst_QWindow
  • tst_languageChange
  • tst_qmouseevent_modal
FALSEnever evaluated
);
0-304
300-
301 return
never executed: return 0;
0;
never executed: return 0;
0
302}-
303-
304void QXcbScreen::windowShown(QXcbWindow *window)-
305{-
306-
307 if (!connection()->startupId().isEmpty()
!connection()-...Id().isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4054 times by 122 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
&& window->window()->isTopLevel()
window->window()->isTopLevel()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-4054
308 sendStartupMessage(([]() -> QByteArray { enum { Size = sizeof("remove: ID=") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "remove: ID=" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()) + connection()->startupId());
0
309 connection()->clearStartupId();-
310 }
never executed: end of block
0
311}
executed 4054 times by 122 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
  • ...
4054
312-
313void QXcbScreen::sendStartupMessage(const QByteArray &message) const-
314{-
315 xcb_window_t rootWindow = root();-
316-
317 xcb_client_message_event_t ev;-
318 ev.response_type = 33;-
319 ev.format = 8;-
320 ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO_BEGIN);-
321 ev.sequence = 0;-
322 ev.window = rootWindow;-
323 int sent = 0;-
324 int length = message.length() + 1;-
325 const char *data = message.constData();-
326 do {-
327 if (sent == 20
sent == 20Description
TRUEnever evaluated
FALSEnever evaluated
)
0
328 ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO);
never executed: ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO);
0
329-
330 const int start = sent;-
331 const int numBytes = qMin(length - start, 20);-
332 memcpy(ev.data.data8, data + start, numBytes);-
333 xcb_send_event(connection()->xcb_connection(), false, rootWindow, XCB_EVENT_MASK_PROPERTY_CHANGE, (const char *) &ev);-
334-
335 sent += numBytes;-
336 }
never executed: end of block
while (sent < length
sent < lengthDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
337}
never executed: end of block
0
338-
339const xcb_visualtype_t *QXcbScreen::visualForId(xcb_visualid_t visualid) const-
340{-
341 QMap<xcb_visualid_t, xcb_visualtype_t>::const_iterator it = m_visuals.find(visualid);-
342 if (it == m_visuals.constEnd()
it == m_visuals.constEnd()Description
TRUEnever evaluated
FALSEevaluated 423 times by 124 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
)
0-423
343 return
never executed: return 0;
0;
never executed: return 0;
0
344 return
executed 423 times by 124 tests: return &*it;
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
  • ...
&*it;
executed 423 times by 124 tests: return &*it;
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
  • ...
423
345}-
346-
347quint8 QXcbScreen::depthOfVisual(xcb_visualid_t visualid) const-
348{-
349 QMap<xcb_visualid_t, quint8>::const_iterator it = m_visualDepths.find(visualid);-
350 if (it == m_visualDepths.constEnd()
it == m_visual...ths.constEnd()Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSystemTrayIcon
)
0-3
351 return
never executed: return 0;
0;
never executed: return 0;
0
352 return
executed 3 times by 1 test: return *it;
Executed by:
  • tst_QSystemTrayIcon
*it;
executed 3 times by 1 test: return *it;
Executed by:
  • tst_QSystemTrayIcon
3
353}-
354-
355QImage::Format QXcbScreen::format() const-
356{-
357 return
executed 72855 times by 105 tests: return QImage::Format_RGB32;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
QImage::Format_RGB32;
executed 72855 times by 105 tests: return QImage::Format_RGB32;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
72855
358}-
359-
360QDpi QXcbScreen::virtualDpi() const-
361{-
362 return
executed 129 times by 5 tests: return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(), Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(),
executed 129 times by 5 tests: return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(), Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
363 Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
executed 129 times by 5 tests: return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(), Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
364}-
365-
366-
367QDpi QXcbScreen::logicalDpi() const-
368{-
369 static const int overrideDpi = qEnvironmentVariableIntValue("QT_FONT_DPI");-
370 if (overrideDpi
overrideDpiDescription
TRUEnever evaluated
FALSEevaluated 404 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QMainWindow
  • tst_QMenu
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-404
371 return
never executed: return QDpi(overrideDpi, overrideDpi);
QDpi(overrideDpi, overrideDpi);
never executed: return QDpi(overrideDpi, overrideDpi);
0
372-
373 if (m_forcedDpi > 0
m_forcedDpi > 0Description
TRUEevaluated 404 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QMainWindow
  • tst_QMenu
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-404
374 return
executed 404 times by 8 tests: return QDpi(m_forcedDpi, m_forcedDpi);
Executed by:
  • tst_QApplication
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QMainWindow
  • tst_QMenu
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
QDpi(m_forcedDpi, m_forcedDpi);
executed 404 times by 8 tests: return QDpi(m_forcedDpi, m_forcedDpi);
Executed by:
  • tst_QApplication
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QMainWindow
  • tst_QMenu
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
404
375 }-
376 return
never executed: return virtualDpi();
virtualDpi();
never executed: return virtualDpi();
0
377}-
378-
379qreal QXcbScreen::pixelDensity() const-
380{-
381 return
never executed: return m_pixelDensity;
m_pixelDensity;
never executed: return m_pixelDensity;
0
382}-
383-
384QPlatformCursor *QXcbScreen::cursor() const-
385{-
386 return
executed 24058 times by 119 tests: return m_cursor;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
m_cursor;
executed 24058 times by 119 tests: return m_cursor;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
24058
387}-
388-
389void QXcbScreen::setOutput(xcb_randr_output_t outputId,-
390 xcb_randr_get_output_info_reply_t *outputInfo)-
391{-
392 m_output = outputId;-
393 m_crtc = outputInfo
outputInfoDescription
TRUEnever evaluated
FALSEnever evaluated
? outputInfo->crtc : 0L;
0
394 m_mode = 0L;-
395 m_outputName = getOutputName(outputInfo);-
396-
397}
never executed: end of block
0
398-
399int QXcbScreen::virtualDesktopNumberStatic(const QScreen *screen)-
400{-
401 if (screen
screenDescription
TRUEnever evaluated
FALSEnever evaluated
&& screen->handle()
screen->handle()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
402 return
never executed: return static_cast<const QXcbScreen *>(screen->handle())->screenNumber();
static_cast<const QXcbScreen *>(screen->handle())->screenNumber();
never executed: return static_cast<const QXcbScreen *>(screen->handle())->screenNumber();
0
403-
404 return
never executed: return 0;
0;
never executed: return 0;
0
405}-
406void QXcbScreen::handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event)-
407{-
408-
409-
410-
411 if (change_event->rotation == m_rotation
change_event->... == m_rotationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
412 return;
never executed: return;
0
413-
414 m_rotation = change_event->rotation;-
415 switch (m_rotation) {-
416 case
never executed: case XCB_RANDR_ROTATION_ROTATE_0:
XCB_RANDR_ROTATION_ROTATE_0:
never executed: case XCB_RANDR_ROTATION_ROTATE_0:
0
417 m_orientation = Qt::LandscapeOrientation;-
418 m_virtualSize.setWidth(change_event->width);-
419 m_virtualSize.setHeight(change_event->height);-
420 m_virtualSizeMillimeters.setWidth(change_event->mwidth);-
421 m_virtualSizeMillimeters.setHeight(change_event->mheight);-
422 break;
never executed: break;
0
423 case
never executed: case XCB_RANDR_ROTATION_ROTATE_90:
XCB_RANDR_ROTATION_ROTATE_90:
never executed: case XCB_RANDR_ROTATION_ROTATE_90:
0
424 m_orientation = Qt::PortraitOrientation;-
425 m_virtualSize.setWidth(change_event->height);-
426 m_virtualSize.setHeight(change_event->width);-
427 m_virtualSizeMillimeters.setWidth(change_event->mheight);-
428 m_virtualSizeMillimeters.setHeight(change_event->mwidth);-
429 break;
never executed: break;
0
430 case
never executed: case XCB_RANDR_ROTATION_ROTATE_180:
XCB_RANDR_ROTATION_ROTATE_180:
never executed: case XCB_RANDR_ROTATION_ROTATE_180:
0
431 m_orientation = Qt::InvertedLandscapeOrientation;-
432 m_virtualSize.setWidth(change_event->width);-
433 m_virtualSize.setHeight(change_event->height);-
434 m_virtualSizeMillimeters.setWidth(change_event->mwidth);-
435 m_virtualSizeMillimeters.setHeight(change_event->mheight);-
436 break;
never executed: break;
0
437 case
never executed: case XCB_RANDR_ROTATION_ROTATE_270:
XCB_RANDR_ROTATION_ROTATE_270:
never executed: case XCB_RANDR_ROTATION_ROTATE_270:
0
438 m_orientation = Qt::InvertedPortraitOrientation;-
439 m_virtualSize.setWidth(change_event->height);-
440 m_virtualSize.setHeight(change_event->width);-
441 m_virtualSizeMillimeters.setWidth(change_event->mheight);-
442 m_virtualSizeMillimeters.setHeight(change_event->mwidth);-
443 break;
never executed: break;
0
444-
445-
446 case
never executed: case XCB_RANDR_ROTATION_REFLECT_X:
XCB_RANDR_ROTATION_REFLECT_X:
never executed: case XCB_RANDR_ROTATION_REFLECT_X:
break;
never executed: break;
0
447 case
never executed: case XCB_RANDR_ROTATION_REFLECT_Y:
XCB_RANDR_ROTATION_REFLECT_Y:
never executed: case XCB_RANDR_ROTATION_REFLECT_Y:
break;
never executed: break;
0
448 }-
449-
450 updateGeometry(change_event->timestamp);-
451-
452 QWindowSystemInterface::handleScreenOrientationChange(QPlatformScreen::screen(), m_orientation);-
453-
454 QDpi ldpi = logicalDpi();-
455 QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(), ldpi.first, ldpi.second);-
456}
never executed: end of block
0
457-
458void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp)-
459{-
460 if (!connection()->hasXRandr()
!connection()->hasXRandr()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
461 return;
never executed: return;
0
462-
463 xcb_randr_get_crtc_info_cookie_t crtcCookie =-
464 xcb_randr_get_crtc_info_unchecked(xcb_connection(), m_crtc, timestamp);-
465 xcb_randr_get_crtc_info_reply_t *crtc =-
466 xcb_randr_get_crtc_info_reply(xcb_connection(), crtcCookie, __null);-
467 if (crtc
crtcDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
468 updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation);-
469 free(crtc);-
470 }
never executed: end of block
0
471}
never executed: end of block
0
472-
473void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation)-
474{-
475 QRect xGeometry = geom;-
476 switch (rotation) {-
477 case
executed 129 times by 5 tests: case XCB_RANDR_ROTATION_ROTATE_0:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
XCB_RANDR_ROTATION_ROTATE_0:
executed 129 times by 5 tests: case XCB_RANDR_ROTATION_ROTATE_0:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
478 m_orientation = Qt::LandscapeOrientation;-
479 m_sizeMillimeters = m_outputSizeMillimeters;-
480 break;
executed 129 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
481 case
never executed: case XCB_RANDR_ROTATION_ROTATE_90:
XCB_RANDR_ROTATION_ROTATE_90:
never executed: case XCB_RANDR_ROTATION_ROTATE_90:
0
482 m_orientation = Qt::PortraitOrientation;-
483 m_sizeMillimeters = m_outputSizeMillimeters.transposed();-
484 break;
never executed: break;
0
485 case
never executed: case XCB_RANDR_ROTATION_ROTATE_180:
XCB_RANDR_ROTATION_ROTATE_180:
never executed: case XCB_RANDR_ROTATION_ROTATE_180:
0
486 m_orientation = Qt::InvertedLandscapeOrientation;-
487 m_sizeMillimeters = m_outputSizeMillimeters;-
488 break;
never executed: break;
0
489 case
never executed: case XCB_RANDR_ROTATION_ROTATE_270:
XCB_RANDR_ROTATION_ROTATE_270:
never executed: case XCB_RANDR_ROTATION_ROTATE_270:
0
490 m_orientation = Qt::InvertedPortraitOrientation;-
491 m_sizeMillimeters = m_outputSizeMillimeters.transposed();-
492 break;
never executed: break;
0
493 }-
494-
495-
496-
497-
498 if (m_sizeMillimeters.isEmpty()
m_sizeMillimeters.isEmpty()Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
499 m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi());
executed 129 times by 5 tests: m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi());
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
500-
501 qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4);-
502 m_pixelDensity = qRound(dpi/96);-
503 m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());-
504 m_availableGeometry = xGeometry & m_virtualDesktop->workArea();-
505 QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);-
506}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
507-
508void QXcbScreen::updateAvailableGeometry()-
509{-
510 QRect availableGeometry = m_geometry & m_virtualDesktop->workArea();-
511 if (m_availableGeometry != availableGeometry
m_availableGeo...ilableGeometryDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
512 m_availableGeometry = availableGeometry;-
513 QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);-
514 }
never executed: end of block
0
515}
never executed: end of block
0
516-
517void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode)-
518{-
519 if (!connection()->hasXRandr()
!connection()->hasXRandr()Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
520 return;
never executed: return;
0
521-
522 if (m_mode == mode
m_mode == modeDescription
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
523 return;
never executed: return;
0
524-
525-
526-
527 xcb_randr_get_screen_resources_current_cookie_t resourcesCookie =-
528 xcb_randr_get_screen_resources_current_unchecked(xcb_connection(), screen()->root);-
529 xcb_randr_get_screen_resources_current_reply_t *resources =-
530 xcb_randr_get_screen_resources_current_reply(xcb_connection(), resourcesCookie, __null);-
531 if (resources
resourcesDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
532 xcb_randr_mode_info_iterator_t modesIter =-
533 xcb_randr_get_screen_resources_current_modes_iterator(resources);-
534 for (; modesIter.rem
modesIter.remDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
; xcb_randr_mode_info_next(&modesIter)) {
0-129
535 xcb_randr_mode_info_t *modeInfo = modesIter.data;-
536 if (modeInfo->id == mode
modeInfo->id == modeDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
537 const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal;-
538 m_refreshRate = (
(dotCount != 0)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
dotCount != 0)
(dotCount != 0)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
? modeInfo->dot_clock / dotCount : 0;
0-129
539 m_mode = mode;-
540 break;
executed 129 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
541 }-
542 }
never executed: end of block
0
543-
544 free(resources);-
545 QWindowSystemInterface::handleScreenRefreshRateChange(QPlatformScreen::screen(), m_refreshRate);-
546 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
547}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
548-
549QPixmap QXcbScreen::grabWindow(WId window, int x, int y, int width, int height) const-
550{-
551 if (width == 0
width == 0Description
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
|| height == 0
height == 0Description
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
)
0-22
552 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
553-
554-
555 QXcbScreen *screen = const_cast<QXcbScreen *>(this);-
556 xcb_window_t root = screen->root();-
557-
558 if (window == 0
window == 0Description
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
)
0-22
559 window = root;
never executed: window = root;
0
560-
561 xcb_get_geometry_cookie_t geometry_cookie = xcb_get_geometry_unchecked(xcb_connection(), window);-
562-
563 xcb_get_geometry_reply_t *reply =-
564 xcb_get_geometry_reply(xcb_connection(), geometry_cookie, __null);-
565-
566 if (!reply
!replyDescription
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
) {
0-22
567 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
568 }-
569-
570 if (width < 0
width < 0Description
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
)
0-22
571 width = reply->width - x;
never executed: width = reply->width - x;
0
572 if (height < 0
height < 0Description
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
)
0-22
573 height = reply->height - y;
never executed: height = reply->height - y;
0
574-
575 geometry_cookie = xcb_get_geometry_unchecked(xcb_connection(), root);-
576 xcb_get_geometry_reply_t *root_reply =-
577 xcb_get_geometry_reply(xcb_connection(), geometry_cookie, __null);-
578-
579 if (!root_reply
!root_replyDescription
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
) {
0-22
580 free(reply);-
581 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
582 }-
583-
584 if (reply->depth == root_reply->depth
reply->depth =...t_reply->depthDescription
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
FALSEnever evaluated
) {
0-22
585-
586-
587-
588-
589-
590 xcb_translate_coordinates_cookie_t translate_cookie =-
591 xcb_translate_coordinates_unchecked(xcb_connection(), window, root, x, y);-
592-
593 xcb_translate_coordinates_reply_t *translate_reply =-
594 xcb_translate_coordinates_reply(xcb_connection(), translate_cookie, __null);-
595-
596 if (!translate_reply
!translate_replyDescription
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
) {
0-22
597 free(reply);-
598 free(root_reply);-
599 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
600 }-
601-
602 x = translate_reply->dst_x;-
603 y = translate_reply->dst_y;-
604-
605 window = root;-
606-
607 free(translate_reply);-
608 free(reply);-
609 reply = root_reply;-
610 }
executed 22 times by 3 tests: end of block
Executed by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
else {
22
611 free(root_reply);-
612 root_reply = 0;-
613 }
never executed: end of block
0
614-
615 xcb_get_window_attributes_reply_t *attributes_reply =-
616 xcb_get_window_attributes_reply(xcb_connection(), xcb_get_window_attributes_unchecked(xcb_connection(), window), __null);-
617-
618 if (!attributes_reply
!attributes_replyDescription
TRUEnever evaluated
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
) {
0-22
619 free(reply);-
620 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
621 }-
622-
623 const xcb_visualtype_t *visual = screen->visualForId(attributes_reply->visual);-
624 free(attributes_reply);-
625-
626 xcb_pixmap_t pixmap = xcb_generate_id(xcb_connection());-
627 xcb_create_pixmap(xcb_connection(), reply->depth, pixmap, window, width, height);-
628-
629 uint32_t gc_value_mask = XCB_GC_SUBWINDOW_MODE;-
630 uint32_t gc_value_list[] = { XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS };-
631-
632 xcb_gcontext_t gc = xcb_generate_id(xcb_connection());-
633 xcb_create_gc(xcb_connection(), gc, pixmap, gc_value_mask, gc_value_list);-
634-
635 xcb_copy_area(xcb_connection(), window, pixmap, gc, x, y, 0, 0, width, height);-
636-
637 QPixmap result = qt_xcb_pixmapFromXPixmap(connection(), pixmap, width, height, reply->depth, visual);-
638-
639 free(reply);-
640 xcb_free_gc(xcb_connection(), gc);-
641 xcb_free_pixmap(xcb_connection(), pixmap);-
642-
643 return
executed 22 times by 3 tests: return result;
Executed by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
result;
executed 22 times by 3 tests: return result;
Executed by:
  • tst_QOpenGLWidget
  • tst_QToolTip
  • tst_QWidget
22
644}-
645-
646static bool parseXftInt(const QByteArray& stringValue, int *value)-
647{-
648 ((!(value != 0)) ? qt_assert("value != 0",__FILE__,714) : qt_noop());-
649 bool ok;-
650 *value = stringValue.toInt(&ok);-
651 return
executed 258 times by 5 tests: return ok;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
ok;
executed 258 times by 5 tests: return ok;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
258
652}-
653-
654static QFontEngine::HintStyle parseXftHintStyle(const QByteArray& stringValue)-
655{-
656 if (stringValue == "hintfull"
stringValue == "hintfull"Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
657 return
never executed: return QFontEngine::HintFull;
QFontEngine::HintFull;
never executed: return QFontEngine::HintFull;
0
658 else if (stringValue == "hintnone"
stringValue == "hintnone"Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-129
659 return
never executed: return QFontEngine::HintNone;
QFontEngine::HintNone;
never executed: return QFontEngine::HintNone;
0
660 else if (stringValue == "hintmedium"
stringValue == "hintmedium"Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
661 return
executed 129 times by 5 tests: return QFontEngine::HintMedium;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
QFontEngine::HintMedium;
executed 129 times by 5 tests: return QFontEngine::HintMedium;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
662 else if (stringValue == "hintslight"
stringValue == "hintslight"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
663 return
never executed: return QFontEngine::HintLight;
QFontEngine::HintLight;
never executed: return QFontEngine::HintLight;
0
664-
665 return
never executed: return QFontEngine::HintStyle(-1);
QFontEngine::HintStyle(-1);
never executed: return QFontEngine::HintStyle(-1);
0
666}-
667-
668static QFontEngine::SubpixelAntialiasingType parseXftRgba(const QByteArray& stringValue)-
669{-
670 if (stringValue == "none"
stringValue == "none"Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
671 return
executed 129 times by 5 tests: return QFontEngine::Subpixel_None;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
QFontEngine::Subpixel_None;
executed 129 times by 5 tests: return QFontEngine::Subpixel_None;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
672 else if (stringValue == "rgb"
stringValue == "rgb"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
673 return
never executed: return QFontEngine::Subpixel_RGB;
QFontEngine::Subpixel_RGB;
never executed: return QFontEngine::Subpixel_RGB;
0
674 else if (stringValue == "bgr"
stringValue == "bgr"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
675 return
never executed: return QFontEngine::Subpixel_BGR;
QFontEngine::Subpixel_BGR;
never executed: return QFontEngine::Subpixel_BGR;
0
676 else if (stringValue == "vrgb"
stringValue == "vrgb"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
677 return
never executed: return QFontEngine::Subpixel_VRGB;
QFontEngine::Subpixel_VRGB;
never executed: return QFontEngine::Subpixel_VRGB;
0
678 else if (stringValue == "vbgr"
stringValue == "vbgr"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
679 return
never executed: return QFontEngine::Subpixel_VBGR;
QFontEngine::Subpixel_VBGR;
never executed: return QFontEngine::Subpixel_VBGR;
0
680-
681 return
never executed: return QFontEngine::SubpixelAntialiasingType(-1);
QFontEngine::SubpixelAntialiasingType(-1);
never executed: return QFontEngine::SubpixelAntialiasingType(-1);
0
682}-
683-
684bool QXcbScreen::xResource(const QByteArray &identifier,-
685 const QByteArray &expectedIdentifier,-
686 QByteArray& stringValue)-
687{-
688 if (identifier.startsWith(expectedIdentifier)
identifier.sta...tedIdentifier)Description
TRUEevaluated 516 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 2322 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
516-2322
689 stringValue = identifier.mid(expectedIdentifier.size());-
690 return
executed 516 times by 5 tests: return true;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
true;
executed 516 times by 5 tests: return true;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
516
691 }-
692 return
executed 2322 times by 5 tests: return false;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
false;
executed 2322 times by 5 tests: return false;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
2322
693}-
694-
695void QXcbScreen::readXResources()-
696{-
697 int offset = 0;-
698 QByteArray resources;-
699 while(1) {-
700 xcb_get_property_reply_t *reply =-
701 xcb_get_property_reply(xcb_connection(),-
702 xcb_get_property_unchecked(xcb_connection(), false, screen()->root,-
703 XCB_ATOM_RESOURCE_MANAGER,-
704 XCB_ATOM_STRING, offset/4, 8192), __null);-
705 bool more = false;-
706 if (reply
replyDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& reply->format == 8
reply->format == 8Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& reply->type == XCB_ATOM_STRING
reply->type == XCB_ATOM_STRINGDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-129
707 resources += QByteArray((const char *)xcb_get_property_value(reply), xcb_get_property_value_length(reply));-
708 offset += xcb_get_property_value_length(reply);-
709 more = reply->bytes_after != 0;-
710 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
711-
712 if (reply
replyDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
713 free(reply);
executed 129 times by 5 tests: free(reply);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
714-
715 if (!more
!moreDescription
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
716 break;
executed 129 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
717 }
never executed: end of block
0
718-
719 QList<QByteArray> split = resources.split('\n');-
720 for (int i = 0; i < split.size()
i < split.size()Description
TRUEevaluated 903 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; ++i) {
129-903
721 const QByteArray &r = split.at(i);-
722 int value;-
723 QByteArray stringValue;-
724 if (xResource(r, "Xft.dpi:\t", stringValue)
xResource(r, "..., stringValue)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 774 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
129-774
725 if (parseXftInt(stringValue, &value)
parseXftInt(st...Value, &value)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
726 m_forcedDpi = value;
executed 129 times by 5 tests: m_forcedDpi = value;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
727 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (xResource(r, "Xft.hintstyle:\t", stringValue)
xResource(r, "..., stringValue)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 645 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
129-645
728 m_hintStyle = parseXftHintStyle(stringValue);-
729 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (xResource(r, "Xft.antialias:\t", stringValue)
xResource(r, "..., stringValue)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 516 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
129-516
730 if (parseXftInt(stringValue, &value)
parseXftInt(st...Value, &value)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
731 m_antialiasingEnabled = value;
executed 129 times by 5 tests: m_antialiasingEnabled = value;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
732 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (xResource(r, "Xft.rgba:\t", stringValue)
xResource(r, "..., stringValue)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 387 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
129-387
733 m_subpixelType = parseXftRgba(stringValue);-
734 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
735 }
executed 903 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
903
736}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
737-
738QXcbXSettings *QXcbScreen::xSettings() const-
739{-
740 return
executed 76 times by 38 tests: return m_virtualDesktop->xSettings();
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • ...
m_virtualDesktop->xSettings();
executed 76 times by 38 tests: return m_virtualDesktop->xSettings();
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTextBrowser
  • tst_QWidget
  • tst_qaccessibility - unknown status
  • tst_qcompleter - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qgraphicsitem - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • ...
76
741}-
742-
743static inline void formatRect(QDebug &debug, const QRect r)-
744{-
745 debug << r.width() << 'x' << r.height()-
746 << forcesign << r.x() << r.y() << noforcesign;-
747}
never executed: end of block
0
748-
749static inline void formatSizeF(QDebug &debug, const QSizeF s)-
750{-
751 debug << s.width() << 'x' << s.height() << "mm";-
752}
never executed: end of block
0
753-
754QDebug operator<<(QDebug debug, const QXcbScreen *screen)-
755{-
756 const QDebugStateSaver saver(debug);-
757 debug.nospace();-
758 debug << "QXcbScreen(" << (const void *)screen;-
759 if (screen
screenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
760 debug << fixed << qSetRealNumberPrecision(1);-
761 debug << ", name=" << screen->name();-
762 debug << ", geometry=";-
763 formatRect(debug, screen->geometry());-
764 debug << ", availableGeometry=";-
765 formatRect(debug, screen->availableGeometry());-
766 debug << ", devicePixelRatio=" << screen->devicePixelRatio();-
767 debug << ", logicalDpi=" << screen->logicalDpi();-
768 debug << ", physicalSize=";-
769 formatSizeF(debug, screen->physicalSize());-
770-
771 debug << ", screenNumber=" << screen->screenNumber();-
772 debug << ", virtualSize=" << screen->virtualSize().width() << 'x' << screen->virtualSize().height() << " (";-
773 formatSizeF(debug, screen->virtualSize());-
774 debug << "), orientation=" << screen->orientation();-
775 debug << ", depth=" << screen->depth();-
776 debug << ", refreshRate=" << screen->refreshRate();-
777 debug << ", root=" << hex << screen->root();-
778 debug << ", windowManagerName=" << screen->windowManagerName();-
779 }
never executed: end of block
0
780 debug << ')';-
781 return
never executed: return debug;
debug;
never executed: return debug;
0
782}-
783-
784-
Switch to Source codePreprocessed file

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