Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbnativeinterface.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | - | |||||||||||||
11 | - | |||||||||||||
12 | - | |||||||||||||
13 | - | |||||||||||||
14 | - | |||||||||||||
15 | - | |||||||||||||
16 | - | |||||||||||||
17 | - | |||||||||||||
18 | - | |||||||||||||
19 | - | |||||||||||||
20 | - | |||||||||||||
21 | - | |||||||||||||
22 | static int resourceType(const QByteArray &key) | - | ||||||||||||
23 | { | - | ||||||||||||
24 | static const QByteArray names[] = { | - | ||||||||||||
25 | ([]() -> QByteArray { enum { Size = sizeof("display") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "display" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
26 | ([]() -> QByteArray { enum { Size = sizeof("connection") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "connection" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), ([]() -> QByteArray { enum { Size = sizeof("screen") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "screen" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
27 | ([]() -> QByteArray { enum { Size = sizeof("apptime") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "apptime" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
28 | ([]() -> QByteArray { enum { Size = sizeof("appusertime") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "appusertime" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), ([]() -> QByteArray { enum { Size = sizeof("hintstyle") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "hintstyle" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
29 | ([]() -> QByteArray { enum { Size = sizeof("startupid") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "startupid" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), ([]() -> QByteArray { enum { Size = sizeof("traywindow") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "traywindow" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
30 | ([]() -> QByteArray { enum { Size = sizeof("gettimestamp") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "gettimestamp" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), ([]() -> QByteArray { enum { Size = sizeof("x11screen") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "x11screen" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
31 | ([]() -> QByteArray { enum { Size = sizeof("rootwindow") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "rootwindow" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
32 | ([]() -> QByteArray { enum { Size = sizeof("subpixeltype") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "subpixeltype" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), ([]() -> QByteArray { enum { Size = sizeof("antialiasingenabled") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "antialiasingenabled" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
33 | ([]() -> QByteArray { enum { Size = sizeof("nofonthinting") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "nofonthinting" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
34 | ([]() -> QByteArray { enum { Size = sizeof("atspibus") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "atspibus" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), | - | ||||||||||||
35 | ([]() -> QByteArray { enum { Size = sizeof("compositingenabled") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "compositingenabled" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()) | - | ||||||||||||
36 | }; | - | ||||||||||||
37 | const QByteArray *end = names + sizeof(names) / sizeof(names[0]); | - | ||||||||||||
38 | const QByteArray *result = std::find(names, end, key); | - | ||||||||||||
39 | return executed 186 times by 128 tests: int(result - names);return int(result - names); Executed by:
executed 186 times by 128 tests: return int(result - names); Executed by:
| 186 | ||||||||||||
40 | } | - | ||||||||||||
41 | - | |||||||||||||
42 | QXcbNativeInterface::QXcbNativeInterface() : | - | ||||||||||||
43 | m_genericEventFilterType(([]() -> QByteArray { enum { Size = sizeof("xcb_generic_event_t") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "xcb_generic_event_t" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }())), | - | ||||||||||||
44 | m_sysTraySelectionAtom(XCB_ATOM_NONE) | - | ||||||||||||
45 | { | - | ||||||||||||
46 | } executed 135 times by 5 tests: end of block Executed by:
| 135 | ||||||||||||
47 | - | |||||||||||||
48 | static inline QXcbSystemTrayTracker *systemTrayTracker(const QScreen *s) | - | ||||||||||||
49 | { | - | ||||||||||||
50 | if (!s
| 0-6 | ||||||||||||
51 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
52 | - | |||||||||||||
53 | return executed 6 times by 1 test: static_cast<const QXcbScreen *>(s->handle())->connection()->systemTrayTracker();return static_cast<const QXcbScreen *>(s->handle())->connection()->systemTrayTracker(); Executed by:
executed 6 times by 1 test: return static_cast<const QXcbScreen *>(s->handle())->connection()->systemTrayTracker(); Executed by:
| 6 | ||||||||||||
54 | } | - | ||||||||||||
55 | - | |||||||||||||
56 | bool QXcbNativeInterface::systemTrayAvailable(const QScreen *screen) const | - | ||||||||||||
57 | { | - | ||||||||||||
58 | return never executed: systemTrayTracker(screen);return systemTrayTracker(screen); never executed: return systemTrayTracker(screen); | 0 | ||||||||||||
59 | } | - | ||||||||||||
60 | - | |||||||||||||
61 | bool QXcbNativeInterface::requestSystemTrayWindowDock(const QWindow *window) | - | ||||||||||||
62 | { | - | ||||||||||||
63 | return never executed: QXcbWindow::requestSystemTrayWindowDockStatic(window);return QXcbWindow::requestSystemTrayWindowDockStatic(window); never executed: return QXcbWindow::requestSystemTrayWindowDockStatic(window); | 0 | ||||||||||||
64 | } | - | ||||||||||||
65 | - | |||||||||||||
66 | QRect QXcbNativeInterface::systemTrayWindowGlobalGeometry(const QWindow *window) | - | ||||||||||||
67 | { | - | ||||||||||||
68 | return never executed: QXcbWindow::systemTrayWindowGlobalGeometryStatic(window);return QXcbWindow::systemTrayWindowGlobalGeometryStatic(window); never executed: return QXcbWindow::systemTrayWindowGlobalGeometryStatic(window); | 0 | ||||||||||||
69 | } | - | ||||||||||||
70 | - | |||||||||||||
71 | xcb_window_t QXcbNativeInterface::locateSystemTray(xcb_connection_t *conn, const QXcbScreen *screen) | - | ||||||||||||
72 | { | - | ||||||||||||
73 | if (m_sysTraySelectionAtom == XCB_ATOM_NONE
| 0 | ||||||||||||
74 | const QByteArray net_sys_tray = QString::fromLatin1("_NET_SYSTEM_TRAY_S%1").arg(screen->screenNumber()).toLatin1(); | - | ||||||||||||
75 | xcb_intern_atom_cookie_t intern_c = | - | ||||||||||||
76 | xcb_intern_atom_unchecked(conn, true, net_sys_tray.length(), net_sys_tray); | - | ||||||||||||
77 | - | |||||||||||||
78 | xcb_intern_atom_reply_t *intern_r = xcb_intern_atom_reply(conn, intern_c, 0); | - | ||||||||||||
79 | - | |||||||||||||
80 | if (!intern_r
| 0 | ||||||||||||
81 | return never executed: XCB_WINDOW_NONE;return XCB_WINDOW_NONE; never executed: return XCB_WINDOW_NONE; | 0 | ||||||||||||
82 | - | |||||||||||||
83 | m_sysTraySelectionAtom = intern_r->atom; | - | ||||||||||||
84 | free(intern_r); | - | ||||||||||||
85 | } never executed: end of block | 0 | ||||||||||||
86 | - | |||||||||||||
87 | xcb_get_selection_owner_cookie_t sel_owner_c = xcb_get_selection_owner_unchecked(conn, m_sysTraySelectionAtom); | - | ||||||||||||
88 | xcb_get_selection_owner_reply_t *sel_owner_r = xcb_get_selection_owner_reply(conn, sel_owner_c, 0); | - | ||||||||||||
89 | - | |||||||||||||
90 | if (!sel_owner_r
| 0 | ||||||||||||
91 | return never executed: XCB_WINDOW_NONE;return XCB_WINDOW_NONE; never executed: return XCB_WINDOW_NONE; | 0 | ||||||||||||
92 | - | |||||||||||||
93 | xcb_window_t selection_window = sel_owner_r->owner; | - | ||||||||||||
94 | free(sel_owner_r); | - | ||||||||||||
95 | - | |||||||||||||
96 | return never executed: selection_window;return selection_window; never executed: return selection_window; | 0 | ||||||||||||
97 | } | - | ||||||||||||
98 | - | |||||||||||||
99 | bool QXcbNativeInterface::systrayVisualHasAlphaChannel() | - | ||||||||||||
100 | { | - | ||||||||||||
101 | return never executed: QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel();return QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel(); never executed: return QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel(); | 0 | ||||||||||||
102 | } | - | ||||||||||||
103 | - | |||||||||||||
104 | void QXcbNativeInterface::setParentRelativeBackPixmap(QWindow *window) | - | ||||||||||||
105 | { | - | ||||||||||||
106 | QXcbWindow::setParentRelativeBackPixmapStatic(window); | - | ||||||||||||
107 | } never executed: end of block | 0 | ||||||||||||
108 | - | |||||||||||||
109 | void *QXcbNativeInterface::nativeResourceForIntegration(const QByteArray &resourceString) | - | ||||||||||||
110 | { | - | ||||||||||||
111 | QByteArray lowerCaseResource = resourceString.toLower(); | - | ||||||||||||
112 | void *result = handlerNativeResourceForIntegration(lowerCaseResource); | - | ||||||||||||
113 | if (result
| 0-180 | ||||||||||||
114 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
115 | - | |||||||||||||
116 | switch (resourceType(lowerCaseResource)) { | - | ||||||||||||
117 | case never executed: StartupId:case StartupId: never executed: case StartupId: | 0 | ||||||||||||
118 | result = startupId(); | - | ||||||||||||
119 | break; never executed: break; | 0 | ||||||||||||
120 | case never executed: X11Screen:case X11Screen: never executed: case X11Screen: | 0 | ||||||||||||
121 | result = x11Screen(); | - | ||||||||||||
122 | break; never executed: break; | 0 | ||||||||||||
123 | case never executed: RootWindow:case RootWindow: never executed: case RootWindow: | 0 | ||||||||||||
124 | result = rootWindow(); | - | ||||||||||||
125 | break; never executed: break; | 0 | ||||||||||||
126 | case never executed: Display:case Display: never executed: case Display: | 0 | ||||||||||||
127 | result = display(); | - | ||||||||||||
128 | break; never executed: break; | 0 | ||||||||||||
129 | case executed 180 times by 128 tests: AtspiBus:case AtspiBus: Executed by:
executed 180 times by 128 tests: case AtspiBus: Executed by:
| 180 | ||||||||||||
130 | result = atspiBus(); | - | ||||||||||||
131 | break; executed 180 times by 128 tests: break; Executed by:
| 180 | ||||||||||||
132 | case never executed: Connection:case Connection: never executed: case Connection: | 0 | ||||||||||||
133 | result = connection(); | - | ||||||||||||
134 | break; never executed: break; | 0 | ||||||||||||
135 | default never executed: :default: never executed: default: | 0 | ||||||||||||
136 | break; never executed: break; | 0 | ||||||||||||
137 | } | - | ||||||||||||
138 | - | |||||||||||||
139 | return executed 180 times by 128 tests: result;return result; Executed by:
executed 180 times by 128 tests: return result; Executed by:
| 180 | ||||||||||||
140 | } | - | ||||||||||||
141 | - | |||||||||||||
142 | void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context) | - | ||||||||||||
143 | { | - | ||||||||||||
144 | QByteArray lowerCaseResource = resourceString.toLower(); | - | ||||||||||||
145 | void *result = handlerNativeResourceForContext(lowerCaseResource, context); | - | ||||||||||||
146 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
147 | } | - | ||||||||||||
148 | - | |||||||||||||
149 | void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resourceString, QScreen *screen) | - | ||||||||||||
150 | { | - | ||||||||||||
151 | if (!screen
| 0-6 | ||||||||||||
152 | QMessageLogger(__FILE__, 207, __PRETTY_FUNCTION__).warning("nativeResourceForScreen: null screen"); | - | ||||||||||||
153 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
154 | } | - | ||||||||||||
155 | - | |||||||||||||
156 | QByteArray lowerCaseResource = resourceString.toLower(); | - | ||||||||||||
157 | void *result = handlerNativeResourceForScreen(lowerCaseResource, screen); | - | ||||||||||||
158 | if (result
| 0-6 | ||||||||||||
159 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
160 | - | |||||||||||||
161 | const QXcbScreen *xcbScreen = static_cast<QXcbScreen *>(screen->handle()); | - | ||||||||||||
162 | switch (resourceType(lowerCaseResource)) { | - | ||||||||||||
163 | case never executed: Display:case Display: never executed: case Display: | 0 | ||||||||||||
164 | - | |||||||||||||
165 | result = xcbScreen->connection()->xlib_display(); | - | ||||||||||||
166 | - | |||||||||||||
167 | break; never executed: break; | 0 | ||||||||||||
168 | case never executed: AppTime:case AppTime: never executed: case AppTime: | 0 | ||||||||||||
169 | result = appTime(xcbScreen); | - | ||||||||||||
170 | break; never executed: break; | 0 | ||||||||||||
171 | case never executed: AppUserTime:case AppUserTime: never executed: case AppUserTime: | 0 | ||||||||||||
172 | result = appUserTime(xcbScreen); | - | ||||||||||||
173 | break; never executed: break; | 0 | ||||||||||||
174 | case never executed: ScreenHintStyle:case ScreenHintStyle: never executed: case ScreenHintStyle: | 0 | ||||||||||||
175 | result = reinterpret_cast<void *>(xcbScreen->hintStyle() + 1); | - | ||||||||||||
176 | break; never executed: break; | 0 | ||||||||||||
177 | case never executed: ScreenSubpixelType:case ScreenSubpixelType: never executed: case ScreenSubpixelType: | 0 | ||||||||||||
178 | result = reinterpret_cast<void *>(xcbScreen->subpixelType() + 1); | - | ||||||||||||
179 | break; never executed: break; | 0 | ||||||||||||
180 | case never executed: ScreenAntialiasingEnabled:case ScreenAntialiasingEnabled: never executed: case ScreenAntialiasingEnabled: | 0 | ||||||||||||
181 | result = reinterpret_cast<void *>(xcbScreen->antialiasingEnabled() + 1); | - | ||||||||||||
182 | break; never executed: break; | 0 | ||||||||||||
183 | case executed 6 times by 1 test: TrayWindow:case TrayWindow: Executed by:
executed 6 times by 1 test: case TrayWindow: Executed by:
| 6 | ||||||||||||
184 | if (QXcbSystemTrayTracker *s = systemTrayTracker(screen)
| 0-6 | ||||||||||||
185 | result = (void *)quintptr(s->trayWindow()); executed 6 times by 1 test: result = (void *)quintptr(s->trayWindow()); Executed by:
| 6 | ||||||||||||
186 | break; executed 6 times by 1 test: break; Executed by:
| 6 | ||||||||||||
187 | case never executed: GetTimestamp:case GetTimestamp: never executed: case GetTimestamp: | 0 | ||||||||||||
188 | result = getTimestamp(xcbScreen); | - | ||||||||||||
189 | break; never executed: break; | 0 | ||||||||||||
190 | case never executed: NoFontHinting:case NoFontHinting: never executed: case NoFontHinting: | 0 | ||||||||||||
191 | result = xcbScreen->noFontHinting()
| 0 | ||||||||||||
192 | break; never executed: break; | 0 | ||||||||||||
193 | case never executed: RootWindow:case RootWindow: never executed: case RootWindow: | 0 | ||||||||||||
194 | result = reinterpret_cast<void *>(xcbScreen->root()); | - | ||||||||||||
195 | break; never executed: break; | 0 | ||||||||||||
196 | case never executed: CompositingEnabled:case CompositingEnabled: never executed: case CompositingEnabled: | 0 | ||||||||||||
197 | if (QXcbVirtualDesktop *vd = xcbScreen->virtualDesktop()
| 0 | ||||||||||||
198 | result = vd->compositingActive()
never executed: result = vd->compositingActive() ? this : nullptr; | 0 | ||||||||||||
199 | break; never executed: break; | 0 | ||||||||||||
200 | default never executed: :default: never executed: default: | 0 | ||||||||||||
201 | break; never executed: break; | 0 | ||||||||||||
202 | } | - | ||||||||||||
203 | return executed 6 times by 1 test: result;return result; Executed by:
executed 6 times by 1 test: return result; Executed by:
| 6 | ||||||||||||
204 | } | - | ||||||||||||
205 | - | |||||||||||||
206 | void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) | - | ||||||||||||
207 | { | - | ||||||||||||
208 | QByteArray lowerCaseResource = resourceString.toLower(); | - | ||||||||||||
209 | void *result = handlerNativeResourceForWindow(lowerCaseResource, window); | - | ||||||||||||
210 | if (result
| 0 | ||||||||||||
211 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
212 | - | |||||||||||||
213 | switch (resourceType(lowerCaseResource)) { | - | ||||||||||||
214 | case never executed: Display:case Display: never executed: case Display: | 0 | ||||||||||||
215 | result = displayForWindow(window); | - | ||||||||||||
216 | break; never executed: break; | 0 | ||||||||||||
217 | case never executed: Connection:case Connection: never executed: case Connection: | 0 | ||||||||||||
218 | result = connectionForWindow(window); | - | ||||||||||||
219 | break; never executed: break; | 0 | ||||||||||||
220 | case never executed: Screen:case Screen: never executed: case Screen: | 0 | ||||||||||||
221 | result = screenForWindow(window); | - | ||||||||||||
222 | break; never executed: break; | 0 | ||||||||||||
223 | default never executed: :default: never executed: default: | 0 | ||||||||||||
224 | break; never executed: break; | 0 | ||||||||||||
225 | } | - | ||||||||||||
226 | - | |||||||||||||
227 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
228 | } | - | ||||||||||||
229 | - | |||||||||||||
230 | void *QXcbNativeInterface::nativeResourceForBackingStore(const QByteArray &resourceString, QBackingStore *backingStore) | - | ||||||||||||
231 | { | - | ||||||||||||
232 | const QByteArray lowerCaseResource = resourceString.toLower(); | - | ||||||||||||
233 | void *result = handlerNativeResourceForBackingStore(lowerCaseResource,backingStore); | - | ||||||||||||
234 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
235 | } | - | ||||||||||||
236 | - | |||||||||||||
237 | - | |||||||||||||
238 | void *QXcbNativeInterface::nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor) | - | ||||||||||||
239 | { | - | ||||||||||||
240 | if (resource == ([]() -> QByteArray { enum { Size = sizeof("xcbcursor") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "xcbcursor" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }())
| 0 | ||||||||||||
241 | if (const
| 0 | ||||||||||||
242 | if (const
| 0 | ||||||||||||
243 | xcb_cursor_t xcbCursor = static_cast<const QXcbCursor *>(pCursor)->xcbCursor(cursor); | - | ||||||||||||
244 | return never executed: reinterpret_cast<void *>(quintptr(xcbCursor));return reinterpret_cast<void *>(quintptr(xcbCursor)); never executed: return reinterpret_cast<void *>(quintptr(xcbCursor)); | 0 | ||||||||||||
245 | } | - | ||||||||||||
246 | } never executed: end of block | 0 | ||||||||||||
247 | } never executed: end of block | 0 | ||||||||||||
248 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
249 | } | - | ||||||||||||
250 | - | |||||||||||||
251 | - | |||||||||||||
252 | QPlatformNativeInterface::NativeResourceForIntegrationFunction QXcbNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource) | - | ||||||||||||
253 | { | - | ||||||||||||
254 | const QByteArray lowerCaseResource = resource.toLower(); | - | ||||||||||||
255 | QPlatformNativeInterface::NativeResourceForIntegrationFunction func = handlerNativeResourceFunctionForIntegration(lowerCaseResource); | - | ||||||||||||
256 | if (func
| 0 | ||||||||||||
257 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
258 | - | |||||||||||||
259 | if (lowerCaseResource == "setstartupid"
| 0 | ||||||||||||
260 | return never executed: NativeResourceForIntegrationFunction(setStartupId);return NativeResourceForIntegrationFunction(setStartupId); never executed: return NativeResourceForIntegrationFunction(setStartupId); | 0 | ||||||||||||
261 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
262 | } | - | ||||||||||||
263 | - | |||||||||||||
264 | QPlatformNativeInterface::NativeResourceForContextFunction QXcbNativeInterface::nativeResourceFunctionForContext(const QByteArray &resource) | - | ||||||||||||
265 | { | - | ||||||||||||
266 | const QByteArray lowerCaseResource = resource.toLower(); | - | ||||||||||||
267 | QPlatformNativeInterface::NativeResourceForContextFunction func = handlerNativeResourceFunctionForContext(lowerCaseResource); | - | ||||||||||||
268 | if (func
| 0 | ||||||||||||
269 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
270 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
271 | } | - | ||||||||||||
272 | - | |||||||||||||
273 | QPlatformNativeInterface::NativeResourceForScreenFunction QXcbNativeInterface::nativeResourceFunctionForScreen(const QByteArray &resource) | - | ||||||||||||
274 | { | - | ||||||||||||
275 | const QByteArray lowerCaseResource = resource.toLower(); | - | ||||||||||||
276 | NativeResourceForScreenFunction func = handlerNativeResourceFunctionForScreen(lowerCaseResource); | - | ||||||||||||
277 | if (func
| 0 | ||||||||||||
278 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
279 | - | |||||||||||||
280 | if (lowerCaseResource == "setapptime"
| 0 | ||||||||||||
281 | return never executed: NativeResourceForScreenFunction(setAppTime);return NativeResourceForScreenFunction(setAppTime); never executed: return NativeResourceForScreenFunction(setAppTime); | 0 | ||||||||||||
282 | else if (lowerCaseResource == "setappusertime"
| 0 | ||||||||||||
283 | return never executed: NativeResourceForScreenFunction(setAppUserTime);return NativeResourceForScreenFunction(setAppUserTime); never executed: return NativeResourceForScreenFunction(setAppUserTime); | 0 | ||||||||||||
284 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
285 | } | - | ||||||||||||
286 | - | |||||||||||||
287 | QPlatformNativeInterface::NativeResourceForWindowFunction QXcbNativeInterface::nativeResourceFunctionForWindow(const QByteArray &resource) | - | ||||||||||||
288 | { | - | ||||||||||||
289 | const QByteArray lowerCaseResource = resource.toLower(); | - | ||||||||||||
290 | NativeResourceForWindowFunction func = handlerNativeResourceFunctionForWindow(lowerCaseResource); | - | ||||||||||||
291 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
292 | } | - | ||||||||||||
293 | - | |||||||||||||
294 | QPlatformNativeInterface::NativeResourceForBackingStoreFunction QXcbNativeInterface::nativeResourceFunctionForBackingStore(const QByteArray &resource) | - | ||||||||||||
295 | { | - | ||||||||||||
296 | const QByteArray lowerCaseResource = resource.toLower(); | - | ||||||||||||
297 | NativeResourceForBackingStoreFunction func = handlerNativeResourceFunctionForBackingStore(resource); | - | ||||||||||||
298 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
299 | } | - | ||||||||||||
300 | - | |||||||||||||
301 | QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &function) const | - | ||||||||||||
302 | { | - | ||||||||||||
303 | const QByteArray lowerCaseFunction = function.toLower(); | - | ||||||||||||
304 | QFunctionPointer func = handlerPlatformFunction(lowerCaseFunction); | - | ||||||||||||
305 | if (func
| 0-4671 | ||||||||||||
306 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
307 | - | |||||||||||||
308 | - | |||||||||||||
309 | if (function == QXcbWindowFunctions::setWmWindowTypeIdentifier()
| 154-4517 | ||||||||||||
310 | return executed 154 times by 23 tests: QFunctionPointer(QXcbWindowFunctions::SetWmWindowType(QXcbWindow::setWmWindowTypeStatic));return QFunctionPointer(QXcbWindowFunctions::SetWmWindowType(QXcbWindow::setWmWindowTypeStatic)); Executed by:
executed 154 times by 23 tests: return QFunctionPointer(QXcbWindowFunctions::SetWmWindowType(QXcbWindow::setWmWindowTypeStatic)); Executed by:
| 154 | ||||||||||||
311 | - | |||||||||||||
312 | if (function == QXcbWindowFunctions::setWmWindowRoleIdentifier()
| 0-4517 | ||||||||||||
313 | return never executed: QFunctionPointer(QXcbWindowFunctions::SetWmWindowRole(QXcbWindow::setWmWindowRoleStatic));return QFunctionPointer(QXcbWindowFunctions::SetWmWindowRole(QXcbWindow::setWmWindowRoleStatic)); never executed: return QFunctionPointer(QXcbWindowFunctions::SetWmWindowRole(QXcbWindow::setWmWindowRoleStatic)); | 0 | ||||||||||||
314 | - | |||||||||||||
315 | if (function == QXcbWindowFunctions::setWmWindowIconTextIdentifier()
| 10-4507 | ||||||||||||
316 | return executed 4507 times by 117 tests: QFunctionPointer(QXcbWindowFunctions::SetWmWindowIconText(QXcbWindow::setWindowIconTextStatic));return QFunctionPointer(QXcbWindowFunctions::SetWmWindowIconText(QXcbWindow::setWindowIconTextStatic)); Executed by:
executed 4507 times by 117 tests: return QFunctionPointer(QXcbWindowFunctions::SetWmWindowIconText(QXcbWindow::setWindowIconTextStatic)); Executed by:
| 4507 | ||||||||||||
317 | - | |||||||||||||
318 | if (function == QXcbWindowFunctions::setParentRelativeBackPixmapIdentifier()
| 0-10 | ||||||||||||
319 | return never executed: QFunctionPointer(QXcbWindowFunctions::SetParentRelativeBackPixmap(QXcbWindow::setParentRelativeBackPixmapStatic));return QFunctionPointer(QXcbWindowFunctions::SetParentRelativeBackPixmap(QXcbWindow::setParentRelativeBackPixmapStatic)); never executed: return QFunctionPointer(QXcbWindowFunctions::SetParentRelativeBackPixmap(QXcbWindow::setParentRelativeBackPixmapStatic)); | 0 | ||||||||||||
320 | - | |||||||||||||
321 | if (function == QXcbWindowFunctions::requestSystemTrayWindowDockIdentifier()
| 3-7 | ||||||||||||
322 | return executed 3 times by 1 test: QFunctionPointer(QXcbWindowFunctions::RequestSystemTrayWindowDock(QXcbWindow::requestSystemTrayWindowDockStatic));return QFunctionPointer(QXcbWindowFunctions::RequestSystemTrayWindowDock(QXcbWindow::requestSystemTrayWindowDockStatic)); Executed by:
executed 3 times by 1 test: return QFunctionPointer(QXcbWindowFunctions::RequestSystemTrayWindowDock(QXcbWindow::requestSystemTrayWindowDockStatic)); Executed by:
| 3 | ||||||||||||
323 | - | |||||||||||||
324 | if (function == QXcbWindowFunctions::systemTrayWindowGlobalGeometryIdentifier()
| 3-4 | ||||||||||||
325 | return executed 4 times by 1 test: QFunctionPointer(QXcbWindowFunctions::SystemTrayWindowGlobalGeometry(QXcbWindow::systemTrayWindowGlobalGeometryStatic));return QFunctionPointer(QXcbWindowFunctions::SystemTrayWindowGlobalGeometry(QXcbWindow::systemTrayWindowGlobalGeometryStatic)); Executed by:
executed 4 times by 1 test: return QFunctionPointer(QXcbWindowFunctions::SystemTrayWindowGlobalGeometry(QXcbWindow::systemTrayWindowGlobalGeometryStatic)); Executed by:
| 4 | ||||||||||||
326 | - | |||||||||||||
327 | if (function == QXcbIntegrationFunctions::xEmbedSystemTrayVisualHasAlphaChannelIdentifier()
| 0-3 | ||||||||||||
328 | return executed 3 times by 1 test: QFunctionPointer(QXcbIntegrationFunctions::XEmbedSystemTrayVisualHasAlphaChannel(QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel));return QFunctionPointer(QXcbIntegrationFunctions::XEmbedSystemTrayVisualHasAlphaChannel(QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel)); Executed by:
executed 3 times by 1 test: return QFunctionPointer(QXcbIntegrationFunctions::XEmbedSystemTrayVisualHasAlphaChannel(QXcbConnection::xEmbedSystemTrayVisualHasAlphaChannel)); Executed by:
| 3 | ||||||||||||
329 | - | |||||||||||||
330 | if (function == QXcbWindowFunctions::visualIdIdentifier()
| 0 | ||||||||||||
331 | return never executed: QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic));return QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic)); never executed: return QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic)); | 0 | ||||||||||||
332 | } | - | ||||||||||||
333 | - | |||||||||||||
334 | if (function == QXcbScreenFunctions::virtualDesktopNumberIdentifier()
| 0 | ||||||||||||
335 | return never executed: QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(QXcbScreen::virtualDesktopNumberStatic));return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(QXcbScreen::virtualDesktopNumberStatic)); never executed: return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(QXcbScreen::virtualDesktopNumberStatic)); | 0 | ||||||||||||
336 | - | |||||||||||||
337 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
338 | } | - | ||||||||||||
339 | - | |||||||||||||
340 | void *QXcbNativeInterface::appTime(const QXcbScreen *screen) | - | ||||||||||||
341 | { | - | ||||||||||||
342 | if (!screen
| 0 | ||||||||||||
343 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
344 | - | |||||||||||||
345 | return never executed: reinterpret_cast<void *>(quintptr(screen->connection()->time()));return reinterpret_cast<void *>(quintptr(screen->connection()->time())); never executed: return reinterpret_cast<void *>(quintptr(screen->connection()->time())); | 0 | ||||||||||||
346 | } | - | ||||||||||||
347 | - | |||||||||||||
348 | void *QXcbNativeInterface::appUserTime(const QXcbScreen *screen) | - | ||||||||||||
349 | { | - | ||||||||||||
350 | if (!screen
| 0 | ||||||||||||
351 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
352 | - | |||||||||||||
353 | return never executed: reinterpret_cast<void *>(quintptr(screen->connection()->netWmUserTime()));return reinterpret_cast<void *>(quintptr(screen->connection()->netWmUserTime())); never executed: return reinterpret_cast<void *>(quintptr(screen->connection()->netWmUserTime())); | 0 | ||||||||||||
354 | } | - | ||||||||||||
355 | - | |||||||||||||
356 | void *QXcbNativeInterface::getTimestamp(const QXcbScreen *screen) | - | ||||||||||||
357 | { | - | ||||||||||||
358 | if (!screen
| 0 | ||||||||||||
359 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
360 | - | |||||||||||||
361 | return never executed: reinterpret_cast<void *>(quintptr(screen->connection()->getTimestamp()));return reinterpret_cast<void *>(quintptr(screen->connection()->getTimestamp())); never executed: return reinterpret_cast<void *>(quintptr(screen->connection()->getTimestamp())); | 0 | ||||||||||||
362 | } | - | ||||||||||||
363 | - | |||||||||||||
364 | void *QXcbNativeInterface::startupId() | - | ||||||||||||
365 | { | - | ||||||||||||
366 | QXcbIntegration* integration = QXcbIntegration::instance(); | - | ||||||||||||
367 | QXcbConnection *defaultConnection = integration->defaultConnection(); | - | ||||||||||||
368 | if (defaultConnection
| 0 | ||||||||||||
369 | return never executed: reinterpret_cast<void *>(const_cast<char *>(defaultConnection->startupId().constData()));return reinterpret_cast<void *>(const_cast<char *>(defaultConnection->startupId().constData())); never executed: return reinterpret_cast<void *>(const_cast<char *>(defaultConnection->startupId().constData())); | 0 | ||||||||||||
370 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
371 | } | - | ||||||||||||
372 | - | |||||||||||||
373 | void *QXcbNativeInterface::x11Screen() | - | ||||||||||||
374 | { | - | ||||||||||||
375 | QXcbIntegration *integration = QXcbIntegration::instance(); | - | ||||||||||||
376 | QXcbConnection *defaultConnection = integration->defaultConnection(); | - | ||||||||||||
377 | if (defaultConnection
| 0 | ||||||||||||
378 | return never executed: reinterpret_cast<void *>(defaultConnection->primaryScreenNumber());return reinterpret_cast<void *>(defaultConnection->primaryScreenNumber()); never executed: return reinterpret_cast<void *>(defaultConnection->primaryScreenNumber()); | 0 | ||||||||||||
379 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
380 | } | - | ||||||||||||
381 | - | |||||||||||||
382 | void *QXcbNativeInterface::rootWindow() | - | ||||||||||||
383 | { | - | ||||||||||||
384 | QXcbIntegration *integration = QXcbIntegration::instance(); | - | ||||||||||||
385 | QXcbConnection *defaultConnection = integration->defaultConnection(); | - | ||||||||||||
386 | if (defaultConnection
| 0 | ||||||||||||
387 | return never executed: reinterpret_cast<void *>(defaultConnection->rootWindow());return reinterpret_cast<void *>(defaultConnection->rootWindow()); never executed: return reinterpret_cast<void *>(defaultConnection->rootWindow()); | 0 | ||||||||||||
388 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
389 | } | - | ||||||||||||
390 | - | |||||||||||||
391 | void *QXcbNativeInterface::display() | - | ||||||||||||
392 | { | - | ||||||||||||
393 | - | |||||||||||||
394 | QXcbIntegration *integration = QXcbIntegration::instance(); | - | ||||||||||||
395 | QXcbConnection *defaultConnection = integration->defaultConnection(); | - | ||||||||||||
396 | if (defaultConnection
| 0 | ||||||||||||
397 | return never executed: defaultConnection->xlib_display();return defaultConnection->xlib_display(); never executed: return defaultConnection->xlib_display(); | 0 | ||||||||||||
398 | - | |||||||||||||
399 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
400 | } | - | ||||||||||||
401 | - | |||||||||||||
402 | void *QXcbNativeInterface::connection() | - | ||||||||||||
403 | { | - | ||||||||||||
404 | QXcbIntegration *integration = QXcbIntegration::instance(); | - | ||||||||||||
405 | return never executed: integration->defaultConnection()->xcb_connection();return integration->defaultConnection()->xcb_connection(); never executed: return integration->defaultConnection()->xcb_connection(); | 0 | ||||||||||||
406 | } | - | ||||||||||||
407 | - | |||||||||||||
408 | void *QXcbNativeInterface::atspiBus() | - | ||||||||||||
409 | { | - | ||||||||||||
410 | QXcbIntegration *integration = static_cast<QXcbIntegration *>(QGuiApplicationPrivate::platformIntegration()); | - | ||||||||||||
411 | QXcbConnection *defaultConnection = integration->defaultConnection(); | - | ||||||||||||
412 | if (defaultConnection
| 0-180 | ||||||||||||
413 | xcb_atom_t atspiBusAtom = defaultConnection->internAtom("AT_SPI_BUS"); | - | ||||||||||||
414 | xcb_get_property_cookie_t cookie = xcb_get_property( defaultConnection->xcb_connection(), false, defaultConnection->rootWindow(), atspiBusAtom, XCB_ATOM_STRING, 0, 128) | - | ||||||||||||
415 | - | |||||||||||||
416 | - | |||||||||||||
417 | - | |||||||||||||
418 | ; | - | ||||||||||||
419 | xcb_get_property_reply_t *reply = xcb_get_property_reply( defaultConnection->xcb_connection(), cookie, 0) | - | ||||||||||||
420 | - | |||||||||||||
421 | - | |||||||||||||
422 | ; | - | ||||||||||||
423 | ((!(!reply->bytes_after)) ? qt_assert("!reply->bytes_after",__FILE__,478) : qt_noop()); | - | ||||||||||||
424 | char *data = (char *)xcb_get_property_value(reply); | - | ||||||||||||
425 | int length = xcb_get_property_value_length(reply); | - | ||||||||||||
426 | QByteArray *busAddress = new QByteArray(data, length); | - | ||||||||||||
427 | free(reply); | - | ||||||||||||
428 | return executed 180 times by 128 tests: busAddress;return busAddress; Executed by:
executed 180 times by 128 tests: return busAddress; Executed by:
| 180 | ||||||||||||
429 | } | - | ||||||||||||
430 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
431 | } | - | ||||||||||||
432 | - | |||||||||||||
433 | void QXcbNativeInterface::setAppTime(QScreen* screen, xcb_timestamp_t time) | - | ||||||||||||
434 | { | - | ||||||||||||
435 | if (screen
| 0 | ||||||||||||
436 | static_cast<QXcbScreen *>(screen->handle())->connection()->setTime(time); | - | ||||||||||||
437 | } never executed: end of block | 0 | ||||||||||||
438 | } never executed: end of block | 0 | ||||||||||||
439 | - | |||||||||||||
440 | void QXcbNativeInterface::setAppUserTime(QScreen* screen, xcb_timestamp_t time) | - | ||||||||||||
441 | { | - | ||||||||||||
442 | if (screen
| 0 | ||||||||||||
443 | static_cast<QXcbScreen *>(screen->handle())->connection()->setNetWmUserTime(time); | - | ||||||||||||
444 | } never executed: end of block | 0 | ||||||||||||
445 | } never executed: end of block | 0 | ||||||||||||
446 | - | |||||||||||||
447 | void QXcbNativeInterface::setStartupId(const char *data) | - | ||||||||||||
448 | { | - | ||||||||||||
449 | QByteArray startupId(data); | - | ||||||||||||
450 | QXcbIntegration *integration = QXcbIntegration::instance(); | - | ||||||||||||
451 | QXcbConnection *defaultConnection = integration->defaultConnection(); | - | ||||||||||||
452 | if (defaultConnection
| 0 | ||||||||||||
453 | defaultConnection->setStartupId(startupId); never executed: defaultConnection->setStartupId(startupId); | 0 | ||||||||||||
454 | } never executed: end of block | 0 | ||||||||||||
455 | - | |||||||||||||
456 | QXcbScreen *QXcbNativeInterface::qPlatformScreenForWindow(QWindow *window) | - | ||||||||||||
457 | { | - | ||||||||||||
458 | QXcbScreen *screen; | - | ||||||||||||
459 | if (window
| 0 | ||||||||||||
460 | QScreen *qs = window->screen(); | - | ||||||||||||
461 | screen = static_cast<QXcbScreen *>(qs ? qs->handle() : nullptr); | - | ||||||||||||
462 | } never executed: else {end of block | 0 | ||||||||||||
463 | QScreen *qs = QGuiApplication::primaryScreen(); | - | ||||||||||||
464 | screen = static_cast<QXcbScreen *>(qs ? qs->handle() : nullptr); | - | ||||||||||||
465 | } never executed: end of block | 0 | ||||||||||||
466 | return never executed: screen;return screen; never executed: return screen; | 0 | ||||||||||||
467 | } | - | ||||||||||||
468 | - | |||||||||||||
469 | void *QXcbNativeInterface::displayForWindow(QWindow *window) | - | ||||||||||||
470 | { | - | ||||||||||||
471 | - | |||||||||||||
472 | QXcbScreen *screen = qPlatformScreenForWindow(window); | - | ||||||||||||
473 | return never executed: screen ? screen->connection()->xlib_display() : nullptr;return screen ? screen->connection()->xlib_display() : nullptr; never executed: return screen ? screen->connection()->xlib_display() : nullptr; | 0 | ||||||||||||
474 | - | |||||||||||||
475 | - | |||||||||||||
476 | - | |||||||||||||
477 | - | |||||||||||||
478 | } | - | ||||||||||||
479 | - | |||||||||||||
480 | void *QXcbNativeInterface::connectionForWindow(QWindow *window) | - | ||||||||||||
481 | { | - | ||||||||||||
482 | QXcbScreen *screen = qPlatformScreenForWindow(window); | - | ||||||||||||
483 | return never executed: screen ? screen->xcb_connection() : nullptr;return screen ? screen->xcb_connection() : nullptr; never executed: return screen ? screen->xcb_connection() : nullptr; | 0 | ||||||||||||
484 | } | - | ||||||||||||
485 | - | |||||||||||||
486 | void *QXcbNativeInterface::screenForWindow(QWindow *window) | - | ||||||||||||
487 | { | - | ||||||||||||
488 | QXcbScreen *screen = qPlatformScreenForWindow(window); | - | ||||||||||||
489 | return never executed: screen ? screen->screen() : nullptr;return screen ? screen->screen() : nullptr; never executed: return screen ? screen->screen() : nullptr; | 0 | ||||||||||||
490 | } | - | ||||||||||||
491 | - | |||||||||||||
492 | void QXcbNativeInterface::addHandler(QXcbNativeInterfaceHandler *handler) | - | ||||||||||||
493 | { | - | ||||||||||||
494 | m_handlers.removeAll(handler); | - | ||||||||||||
495 | m_handlers.prepend(handler); | - | ||||||||||||
496 | } executed 135 times by 5 tests: end of block Executed by:
| 135 | ||||||||||||
497 | - | |||||||||||||
498 | void QXcbNativeInterface::removeHandler(QXcbNativeInterfaceHandler *handler) | - | ||||||||||||
499 | { | - | ||||||||||||
500 | m_handlers.removeAll(handler); | - | ||||||||||||
501 | } executed 347 times by 219 tests: end of block Executed by:
| 347 | ||||||||||||
502 | - | |||||||||||||
503 | QPlatformNativeInterface::NativeResourceForIntegrationFunction QXcbNativeInterface::handlerNativeResourceFunctionForIntegration(const QByteArray &resource) const | - | ||||||||||||
504 | { | - | ||||||||||||
505 | for (int i = 0; i < m_handlers.size()
| 180 | ||||||||||||
506 | QXcbNativeInterfaceHandler *handler = m_handlers.at(i); | - | ||||||||||||
507 | NativeResourceForIntegrationFunction result = handler->nativeResourceFunctionForIntegration(resource); | - | ||||||||||||
508 | if (result
| 0-180 | ||||||||||||
509 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
510 | } executed 180 times by 128 tests: end of block Executed by:
| 180 | ||||||||||||
511 | return executed 180 times by 128 tests: nullptr;return nullptr; Executed by:
executed 180 times by 128 tests: return nullptr; Executed by:
| 180 | ||||||||||||
512 | } | - | ||||||||||||
513 | - | |||||||||||||
514 | QPlatformNativeInterface::NativeResourceForContextFunction QXcbNativeInterface::handlerNativeResourceFunctionForContext(const QByteArray &resource) const | - | ||||||||||||
515 | { | - | ||||||||||||
516 | for (int i = 0; i < m_handlers.size()
| 0 | ||||||||||||
517 | QXcbNativeInterfaceHandler *handler = m_handlers.at(i); | - | ||||||||||||
518 | NativeResourceForContextFunction result = handler->nativeResourceFunctionForContext(resource); | - | ||||||||||||
519 | if (result
| 0 | ||||||||||||
520 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
521 | } never executed: end of block | 0 | ||||||||||||
522 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
523 | } | - | ||||||||||||
524 | - | |||||||||||||
525 | QPlatformNativeInterface::NativeResourceForScreenFunction QXcbNativeInterface::handlerNativeResourceFunctionForScreen(const QByteArray &resource) const | - | ||||||||||||
526 | { | - | ||||||||||||
527 | for (int i = 0; i < m_handlers.size()
| 6 | ||||||||||||
528 | QXcbNativeInterfaceHandler *handler = m_handlers.at(i); | - | ||||||||||||
529 | NativeResourceForScreenFunction result = handler->nativeResourceFunctionForScreen(resource); | - | ||||||||||||
530 | if (result
| 0-6 | ||||||||||||
531 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
532 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||
533 | return executed 6 times by 1 test: nullptr;return nullptr; Executed by:
executed 6 times by 1 test: return nullptr; Executed by:
| 6 | ||||||||||||
534 | } | - | ||||||||||||
535 | - | |||||||||||||
536 | QPlatformNativeInterface::NativeResourceForWindowFunction QXcbNativeInterface::handlerNativeResourceFunctionForWindow(const QByteArray &resource) const | - | ||||||||||||
537 | { | - | ||||||||||||
538 | for (int i = 0; i < m_handlers.size()
| 0 | ||||||||||||
539 | QXcbNativeInterfaceHandler *handler = m_handlers.at(i); | - | ||||||||||||
540 | NativeResourceForWindowFunction result = handler->nativeResourceFunctionForWindow(resource); | - | ||||||||||||
541 | if (result
| 0 | ||||||||||||
542 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
543 | } never executed: end of block | 0 | ||||||||||||
544 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
545 | } | - | ||||||||||||
546 | - | |||||||||||||
547 | QPlatformNativeInterface::NativeResourceForBackingStoreFunction QXcbNativeInterface::handlerNativeResourceFunctionForBackingStore(const QByteArray &resource) const | - | ||||||||||||
548 | { | - | ||||||||||||
549 | for (int i = 0; i < m_handlers.size()
| 0 | ||||||||||||
550 | QXcbNativeInterfaceHandler *handler = m_handlers.at(i); | - | ||||||||||||
551 | NativeResourceForBackingStoreFunction result = handler->nativeResourceFunctionForBackingStore(resource); | - | ||||||||||||
552 | if (result
| 0 | ||||||||||||
553 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||
554 | } never executed: end of block | 0 | ||||||||||||
555 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
556 | } | - | ||||||||||||
557 | - | |||||||||||||
558 | QFunctionPointer QXcbNativeInterface::handlerPlatformFunction(const QByteArray &function) const | - | ||||||||||||
559 | { | - | ||||||||||||
560 | for (int i = 0; i < m_handlers.size()
| 4671 | ||||||||||||
561 | QXcbNativeInterfaceHandler *handler = m_handlers.at(i); | - | ||||||||||||
562 | QFunctionPointer func = handler->platformFunction(function); | - | ||||||||||||
563 | if (func
| 0-4671 | ||||||||||||
564 | return never executed: func;return func; never executed: return func; | 0 | ||||||||||||
565 | } executed 4671 times by 117 tests: end of block Executed by:
| 4671 | ||||||||||||
566 | return executed 4671 times by 117 tests: nullptr;return nullptr; Executed by:
executed 4671 times by 117 tests: return nullptr; Executed by:
| 4671 | ||||||||||||
567 | } | - | ||||||||||||
568 | - | |||||||||||||
569 | void *QXcbNativeInterface::handlerNativeResourceForIntegration(const QByteArray &resource) const | - | ||||||||||||
570 | { | - | ||||||||||||
571 | NativeResourceForIntegrationFunction func = handlerNativeResourceFunctionForIntegration(resource); | - | ||||||||||||
572 | if (func
| 0-180 | ||||||||||||
573 | return never executed: func();return func(); never executed: return func(); | 0 | ||||||||||||
574 | return executed 180 times by 128 tests: nullptr;return nullptr; Executed by:
executed 180 times by 128 tests: return nullptr; Executed by:
| 180 | ||||||||||||
575 | } | - | ||||||||||||
576 | - | |||||||||||||
577 | void *QXcbNativeInterface::handlerNativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) const | - | ||||||||||||
578 | { | - | ||||||||||||
579 | NativeResourceForContextFunction func = handlerNativeResourceFunctionForContext(resource); | - | ||||||||||||
580 | if (func
| 0 | ||||||||||||
581 | return never executed: func(context);return func(context); never executed: return func(context); | 0 | ||||||||||||
582 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
583 | } | - | ||||||||||||
584 | - | |||||||||||||
585 | void *QXcbNativeInterface::handlerNativeResourceForScreen(const QByteArray &resource, QScreen *screen) const | - | ||||||||||||
586 | { | - | ||||||||||||
587 | NativeResourceForScreenFunction func = handlerNativeResourceFunctionForScreen(resource); | - | ||||||||||||
588 | if (func
| 0-6 | ||||||||||||
589 | return never executed: func(screen);return func(screen); never executed: return func(screen); | 0 | ||||||||||||
590 | return executed 6 times by 1 test: nullptr;return nullptr; Executed by:
executed 6 times by 1 test: return nullptr; Executed by:
| 6 | ||||||||||||
591 | } | - | ||||||||||||
592 | - | |||||||||||||
593 | void *QXcbNativeInterface::handlerNativeResourceForWindow(const QByteArray &resource, QWindow *window) const | - | ||||||||||||
594 | { | - | ||||||||||||
595 | NativeResourceForWindowFunction func = handlerNativeResourceFunctionForWindow(resource); | - | ||||||||||||
596 | if (func
| 0 | ||||||||||||
597 | return never executed: func(window);return func(window); never executed: return func(window); | 0 | ||||||||||||
598 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
599 | } | - | ||||||||||||
600 | - | |||||||||||||
601 | void *QXcbNativeInterface::handlerNativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore) const | - | ||||||||||||
602 | { | - | ||||||||||||
603 | NativeResourceForBackingStoreFunction func = handlerNativeResourceFunctionForBackingStore(resource); | - | ||||||||||||
604 | if (func
| 0 | ||||||||||||
605 | return never executed: func(backingStore);return func(backingStore); never executed: return func(backingStore); | 0 | ||||||||||||
606 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||
607 | } | - | ||||||||||||
608 | - | |||||||||||||
609 | - | |||||||||||||
Switch to Source code | Preprocessed file |