| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | void q_createNativeChildrenAndSetParent(const QWidget *parentWidget) | - |
| 6 | { | - |
| 7 | QObjectList children = parentWidget->children(); | - |
| 8 | for (int i = 0; i < children.size(); i++) { evaluated: i < children.size()| yes Evaluation Count:27516 | yes Evaluation Count:19581 |
| 19581-27516 |
| 9 | if (children.at(i)->isWidgetType()) { evaluated: children.at(i)->isWidgetType()| yes Evaluation Count:16940 | yes Evaluation Count:10576 |
| 10576-16940 |
| 10 | const QWidget *childWidget = qobject_cast<const QWidget *>(children.at(i)); | - |
| 11 | if (childWidget) { partially evaluated: childWidget| yes Evaluation Count:16940 | no Evaluation Count:0 |
| 0-16940 |
| 12 | if (childWidget->testAttribute(Qt::WA_NativeWindow)) { evaluated: childWidget->testAttribute(Qt::WA_NativeWindow)| yes Evaluation Count:33 | yes Evaluation Count:16907 |
| 33-16907 |
| 13 | if (!childWidget->windowHandle()) partially evaluated: !childWidget->windowHandle()| no Evaluation Count:0 | yes Evaluation Count:33 |
| 0-33 |
| 14 | childWidget->winId(); never executed: childWidget->winId(); | 0 |
| 15 | if (childWidget->windowHandle()) { partially evaluated: childWidget->windowHandle()| yes Evaluation Count:33 | no Evaluation Count:0 |
| 0-33 |
| 16 | QWindow *parentWindow = childWidget->nativeParentWidget()->windowHandle(); | - |
| 17 | if (childWidget->isWindow()) evaluated: childWidget->isWindow()| yes Evaluation Count:3 | yes Evaluation Count:30 |
| 3-30 |
| 18 | childWidget->windowHandle()->setTransientParent(parentWindow); executed: childWidget->windowHandle()->setTransientParent(parentWindow);Execution Count:3 | 3 |
| 19 | else | - |
| 20 | childWidget->windowHandle()->setParent(parentWindow); executed: childWidget->windowHandle()->setParent(parentWindow);Execution Count:30 | 30 |
| 21 | } | - |
| 22 | } else { executed: }Execution Count:33 | 33 |
| 23 | q_createNativeChildrenAndSetParent(childWidget); | - |
| 24 | } executed: }Execution Count:16907 | 16907 |
| 25 | } | - |
| 26 | } executed: }Execution Count:16940 | 16940 |
| 27 | } executed: }Execution Count:27516 | 27516 |
| 28 | | - |
| 29 | } executed: }Execution Count:19581 | 19581 |
| 30 | | - |
| 31 | void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyOldWindow) | - |
| 32 | { | - |
| 33 | QWidget * const q = q_func(); | - |
| 34 | | - |
| 35 | (void)window;; | - |
| 36 | (void)initializeWindow;; | - |
| 37 | (void)destroyOldWindow;; | - |
| 38 | | - |
| 39 | Qt::WindowFlags flags = data.window_flags; | - |
| 40 | | - |
| 41 | if (!q->testAttribute(Qt::WA_NativeWindow) && !q->isWindow()) evaluated: !q->testAttribute(Qt::WA_NativeWindow)| yes Evaluation Count:11583 | yes Evaluation Count:58 |
evaluated: !q->isWindow()| yes Evaluation Count:8967 | yes Evaluation Count:2616 |
| 58-11583 |
| 42 | return; executed: return;Execution Count:8967 | 8967 |
| 43 | | - |
| 44 | QWindow *win = topData()->window; | - |
| 45 | | - |
| 46 | | - |
| 47 | if (!win) { evaluated: !win| yes Evaluation Count:2 | yes Evaluation Count:2672 |
| 2-2672 |
| 48 | createTLSysExtra(); | - |
| 49 | win = topData()->window; | - |
| 50 | } executed: }Execution Count:2 | 2 |
| 51 | | - |
| 52 | win->setFlags(data.window_flags); | - |
| 53 | fixPosIncludesFrame(); | - |
| 54 | win->setGeometry(q->geometry()); | - |
| 55 | win->setScreen(QGuiApplication::screens().value(topData()->screenIndex, 0)); | - |
| 56 | | - |
| 57 | if (q->testAttribute(Qt::WA_TranslucentBackground)) { evaluated: q->testAttribute(Qt::WA_TranslucentBackground)| yes Evaluation Count:4 | yes Evaluation Count:2670 |
| 4-2670 |
| 58 | QSurfaceFormat format; | - |
| 59 | format.setAlphaBufferSize(8); | - |
| 60 | win->setFormat(format); | - |
| 61 | } executed: }Execution Count:4 | 4 |
| 62 | | - |
| 63 | if (QWidget *nativeParent = q->nativeParentWidget()) { evaluated: QWidget *nativeParent = q->nativeParentWidget()| yes Evaluation Count:141 | yes Evaluation Count:2533 |
| 141-2533 |
| 64 | if (nativeParent->windowHandle()) { partially evaluated: nativeParent->windowHandle()| yes Evaluation Count:141 | no Evaluation Count:0 |
| 0-141 |
| 65 | if (flags & Qt::Window) { evaluated: flags & Qt::Window| yes Evaluation Count:103 | yes Evaluation Count:38 |
| 38-103 |
| 66 | win->setTransientParent(nativeParent->windowHandle()); | - |
| 67 | win->setParent(0); | - |
| 68 | } else { executed: }Execution Count:103 | 103 |
| 69 | win->setTransientParent(0); | - |
| 70 | win->setParent(nativeParent->windowHandle()); | - |
| 71 | } executed: }Execution Count:38 | 38 |
| 72 | } | - |
| 73 | } executed: }Execution Count:141 | 141 |
| 74 | | - |
| 75 | qt_window_private(win)->positionPolicy = topData()->posIncludesFrame ? evaluated: topData()->posIncludesFrame| yes Evaluation Count:225 | yes Evaluation Count:2449 |
| 225-2449 |
| 76 | QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive; | - |
| 77 | win->create(); | - |
| 78 | | - |
| 79 | data.window_flags = win->flags(); | - |
| 80 | | - |
| 81 | QBackingStore *store = q->backingStore(); | - |
| 82 | | - |
| 83 | if (!store) { evaluated: !store| yes Evaluation Count:2631 | yes Evaluation Count:43 |
| 43-2631 |
| 84 | if (win && q->windowType() != Qt::Desktop) partially evaluated: win| yes Evaluation Count:2631 | no Evaluation Count:0 |
evaluated: q->windowType() != Qt::Desktop| yes Evaluation Count:2499 | yes Evaluation Count:132 |
| 0-2631 |
| 85 | q->setBackingStore(new QBackingStore(win)); executed: q->setBackingStore(new QBackingStore(win));Execution Count:2499 | 2499 |
| 86 | else | - |
| 87 | q->setAttribute(Qt::WA_PaintOnScreen, true); executed: q->setAttribute(Qt::WA_PaintOnScreen, true);Execution Count:132 | 132 |
| 88 | } | - |
| 89 | | - |
| 90 | setWindowModified_helper(); | - |
| 91 | setWinId(win->winId()); | - |
| 92 | | - |
| 93 | | - |
| 94 | q_createNativeChildrenAndSetParent(q); | - |
| 95 | | - |
| 96 | if (extra && !extra->mask.isEmpty()) partially evaluated: extra| yes Evaluation Count:2674 | no Evaluation Count:0 |
evaluated: !extra->mask.isEmpty()| yes Evaluation Count:5 | yes Evaluation Count:2669 |
| 0-2674 |
| 97 | setMask_sys(extra->mask); executed: setMask_sys(extra->mask);Execution Count:5 | 5 |
| 98 | | - |
| 99 | | - |
| 100 | if (q->isVisible()) evaluated: q->isVisible()| yes Evaluation Count:12 | yes Evaluation Count:2662 |
| 12-2662 |
| 101 | win->setVisible(true); executed: win->setVisible(true);Execution Count:12 | 12 |
| 102 | } executed: }Execution Count:2674 | 2674 |
| 103 | | - |
| 104 | void QWidget::destroy(bool destroyWindow, bool destroySubWindows) | - |
| 105 | { | - |
| 106 | QWidgetPrivate * const d = d_func(); | - |
| 107 | | - |
| 108 | d->aboutToDestroy(); | - |
| 109 | if (!isWindow() && parentWidget()) evaluated: !isWindow()| yes Evaluation Count:36280 | yes Evaluation Count:8929 |
partially evaluated: parentWidget()| yes Evaluation Count:36280 | no Evaluation Count:0 |
| 0-36280 |
| 110 | parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); executed: parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));Execution Count:36280 | 36280 |
| 111 | d->deactivateWidgetCleanup(); | - |
| 112 | | - |
| 113 | if ((windowType() == Qt::Popup)) evaluated: (windowType() == Qt::Popup)| yes Evaluation Count:641 | yes Evaluation Count:44568 |
| 641-44568 |
| 114 | (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(this); executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(this);Execution Count:641 | 641 |
| 115 | | - |
| 116 | if (this == QApplicationPrivate::active_window) partially evaluated: this == QApplicationPrivate::active_window| no Evaluation Count:0 | yes Evaluation Count:45209 |
| 0-45209 |
| 117 | QApplication::setActiveWindow(0); never executed: QApplication::setActiveWindow(0); | 0 |
| 118 | if (QWidget::mouseGrabber() == this) partially evaluated: QWidget::mouseGrabber() == this| no Evaluation Count:0 | yes Evaluation Count:45209 |
| 0-45209 |
| 119 | releaseMouse(); never executed: releaseMouse(); | 0 |
| 120 | if (QWidget::keyboardGrabber() == this) evaluated: QWidget::keyboardGrabber() == this| yes Evaluation Count:1 | yes Evaluation Count:45208 |
| 1-45208 |
| 121 | releaseKeyboard(); executed: releaseKeyboard();Execution Count:1 | 1 |
| 122 | | - |
| 123 | setAttribute(Qt::WA_WState_Created, false); | - |
| 124 | | - |
| 125 | if (windowType() != Qt::Desktop) { evaluated: windowType() != Qt::Desktop| yes Evaluation Count:44734 | yes Evaluation Count:475 |
| 475-44734 |
| 126 | if (destroySubWindows) { partially evaluated: destroySubWindows| yes Evaluation Count:44734 | no Evaluation Count:0 |
| 0-44734 |
| 127 | QObjectList childList(children()); | - |
| 128 | for (int i = 0; i < childList.size(); i++) { evaluated: i < childList.size()| yes Evaluation Count:5036 | yes Evaluation Count:44734 |
| 5036-44734 |
| 129 | QWidget *widget = qobject_cast<QWidget *>(childList.at(i)); | - |
| 130 | if (widget && widget->testAttribute(Qt::WA_NativeWindow)) { evaluated: widget| yes Evaluation Count:3319 | yes Evaluation Count:1717 |
partially evaluated: widget->testAttribute(Qt::WA_NativeWindow)| no Evaluation Count:0 | yes Evaluation Count:3319 |
| 0-3319 |
| 131 | if (widget->windowHandle()) { never evaluated: widget->windowHandle() | 0 |
| 132 | widget->destroy(); | - |
| 133 | } | 0 |
| 134 | } | 0 |
| 135 | } executed: }Execution Count:5036 | 5036 |
| 136 | } executed: }Execution Count:44734 | 44734 |
| 137 | if (destroyWindow) { partially evaluated: destroyWindow| yes Evaluation Count:44734 | no Evaluation Count:0 |
| 0-44734 |
| 138 | d->deleteTLSysExtra(); | - |
| 139 | } else { executed: }Execution Count:44734 | 44734 |
| 140 | if (parentWidget() && parentWidget()->testAttribute(Qt::WA_WState_Created)) { never evaluated: parentWidget() never evaluated: parentWidget()->testAttribute(Qt::WA_WState_Created) | 0 |
| 141 | d->hide_sys(); | - |
| 142 | } | 0 |
| 143 | } | 0 |
| 144 | | - |
| 145 | d->setWinId(0); | - |
| 146 | } executed: }Execution Count:44734 | 44734 |
| 147 | } executed: }Execution Count:45209 | 45209 |
| 148 | | - |
| 149 | void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f) | - |
| 150 | { | - |
| 151 | QWidget * const q = q_func(); | - |
| 152 | | - |
| 153 | Qt::WindowFlags oldFlags = data.window_flags; | - |
| 154 | bool wasCreated = q->testAttribute(Qt::WA_WState_Created); | - |
| 155 | | - |
| 156 | int targetScreen = -1; | - |
| 157 | | - |
| 158 | if (newparent && newparent->windowType() == Qt::Desktop) { evaluated: newparent| yes Evaluation Count:40989 | yes Evaluation Count:574 |
partially evaluated: newparent->windowType() == Qt::Desktop| no Evaluation Count:0 | yes Evaluation Count:40989 |
| 0-40989 |
| 159 | | - |
| 160 | | - |
| 161 | | - |
| 162 | | - |
| 163 | targetScreen = newparent->window()->d_func()->topData()->screenIndex; | - |
| 164 | newparent = 0; | - |
| 165 | } | 0 |
| 166 | | - |
| 167 | setWinId(0); | - |
| 168 | | - |
| 169 | if (parent != newparent) { evaluated: parent != newparent| yes Evaluation Count:41065 | yes Evaluation Count:498 |
| 498-41065 |
| 170 | QObjectPrivate::setParent_helper(newparent); | - |
| 171 | if (q->windowHandle()) { evaluated: q->windowHandle()| yes Evaluation Count:55 | yes Evaluation Count:41010 |
| 55-41010 |
| 172 | q->windowHandle()->setFlags(f); | - |
| 173 | QWidget *parentWithWindow = | - |
| 174 | newparent ? (newparent->windowHandle() ? newparent : newparent->nativeParentWidget()) : 0; evaluated: newparent| yes Evaluation Count:51 | yes Evaluation Count:4 |
| 4-51 |
| 175 | if (parentWithWindow) { evaluated: parentWithWindow| yes Evaluation Count:38 | yes Evaluation Count:17 |
| 17-38 |
| 176 | if (f & Qt::Window) { evaluated: f & Qt::Window| yes Evaluation Count:6 | yes Evaluation Count:32 |
| 6-32 |
| 177 | q->windowHandle()->setTransientParent(parentWithWindow->windowHandle()); | - |
| 178 | q->windowHandle()->setParent(0); | - |
| 179 | } else { executed: }Execution Count:6 | 6 |
| 180 | q->windowHandle()->setTransientParent(0); | - |
| 181 | q->windowHandle()->setParent(parentWithWindow->windowHandle()); | - |
| 182 | } executed: }Execution Count:32 | 32 |
| 183 | } else { | - |
| 184 | q->windowHandle()->setTransientParent(0); | - |
| 185 | q->windowHandle()->setParent(0); | - |
| 186 | } executed: }Execution Count:17 | 17 |
| 187 | } | - |
| 188 | } executed: }Execution Count:41065 | 41065 |
| 189 | | - |
| 190 | if (!newparent) { evaluated: !newparent| yes Evaluation Count:574 | yes Evaluation Count:40989 |
| 574-40989 |
| 191 | f |= Qt::Window; | - |
| 192 | if (targetScreen == -1) { partially evaluated: targetScreen == -1| yes Evaluation Count:574 | no Evaluation Count:0 |
| 0-574 |
| 193 | if (parent) partially evaluated: parent| no Evaluation Count:0 | yes Evaluation Count:574 |
| 0-574 |
| 194 | targetScreen = q->parentWidget()->window()->d_func()->topData()->screenIndex; never executed: targetScreen = q->parentWidget()->window()->d_func()->topData()->screenIndex; | 0 |
| 195 | } executed: }Execution Count:574 | 574 |
| 196 | } executed: }Execution Count:574 | 574 |
| 197 | | - |
| 198 | bool explicitlyHidden = q->testAttribute(Qt::WA_WState_Hidden) && q->testAttribute(Qt::WA_WState_ExplicitShowHide); evaluated: q->testAttribute(Qt::WA_WState_Hidden)| yes Evaluation Count:41348 | yes Evaluation Count:215 |
evaluated: q->testAttribute(Qt::WA_WState_ExplicitShowHide)| yes Evaluation Count:201 | yes Evaluation Count:41147 |
| 201-41348 |
| 199 | | - |
| 200 | | - |
| 201 | if (!(f&Qt::Window) && (oldFlags&Qt::Window) && !q->testAttribute(Qt::WA_NativeWindow)) { evaluated: !(f&Qt::Window)| yes Evaluation Count:40327 | yes Evaluation Count:1236 |
evaluated: (oldFlags&Qt::Window)| yes Evaluation Count:3143 | yes Evaluation Count:37184 |
evaluated: !q->testAttribute(Qt::WA_NativeWindow)| yes Evaluation Count:3138 | yes Evaluation Count:5 |
| 5-40327 |
| 202 | | - |
| 203 | q->destroy(); | - |
| 204 | } executed: }Execution Count:3138 | 3138 |
| 205 | | - |
| 206 | adjustFlags(f, q); | - |
| 207 | data.window_flags = f; | - |
| 208 | q->setAttribute(Qt::WA_WState_Created, false); | - |
| 209 | q->setAttribute(Qt::WA_WState_Visible, false); | - |
| 210 | q->setAttribute(Qt::WA_WState_Hidden, false); | - |
| 211 | | - |
| 212 | if (newparent && wasCreated && (q->testAttribute(Qt::WA_NativeWindow) || (f & Qt::Window))) evaluated: newparent| yes Evaluation Count:40989 | yes Evaluation Count:574 |
evaluated: wasCreated| yes Evaluation Count:37 | yes Evaluation Count:40952 |
evaluated: q->testAttribute(Qt::WA_NativeWindow)| yes Evaluation Count:9 | yes Evaluation Count:28 |
evaluated: (f & Qt::Window)| yes Evaluation Count:14 | yes Evaluation Count:14 |
| 9-40989 |
| 213 | q->createWinId(); executed: q->createWinId();Execution Count:23 | 23 |
| 214 | | - |
| 215 | if (q->isWindow() || (!newparent || newparent->isVisible()) || explicitlyHidden) evaluated: q->isWindow()| yes Evaluation Count:1236 | yes Evaluation Count:40327 |
partially evaluated: !newparent| no Evaluation Count:0 | yes Evaluation Count:40327 |
evaluated: newparent->isVisible()| yes Evaluation Count:468 | yes Evaluation Count:39859 |
evaluated: explicitlyHidden| yes Evaluation Count:15 | yes Evaluation Count:39844 |
| 0-40327 |
| 216 | q->setAttribute(Qt::WA_WState_Hidden); executed: q->setAttribute(Qt::WA_WState_Hidden);Execution Count:1719 | 1719 |
| 217 | q->setAttribute(Qt::WA_WState_ExplicitShowHide, explicitlyHidden); | - |
| 218 | | - |
| 219 | | - |
| 220 | if (!newparent && targetScreen != -1) { evaluated: !newparent| yes Evaluation Count:574 | yes Evaluation Count:40989 |
partially evaluated: targetScreen != -1| no Evaluation Count:0 | yes Evaluation Count:574 |
| 0-40989 |
| 221 | if (maybeTopData()) never evaluated: maybeTopData() | 0 |
| 222 | maybeTopData()->screenIndex = targetScreen; never executed: maybeTopData()->screenIndex = targetScreen; | 0 |
| 223 | | - |
| 224 | if (q->testAttribute(Qt::WA_WState_Created)) { never evaluated: q->testAttribute(Qt::WA_WState_Created) | 0 |
| 225 | q->windowHandle()->setScreen(QGuiApplication::screens().value(targetScreen, 0)); | - |
| 226 | } | 0 |
| 227 | } | 0 |
| 228 | } executed: }Execution Count:41563 | 41563 |
| 229 | | - |
| 230 | QPoint QWidget::mapToGlobal(const QPoint &pos) const | - |
| 231 | { | - |
| 232 | int x = pos.x(), y = pos.y(); | - |
| 233 | const QWidget *w = this; | - |
| 234 | while (w) { evaluated: w| yes Evaluation Count:28426 | yes Evaluation Count:721 |
| 721-28426 |
| 235 | QWindow *window = w->windowHandle(); | - |
| 236 | if (window && window->handle()) evaluated: window| yes Evaluation Count:14289 | yes Evaluation Count:14137 |
evaluated: window->handle()| yes Evaluation Count:13713 | yes Evaluation Count:576 |
| 576-14289 |
| 237 | return window->mapToGlobal(QPoint(x, y)); executed: return window->mapToGlobal(QPoint(x, y));Execution Count:13713 | 13713 |
| 238 | | - |
| 239 | x += w->data->crect.x(); | - |
| 240 | y += w->data->crect.y(); | - |
| 241 | w = w->isWindow() ? 0 : w->parentWidget(); evaluated: w->isWindow()| yes Evaluation Count:721 | yes Evaluation Count:13992 |
| 721-13992 |
| 242 | } executed: }Execution Count:14713 | 14713 |
| 243 | return QPoint(x, y); executed: return QPoint(x, y);Execution Count:721 | 721 |
| 244 | } | - |
| 245 | | - |
| 246 | QPoint QWidget::mapFromGlobal(const QPoint &pos) const | - |
| 247 | { | - |
| 248 | int x = pos.x(), y = pos.y(); | - |
| 249 | const QWidget *w = this; | - |
| 250 | while (w) { evaluated: w| yes Evaluation Count:28476 | yes Evaluation Count:622 |
| 622-28476 |
| 251 | QWindow *window = w->windowHandle(); | - |
| 252 | if (window && window->handle()) evaluated: window| yes Evaluation Count:15148 | yes Evaluation Count:13328 |
evaluated: window->handle()| yes Evaluation Count:14551 | yes Evaluation Count:597 |
| 597-15148 |
| 253 | return window->mapFromGlobal(QPoint(x, y)); executed: return window->mapFromGlobal(QPoint(x, y));Execution Count:14551 | 14551 |
| 254 | | - |
| 255 | x -= w->data->crect.x(); | - |
| 256 | y -= w->data->crect.y(); | - |
| 257 | w = w->isWindow() ? 0 : w->parentWidget(); evaluated: w->isWindow()| yes Evaluation Count:622 | yes Evaluation Count:13303 |
| 622-13303 |
| 258 | } executed: }Execution Count:13925 | 13925 |
| 259 | return QPoint(x, y); executed: return QPoint(x, y);Execution Count:622 | 622 |
| 260 | } | - |
| 261 | | - |
| 262 | void QWidgetPrivate::updateSystemBackground() {} | - |
| 263 | | - |
| 264 | | - |
| 265 | void QWidgetPrivate::setCursor_sys(const QCursor &cursor) | - |
| 266 | { | - |
| 267 | (void)cursor;; | - |
| 268 | QWidget * const q = q_func(); | - |
| 269 | qt_qpa_set_cursor(q, false); | - |
| 270 | } executed: }Execution Count:2649 | 2649 |
| 271 | | - |
| 272 | void QWidgetPrivate::unsetCursor_sys() | - |
| 273 | { | - |
| 274 | QWidget * const q = q_func(); | - |
| 275 | qt_qpa_set_cursor(q, false); | - |
| 276 | } executed: }Execution Count:138 | 138 |
| 277 | | - |
| 278 | | - |
| 279 | | - |
| 280 | void QWidgetPrivate::setWindowTitle_sys(const QString &caption) | - |
| 281 | { | - |
| 282 | QWidget * const q = q_func(); | - |
| 283 | if (!q->isWindow()) evaluated: !q->isWindow()| yes Evaluation Count:45 | yes Evaluation Count:3002 |
| 45-3002 |
| 284 | return; executed: return;Execution Count:45 | 45 |
| 285 | | - |
| 286 | if (QWindow *window = q->windowHandle()) partially evaluated: QWindow *window = q->windowHandle()| yes Evaluation Count:3002 | no Evaluation Count:0 |
| 0-3002 |
| 287 | window->setTitle(caption); executed: window->setTitle(caption);Execution Count:3002 | 3002 |
| 288 | | - |
| 289 | } executed: }Execution Count:3002 | 3002 |
| 290 | | - |
| 291 | void QWidgetPrivate::setWindowFilePath_sys(const QString &filePath) | - |
| 292 | { | - |
| 293 | QWidget * const q = q_func(); | - |
| 294 | if (!q->isWindow()) never evaluated: !q->isWindow() | 0 |
| 295 | return; | 0 |
| 296 | | - |
| 297 | if (QWindow *window = q->windowHandle()) never evaluated: QWindow *window = q->windowHandle() | 0 |
| 298 | window->setFilePath(filePath); never executed: window->setFilePath(filePath); | 0 |
| 299 | } | 0 |
| 300 | | - |
| 301 | void QWidgetPrivate::setWindowIcon_sys() | - |
| 302 | { | - |
| 303 | QWidget * const q = q_func(); | - |
| 304 | if (QWindow *window = q->windowHandle()) evaluated: QWindow *window = q->windowHandle()| yes Evaluation Count:2613 | yes Evaluation Count:3 |
| 3-2613 |
| 305 | window->setIcon(q->windowIcon()); executed: window->setIcon(q->windowIcon());Execution Count:2613 | 2613 |
| 306 | } executed: }Execution Count:2616 | 2616 |
| 307 | | - |
| 308 | void QWidgetPrivate::setWindowIconText_sys(const QString &iconText) | - |
| 309 | { | - |
| 310 | (void)iconText;; | - |
| 311 | } executed: }Execution Count:2810 | 2810 |
| 312 | | - |
| 313 | QWidget *qt_pressGrab = 0; | - |
| 314 | QWidget *qt_mouseGrb = 0; | - |
| 315 | static QWidget *keyboardGrb = 0; | - |
| 316 | | - |
| 317 | static inline QWindow *grabberWindow(const QWidget *w) | - |
| 318 | { | - |
| 319 | QWindow *window = w->windowHandle(); | - |
| 320 | if (!window) evaluated: !window| yes Evaluation Count:8 | yes Evaluation Count:400 |
| 8-400 |
| 321 | if (const QWidget *nativeParent = w->nativeParentWidget()) partially evaluated: const QWidget *nativeParent = w->nativeParentWidget()| yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
| 322 | window = nativeParent->windowHandle(); executed: window = nativeParent->windowHandle();Execution Count:8 | 8 |
| 323 | return window; executed: return window;Execution Count:408 | 408 |
| 324 | } | - |
| 325 | | - |
| 326 | void QWidget::grabMouse() | - |
| 327 | { | - |
| 328 | if (qt_mouseGrb) partially evaluated: qt_mouseGrb| no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
| 329 | qt_mouseGrb->releaseMouse(); never executed: qt_mouseGrb->releaseMouse(); | 0 |
| 330 | | - |
| 331 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this)| yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
| 332 | window->setMouseGrabEnabled(true); executed: window->setMouseGrabEnabled(true);Execution Count:3 | 3 |
| 333 | | - |
| 334 | qt_mouseGrb = this; | - |
| 335 | qt_pressGrab = 0; | - |
| 336 | } executed: }Execution Count:3 | 3 |
| 337 | | - |
| 338 | | - |
| 339 | void QWidget::grabMouse(const QCursor &cursor) | - |
| 340 | { | - |
| 341 | (void)cursor;; | - |
| 342 | grabMouse(); | - |
| 343 | } | 0 |
| 344 | | - |
| 345 | | - |
| 346 | bool QWidgetPrivate::stealMouseGrab(bool grab) | - |
| 347 | { | - |
| 348 | | - |
| 349 | | - |
| 350 | QWidget * const q = q_func(); | - |
| 351 | QWindow *window = grabberWindow(q); | - |
| 352 | return window ? window->setMouseGrabEnabled(grab) : false; executed: return window ? window->setMouseGrabEnabled(grab) : false;Execution Count:199 | 199 |
| 353 | } | - |
| 354 | | - |
| 355 | void QWidget::releaseMouse() | - |
| 356 | { | - |
| 357 | if (qt_mouseGrb == this) { partially evaluated: qt_mouseGrb == this| yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
| 358 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this)| yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
| 359 | window->setMouseGrabEnabled(false); executed: window->setMouseGrabEnabled(false);Execution Count:3 | 3 |
| 360 | qt_mouseGrb = 0; | - |
| 361 | } executed: }Execution Count:3 | 3 |
| 362 | } executed: }Execution Count:3 | 3 |
| 363 | | - |
| 364 | void QWidget::grabKeyboard() | - |
| 365 | { | - |
| 366 | if (keyboardGrb) partially evaluated: keyboardGrb| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 367 | keyboardGrb->releaseKeyboard(); never executed: keyboardGrb->releaseKeyboard(); | 0 |
| 368 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 369 | window->setKeyboardGrabEnabled(true); executed: window->setKeyboardGrabEnabled(true);Execution Count:2 | 2 |
| 370 | keyboardGrb = this; | - |
| 371 | } executed: }Execution Count:2 | 2 |
| 372 | | - |
| 373 | bool QWidgetPrivate::stealKeyboardGrab(bool grab) | - |
| 374 | { | - |
| 375 | | - |
| 376 | | - |
| 377 | QWidget * const q = q_func(); | - |
| 378 | QWindow *window = grabberWindow(q); | - |
| 379 | return window ? window->setKeyboardGrabEnabled(grab) : false; executed: return window ? window->setKeyboardGrabEnabled(grab) : false;Execution Count:199 | 199 |
| 380 | } | - |
| 381 | | - |
| 382 | void QWidget::releaseKeyboard() | - |
| 383 | { | - |
| 384 | if (keyboardGrb == this) { partially evaluated: keyboardGrb == this| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 385 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 386 | window->setKeyboardGrabEnabled(false); executed: window->setKeyboardGrabEnabled(false);Execution Count:2 | 2 |
| 387 | keyboardGrb = 0; | - |
| 388 | } executed: }Execution Count:2 | 2 |
| 389 | } executed: }Execution Count:2 | 2 |
| 390 | | - |
| 391 | QWidget *QWidget::mouseGrabber() | - |
| 392 | { | - |
| 393 | if (qt_mouseGrb) evaluated: qt_mouseGrb| yes Evaluation Count:25 | yes Evaluation Count:48236 |
| 25-48236 |
| 394 | return qt_mouseGrb; executed: return qt_mouseGrb;Execution Count:25 | 25 |
| 395 | return qt_pressGrab; executed: return qt_pressGrab;Execution Count:48236 | 48236 |
| 396 | } | - |
| 397 | | - |
| 398 | QWidget *QWidget::keyboardGrabber() | - |
| 399 | { | - |
| 400 | return keyboardGrb; executed: return keyboardGrb;Execution Count:45401 | 45401 |
| 401 | } | - |
| 402 | | - |
| 403 | void QWidget::activateWindow() | - |
| 404 | { | - |
| 405 | QWindow *const wnd = window()->windowHandle(); | - |
| 406 | | - |
| 407 | if (wnd) evaluated: wnd| yes Evaluation Count:199 | yes Evaluation Count:1 |
| 1-199 |
| 408 | wnd->requestActivate(); executed: wnd->requestActivate();Execution Count:199 | 199 |
| 409 | } executed: }Execution Count:200 | 200 |
| 410 | | - |
| 411 | | - |
| 412 | | - |
| 413 | static inline QRect positionTopLevelWindow(QRect geometry, const QScreen *screen) | - |
| 414 | { | - |
| 415 | if (screen && geometry.x() == 0 && geometry.y() == 0) { partially evaluated: screen| yes Evaluation Count:2369 | no Evaluation Count:0 |
evaluated: geometry.x() == 0| yes Evaluation Count:2111 | yes Evaluation Count:258 |
partially evaluated: geometry.y() == 0| yes Evaluation Count:2111 | no Evaluation Count:0 |
| 0-2369 |
| 416 | const QRect availableGeometry = screen->availableGeometry(); | - |
| 417 | if (availableGeometry.width() > geometry.width() evaluated: availableGeometry.width() > geometry.width()| yes Evaluation Count:2101 | yes Evaluation Count:10 |
| 10-2101 |
| 418 | && availableGeometry.height() > geometry.height()) evaluated: availableGeometry.height() > geometry.height()| yes Evaluation Count:2099 | yes Evaluation Count:2 |
| 2-2099 |
| 419 | geometry.moveCenter(availableGeometry.center()); executed: geometry.moveCenter(availableGeometry.center());Execution Count:2099 | 2099 |
| 420 | } executed: }Execution Count:2111 | 2111 |
| 421 | return geometry; executed: return geometry;Execution Count:2369 | 2369 |
| 422 | } | - |
| 423 | | - |
| 424 | | - |
| 425 | | - |
| 426 | | - |
| 427 | void QWidgetPrivate::fixPosIncludesFrame() | - |
| 428 | { | - |
| 429 | QWidget * const q = q_func(); | - |
| 430 | if (QTLWExtra *te = maybeTopData()) { evaluated: QTLWExtra *te = maybeTopData()| yes Evaluation Count:7710 | yes Evaluation Count:584 |
| 584-7710 |
| 431 | if (te->posIncludesFrame) { evaluated: te->posIncludesFrame| yes Evaluation Count:635 | yes Evaluation Count:7075 |
| 635-7075 |
| 432 | | - |
| 433 | | - |
| 434 | if (q->testAttribute(Qt::WA_DontShowOnScreen)) { evaluated: q->testAttribute(Qt::WA_DontShowOnScreen)| yes Evaluation Count:1 | yes Evaluation Count:634 |
| 1-634 |
| 435 | te->posIncludesFrame = 0; | - |
| 436 | } else { executed: }Execution Count:1 | 1 |
| 437 | if (q->windowHandle()) { partially evaluated: q->windowHandle()| yes Evaluation Count:634 | no Evaluation Count:0 |
| 0-634 |
| 438 | updateFrameStrut(); | - |
| 439 | if (!q->data->fstrut_dirty) { partially evaluated: !q->data->fstrut_dirty| no Evaluation Count:0 | yes Evaluation Count:634 |
| 0-634 |
| 440 | data.crect.translate(te->frameStrut.x(), te->frameStrut.y()); | - |
| 441 | te->posIncludesFrame = 0; | - |
| 442 | } | 0 |
| 443 | } executed: }Execution Count:634 | 634 |
| 444 | } executed: }Execution Count:634 | 634 |
| 445 | } | - |
| 446 | } executed: }Execution Count:7710 | 7710 |
| 447 | } executed: }Execution Count:8294 | 8294 |
| 448 | | - |
| 449 | void QWidgetPrivate::show_sys() | - |
| 450 | { | - |
| 451 | QWidget * const q = q_func(); | - |
| 452 | | - |
| 453 | QWindow *window = q->windowHandle(); | - |
| 454 | | - |
| 455 | if (q->testAttribute(Qt::WA_DontShowOnScreen)) { evaluated: q->testAttribute(Qt::WA_DontShowOnScreen)| yes Evaluation Count:10 | yes Evaluation Count:14998 |
| 10-14998 |
| 456 | invalidateBuffer(q->rect()); | - |
| 457 | q->setAttribute(Qt::WA_Mapped); | - |
| 458 | if (q->isWindow() && q->windowModality() != Qt::NonModal && window) { partially evaluated: q->isWindow()| yes Evaluation Count:10 | no Evaluation Count:0 |
partially evaluated: q->windowModality() != Qt::NonModal| no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
| 459 | | - |
| 460 | QGuiApplicationPrivate::showModalWindow(window); | - |
| 461 | } | 0 |
| 462 | return; executed: return;Execution Count:10 | 10 |
| 463 | } | - |
| 464 | | - |
| 465 | QApplication::postEvent(q, new QUpdateLaterEvent(q->rect())); | - |
| 466 | | - |
| 467 | if (!q->isWindow() && !q->testAttribute(Qt::WA_NativeWindow)) evaluated: !q->isWindow()| yes Evaluation Count:12446 | yes Evaluation Count:2552 |
evaluated: !q->testAttribute(Qt::WA_NativeWindow)| yes Evaluation Count:12431 | yes Evaluation Count:15 |
| 15-12446 |
| 468 | return; executed: return;Execution Count:12431 | 12431 |
| 469 | | - |
| 470 | if (window) { partially evaluated: window| yes Evaluation Count:2567 | no Evaluation Count:0 |
| 0-2567 |
| 471 | if (q->isWindow()) evaluated: q->isWindow()| yes Evaluation Count:2552 | yes Evaluation Count:15 |
| 15-2552 |
| 472 | fixPosIncludesFrame(); executed: fixPosIncludesFrame();Execution Count:2552 | 2552 |
| 473 | QRect geomRect = q->geometry(); | - |
| 474 | if (q->isWindow()) { evaluated: q->isWindow()| yes Evaluation Count:2552 | yes Evaluation Count:15 |
| 15-2552 |
| 475 | if (!q->testAttribute(Qt::WA_Moved)) evaluated: !q->testAttribute(Qt::WA_Moved)| yes Evaluation Count:2369 | yes Evaluation Count:183 |
| 183-2369 |
| 476 | geomRect = positionTopLevelWindow(geomRect, window->screen()); executed: geomRect = positionTopLevelWindow(geomRect, window->screen());Execution Count:2369 | 2369 |
| 477 | } else { executed: }Execution Count:2552 | 2552 |
| 478 | QPoint topLeftOfWindow = q->mapTo(q->nativeParentWidget(),QPoint()); | - |
| 479 | geomRect.moveTopLeft(topLeftOfWindow); | - |
| 480 | } executed: }Execution Count:15 | 15 |
| 481 | const QRect windowRect = window->geometry(); | - |
| 482 | if (windowRect != geomRect) { evaluated: windowRect != geomRect| yes Evaluation Count:2117 | yes Evaluation Count:450 |
| 450-2117 |
| 483 | window->setGeometry(geomRect); | - |
| 484 | } executed: }Execution Count:2117 | 2117 |
| 485 | | - |
| 486 | if (QBackingStore *store = q->backingStore()) { partially evaluated: QBackingStore *store = q->backingStore()| yes Evaluation Count:2567 | no Evaluation Count:0 |
| 0-2567 |
| 487 | if (store->size() != geomRect.size()) { evaluated: store->size() != geomRect.size()| yes Evaluation Count:2433 | yes Evaluation Count:134 |
| 134-2433 |
| 488 | store->resize(geomRect.size()); | - |
| 489 | } executed: }Execution Count:2433 | 2433 |
| 490 | } executed: }Execution Count:2567 | 2567 |
| 491 | | - |
| 492 | | - |
| 493 | qt_qpa_set_cursor(q, false); | - |
| 494 | | - |
| 495 | invalidateBuffer(q->rect()); | - |
| 496 | window->setVisible(true); | - |
| 497 | } executed: }Execution Count:2567 | 2567 |
| 498 | } executed: }Execution Count:2567 | 2567 |
| 499 | | - |
| 500 | | - |
| 501 | void QWidgetPrivate::hide_sys() | - |
| 502 | { | - |
| 503 | QWidget * const q = q_func(); | - |
| 504 | | - |
| 505 | QWindow *window = q->windowHandle(); | - |
| 506 | | - |
| 507 | if (q->testAttribute(Qt::WA_DontShowOnScreen)) { evaluated: q->testAttribute(Qt::WA_DontShowOnScreen)| yes Evaluation Count:6 | yes Evaluation Count:3887 |
| 6-3887 |
| 508 | q->setAttribute(Qt::WA_Mapped, false); | - |
| 509 | if (q->isWindow() && q->windowModality() != Qt::NonModal && window) { partially evaluated: q->isWindow()| yes Evaluation Count:6 | no Evaluation Count:0 |
partially evaluated: q->windowModality() != Qt::NonModal| no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
| 510 | | - |
| 511 | QGuiApplicationPrivate::hideModalWindow(window); | - |
| 512 | } | 0 |
| 513 | | - |
| 514 | } executed: }Execution Count:6 | 6 |
| 515 | | - |
| 516 | deactivateWidgetCleanup(); | - |
| 517 | | - |
| 518 | if (!q->isWindow()) { evaluated: !q->isWindow()| yes Evaluation Count:1381 | yes Evaluation Count:2512 |
| 1381-2512 |
| 519 | QWidget *p = q->parentWidget(); | - |
| 520 | if (p &&p->isVisible()) { partially evaluated: p| yes Evaluation Count:1381 | no Evaluation Count:0 |
evaluated: p->isVisible()| yes Evaluation Count:1020 | yes Evaluation Count:361 |
| 0-1381 |
| 521 | invalidateBuffer(q->rect()); | - |
| 522 | } executed: }Execution Count:1020 | 1020 |
| 523 | } else { executed: }Execution Count:1381 | 1381 |
| 524 | invalidateBuffer(q->rect()); | - |
| 525 | } executed: }Execution Count:2512 | 2512 |
| 526 | | - |
| 527 | if (window) evaluated: window| yes Evaluation Count:2521 | yes Evaluation Count:1372 |
| 1372-2521 |
| 528 | window->setVisible(false); executed: window->setVisible(false);Execution Count:2521 | 2521 |
| 529 | } executed: }Execution Count:3893 | 3893 |
| 530 | | - |
| 531 | Qt::WindowState effectiveState(Qt::WindowStates state) | - |
| 532 | { | - |
| 533 | if (state & Qt::WindowMinimized) evaluated: state & Qt::WindowMinimized| yes Evaluation Count:89 | yes Evaluation Count:442 |
| 89-442 |
| 534 | return Qt::WindowMinimized; executed: return Qt::WindowMinimized;Execution Count:89 | 89 |
| 535 | else if (state & Qt::WindowFullScreen) evaluated: state & Qt::WindowFullScreen| yes Evaluation Count:46 | yes Evaluation Count:396 |
| 46-396 |
| 536 | return Qt::WindowFullScreen; executed: return Qt::WindowFullScreen;Execution Count:46 | 46 |
| 537 | else if (state & Qt::WindowMaximized) evaluated: state & Qt::WindowMaximized| yes Evaluation Count:155 | yes Evaluation Count:241 |
| 155-241 |
| 538 | return Qt::WindowMaximized; executed: return Qt::WindowMaximized;Execution Count:155 | 155 |
| 539 | return Qt::WindowNoState; executed: return Qt::WindowNoState;Execution Count:241 | 241 |
| 540 | } | - |
| 541 | | - |
| 542 | void QWidget::setWindowState(Qt::WindowStates newstate) | - |
| 543 | { | - |
| 544 | QWidgetPrivate * const d = d_func(); | - |
| 545 | Qt::WindowStates oldstate = windowState(); | - |
| 546 | if (oldstate == newstate) evaluated: oldstate == newstate| yes Evaluation Count:19 | yes Evaluation Count:255 |
| 19-255 |
| 547 | return; executed: return;Execution Count:19 | 19 |
| 548 | if (isWindow() && !testAttribute(Qt::WA_WState_Created)) evaluated: isWindow()| yes Evaluation Count:98 | yes Evaluation Count:157 |
evaluated: !testAttribute(Qt::WA_WState_Created)| yes Evaluation Count:25 | yes Evaluation Count:73 |
| 25-157 |
| 549 | create(); executed: create();Execution Count:25 | 25 |
| 550 | | - |
| 551 | data->window_state = newstate; | - |
| 552 | data->in_set_window_state = 1; | - |
| 553 | Qt::WindowState newEffectiveState = effectiveState(newstate); | - |
| 554 | Qt::WindowState oldEffectiveState = effectiveState(oldstate); | - |
| 555 | if (isWindow() && newEffectiveState != oldEffectiveState) { evaluated: isWindow()| yes Evaluation Count:98 | yes Evaluation Count:157 |
evaluated: newEffectiveState != oldEffectiveState| yes Evaluation Count:97 | yes Evaluation Count:1 |
| 1-157 |
| 556 | | - |
| 557 | if (!testAttribute(Qt::WA_Resized) && !isVisible()) evaluated: !testAttribute(Qt::WA_Resized)| yes Evaluation Count:38 | yes Evaluation Count:59 |
evaluated: !isVisible()| yes Evaluation Count:11 | yes Evaluation Count:27 |
| 11-59 |
| 558 | adjustSize(); executed: adjustSize();Execution Count:11 | 11 |
| 559 | | - |
| 560 | d->createTLExtra(); | - |
| 561 | if (oldEffectiveState == Qt::WindowNoState) evaluated: oldEffectiveState == Qt::WindowNoState| yes Evaluation Count:53 | yes Evaluation Count:44 |
| 44-53 |
| 562 | d->topData()->normalGeometry = geometry(); executed: d->topData()->normalGeometry = geometry();Execution Count:53 | 53 |
| 563 | | - |
| 564 | qt_noop(); | - |
| 565 | windowHandle()->setWindowState(newEffectiveState); | - |
| 566 | } executed: }Execution Count:97 | 97 |
| 567 | data->in_set_window_state = 0; | - |
| 568 | | - |
| 569 | if (newstate & Qt::WindowActive) evaluated: newstate & Qt::WindowActive| yes Evaluation Count:95 | yes Evaluation Count:160 |
| 95-160 |
| 570 | activateWindow(); executed: activateWindow();Execution Count:95 | 95 |
| 571 | | - |
| 572 | QWindowStateChangeEvent e(oldstate); | - |
| 573 | QApplication::sendEvent(this, &e); | - |
| 574 | } executed: }Execution Count:255 | 255 |
| 575 | | - |
| 576 | void QWidgetPrivate::setFocus_sys() | - |
| 577 | { | - |
| 578 | QWidget * const q = q_func(); | - |
| 579 | | - |
| 580 | const QWidget *topLevel = q->window(); | - |
| 581 | if (topLevel->windowType() != Qt::Popup) { evaluated: topLevel->windowType() != Qt::Popup| yes Evaluation Count:1647 | yes Evaluation Count:16 |
| 16-1647 |
| 582 | if (QWindow *nativeWindow = q->window()->windowHandle()) { partially evaluated: QWindow *nativeWindow = q->window()->windowHandle()| yes Evaluation Count:1647 | no Evaluation Count:0 |
| 0-1647 |
| 583 | if (nativeWindow != QGuiApplication::focusWindow() evaluated: nativeWindow != QGuiApplication::focusWindow()| yes Evaluation Count:168 | yes Evaluation Count:1479 |
| 168-1479 |
| 584 | && q->testAttribute(Qt::WA_WState_Created)) { partially evaluated: q->testAttribute(Qt::WA_WState_Created)| yes Evaluation Count:168 | no Evaluation Count:0 |
| 0-168 |
| 585 | nativeWindow->requestActivate(); | - |
| 586 | } executed: }Execution Count:168 | 168 |
| 587 | } executed: }Execution Count:1647 | 1647 |
| 588 | } executed: }Execution Count:1647 | 1647 |
| 589 | } executed: }Execution Count:1663 | 1663 |
| 590 | | - |
| 591 | void QWidgetPrivate::raise_sys() | - |
| 592 | { | - |
| 593 | QWidget * const q = q_func(); | - |
| 594 | if (q->isWindow() || q->testAttribute(Qt::WA_NativeWindow)) { evaluated: q->isWindow()| yes Evaluation Count:128 | yes Evaluation Count:3591 |
partially evaluated: q->testAttribute(Qt::WA_NativeWindow)| no Evaluation Count:0 | yes Evaluation Count:3591 |
| 0-3591 |
| 595 | q->windowHandle()->raise(); | - |
| 596 | } executed: }Execution Count:128 | 128 |
| 597 | } executed: }Execution Count:3719 | 3719 |
| 598 | | - |
| 599 | void QWidgetPrivate::lower_sys() | - |
| 600 | { | - |
| 601 | QWidget * const q = q_func(); | - |
| 602 | if (q->isWindow() || q->testAttribute(Qt::WA_NativeWindow)) { evaluated: q->isWindow()| yes Evaluation Count:1 | yes Evaluation Count:35 |
partially evaluated: q->testAttribute(Qt::WA_NativeWindow)| no Evaluation Count:0 | yes Evaluation Count:35 |
| 0-35 |
| 603 | qt_noop(); | - |
| 604 | q->windowHandle()->lower(); | - |
| 605 | } else if (QWidget *p = q->parentWidget()) { executed: }Execution Count:1 partially evaluated: QWidget *p = q->parentWidget()| yes Evaluation Count:35 | no Evaluation Count:0 |
| 0-35 |
| 606 | setDirtyOpaqueRegion(); | - |
| 607 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - |
| 608 | } executed: }Execution Count:35 | 35 |
| 609 | } | - |
| 610 | | - |
| 611 | void QWidgetPrivate::stackUnder_sys(QWidget*) | - |
| 612 | { | - |
| 613 | QWidget * const q = q_func(); | - |
| 614 | if (QWidget *p = q->parentWidget()) { partially evaluated: QWidget *p = q->parentWidget()| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 615 | setDirtyOpaqueRegion(); | - |
| 616 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - |
| 617 | } executed: }Execution Count:2 | 2 |
| 618 | } executed: }Execution Count:2 | 2 |
| 619 | | - |
| 620 | void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) | - |
| 621 | { | - |
| 622 | QWidget * const q = q_func(); | - |
| 623 | if (extra) { evaluated: extra| yes Evaluation Count:21076 | yes Evaluation Count:7948 |
| 7948-21076 |
| 624 | w = qMin(w,extra->maxw); | - |
| 625 | h = qMin(h,extra->maxh); | - |
| 626 | w = qMax(w,extra->minw); | - |
| 627 | h = qMax(h,extra->minh); | - |
| 628 | } executed: }Execution Count:21076 | 21076 |
| 629 | | - |
| 630 | QPoint oldp = q->geometry().topLeft(); | - |
| 631 | QSize olds = q->size(); | - |
| 632 | QRect r(x, y, w, h); | - |
| 633 | | - |
| 634 | bool isResize = olds != r.size(); | - |
| 635 | isMove = oldp != r.topLeft(); | - |
| 636 | | - |
| 637 | | - |
| 638 | | - |
| 639 | | - |
| 640 | if (r.size() == olds && oldp == r.topLeft()) evaluated: r.size() == olds| yes Evaluation Count:21553 | yes Evaluation Count:7471 |
evaluated: oldp == r.topLeft()| yes Evaluation Count:20869 | yes Evaluation Count:684 |
| 684-21553 |
| 641 | return; executed: return;Execution Count:20869 | 20869 |
| 642 | | - |
| 643 | if (!data.in_set_window_state) { evaluated: !data.in_set_window_state| yes Evaluation Count:8147 | yes Evaluation Count:8 |
| 8-8147 |
| 644 | q->data->window_state &= ~Qt::WindowMaximized; | - |
| 645 | q->data->window_state &= ~Qt::WindowFullScreen; | - |
| 646 | if (q->isWindow()) evaluated: q->isWindow()| yes Evaluation Count:2022 | yes Evaluation Count:6125 |
| 2022-6125 |
| 647 | topData()->normalGeometry = QRect(0, 0, -1, -1); executed: topData()->normalGeometry = QRect(0, 0, -1, -1);Execution Count:2022 | 2022 |
| 648 | } executed: }Execution Count:8147 | 8147 |
| 649 | | - |
| 650 | QPoint oldPos = q->pos(); | - |
| 651 | data.crect = r; | - |
| 652 | | - |
| 653 | bool needsShow = false; | - |
| 654 | | - |
| 655 | if (!(data.window_state & Qt::WindowFullScreen) && (w == 0 || h == 0)) { evaluated: !(data.window_state & Qt::WindowFullScreen)| yes Evaluation Count:8153 | yes Evaluation Count:2 |
evaluated: w == 0| yes Evaluation Count:144 | yes Evaluation Count:8009 |
evaluated: h == 0| yes Evaluation Count:107 | yes Evaluation Count:7902 |
| 2-8153 |
| 656 | q->setAttribute(Qt::WA_OutsideWSRange, true); | - |
| 657 | if (q->isVisible() && q->testAttribute(Qt::WA_Mapped)) evaluated: q->isVisible()| yes Evaluation Count:184 | yes Evaluation Count:67 |
evaluated: q->testAttribute(Qt::WA_Mapped)| yes Evaluation Count:1 | yes Evaluation Count:183 |
| 1-184 |
| 658 | hide_sys(); executed: hide_sys();Execution Count:1 | 1 |
| 659 | data.crect = QRect(x, y, w, h); | - |
| 660 | } else if (q->isVisible() && q->testAttribute(Qt::WA_OutsideWSRange)) { executed: }Execution Count:251 evaluated: q->isVisible()| yes Evaluation Count:4664 | yes Evaluation Count:3240 |
evaluated: q->testAttribute(Qt::WA_OutsideWSRange)| yes Evaluation Count:173 | yes Evaluation Count:4491 |
| 173-4664 |
| 661 | q->setAttribute(Qt::WA_OutsideWSRange, false); | - |
| 662 | needsShow = true; | - |
| 663 | } executed: }Execution Count:173 | 173 |
| 664 | | - |
| 665 | if (q->isVisible()) { evaluated: q->isVisible()| yes Evaluation Count:4848 | yes Evaluation Count:3307 |
| 3307-4848 |
| 666 | if (!q->testAttribute(Qt::WA_DontShowOnScreen) && !q->testAttribute(Qt::WA_OutsideWSRange)) { evaluated: !q->testAttribute(Qt::WA_DontShowOnScreen)| yes Evaluation Count:4845 | yes Evaluation Count:3 |
evaluated: !q->testAttribute(Qt::WA_OutsideWSRange)| yes Evaluation Count:4661 | yes Evaluation Count:184 |
| 3-4845 |
| 667 | if (q->windowHandle()) { evaluated: q->windowHandle()| yes Evaluation Count:364 | yes Evaluation Count:4297 |
| 364-4297 |
| 668 | if (q->isWindow()) { partially evaluated: q->isWindow()| yes Evaluation Count:364 | no Evaluation Count:0 |
| 0-364 |
| 669 | q->windowHandle()->setGeometry(q->geometry()); | - |
| 670 | } else { executed: }Execution Count:364 | 364 |
| 671 | QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint()); | - |
| 672 | q->windowHandle()->setGeometry(QRect(posInNativeParent,r.size())); | - |
| 673 | } | 0 |
| 674 | const QWidgetBackingStore *bs = maybeBackingStore(); | - |
| 675 | if (bs->store) { partially evaluated: bs->store| yes Evaluation Count:364 | no Evaluation Count:0 |
| 0-364 |
| 676 | if (isResize) evaluated: isResize| yes Evaluation Count:215 | yes Evaluation Count:149 |
| 149-215 |
| 677 | bs->store->resize(r.size()); executed: bs->store->resize(r.size());Execution Count:215 | 215 |
| 678 | } executed: }Execution Count:364 | 364 |
| 679 | | - |
| 680 | if (needsShow) evaluated: needsShow| yes Evaluation Count:17 | yes Evaluation Count:347 |
| 17-347 |
| 681 | show_sys(); executed: show_sys();Execution Count:17 | 17 |
| 682 | } executed: }Execution Count:364 | 364 |
| 683 | | - |
| 684 | if (!q->isWindow()) { evaluated: !q->isWindow()| yes Evaluation Count:4297 | yes Evaluation Count:364 |
| 364-4297 |
| 685 | if (isMove && !isResize) evaluated: isMove| yes Evaluation Count:953 | yes Evaluation Count:3344 |
evaluated: !isResize| yes Evaluation Count:388 | yes Evaluation Count:565 |
| 388-3344 |
| 686 | moveRect(QRect(oldPos, olds), x - oldPos.x(), y - oldPos.y()); executed: moveRect(QRect(oldPos, olds), x - oldPos.x(), y - oldPos.y());Execution Count:388 | 388 |
| 687 | else | - |
| 688 | invalidateBuffer_resizeHelper(oldPos, olds); executed: invalidateBuffer_resizeHelper(oldPos, olds);Execution Count:3909 | 3909 |
| 689 | } | - |
| 690 | } executed: }Execution Count:4661 | 4661 |
| 691 | | - |
| 692 | if (isMove) { evaluated: isMove| yes Evaluation Count:1181 | yes Evaluation Count:3667 |
| 1181-3667 |
| 693 | QMoveEvent e(q->pos(), oldPos); | - |
| 694 | QApplication::sendEvent(q, &e); | - |
| 695 | } executed: }Execution Count:1181 | 1181 |
| 696 | if (isResize) { evaluated: isResize| yes Evaluation Count:4311 | yes Evaluation Count:537 |
| 537-4311 |
| 697 | QResizeEvent e(r.size(), olds); | - |
| 698 | QApplication::sendEvent(q, &e); | - |
| 699 | if (q->windowHandle()) evaluated: q->windowHandle()| yes Evaluation Count:220 | yes Evaluation Count:4091 |
| 220-4091 |
| 700 | q->update(); executed: q->update();Execution Count:220 | 220 |
| 701 | } executed: }Execution Count:4311 | 4311 |
| 702 | } else { executed: }Execution Count:4848 | 4848 |
| 703 | if (isMove && q->pos() != oldPos) evaluated: isMove| yes Evaluation Count:861 | yes Evaluation Count:2446 |
partially evaluated: q->pos() != oldPos| yes Evaluation Count:861 | no Evaluation Count:0 |
| 0-2446 |
| 704 | q->setAttribute(Qt::WA_PendingMoveEvent, true); executed: q->setAttribute(Qt::WA_PendingMoveEvent, true);Execution Count:861 | 861 |
| 705 | if (isResize) evaluated: isResize| yes Evaluation Count:3160 | yes Evaluation Count:147 |
| 147-3160 |
| 706 | q->setAttribute(Qt::WA_PendingResizeEvent, true); executed: q->setAttribute(Qt::WA_PendingResizeEvent, true);Execution Count:3160 | 3160 |
| 707 | } executed: }Execution Count:3307 | 3307 |
| 708 | | - |
| 709 | } | - |
| 710 | | - |
| 711 | void QWidgetPrivate::setConstraints_sys() | - |
| 712 | { | - |
| 713 | QWidget * const q = q_func(); | - |
| 714 | if (extra && q->windowHandle()) { partially evaluated: extra| yes Evaluation Count:1883 | no Evaluation Count:0 |
evaluated: q->windowHandle()| yes Evaluation Count:609 | yes Evaluation Count:1274 |
| 0-1883 |
| 715 | QWindow *win = q->windowHandle(); | - |
| 716 | QWindowPrivate *winp = qt_window_private(win); | - |
| 717 | | - |
| 718 | winp->minimumSize = QSize(extra->minw, extra->minh); | - |
| 719 | winp->maximumSize = QSize(extra->maxw, extra->maxh); | - |
| 720 | | - |
| 721 | if (extra->topextra) { partially evaluated: extra->topextra| yes Evaluation Count:609 | no Evaluation Count:0 |
| 0-609 |
| 722 | winp->baseSize = QSize(extra->topextra->basew, extra->topextra->baseh); | - |
| 723 | winp->sizeIncrement = QSize(extra->topextra->incw, extra->topextra->inch); | - |
| 724 | } executed: }Execution Count:609 | 609 |
| 725 | | - |
| 726 | if (winp->platformWindow) { evaluated: winp->platformWindow| yes Evaluation Count:602 | yes Evaluation Count:7 |
| 7-602 |
| 727 | fixPosIncludesFrame(); | - |
| 728 | winp->platformWindow->propagateSizeHints(); | - |
| 729 | } executed: }Execution Count:602 | 602 |
| 730 | } executed: }Execution Count:609 | 609 |
| 731 | } executed: }Execution Count:1883 | 1883 |
| 732 | | - |
| 733 | void QWidgetPrivate::scroll_sys(int dx, int dy) | - |
| 734 | { | - |
| 735 | QWidget * const q = q_func(); | - |
| 736 | scrollChildren(dx, dy); | - |
| 737 | scrollRect(q->rect(), dx, dy); | - |
| 738 | } executed: }Execution Count:14649 | 14649 |
| 739 | | - |
| 740 | void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) | - |
| 741 | { | - |
| 742 | scrollRect(r, dx, dy); | - |
| 743 | } | 0 |
| 744 | | - |
| 745 | int QWidget::metric(PaintDeviceMetric m) const | - |
| 746 | { | - |
| 747 | const QWidgetPrivate * const d = d_func(); | - |
| 748 | | - |
| 749 | QScreen *screen = 0; | - |
| 750 | if (QWidget *topLevel = window()) partially evaluated: QWidget *topLevel = window()| yes Evaluation Count:281357 | no Evaluation Count:0 |
| 0-281357 |
| 751 | if (QWindow *topLevelWindow = topLevel->windowHandle()) { evaluated: QWindow *topLevelWindow = topLevel->windowHandle()| yes Evaluation Count:171342 | yes Evaluation Count:110015 |
| 110015-171342 |
| 752 | QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(topLevelWindow); | - |
| 753 | if (platformScreen) partially evaluated: platformScreen| yes Evaluation Count:171342 | no Evaluation Count:0 |
| 0-171342 |
| 754 | screen = platformScreen->screen(); executed: screen = platformScreen->screen();Execution Count:171342 | 171342 |
| 755 | } executed: }Execution Count:171342 | 171342 |
| 756 | if (!screen && QGuiApplication::primaryScreen()) evaluated: !screen| yes Evaluation Count:110015 | yes Evaluation Count:171342 |
partially evaluated: QGuiApplication::primaryScreen()| yes Evaluation Count:110015 | no Evaluation Count:0 |
| 0-171342 |
| 757 | screen = QGuiApplication::primaryScreen(); executed: screen = QGuiApplication::primaryScreen();Execution Count:110015 | 110015 |
| 758 | | - |
| 759 | if (!screen) { partially evaluated: !screen| no Evaluation Count:0 | yes Evaluation Count:281357 |
| 0-281357 |
| 760 | if (m == PdmDpiX || m == PdmDpiY) never evaluated: m == PdmDpiX never evaluated: m == PdmDpiY | 0 |
| 761 | return 72; never executed: return 72; | 0 |
| 762 | return QPaintDevice::metric(m); never executed: return QPaintDevice::metric(m); | 0 |
| 763 | } | - |
| 764 | int val; | - |
| 765 | if (m == PdmWidth) { evaluated: m == PdmWidth| yes Evaluation Count:44 | yes Evaluation Count:281313 |
| 44-281313 |
| 766 | val = data->crect.width(); | - |
| 767 | } else if (m == PdmWidthMM) { executed: }Execution Count:44 partially evaluated: m == PdmWidthMM| no Evaluation Count:0 | yes Evaluation Count:281313 |
| 0-281313 |
| 768 | val = data->crect.width() * screen->physicalSize().width() / screen->geometry().width(); | - |
| 769 | } else if (m == PdmHeight) { evaluated: m == PdmHeight| yes Evaluation Count:44 | yes Evaluation Count:281269 |
| 0-281269 |
| 770 | val = data->crect.height(); | - |
| 771 | } else if (m == PdmHeightMM) { executed: }Execution Count:44 partially evaluated: m == PdmHeightMM| no Evaluation Count:0 | yes Evaluation Count:281269 |
| 0-281269 |
| 772 | val = data->crect.height() * screen->physicalSize().height() / screen->geometry().height(); | - |
| 773 | } else if (m == PdmDepth) { evaluated: m == PdmDepth| yes Evaluation Count:3 | yes Evaluation Count:281266 |
| 0-281266 |
| 774 | return screen->depth(); executed: return screen->depth();Execution Count:3 | 3 |
| 775 | } else if (m == PdmDpiX) { evaluated: m == PdmDpiX| yes Evaluation Count:27 | yes Evaluation Count:281239 |
| 27-281239 |
| 776 | if (d->extra && d->extra->customDpiX) evaluated: d->extra| yes Evaluation Count:14 | yes Evaluation Count:13 |
evaluated: d->extra->customDpiX| yes Evaluation Count:2 | yes Evaluation Count:12 |
| 2-14 |
| 777 | return d->extra->customDpiX; executed: return d->extra->customDpiX;Execution Count:2 | 2 |
| 778 | else if (d->parent) evaluated: d->parent| yes Evaluation Count:7 | yes Evaluation Count:18 |
| 7-18 |
| 779 | return static_cast<QWidget *>(d->parent)->metric(m); executed: return static_cast<QWidget *>(d->parent)->metric(m);Execution Count:7 | 7 |
| 780 | return qRound(screen->logicalDotsPerInchX()); executed: return qRound(screen->logicalDotsPerInchX());Execution Count:18 | 18 |
| 781 | } else if (m == PdmDpiY) { evaluated: m == PdmDpiY| yes Evaluation Count:281207 | yes Evaluation Count:32 |
| 32-281207 |
| 782 | if (d->extra && d->extra->customDpiY) evaluated: d->extra| yes Evaluation Count:159268 | yes Evaluation Count:121939 |
evaluated: d->extra->customDpiY| yes Evaluation Count:4 | yes Evaluation Count:159264 |
| 4-159268 |
| 783 | return d->extra->customDpiY; executed: return d->extra->customDpiY;Execution Count:4 | 4 |
| 784 | else if (d->parent) evaluated: d->parent| yes Evaluation Count:158090 | yes Evaluation Count:123113 |
| 123113-158090 |
| 785 | return static_cast<QWidget *>(d->parent)->metric(m); executed: return static_cast<QWidget *>(d->parent)->metric(m);Execution Count:158090 | 158090 |
| 786 | return qRound(screen->logicalDotsPerInchY()); executed: return qRound(screen->logicalDotsPerInchY());Execution Count:123113 | 123113 |
| 787 | } else if (m == PdmPhysicalDpiX) { evaluated: m == PdmPhysicalDpiX| yes Evaluation Count:16 | yes Evaluation Count:16 |
| 16 |
| 788 | return qRound(screen->physicalDotsPerInchX()); executed: return qRound(screen->physicalDotsPerInchX());Execution Count:16 | 16 |
| 789 | } else if (m == PdmPhysicalDpiY) { partially evaluated: m == PdmPhysicalDpiY| yes Evaluation Count:16 | no Evaluation Count:0 |
| 0-16 |
| 790 | return qRound(screen->physicalDotsPerInchY()); executed: return qRound(screen->physicalDotsPerInchY());Execution Count:16 | 16 |
| 791 | } else { | - |
| 792 | val = QPaintDevice::metric(m); | - |
| 793 | } | 0 |
| 794 | return val; executed: return val;Execution Count:88 | 88 |
| 795 | } | - |
| 796 | | - |
| 797 | | - |
| 798 | | - |
| 799 | | - |
| 800 | | - |
| 801 | | - |
| 802 | QWindow *QWidget::windowHandle() const | - |
| 803 | { | - |
| 804 | const QWidgetPrivate * const d = d_func(); | - |
| 805 | QTLWExtra *extra = d->maybeTopData(); | - |
| 806 | if (extra) evaluated: extra| yes Evaluation Count:456101 | yes Evaluation Count:371034 |
| 371034-456101 |
| 807 | return extra->window; executed: return extra->window;Execution Count:456101 | 456101 |
| 808 | | - |
| 809 | return 0; executed: return 0;Execution Count:371034 | 371034 |
| 810 | } | - |
| 811 | | - |
| 812 | void QWidgetPrivate::createSysExtra() | - |
| 813 | { | - |
| 814 | } | - |
| 815 | | - |
| 816 | void QWidgetPrivate::deleteSysExtra() | - |
| 817 | { | - |
| 818 | | - |
| 819 | } | - |
| 820 | | - |
| 821 | void QWidgetPrivate::createTLSysExtra() | - |
| 822 | { | - |
| 823 | QWidget * const q = q_func(); | - |
| 824 | extra->topextra->screenIndex = 0; | - |
| 825 | extra->topextra->window = 0; | - |
| 826 | if (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow()) { evaluated: q->testAttribute(Qt::WA_NativeWindow)| yes Evaluation Count:43 | yes Evaluation Count:3484 |
evaluated: q->isWindow()| yes Evaluation Count:3427 | yes Evaluation Count:57 |
| 43-3484 |
| 827 | extra->topextra->window = new QWidgetWindow(q); | - |
| 828 | if (extra->minw || extra->minh) evaluated: extra->minw| yes Evaluation Count:198 | yes Evaluation Count:3272 |
evaluated: extra->minh| yes Evaluation Count:1 | yes Evaluation Count:3271 |
| 1-3272 |
| 829 | extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh)); executed: extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh));Execution Count:199 | 199 |
| 830 | if (extra->maxw != ((1<<24)-1) || extra->maxh != ((1<<24)-1)) evaluated: extra->maxw != ((1<<24)-1)| yes Evaluation Count:190 | yes Evaluation Count:3280 |
evaluated: extra->maxh != ((1<<24)-1)| yes Evaluation Count:1 | yes Evaluation Count:3279 |
| 1-3280 |
| 831 | extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh)); executed: extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh));Execution Count:191 | 191 |
| 832 | } executed: }Execution Count:3470 | 3470 |
| 833 | } executed: }Execution Count:3527 | 3527 |
| 834 | | - |
| 835 | void QWidgetPrivate::deleteTLSysExtra() | - |
| 836 | { | - |
| 837 | if (extra && extra->topextra) { evaluated: extra| yes Evaluation Count:19975 | yes Evaluation Count:28241 |
evaluated: extra->topextra| yes Evaluation Count:6805 | yes Evaluation Count:13170 |
| 6805-28241 |
| 838 | | - |
| 839 | | - |
| 840 | | - |
| 841 | | - |
| 842 | if (extra->topextra->window) { evaluated: extra->topextra->window| yes Evaluation Count:3468 | yes Evaluation Count:3337 |
| 3337-3468 |
| 843 | extra->topextra->window->destroy(); | - |
| 844 | } executed: }Execution Count:3468 | 3468 |
| 845 | setWinId(0); | - |
| 846 | delete extra->topextra->window; | - |
| 847 | extra->topextra->window = 0; | - |
| 848 | | - |
| 849 | extra->topextra->backingStoreTracker.destroy(); | - |
| 850 | delete extra->topextra->backingStore; | - |
| 851 | extra->topextra->backingStore = 0; | - |
| 852 | | - |
| 853 | } executed: }Execution Count:6805 | 6805 |
| 854 | } executed: }Execution Count:48216 | 48216 |
| 855 | | - |
| 856 | void QWidgetPrivate::registerDropSite(bool on) | - |
| 857 | { | - |
| 858 | (void)on;; | - |
| 859 | } executed: }Execution Count:53811 | 53811 |
| 860 | | - |
| 861 | void QWidgetPrivate::setMask_sys(const QRegion ®ion) | - |
| 862 | { | - |
| 863 | if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowMasks)) { partially evaluated: !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowMasks)| no Evaluation Count:0 | yes Evaluation Count:40 |
| 0-40 |
| 864 | QMessageLogger("kernel/qwidget_qpa.cpp", 922, __PRETTY_FUNCTION__).warning("%s: Not supported on %s.", __PRETTY_FUNCTION__, QString(QGuiApplication::platformName()).toLocal8Bit().constData()); | - |
| 865 | return; | 0 |
| 866 | } | - |
| 867 | QWidget * const q = q_func(); | - |
| 868 | if (const QWindow *window = q->windowHandle()) evaluated: const QWindow *window = q->windowHandle()| yes Evaluation Count:8 | yes Evaluation Count:32 |
| 8-32 |
| 869 | if (QPlatformWindow *platformWindow = window->handle()) partially evaluated: QPlatformWindow *platformWindow = window->handle()| yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
| 870 | platformWindow->setMask(region); executed: platformWindow->setMask(region);Execution Count:8 | 8 |
| 871 | } executed: }Execution Count:40 | 40 |
| 872 | | - |
| 873 | void QWidgetPrivate::updateFrameStrut() | - |
| 874 | { | - |
| 875 | QWidget * const q = q_func(); | - |
| 876 | if (q->data->fstrut_dirty) { evaluated: q->data->fstrut_dirty| yes Evaluation Count:14306 | yes Evaluation Count:6 |
| 6-14306 |
| 877 | if (QTLWExtra *te = maybeTopData()) { evaluated: QTLWExtra *te = maybeTopData()| yes Evaluation Count:5430 | yes Evaluation Count:8876 |
| 5430-8876 |
| 878 | if (te->window) { evaluated: te->window| yes Evaluation Count:5341 | yes Evaluation Count:89 |
| 89-5341 |
| 879 | if (const QPlatformWindow *pw = te->window->handle()) { evaluated: const QPlatformWindow *pw = te->window->handle()| yes Evaluation Count:5116 | yes Evaluation Count:225 |
| 225-5116 |
| 880 | const QMargins margins = pw->frameMargins(); | - |
| 881 | if (!margins.isNull()) { evaluated: !margins.isNull()| yes Evaluation Count:1 | yes Evaluation Count:5115 |
| 1-5115 |
| 882 | te->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom()); | - |
| 883 | q->data->fstrut_dirty = false; | - |
| 884 | } executed: }Execution Count:1 | 1 |
| 885 | } executed: }Execution Count:5116 | 5116 |
| 886 | } executed: }Execution Count:5341 | 5341 |
| 887 | } executed: }Execution Count:5430 | 5430 |
| 888 | } executed: }Execution Count:14306 | 14306 |
| 889 | } executed: }Execution Count:14312 | 14312 |
| 890 | | - |
| 891 | void QWidgetPrivate::setWindowOpacity_sys(qreal level) | - |
| 892 | { | - |
| 893 | QWidget * const q = q_func(); | - |
| 894 | if (q->windowHandle()) partially evaluated: q->windowHandle()| yes Evaluation Count:355 | no Evaluation Count:0 |
| 0-355 |
| 895 | q->windowHandle()->setOpacity(level); executed: q->windowHandle()->setOpacity(level);Execution Count:355 | 355 |
| 896 | } executed: }Execution Count:355 | 355 |
| 897 | | - |
| 898 | void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) | - |
| 899 | { | - |
| 900 | (void)dontShow;; | - |
| 901 | (void)oldRect;; | - |
| 902 | | - |
| 903 | } executed: }Execution Count:6 | 6 |
| 904 | | - |
| 905 | QPaintEngine *QWidget::paintEngine() const | - |
| 906 | { | - |
| 907 | QMessageLogger("kernel/qwidget_qpa.cpp", 965, __PRETTY_FUNCTION__).warning("QWidget::paintEngine: Should no longer be called"); | - |
| 908 | return 0; executed: return 0;Execution Count:16 | 16 |
| 909 | } | - |
| 910 | | - |
| 911 | void QWidgetPrivate::setModal_sys() | - |
| 912 | { | - |
| 913 | QWidget * const q = q_func(); | - |
| 914 | if (q->windowHandle()) evaluated: q->windowHandle()| yes Evaluation Count:2721 | yes Evaluation Count:8967 |
| 2721-8967 |
| 915 | q->windowHandle()->setModality(q->windowModality()); executed: q->windowHandle()->setModality(q->windowModality());Execution Count:2721 | 2721 |
| 916 | } executed: }Execution Count:11688 | 11688 |
| 917 | | - |
| 918 | | - |
| 919 | static inline void applyCursor(QWidget *w, QCursor c) | - |
| 920 | { | - |
| 921 | if (QWindow *window = w->windowHandle()) partially evaluated: QWindow *window = w->windowHandle()| yes Evaluation Count:3775 | no Evaluation Count:0 |
| 0-3775 |
| 922 | window->setCursor(c); executed: window->setCursor(c);Execution Count:3775 | 3775 |
| 923 | } executed: }Execution Count:3775 | 3775 |
| 924 | | - |
| 925 | void qt_qpa_set_cursor(QWidget *w, bool force) | - |
| 926 | { | - |
| 927 | if (!w->testAttribute(Qt::WA_WState_Created)) evaluated: !w->testAttribute(Qt::WA_WState_Created)| yes Evaluation Count:2599 | yes Evaluation Count:3883 |
| 2599-3883 |
| 928 | return; executed: return;Execution Count:2599 | 2599 |
| 929 | | - |
| 930 | static QPointer<QWidget> lastUnderMouse = 0; | - |
| 931 | if (force) { evaluated: force| yes Evaluation Count:1047 | yes Evaluation Count:2836 |
| 1047-2836 |
| 932 | lastUnderMouse = w; | - |
| 933 | } else if (lastUnderMouse) { executed: }Execution Count:1047 evaluated: lastUnderMouse| yes Evaluation Count:199 | yes Evaluation Count:2637 |
| 199-2637 |
| 934 | const WId lastWinId = lastUnderMouse->effectiveWinId(); | - |
| 935 | const WId winId = w->effectiveWinId(); | - |
| 936 | if (lastWinId && lastWinId == winId) partially evaluated: lastWinId| yes Evaluation Count:199 | no Evaluation Count:0 |
evaluated: lastWinId == winId| yes Evaluation Count:140 | yes Evaluation Count:59 |
| 0-199 |
| 937 | w = lastUnderMouse; executed: w = lastUnderMouse;Execution Count:140 | 140 |
| 938 | } else if (!w->internalWinId()) { executed: }Execution Count:199 evaluated: !w->internalWinId()| yes Evaluation Count:108 | yes Evaluation Count:2529 |
| 108-2529 |
| 939 | return; executed: return;Execution Count:108 | 108 |
| 940 | } | - |
| 941 | | - |
| 942 | while (!w->internalWinId() && w->parentWidget() && !w->isWindow() evaluated: !w->internalWinId()| yes Evaluation Count:1558 | yes Evaluation Count:3616 |
partially evaluated: w->parentWidget()| yes Evaluation Count:1558 | no Evaluation Count:0 |
partially evaluated: !w->isWindow()| yes Evaluation Count:1558 | no Evaluation Count:0 |
| 0-3616 |
| 943 | && !w->testAttribute(Qt::WA_SetCursor)) evaluated: !w->testAttribute(Qt::WA_SetCursor)| yes Evaluation Count:1399 | yes Evaluation Count:159 |
| 159-1399 |
| 944 | w = w->parentWidget(); executed: w = w->parentWidget();Execution Count:1399 | 1399 |
| 945 | | - |
| 946 | QWidget *nativeParent = w; | - |
| 947 | if (!w->internalWinId()) evaluated: !w->internalWinId()| yes Evaluation Count:159 | yes Evaluation Count:3616 |
| 159-3616 |
| 948 | nativeParent = w->nativeParentWidget(); executed: nativeParent = w->nativeParentWidget();Execution Count:159 | 159 |
| 949 | if (!nativeParent || !nativeParent->internalWinId()) partially evaluated: !nativeParent| no Evaluation Count:0 | yes Evaluation Count:3775 |
partially evaluated: !nativeParent->internalWinId()| no Evaluation Count:0 | yes Evaluation Count:3775 |
| 0-3775 |
| 950 | return; | 0 |
| 951 | | - |
| 952 | if (w->isWindow() || w->testAttribute(Qt::WA_SetCursor)) { evaluated: w->isWindow()| yes Evaluation Count:3601 | yes Evaluation Count:174 |
evaluated: w->testAttribute(Qt::WA_SetCursor)| yes Evaluation Count:159 | yes Evaluation Count:15 |
| 15-3601 |
| 953 | if (w->isEnabled()) evaluated: w->isEnabled()| yes Evaluation Count:3753 | yes Evaluation Count:7 |
| 7-3753 |
| 954 | applyCursor(nativeParent, w->cursor()); executed: applyCursor(nativeParent, w->cursor());Execution Count:3753 | 3753 |
| 955 | else | - |
| 956 | | - |
| 957 | | - |
| 958 | applyCursor(nativeParent, Qt::ArrowCursor); executed: applyCursor(nativeParent, Qt::ArrowCursor);Execution Count:7 | 7 |
| 959 | } else { | - |
| 960 | applyCursor(nativeParent, Qt::ArrowCursor); | - |
| 961 | } executed: }Execution Count:15 | 15 |
| 962 | } | - |
| 963 | | - |
| 964 | | - |
| 965 | | - |
| 966 | | - |
| | |