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