Line | Source Code | Coverage |
---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). | - |
4 | ** Contact: http://www.qt-project.org/legal | - |
5 | ** | - |
6 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
7 | ** | - |
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
9 | ** Commercial License Usage | - |
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
11 | ** accordance with the commercial license agreement provided with the | - |
12 | ** Software or, alternatively, in accordance with the terms contained in | - |
13 | ** a written agreement between you and Digia. For licensing terms and | - |
14 | ** conditions see http://qt.digia.com/licensing. For further information | - |
15 | ** use the contact form at http://qt.digia.com/contact-us. | - |
16 | ** | - |
17 | ** GNU Lesser General Public License Usage | - |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
19 | ** General Public License version 2.1 as published by the Free Software | - |
20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | - |
21 | ** packaging of this file. Please review the following information to | - |
22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | - |
23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
24 | ** | - |
25 | ** In addition, as a special exception, Digia gives you certain additional | - |
26 | ** rights. These rights are described in the Digia Qt LGPL Exception | - |
27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
28 | ** | - |
29 | ** GNU General Public License Usage | - |
30 | ** Alternatively, this file may be used under the terms of the GNU | - |
31 | ** General Public License version 3.0 as published by the Free Software | - |
32 | ** Foundation and appearing in the file LICENSE.GPL included in the | - |
33 | ** packaging of this file. Please review the following information to | - |
34 | ** ensure the GNU General Public License version 3.0 requirements will be | - |
35 | ** met: http://www.gnu.org/copyleft/gpl.html. | - |
36 | ** | - |
37 | ** | - |
38 | ** $QT_END_LICENSE$ | - |
39 | ** | - |
40 | ****************************************************************************/ | - |
41 | | - |
42 | #include "QtWidgets/qwidget.h" | - |
43 | #include "QtGui/qevent.h" | - |
44 | #include "QtWidgets/qapplication.h" | - |
45 | #include "private/qwidgetbackingstore_p.h" | - |
46 | #include "private/qwidget_p.h" | - |
47 | #include "private/qwidgetwindow_qpa_p.h" | - |
48 | #include "private/qapplication_p.h" | - |
49 | #include "QtWidgets/qdesktopwidget.h" | - |
50 | #include <qpa/qplatformwindow.h> | - |
51 | #include "QtGui/qsurfaceformat.h" | - |
52 | #include <qpa/qplatformopenglcontext.h> | - |
53 | #include <qpa/qplatformintegration.h> | - |
54 | #include "QtGui/private/qwindow_p.h" | - |
55 | | - |
56 | #include <qpa/qplatformcursor.h> | - |
57 | #include <QtGui/QGuiApplication> | - |
58 | #include <QtGui/QScreen> | - |
59 | #include <QtCore/QMargins> | - |
60 | | - |
61 | QT_BEGIN_NAMESPACE | - |
62 | | - |
63 | void q_createNativeChildrenAndSetParent(const QWidget *parentWidget) | - |
64 | { | - |
65 | QObjectList children = parentWidget->children(); executed (the execution status of this line is deduced): QObjectList children = parentWidget->children(); | - |
66 | for (int i = 0; i < children.size(); i++) { evaluated: i < children.size() yes Evaluation Count:27516 | yes Evaluation Count:19581 |
| 19581-27516 |
67 | if (children.at(i)->isWidgetType()) { evaluated: children.at(i)->isWidgetType() yes Evaluation Count:16940 | yes Evaluation Count:10576 |
| 10576-16940 |
68 | const QWidget *childWidget = qobject_cast<const QWidget *>(children.at(i)); executed (the execution status of this line is deduced): const QWidget *childWidget = qobject_cast<const QWidget *>(children.at(i)); | - |
69 | if (childWidget) { // should not be necessary partially evaluated: childWidget yes Evaluation Count:16940 | no Evaluation Count:0 |
| 0-16940 |
70 | if (childWidget->testAttribute(Qt::WA_NativeWindow)) { evaluated: childWidget->testAttribute(Qt::WA_NativeWindow) yes Evaluation Count:33 | yes Evaluation Count:16907 |
| 33-16907 |
71 | if (!childWidget->windowHandle()) partially evaluated: !childWidget->windowHandle() no Evaluation Count:0 | yes Evaluation Count:33 |
| 0-33 |
72 | childWidget->winId(); never executed: childWidget->winId(); | 0 |
73 | if (childWidget->windowHandle()) { partially evaluated: childWidget->windowHandle() yes Evaluation Count:33 | no Evaluation Count:0 |
| 0-33 |
74 | QWindow *parentWindow = childWidget->nativeParentWidget()->windowHandle(); executed (the execution status of this line is deduced): QWindow *parentWindow = childWidget->nativeParentWidget()->windowHandle(); | - |
75 | if (childWidget->isWindow()) evaluated: childWidget->isWindow() yes Evaluation Count:3 | yes Evaluation Count:30 |
| 3-30 |
76 | childWidget->windowHandle()->setTransientParent(parentWindow); executed: childWidget->windowHandle()->setTransientParent(parentWindow); Execution Count:3 | 3 |
77 | else | - |
78 | childWidget->windowHandle()->setParent(parentWindow); executed: childWidget->windowHandle()->setParent(parentWindow); Execution Count:30 | 30 |
79 | } | - |
80 | } else { executed: } Execution Count:33 | 33 |
81 | q_createNativeChildrenAndSetParent(childWidget); executed (the execution status of this line is deduced): q_createNativeChildrenAndSetParent(childWidget); | - |
82 | } executed: } Execution Count:16907 | 16907 |
83 | } | - |
84 | } executed: } Execution Count:16940 | 16940 |
85 | } executed: } Execution Count:27516 | 27516 |
86 | | - |
87 | } executed: } Execution Count:19581 | 19581 |
88 | | - |
89 | void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyOldWindow) | - |
90 | { | - |
91 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
92 | | - |
93 | Q_UNUSED(window); executed (the execution status of this line is deduced): (void)window;; | - |
94 | Q_UNUSED(initializeWindow); executed (the execution status of this line is deduced): (void)initializeWindow;; | - |
95 | Q_UNUSED(destroyOldWindow); executed (the execution status of this line is deduced): (void)destroyOldWindow;; | - |
96 | | - |
97 | Qt::WindowFlags flags = data.window_flags; executed (the execution status of this line is deduced): Qt::WindowFlags flags = data.window_flags; | - |
98 | | - |
99 | 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 |
100 | return; // we only care about real toplevels executed: return; Execution Count:8967 | 8967 |
101 | | - |
102 | QWindow *win = topData()->window; executed (the execution status of this line is deduced): QWindow *win = topData()->window; | - |
103 | // topData() ensures the extra is created but does not ensure 'window' is non-null | - |
104 | // in case the extra was already valid. | - |
105 | if (!win) { evaluated: !win yes Evaluation Count:2 | yes Evaluation Count:2672 |
| 2-2672 |
106 | createTLSysExtra(); executed (the execution status of this line is deduced): createTLSysExtra(); | - |
107 | win = topData()->window; executed (the execution status of this line is deduced): win = topData()->window; | - |
108 | } executed: } Execution Count:2 | 2 |
109 | | - |
110 | win->setFlags(data.window_flags); executed (the execution status of this line is deduced): win->setFlags(data.window_flags); | - |
111 | fixPosIncludesFrame(); executed (the execution status of this line is deduced): fixPosIncludesFrame(); | - |
112 | win->setGeometry(q->geometry()); executed (the execution status of this line is deduced): win->setGeometry(q->geometry()); | - |
113 | win->setScreen(QGuiApplication::screens().value(topData()->screenIndex, 0)); executed (the execution status of this line is deduced): win->setScreen(QGuiApplication::screens().value(topData()->screenIndex, 0)); | - |
114 | | - |
115 | if (q->testAttribute(Qt::WA_TranslucentBackground)) { evaluated: q->testAttribute(Qt::WA_TranslucentBackground) yes Evaluation Count:4 | yes Evaluation Count:2670 |
| 4-2670 |
116 | QSurfaceFormat format; executed (the execution status of this line is deduced): QSurfaceFormat format; | - |
117 | format.setAlphaBufferSize(8); executed (the execution status of this line is deduced): format.setAlphaBufferSize(8); | - |
118 | win->setFormat(format); executed (the execution status of this line is deduced): win->setFormat(format); | - |
119 | } executed: } Execution Count:4 | 4 |
120 | | - |
121 | if (QWidget *nativeParent = q->nativeParentWidget()) { evaluated: QWidget *nativeParent = q->nativeParentWidget() yes Evaluation Count:141 | yes Evaluation Count:2533 |
| 141-2533 |
122 | if (nativeParent->windowHandle()) { partially evaluated: nativeParent->windowHandle() yes Evaluation Count:141 | no Evaluation Count:0 |
| 0-141 |
123 | if (flags & Qt::Window) { evaluated: flags & Qt::Window yes Evaluation Count:103 | yes Evaluation Count:38 |
| 38-103 |
124 | win->setTransientParent(nativeParent->windowHandle()); executed (the execution status of this line is deduced): win->setTransientParent(nativeParent->windowHandle()); | - |
125 | win->setParent(0); executed (the execution status of this line is deduced): win->setParent(0); | - |
126 | } else { executed: } Execution Count:103 | 103 |
127 | win->setTransientParent(0); executed (the execution status of this line is deduced): win->setTransientParent(0); | - |
128 | win->setParent(nativeParent->windowHandle()); executed (the execution status of this line is deduced): win->setParent(nativeParent->windowHandle()); | - |
129 | } executed: } Execution Count:38 | 38 |
130 | } | - |
131 | } executed: } Execution Count:141 | 141 |
132 | | - |
133 | qt_window_private(win)->positionPolicy = topData()->posIncludesFrame ? evaluated: topData()->posIncludesFrame yes Evaluation Count:225 | yes Evaluation Count:2449 |
| 225-2449 |
134 | QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive; executed (the execution status of this line is deduced): QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive; | - |
135 | win->create(); executed (the execution status of this line is deduced): win->create(); | - |
136 | | - |
137 | data.window_flags = win->flags(); executed (the execution status of this line is deduced): data.window_flags = win->flags(); | - |
138 | | - |
139 | QBackingStore *store = q->backingStore(); executed (the execution status of this line is deduced): QBackingStore *store = q->backingStore(); | - |
140 | | - |
141 | if (!store) { evaluated: !store yes Evaluation Count:2631 | yes Evaluation Count:43 |
| 43-2631 |
142 | 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 |
143 | q->setBackingStore(new QBackingStore(win)); executed: q->setBackingStore(new QBackingStore(win)); Execution Count:2499 | 2499 |
144 | else | - |
145 | q->setAttribute(Qt::WA_PaintOnScreen, true); executed: q->setAttribute(Qt::WA_PaintOnScreen, true); Execution Count:132 | 132 |
146 | } | - |
147 | | - |
148 | setWindowModified_helper(); executed (the execution status of this line is deduced): setWindowModified_helper(); | - |
149 | setWinId(win->winId()); executed (the execution status of this line is deduced): setWinId(win->winId()); | - |
150 | | - |
151 | // Check children and create windows for them if necessary | - |
152 | q_createNativeChildrenAndSetParent(q); executed (the execution status of this line is deduced): q_createNativeChildrenAndSetParent(q); | - |
153 | | - |
154 | 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 |
155 | setMask_sys(extra->mask); executed: setMask_sys(extra->mask); Execution Count:5 | 5 |
156 | | - |
157 | // If widget is already shown, set window visible, too | - |
158 | if (q->isVisible()) evaluated: q->isVisible() yes Evaluation Count:12 | yes Evaluation Count:2662 |
| 12-2662 |
159 | win->setVisible(true); executed: win->setVisible(true); Execution Count:12 | 12 |
160 | } executed: } Execution Count:2674 | 2674 |
161 | | - |
162 | void QWidget::destroy(bool destroyWindow, bool destroySubWindows) | - |
163 | { | - |
164 | Q_D(QWidget); executed (the execution status of this line is deduced): QWidgetPrivate * const d = d_func(); | - |
165 | | - |
166 | d->aboutToDestroy(); executed (the execution status of this line is deduced): d->aboutToDestroy(); | - |
167 | 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 |
168 | parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); executed: parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); Execution Count:36280 | 36280 |
169 | d->deactivateWidgetCleanup(); executed (the execution status of this line is deduced): d->deactivateWidgetCleanup(); | - |
170 | | - |
171 | if ((windowType() == Qt::Popup)) evaluated: (windowType() == Qt::Popup) yes Evaluation Count:641 | yes Evaluation Count:44568 |
| 641-44568 |
172 | qApp->d_func()->closePopup(this); executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(this); Execution Count:641 | 641 |
173 | | - |
174 | if (this == QApplicationPrivate::active_window) partially evaluated: this == QApplicationPrivate::active_window no Evaluation Count:0 | yes Evaluation Count:45209 |
| 0-45209 |
175 | QApplication::setActiveWindow(0); never executed: QApplication::setActiveWindow(0); | 0 |
176 | if (QWidget::mouseGrabber() == this) partially evaluated: QWidget::mouseGrabber() == this no Evaluation Count:0 | yes Evaluation Count:45209 |
| 0-45209 |
177 | releaseMouse(); never executed: releaseMouse(); | 0 |
178 | if (QWidget::keyboardGrabber() == this) evaluated: QWidget::keyboardGrabber() == this yes Evaluation Count:1 | yes Evaluation Count:45208 |
| 1-45208 |
179 | releaseKeyboard(); executed: releaseKeyboard(); Execution Count:1 | 1 |
180 | | - |
181 | setAttribute(Qt::WA_WState_Created, false); executed (the execution status of this line is deduced): setAttribute(Qt::WA_WState_Created, false); | - |
182 | | - |
183 | if (windowType() != Qt::Desktop) { evaluated: windowType() != Qt::Desktop yes Evaluation Count:44734 | yes Evaluation Count:475 |
| 475-44734 |
184 | if (destroySubWindows) { partially evaluated: destroySubWindows yes Evaluation Count:44734 | no Evaluation Count:0 |
| 0-44734 |
185 | QObjectList childList(children()); executed (the execution status of this line is deduced): QObjectList childList(children()); | - |
186 | for (int i = 0; i < childList.size(); i++) { evaluated: i < childList.size() yes Evaluation Count:5036 | yes Evaluation Count:44734 |
| 5036-44734 |
187 | QWidget *widget = qobject_cast<QWidget *>(childList.at(i)); executed (the execution status of this line is deduced): QWidget *widget = qobject_cast<QWidget *>(childList.at(i)); | - |
188 | 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 |
189 | if (widget->windowHandle()) { never evaluated: widget->windowHandle() | 0 |
190 | widget->destroy(); never executed (the execution status of this line is deduced): widget->destroy(); | - |
191 | } | 0 |
192 | } | 0 |
193 | } executed: } Execution Count:5036 | 5036 |
194 | } executed: } Execution Count:44734 | 44734 |
195 | if (destroyWindow) { partially evaluated: destroyWindow yes Evaluation Count:44734 | no Evaluation Count:0 |
| 0-44734 |
196 | d->deleteTLSysExtra(); executed (the execution status of this line is deduced): d->deleteTLSysExtra(); | - |
197 | } else { executed: } Execution Count:44734 | 44734 |
198 | if (parentWidget() && parentWidget()->testAttribute(Qt::WA_WState_Created)) { never evaluated: parentWidget() never evaluated: parentWidget()->testAttribute(Qt::WA_WState_Created) | 0 |
199 | d->hide_sys(); never executed (the execution status of this line is deduced): d->hide_sys(); | - |
200 | } | 0 |
201 | } | 0 |
202 | | - |
203 | d->setWinId(0); executed (the execution status of this line is deduced): d->setWinId(0); | - |
204 | } executed: } Execution Count:44734 | 44734 |
205 | } executed: } Execution Count:45209 | 45209 |
206 | | - |
207 | void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f) | - |
208 | { | - |
209 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
210 | | - |
211 | Qt::WindowFlags oldFlags = data.window_flags; executed (the execution status of this line is deduced): Qt::WindowFlags oldFlags = data.window_flags; | - |
212 | bool wasCreated = q->testAttribute(Qt::WA_WState_Created); executed (the execution status of this line is deduced): bool wasCreated = q->testAttribute(Qt::WA_WState_Created); | - |
213 | | - |
214 | int targetScreen = -1; executed (the execution status of this line is deduced): int targetScreen = -1; | - |
215 | // Handle a request to move the widget to a particular screen | - |
216 | 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 |
217 | // make sure the widget is created on the same screen as the | - |
218 | // programmer specified desktop widget | - |
219 | | - |
220 | // get the desktop's screen number | - |
221 | targetScreen = newparent->window()->d_func()->topData()->screenIndex; never executed (the execution status of this line is deduced): targetScreen = newparent->window()->d_func()->topData()->screenIndex; | - |
222 | newparent = 0; never executed (the execution status of this line is deduced): newparent = 0; | - |
223 | } | 0 |
224 | | - |
225 | setWinId(0); executed (the execution status of this line is deduced): setWinId(0); | - |
226 | | - |
227 | if (parent != newparent) { evaluated: parent != newparent yes Evaluation Count:41065 | yes Evaluation Count:498 |
| 498-41065 |
228 | QObjectPrivate::setParent_helper(newparent); //### why does this have to be done in the _sys function??? executed (the execution status of this line is deduced): QObjectPrivate::setParent_helper(newparent); | - |
229 | if (q->windowHandle()) { evaluated: q->windowHandle() yes Evaluation Count:55 | yes Evaluation Count:41010 |
| 55-41010 |
230 | q->windowHandle()->setFlags(f); executed (the execution status of this line is deduced): q->windowHandle()->setFlags(f); | - |
231 | QWidget *parentWithWindow = executed (the execution status of this line is deduced): QWidget *parentWithWindow = | - |
232 | newparent ? (newparent->windowHandle() ? newparent : newparent->nativeParentWidget()) : 0; evaluated: newparent yes Evaluation Count:51 | yes Evaluation Count:4 |
| 4-51 |
233 | if (parentWithWindow) { evaluated: parentWithWindow yes Evaluation Count:38 | yes Evaluation Count:17 |
| 17-38 |
234 | if (f & Qt::Window) { evaluated: f & Qt::Window yes Evaluation Count:6 | yes Evaluation Count:32 |
| 6-32 |
235 | q->windowHandle()->setTransientParent(parentWithWindow->windowHandle()); executed (the execution status of this line is deduced): q->windowHandle()->setTransientParent(parentWithWindow->windowHandle()); | - |
236 | q->windowHandle()->setParent(0); executed (the execution status of this line is deduced): q->windowHandle()->setParent(0); | - |
237 | } else { executed: } Execution Count:6 | 6 |
238 | q->windowHandle()->setTransientParent(0); executed (the execution status of this line is deduced): q->windowHandle()->setTransientParent(0); | - |
239 | q->windowHandle()->setParent(parentWithWindow->windowHandle()); executed (the execution status of this line is deduced): q->windowHandle()->setParent(parentWithWindow->windowHandle()); | - |
240 | } executed: } Execution Count:32 | 32 |
241 | } else { | - |
242 | q->windowHandle()->setTransientParent(0); executed (the execution status of this line is deduced): q->windowHandle()->setTransientParent(0); | - |
243 | q->windowHandle()->setParent(0); executed (the execution status of this line is deduced): q->windowHandle()->setParent(0); | - |
244 | } executed: } Execution Count:17 | 17 |
245 | } | - |
246 | } executed: } Execution Count:41065 | 41065 |
247 | | - |
248 | if (!newparent) { evaluated: !newparent yes Evaluation Count:574 | yes Evaluation Count:40989 |
| 574-40989 |
249 | f |= Qt::Window; executed (the execution status of this line is deduced): f |= Qt::Window; | - |
250 | if (targetScreen == -1) { partially evaluated: targetScreen == -1 yes Evaluation Count:574 | no Evaluation Count:0 |
| 0-574 |
251 | if (parent) partially evaluated: parent no Evaluation Count:0 | yes Evaluation Count:574 |
| 0-574 |
252 | targetScreen = q->parentWidget()->window()->d_func()->topData()->screenIndex; never executed: targetScreen = q->parentWidget()->window()->d_func()->topData()->screenIndex; | 0 |
253 | } executed: } Execution Count:574 | 574 |
254 | } executed: } Execution Count:574 | 574 |
255 | | - |
256 | 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 |
257 | | - |
258 | // Reparenting toplevel to child | - |
259 | 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 |
260 | //qDebug() << "setParent_sys() change from toplevel"; | - |
261 | q->destroy(); executed (the execution status of this line is deduced): q->destroy(); | - |
262 | } executed: } Execution Count:3138 | 3138 |
263 | | - |
264 | adjustFlags(f, q); executed (the execution status of this line is deduced): adjustFlags(f, q); | - |
265 | data.window_flags = f; executed (the execution status of this line is deduced): data.window_flags = f; | - |
266 | q->setAttribute(Qt::WA_WState_Created, false); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_WState_Created, false); | - |
267 | q->setAttribute(Qt::WA_WState_Visible, false); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_WState_Visible, false); | - |
268 | q->setAttribute(Qt::WA_WState_Hidden, false); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_WState_Hidden, false); | - |
269 | | - |
270 | 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 |
271 | q->createWinId(); executed: q->createWinId(); Execution Count:23 | 23 |
272 | | - |
273 | 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 |
274 | q->setAttribute(Qt::WA_WState_Hidden); executed: q->setAttribute(Qt::WA_WState_Hidden); Execution Count:1719 | 1719 |
275 | q->setAttribute(Qt::WA_WState_ExplicitShowHide, explicitlyHidden); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_WState_ExplicitShowHide, explicitlyHidden); | - |
276 | | - |
277 | // move the window to the selected screen | - |
278 | 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 |
279 | if (maybeTopData()) never evaluated: maybeTopData() | 0 |
280 | maybeTopData()->screenIndex = targetScreen; never executed: maybeTopData()->screenIndex = targetScreen; | 0 |
281 | // only if it is already created | - |
282 | if (q->testAttribute(Qt::WA_WState_Created)) { never evaluated: q->testAttribute(Qt::WA_WState_Created) | 0 |
283 | q->windowHandle()->setScreen(QGuiApplication::screens().value(targetScreen, 0)); never executed (the execution status of this line is deduced): q->windowHandle()->setScreen(QGuiApplication::screens().value(targetScreen, 0)); | - |
284 | } | 0 |
285 | } | 0 |
286 | } executed: } Execution Count:41563 | 41563 |
287 | | - |
288 | QPoint QWidget::mapToGlobal(const QPoint &pos) const | - |
289 | { | - |
290 | int x = pos.x(), y = pos.y(); executed (the execution status of this line is deduced): int x = pos.x(), y = pos.y(); | - |
291 | const QWidget *w = this; executed (the execution status of this line is deduced): const QWidget *w = this; | - |
292 | while (w) { evaluated: w yes Evaluation Count:28426 | yes Evaluation Count:721 |
| 721-28426 |
293 | QWindow *window = w->windowHandle(); executed (the execution status of this line is deduced): QWindow *window = w->windowHandle(); | - |
294 | 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 |
295 | return window->mapToGlobal(QPoint(x, y)); executed: return window->mapToGlobal(QPoint(x, y)); Execution Count:13713 | 13713 |
296 | | - |
297 | x += w->data->crect.x(); executed (the execution status of this line is deduced): x += w->data->crect.x(); | - |
298 | y += w->data->crect.y(); executed (the execution status of this line is deduced): y += w->data->crect.y(); | - |
299 | w = w->isWindow() ? 0 : w->parentWidget(); evaluated: w->isWindow() yes Evaluation Count:721 | yes Evaluation Count:13992 |
| 721-13992 |
300 | } executed: } Execution Count:14713 | 14713 |
301 | return QPoint(x, y); executed: return QPoint(x, y); Execution Count:721 | 721 |
302 | } | - |
303 | | - |
304 | QPoint QWidget::mapFromGlobal(const QPoint &pos) const | - |
305 | { | - |
306 | int x = pos.x(), y = pos.y(); executed (the execution status of this line is deduced): int x = pos.x(), y = pos.y(); | - |
307 | const QWidget *w = this; executed (the execution status of this line is deduced): const QWidget *w = this; | - |
308 | while (w) { evaluated: w yes Evaluation Count:28476 | yes Evaluation Count:622 |
| 622-28476 |
309 | QWindow *window = w->windowHandle(); executed (the execution status of this line is deduced): QWindow *window = w->windowHandle(); | - |
310 | 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 |
311 | return window->mapFromGlobal(QPoint(x, y)); executed: return window->mapFromGlobal(QPoint(x, y)); Execution Count:14551 | 14551 |
312 | | - |
313 | x -= w->data->crect.x(); executed (the execution status of this line is deduced): x -= w->data->crect.x(); | - |
314 | y -= w->data->crect.y(); executed (the execution status of this line is deduced): y -= w->data->crect.y(); | - |
315 | w = w->isWindow() ? 0 : w->parentWidget(); evaluated: w->isWindow() yes Evaluation Count:622 | yes Evaluation Count:13303 |
| 622-13303 |
316 | } executed: } Execution Count:13925 | 13925 |
317 | return QPoint(x, y); executed: return QPoint(x, y); Execution Count:622 | 622 |
318 | } | - |
319 | | - |
320 | void QWidgetPrivate::updateSystemBackground() {} | - |
321 | | - |
322 | #ifndef QT_NO_CURSOR | - |
323 | void QWidgetPrivate::setCursor_sys(const QCursor &cursor) | - |
324 | { | - |
325 | Q_UNUSED(cursor); executed (the execution status of this line is deduced): (void)cursor;; | - |
326 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
327 | qt_qpa_set_cursor(q, false); executed (the execution status of this line is deduced): qt_qpa_set_cursor(q, false); | - |
328 | } executed: } Execution Count:2649 | 2649 |
329 | | - |
330 | void QWidgetPrivate::unsetCursor_sys() | - |
331 | { | - |
332 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
333 | qt_qpa_set_cursor(q, false); executed (the execution status of this line is deduced): qt_qpa_set_cursor(q, false); | - |
334 | } executed: } Execution Count:138 | 138 |
335 | | - |
336 | #endif //QT_NO_CURSOR | - |
337 | | - |
338 | void QWidgetPrivate::setWindowTitle_sys(const QString &caption) | - |
339 | { | - |
340 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
341 | if (!q->isWindow()) evaluated: !q->isWindow() yes Evaluation Count:45 | yes Evaluation Count:3002 |
| 45-3002 |
342 | return; executed: return; Execution Count:45 | 45 |
343 | | - |
344 | if (QWindow *window = q->windowHandle()) partially evaluated: QWindow *window = q->windowHandle() yes Evaluation Count:3002 | no Evaluation Count:0 |
| 0-3002 |
345 | window->setTitle(caption); executed: window->setTitle(caption); Execution Count:3002 | 3002 |
346 | | - |
347 | } executed: } Execution Count:3002 | 3002 |
348 | | - |
349 | void QWidgetPrivate::setWindowFilePath_sys(const QString &filePath) | - |
350 | { | - |
351 | Q_Q(QWidget); never executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
352 | if (!q->isWindow()) never evaluated: !q->isWindow() | 0 |
353 | return; | 0 |
354 | | - |
355 | if (QWindow *window = q->windowHandle()) never evaluated: QWindow *window = q->windowHandle() | 0 |
356 | window->setFilePath(filePath); never executed: window->setFilePath(filePath); | 0 |
357 | } | 0 |
358 | | - |
359 | void QWidgetPrivate::setWindowIcon_sys() | - |
360 | { | - |
361 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
362 | if (QWindow *window = q->windowHandle()) evaluated: QWindow *window = q->windowHandle() yes Evaluation Count:2613 | yes Evaluation Count:3 |
| 3-2613 |
363 | window->setIcon(q->windowIcon()); executed: window->setIcon(q->windowIcon()); Execution Count:2613 | 2613 |
364 | } executed: } Execution Count:2616 | 2616 |
365 | | - |
366 | void QWidgetPrivate::setWindowIconText_sys(const QString &iconText) | - |
367 | { | - |
368 | Q_UNUSED(iconText); executed (the execution status of this line is deduced): (void)iconText;; | - |
369 | } executed: } Execution Count:2810 | 2810 |
370 | | - |
371 | QWidget *qt_pressGrab = 0; | - |
372 | QWidget *qt_mouseGrb = 0; | - |
373 | static QWidget *keyboardGrb = 0; | - |
374 | | - |
375 | static inline QWindow *grabberWindow(const QWidget *w) | - |
376 | { | - |
377 | QWindow *window = w->windowHandle(); executed (the execution status of this line is deduced): QWindow *window = w->windowHandle(); | - |
378 | if (!window) evaluated: !window yes Evaluation Count:8 | yes Evaluation Count:400 |
| 8-400 |
379 | if (const QWidget *nativeParent = w->nativeParentWidget()) partially evaluated: const QWidget *nativeParent = w->nativeParentWidget() yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
380 | window = nativeParent->windowHandle(); executed: window = nativeParent->windowHandle(); Execution Count:8 | 8 |
381 | return window; executed: return window; Execution Count:408 | 408 |
382 | } | - |
383 | | - |
384 | void QWidget::grabMouse() | - |
385 | { | - |
386 | if (qt_mouseGrb) partially evaluated: qt_mouseGrb no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
387 | qt_mouseGrb->releaseMouse(); never executed: qt_mouseGrb->releaseMouse(); | 0 |
388 | | - |
389 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this) yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
390 | window->setMouseGrabEnabled(true); executed: window->setMouseGrabEnabled(true); Execution Count:3 | 3 |
391 | | - |
392 | qt_mouseGrb = this; executed (the execution status of this line is deduced): qt_mouseGrb = this; | - |
393 | qt_pressGrab = 0; executed (the execution status of this line is deduced): qt_pressGrab = 0; | - |
394 | } executed: } Execution Count:3 | 3 |
395 | | - |
396 | #ifndef QT_NO_CURSOR | - |
397 | void QWidget::grabMouse(const QCursor &cursor) | - |
398 | { | - |
399 | Q_UNUSED(cursor); never executed (the execution status of this line is deduced): (void)cursor;; | - |
400 | grabMouse(); never executed (the execution status of this line is deduced): grabMouse(); | - |
401 | } | 0 |
402 | #endif | - |
403 | | - |
404 | bool QWidgetPrivate::stealMouseGrab(bool grab) | - |
405 | { | - |
406 | // This is like a combination of grab/releaseMouse() but with error checking | - |
407 | // and it has no effect on the result of mouseGrabber(). | - |
408 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
409 | QWindow *window = grabberWindow(q); executed (the execution status of this line is deduced): QWindow *window = grabberWindow(q); | - |
410 | return window ? window->setMouseGrabEnabled(grab) : false; executed: return window ? window->setMouseGrabEnabled(grab) : false; Execution Count:199 | 199 |
411 | } | - |
412 | | - |
413 | void QWidget::releaseMouse() | - |
414 | { | - |
415 | if (qt_mouseGrb == this) { partially evaluated: qt_mouseGrb == this yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
416 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this) yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
417 | window->setMouseGrabEnabled(false); executed: window->setMouseGrabEnabled(false); Execution Count:3 | 3 |
418 | qt_mouseGrb = 0; executed (the execution status of this line is deduced): qt_mouseGrb = 0; | - |
419 | } executed: } Execution Count:3 | 3 |
420 | } executed: } Execution Count:3 | 3 |
421 | | - |
422 | void QWidget::grabKeyboard() | - |
423 | { | - |
424 | if (keyboardGrb) partially evaluated: keyboardGrb no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
425 | keyboardGrb->releaseKeyboard(); never executed: keyboardGrb->releaseKeyboard(); | 0 |
426 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this) yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
427 | window->setKeyboardGrabEnabled(true); executed: window->setKeyboardGrabEnabled(true); Execution Count:2 | 2 |
428 | keyboardGrb = this; executed (the execution status of this line is deduced): keyboardGrb = this; | - |
429 | } executed: } Execution Count:2 | 2 |
430 | | - |
431 | bool QWidgetPrivate::stealKeyboardGrab(bool grab) | - |
432 | { | - |
433 | // This is like a combination of grab/releaseKeyboard() but with error | - |
434 | // checking and it has no effect on the result of keyboardGrabber(). | - |
435 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
436 | QWindow *window = grabberWindow(q); executed (the execution status of this line is deduced): QWindow *window = grabberWindow(q); | - |
437 | return window ? window->setKeyboardGrabEnabled(grab) : false; executed: return window ? window->setKeyboardGrabEnabled(grab) : false; Execution Count:199 | 199 |
438 | } | - |
439 | | - |
440 | void QWidget::releaseKeyboard() | - |
441 | { | - |
442 | if (keyboardGrb == this) { partially evaluated: keyboardGrb == this yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
443 | if (QWindow *window = grabberWindow(this)) partially evaluated: QWindow *window = grabberWindow(this) yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
444 | window->setKeyboardGrabEnabled(false); executed: window->setKeyboardGrabEnabled(false); Execution Count:2 | 2 |
445 | keyboardGrb = 0; executed (the execution status of this line is deduced): keyboardGrb = 0; | - |
446 | } executed: } Execution Count:2 | 2 |
447 | } executed: } Execution Count:2 | 2 |
448 | | - |
449 | QWidget *QWidget::mouseGrabber() | - |
450 | { | - |
451 | if (qt_mouseGrb) evaluated: qt_mouseGrb yes Evaluation Count:25 | yes Evaluation Count:48236 |
| 25-48236 |
452 | return qt_mouseGrb; executed: return qt_mouseGrb; Execution Count:25 | 25 |
453 | return qt_pressGrab; executed: return qt_pressGrab; Execution Count:48236 | 48236 |
454 | } | - |
455 | | - |
456 | QWidget *QWidget::keyboardGrabber() | - |
457 | { | - |
458 | return keyboardGrb; executed: return keyboardGrb; Execution Count:45401 | 45401 |
459 | } | - |
460 | | - |
461 | void QWidget::activateWindow() | - |
462 | { | - |
463 | QWindow *const wnd = window()->windowHandle(); executed (the execution status of this line is deduced): QWindow *const wnd = window()->windowHandle(); | - |
464 | | - |
465 | if (wnd) evaluated: wnd yes Evaluation Count:199 | yes Evaluation Count:1 |
| 1-199 |
466 | wnd->requestActivate(); executed: wnd->requestActivate(); Execution Count:199 | 199 |
467 | } executed: } Execution Count:200 | 200 |
468 | | - |
469 | // Position top level windows at the center, avoid showing | - |
470 | // Windows at the default 0,0 position excluding the frame. | - |
471 | static inline QRect positionTopLevelWindow(QRect geometry, const QScreen *screen) | - |
472 | { | - |
473 | 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 |
474 | const QRect availableGeometry = screen->availableGeometry(); executed (the execution status of this line is deduced): const QRect availableGeometry = screen->availableGeometry(); | - |
475 | if (availableGeometry.width() > geometry.width() evaluated: availableGeometry.width() > geometry.width() yes Evaluation Count:2101 | yes Evaluation Count:10 |
| 10-2101 |
476 | && availableGeometry.height() > geometry.height()) evaluated: availableGeometry.height() > geometry.height() yes Evaluation Count:2099 | yes Evaluation Count:2 |
| 2-2099 |
477 | geometry.moveCenter(availableGeometry.center()); executed: geometry.moveCenter(availableGeometry.center()); Execution Count:2099 | 2099 |
478 | } executed: } Execution Count:2111 | 2111 |
479 | return geometry; executed: return geometry; Execution Count:2369 | 2369 |
480 | } | - |
481 | | - |
482 | // move() was invoked with Qt::WA_WState_Created not set (frame geometry | - |
483 | // unknown), that is, crect has a position including the frame. | - |
484 | // If we can determine the frame strut, fix that and clear the flag. | - |
485 | void QWidgetPrivate::fixPosIncludesFrame() | - |
486 | { | - |
487 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
488 | if (QTLWExtra *te = maybeTopData()) { evaluated: QTLWExtra *te = maybeTopData() yes Evaluation Count:7710 | yes Evaluation Count:584 |
| 584-7710 |
489 | if (te->posIncludesFrame) { evaluated: te->posIncludesFrame yes Evaluation Count:635 | yes Evaluation Count:7075 |
| 635-7075 |
490 | // For Qt::WA_DontShowOnScreen, assume a frame of 0 (for | - |
491 | // example, in QGraphicsProxyWidget). | - |
492 | if (q->testAttribute(Qt::WA_DontShowOnScreen)) { evaluated: q->testAttribute(Qt::WA_DontShowOnScreen) yes Evaluation Count:1 | yes Evaluation Count:634 |
| 1-634 |
493 | te->posIncludesFrame = 0; executed (the execution status of this line is deduced): te->posIncludesFrame = 0; | - |
494 | } else { executed: } Execution Count:1 | 1 |
495 | if (q->windowHandle()) { partially evaluated: q->windowHandle() yes Evaluation Count:634 | no Evaluation Count:0 |
| 0-634 |
496 | updateFrameStrut(); executed (the execution status of this line is deduced): updateFrameStrut(); | - |
497 | if (!q->data->fstrut_dirty) { partially evaluated: !q->data->fstrut_dirty no Evaluation Count:0 | yes Evaluation Count:634 |
| 0-634 |
498 | data.crect.translate(te->frameStrut.x(), te->frameStrut.y()); never executed (the execution status of this line is deduced): data.crect.translate(te->frameStrut.x(), te->frameStrut.y()); | - |
499 | te->posIncludesFrame = 0; never executed (the execution status of this line is deduced): te->posIncludesFrame = 0; | - |
500 | } | 0 |
501 | } // windowHandle() executed: } Execution Count:634 | 634 |
502 | } // !WA_DontShowOnScreen executed: } Execution Count:634 | 634 |
503 | } // posIncludesFrame | - |
504 | } // QTLWExtra executed: } Execution Count:7710 | 7710 |
505 | } executed: } Execution Count:8294 | 8294 |
506 | | - |
507 | void QWidgetPrivate::show_sys() | - |
508 | { | - |
509 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
510 | | - |
511 | QWindow *window = q->windowHandle(); executed (the execution status of this line is deduced): QWindow *window = q->windowHandle(); | - |
512 | | - |
513 | if (q->testAttribute(Qt::WA_DontShowOnScreen)) { evaluated: q->testAttribute(Qt::WA_DontShowOnScreen) yes Evaluation Count:10 | yes Evaluation Count:14998 |
| 10-14998 |
514 | invalidateBuffer(q->rect()); executed (the execution status of this line is deduced): invalidateBuffer(q->rect()); | - |
515 | q->setAttribute(Qt::WA_Mapped); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_Mapped); | - |
516 | 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 |
never evaluated: window | 0-10 |
517 | // add our window to the modal window list | - |
518 | QGuiApplicationPrivate::showModalWindow(window); never executed (the execution status of this line is deduced): QGuiApplicationPrivate::showModalWindow(window); | - |
519 | } | 0 |
520 | return; executed: return; Execution Count:10 | 10 |
521 | } | - |
522 | | - |
523 | QApplication::postEvent(q, new QUpdateLaterEvent(q->rect())); executed (the execution status of this line is deduced): QApplication::postEvent(q, new QUpdateLaterEvent(q->rect())); | - |
524 | | - |
525 | 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 |
526 | return; executed: return; Execution Count:12431 | 12431 |
527 | | - |
528 | if (window) { partially evaluated: window yes Evaluation Count:2567 | no Evaluation Count:0 |
| 0-2567 |
529 | if (q->isWindow()) evaluated: q->isWindow() yes Evaluation Count:2552 | yes Evaluation Count:15 |
| 15-2552 |
530 | fixPosIncludesFrame(); executed: fixPosIncludesFrame(); Execution Count:2552 | 2552 |
531 | QRect geomRect = q->geometry(); executed (the execution status of this line is deduced): QRect geomRect = q->geometry(); | - |
532 | if (q->isWindow()) { evaluated: q->isWindow() yes Evaluation Count:2552 | yes Evaluation Count:15 |
| 15-2552 |
533 | if (!q->testAttribute(Qt::WA_Moved)) evaluated: !q->testAttribute(Qt::WA_Moved) yes Evaluation Count:2369 | yes Evaluation Count:183 |
| 183-2369 |
534 | geomRect = positionTopLevelWindow(geomRect, window->screen()); executed: geomRect = positionTopLevelWindow(geomRect, window->screen()); Execution Count:2369 | 2369 |
535 | } else { executed: } Execution Count:2552 | 2552 |
536 | QPoint topLeftOfWindow = q->mapTo(q->nativeParentWidget(),QPoint()); executed (the execution status of this line is deduced): QPoint topLeftOfWindow = q->mapTo(q->nativeParentWidget(),QPoint()); | - |
537 | geomRect.moveTopLeft(topLeftOfWindow); executed (the execution status of this line is deduced): geomRect.moveTopLeft(topLeftOfWindow); | - |
538 | } executed: } Execution Count:15 | 15 |
539 | const QRect windowRect = window->geometry(); executed (the execution status of this line is deduced): const QRect windowRect = window->geometry(); | - |
540 | if (windowRect != geomRect) { evaluated: windowRect != geomRect yes Evaluation Count:2117 | yes Evaluation Count:450 |
| 450-2117 |
541 | window->setGeometry(geomRect); executed (the execution status of this line is deduced): window->setGeometry(geomRect); | - |
542 | } executed: } Execution Count:2117 | 2117 |
543 | | - |
544 | if (QBackingStore *store = q->backingStore()) { partially evaluated: QBackingStore *store = q->backingStore() yes Evaluation Count:2567 | no Evaluation Count:0 |
| 0-2567 |
545 | if (store->size() != geomRect.size()) { evaluated: store->size() != geomRect.size() yes Evaluation Count:2433 | yes Evaluation Count:134 |
| 134-2433 |
546 | store->resize(geomRect.size()); executed (the execution status of this line is deduced): store->resize(geomRect.size()); | - |
547 | } executed: } Execution Count:2433 | 2433 |
548 | } executed: } Execution Count:2567 | 2567 |
549 | | - |
550 | #ifndef QT_NO_CURSOR | - |
551 | qt_qpa_set_cursor(q, false); // Needed in case cursor was set before show executed (the execution status of this line is deduced): qt_qpa_set_cursor(q, false); | - |
552 | #endif | - |
553 | invalidateBuffer(q->rect()); executed (the execution status of this line is deduced): invalidateBuffer(q->rect()); | - |
554 | window->setVisible(true); executed (the execution status of this line is deduced): window->setVisible(true); | - |
555 | } executed: } Execution Count:2567 | 2567 |
556 | } executed: } Execution Count:2567 | 2567 |
557 | | - |
558 | | - |
559 | void QWidgetPrivate::hide_sys() | - |
560 | { | - |
561 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
562 | | - |
563 | QWindow *window = q->windowHandle(); executed (the execution status of this line is deduced): QWindow *window = q->windowHandle(); | - |
564 | | - |
565 | if (q->testAttribute(Qt::WA_DontShowOnScreen)) { evaluated: q->testAttribute(Qt::WA_DontShowOnScreen) yes Evaluation Count:6 | yes Evaluation Count:3887 |
| 6-3887 |
566 | q->setAttribute(Qt::WA_Mapped, false); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_Mapped, false); | - |
567 | 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 |
never evaluated: window | 0-6 |
568 | // remove our window from the modal window list | - |
569 | QGuiApplicationPrivate::hideModalWindow(window); never executed (the execution status of this line is deduced): QGuiApplicationPrivate::hideModalWindow(window); | - |
570 | } | 0 |
571 | // do not return here, if window non-zero, we must hide it | - |
572 | } executed: } Execution Count:6 | 6 |
573 | | - |
574 | deactivateWidgetCleanup(); executed (the execution status of this line is deduced): deactivateWidgetCleanup(); | - |
575 | | - |
576 | if (!q->isWindow()) { evaluated: !q->isWindow() yes Evaluation Count:1381 | yes Evaluation Count:2512 |
| 1381-2512 |
577 | QWidget *p = q->parentWidget(); executed (the execution status of this line is deduced): QWidget *p = q->parentWidget(); | - |
578 | 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 |
579 | invalidateBuffer(q->rect()); executed (the execution status of this line is deduced): invalidateBuffer(q->rect()); | - |
580 | } executed: } Execution Count:1020 | 1020 |
581 | } else { executed: } Execution Count:1381 | 1381 |
582 | invalidateBuffer(q->rect()); executed (the execution status of this line is deduced): invalidateBuffer(q->rect()); | - |
583 | } executed: } Execution Count:2512 | 2512 |
584 | | - |
585 | if (window) evaluated: window yes Evaluation Count:2521 | yes Evaluation Count:1372 |
| 1372-2521 |
586 | window->setVisible(false); executed: window->setVisible(false); Execution Count:2521 | 2521 |
587 | } executed: } Execution Count:3893 | 3893 |
588 | | - |
589 | Qt::WindowState effectiveState(Qt::WindowStates state) | - |
590 | { | - |
591 | if (state & Qt::WindowMinimized) evaluated: state & Qt::WindowMinimized yes Evaluation Count:89 | yes Evaluation Count:442 |
| 89-442 |
592 | return Qt::WindowMinimized; executed: return Qt::WindowMinimized; Execution Count:89 | 89 |
593 | else if (state & Qt::WindowFullScreen) evaluated: state & Qt::WindowFullScreen yes Evaluation Count:46 | yes Evaluation Count:396 |
| 46-396 |
594 | return Qt::WindowFullScreen; executed: return Qt::WindowFullScreen; Execution Count:46 | 46 |
595 | else if (state & Qt::WindowMaximized) evaluated: state & Qt::WindowMaximized yes Evaluation Count:155 | yes Evaluation Count:241 |
| 155-241 |
596 | return Qt::WindowMaximized; executed: return Qt::WindowMaximized; Execution Count:155 | 155 |
597 | return Qt::WindowNoState; executed: return Qt::WindowNoState; Execution Count:241 | 241 |
598 | } | - |
599 | | - |
600 | void QWidget::setWindowState(Qt::WindowStates newstate) | - |
601 | { | - |
602 | Q_D(QWidget); executed (the execution status of this line is deduced): QWidgetPrivate * const d = d_func(); | - |
603 | Qt::WindowStates oldstate = windowState(); executed (the execution status of this line is deduced): Qt::WindowStates oldstate = windowState(); | - |
604 | if (oldstate == newstate) evaluated: oldstate == newstate yes Evaluation Count:19 | yes Evaluation Count:255 |
| 19-255 |
605 | return; executed: return; Execution Count:19 | 19 |
606 | 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 |
607 | create(); executed: create(); Execution Count:25 | 25 |
608 | | - |
609 | data->window_state = newstate; executed (the execution status of this line is deduced): data->window_state = newstate; | - |
610 | data->in_set_window_state = 1; executed (the execution status of this line is deduced): data->in_set_window_state = 1; | - |
611 | Qt::WindowState newEffectiveState = effectiveState(newstate); executed (the execution status of this line is deduced): Qt::WindowState newEffectiveState = effectiveState(newstate); | - |
612 | Qt::WindowState oldEffectiveState = effectiveState(oldstate); executed (the execution status of this line is deduced): Qt::WindowState oldEffectiveState = effectiveState(oldstate); | - |
613 | 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 |
614 | // Ensure the initial size is valid, since we store it as normalGeometry below. | - |
615 | 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 |
616 | adjustSize(); executed: adjustSize(); Execution Count:11 | 11 |
617 | | - |
618 | d->createTLExtra(); executed (the execution status of this line is deduced): d->createTLExtra(); | - |
619 | if (oldEffectiveState == Qt::WindowNoState) evaluated: oldEffectiveState == Qt::WindowNoState yes Evaluation Count:53 | yes Evaluation Count:44 |
| 44-53 |
620 | d->topData()->normalGeometry = geometry(); executed: d->topData()->normalGeometry = geometry(); Execution Count:53 | 53 |
621 | | - |
622 | Q_ASSERT(windowHandle()); executed (the execution status of this line is deduced): qt_noop(); | - |
623 | windowHandle()->setWindowState(newEffectiveState); executed (the execution status of this line is deduced): windowHandle()->setWindowState(newEffectiveState); | - |
624 | } executed: } Execution Count:97 | 97 |
625 | data->in_set_window_state = 0; executed (the execution status of this line is deduced): data->in_set_window_state = 0; | - |
626 | | - |
627 | if (newstate & Qt::WindowActive) evaluated: newstate & Qt::WindowActive yes Evaluation Count:95 | yes Evaluation Count:160 |
| 95-160 |
628 | activateWindow(); executed: activateWindow(); Execution Count:95 | 95 |
629 | | - |
630 | QWindowStateChangeEvent e(oldstate); executed (the execution status of this line is deduced): QWindowStateChangeEvent e(oldstate); | - |
631 | QApplication::sendEvent(this, &e); executed (the execution status of this line is deduced): QApplication::sendEvent(this, &e); | - |
632 | } executed: } Execution Count:255 | 255 |
633 | | - |
634 | void QWidgetPrivate::setFocus_sys() | - |
635 | { | - |
636 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
637 | // Embedded native widget may have taken the focus; get it back to toplevel if that is the case | - |
638 | const QWidget *topLevel = q->window(); executed (the execution status of this line is deduced): const QWidget *topLevel = q->window(); | - |
639 | if (topLevel->windowType() != Qt::Popup) { evaluated: topLevel->windowType() != Qt::Popup yes Evaluation Count:1647 | yes Evaluation Count:16 |
| 16-1647 |
640 | if (QWindow *nativeWindow = q->window()->windowHandle()) { partially evaluated: QWindow *nativeWindow = q->window()->windowHandle() yes Evaluation Count:1647 | no Evaluation Count:0 |
| 0-1647 |
641 | if (nativeWindow != QGuiApplication::focusWindow() evaluated: nativeWindow != QGuiApplication::focusWindow() yes Evaluation Count:168 | yes Evaluation Count:1479 |
| 168-1479 |
642 | && q->testAttribute(Qt::WA_WState_Created)) { partially evaluated: q->testAttribute(Qt::WA_WState_Created) yes Evaluation Count:168 | no Evaluation Count:0 |
| 0-168 |
643 | nativeWindow->requestActivate(); executed (the execution status of this line is deduced): nativeWindow->requestActivate(); | - |
644 | } executed: } Execution Count:168 | 168 |
645 | } executed: } Execution Count:1647 | 1647 |
646 | } executed: } Execution Count:1647 | 1647 |
647 | } executed: } Execution Count:1663 | 1663 |
648 | | - |
649 | void QWidgetPrivate::raise_sys() | - |
650 | { | - |
651 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
652 | 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 |
653 | q->windowHandle()->raise(); executed (the execution status of this line is deduced): q->windowHandle()->raise(); | - |
654 | } executed: } Execution Count:128 | 128 |
655 | } executed: } Execution Count:3719 | 3719 |
656 | | - |
657 | void QWidgetPrivate::lower_sys() | - |
658 | { | - |
659 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
660 | 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 |
661 | Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); executed (the execution status of this line is deduced): qt_noop(); | - |
662 | q->windowHandle()->lower(); executed (the execution status of this line is deduced): q->windowHandle()->lower(); | - |
663 | } 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 |
664 | setDirtyOpaqueRegion(); executed (the execution status of this line is deduced): setDirtyOpaqueRegion(); | - |
665 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); executed (the execution status of this line is deduced): p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - |
666 | } executed: } Execution Count:35 | 35 |
667 | } | - |
668 | | - |
669 | void QWidgetPrivate::stackUnder_sys(QWidget*) | - |
670 | { | - |
671 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
672 | if (QWidget *p = q->parentWidget()) { partially evaluated: QWidget *p = q->parentWidget() yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
673 | setDirtyOpaqueRegion(); executed (the execution status of this line is deduced): setDirtyOpaqueRegion(); | - |
674 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); executed (the execution status of this line is deduced): p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - |
675 | } executed: } Execution Count:2 | 2 |
676 | } executed: } Execution Count:2 | 2 |
677 | | - |
678 | void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) | - |
679 | { | - |
680 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
681 | if (extra) { // any size restrictions? evaluated: extra yes Evaluation Count:21076 | yes Evaluation Count:7948 |
| 7948-21076 |
682 | w = qMin(w,extra->maxw); executed (the execution status of this line is deduced): w = qMin(w,extra->maxw); | - |
683 | h = qMin(h,extra->maxh); executed (the execution status of this line is deduced): h = qMin(h,extra->maxh); | - |
684 | w = qMax(w,extra->minw); executed (the execution status of this line is deduced): w = qMax(w,extra->minw); | - |
685 | h = qMax(h,extra->minh); executed (the execution status of this line is deduced): h = qMax(h,extra->minh); | - |
686 | } executed: } Execution Count:21076 | 21076 |
687 | | - |
688 | QPoint oldp = q->geometry().topLeft(); executed (the execution status of this line is deduced): QPoint oldp = q->geometry().topLeft(); | - |
689 | QSize olds = q->size(); executed (the execution status of this line is deduced): QSize olds = q->size(); | - |
690 | QRect r(x, y, w, h); executed (the execution status of this line is deduced): QRect r(x, y, w, h); | - |
691 | | - |
692 | bool isResize = olds != r.size(); executed (the execution status of this line is deduced): bool isResize = olds != r.size(); | - |
693 | isMove = oldp != r.topLeft(); //### why do we have isMove as a parameter? executed (the execution status of this line is deduced): isMove = oldp != r.topLeft(); | - |
694 | | - |
695 | | - |
696 | // We only care about stuff that changes the geometry, or may | - |
697 | // cause the window manager to change its state | - |
698 | 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 |
699 | return; executed: return; Execution Count:20869 | 20869 |
700 | | - |
701 | if (!data.in_set_window_state) { evaluated: !data.in_set_window_state yes Evaluation Count:8147 | yes Evaluation Count:8 |
| 8-8147 |
702 | q->data->window_state &= ~Qt::WindowMaximized; executed (the execution status of this line is deduced): q->data->window_state &= ~Qt::WindowMaximized; | - |
703 | q->data->window_state &= ~Qt::WindowFullScreen; executed (the execution status of this line is deduced): q->data->window_state &= ~Qt::WindowFullScreen; | - |
704 | if (q->isWindow()) evaluated: q->isWindow() yes Evaluation Count:2022 | yes Evaluation Count:6125 |
| 2022-6125 |
705 | topData()->normalGeometry = QRect(0, 0, -1, -1); executed: topData()->normalGeometry = QRect(0, 0, -1, -1); Execution Count:2022 | 2022 |
706 | } executed: } Execution Count:8147 | 8147 |
707 | | - |
708 | QPoint oldPos = q->pos(); executed (the execution status of this line is deduced): QPoint oldPos = q->pos(); | - |
709 | data.crect = r; executed (the execution status of this line is deduced): data.crect = r; | - |
710 | | - |
711 | bool needsShow = false; executed (the execution status of this line is deduced): bool needsShow = false; | - |
712 | | - |
713 | 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 |
714 | q->setAttribute(Qt::WA_OutsideWSRange, true); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_OutsideWSRange, true); | - |
715 | 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 |
716 | hide_sys(); executed: hide_sys(); Execution Count:1 | 1 |
717 | data.crect = QRect(x, y, w, h); executed (the execution status of this line is deduced): data.crect = QRect(x, y, w, h); | - |
718 | } 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 |
719 | q->setAttribute(Qt::WA_OutsideWSRange, false); executed (the execution status of this line is deduced): q->setAttribute(Qt::WA_OutsideWSRange, false); | - |
720 | needsShow = true; executed (the execution status of this line is deduced): needsShow = true; | - |
721 | } executed: } Execution Count:173 | 173 |
722 | | - |
723 | if (q->isVisible()) { evaluated: q->isVisible() yes Evaluation Count:4848 | yes Evaluation Count:3307 |
| 3307-4848 |
724 | 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 |
725 | if (q->windowHandle()) { evaluated: q->windowHandle() yes Evaluation Count:364 | yes Evaluation Count:4297 |
| 364-4297 |
726 | if (q->isWindow()) { partially evaluated: q->isWindow() yes Evaluation Count:364 | no Evaluation Count:0 |
| 0-364 |
727 | q->windowHandle()->setGeometry(q->geometry()); executed (the execution status of this line is deduced): q->windowHandle()->setGeometry(q->geometry()); | - |
728 | } else { executed: } Execution Count:364 | 364 |
729 | QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint()); never executed (the execution status of this line is deduced): QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint()); | - |
730 | q->windowHandle()->setGeometry(QRect(posInNativeParent,r.size())); never executed (the execution status of this line is deduced): q->windowHandle()->setGeometry(QRect(posInNativeParent,r.size())); | - |
731 | } | 0 |
732 | const QWidgetBackingStore *bs = maybeBackingStore(); executed (the execution status of this line is deduced): const QWidgetBackingStore *bs = maybeBackingStore(); | - |
733 | if (bs->store) { partially evaluated: bs->store yes Evaluation Count:364 | no Evaluation Count:0 |
| 0-364 |
734 | if (isResize) evaluated: isResize yes Evaluation Count:215 | yes Evaluation Count:149 |
| 149-215 |
735 | bs->store->resize(r.size()); executed: bs->store->resize(r.size()); Execution Count:215 | 215 |
736 | } executed: } Execution Count:364 | 364 |
737 | | - |
738 | if (needsShow) evaluated: needsShow yes Evaluation Count:17 | yes Evaluation Count:347 |
| 17-347 |
739 | show_sys(); executed: show_sys(); Execution Count:17 | 17 |
740 | } executed: } Execution Count:364 | 364 |
741 | | - |
742 | if (!q->isWindow()) { evaluated: !q->isWindow() yes Evaluation Count:4297 | yes Evaluation Count:364 |
| 364-4297 |
743 | 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 |
744 | 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 |
745 | else | - |
746 | invalidateBuffer_resizeHelper(oldPos, olds); executed: invalidateBuffer_resizeHelper(oldPos, olds); Execution Count:3909 | 3909 |
747 | } | - |
748 | } executed: } Execution Count:4661 | 4661 |
749 | | - |
750 | if (isMove) { evaluated: isMove yes Evaluation Count:1181 | yes Evaluation Count:3667 |
| 1181-3667 |
751 | QMoveEvent e(q->pos(), oldPos); executed (the execution status of this line is deduced): QMoveEvent e(q->pos(), oldPos); | - |
752 | QApplication::sendEvent(q, &e); executed (the execution status of this line is deduced): QApplication::sendEvent(q, &e); | - |
753 | } executed: } Execution Count:1181 | 1181 |
754 | if (isResize) { evaluated: isResize yes Evaluation Count:4311 | yes Evaluation Count:537 |
| 537-4311 |
755 | QResizeEvent e(r.size(), olds); executed (the execution status of this line is deduced): QResizeEvent e(r.size(), olds); | - |
756 | QApplication::sendEvent(q, &e); executed (the execution status of this line is deduced): QApplication::sendEvent(q, &e); | - |
757 | if (q->windowHandle()) evaluated: q->windowHandle() yes Evaluation Count:220 | yes Evaluation Count:4091 |
| 220-4091 |
758 | q->update(); executed: q->update(); Execution Count:220 | 220 |
759 | } executed: } Execution Count:4311 | 4311 |
760 | } else { // not visible executed: } Execution Count:4848 | 4848 |
761 | 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 |
762 | q->setAttribute(Qt::WA_PendingMoveEvent, true); executed: q->setAttribute(Qt::WA_PendingMoveEvent, true); Execution Count:861 | 861 |
763 | if (isResize) evaluated: isResize yes Evaluation Count:3160 | yes Evaluation Count:147 |
| 147-3160 |
764 | q->setAttribute(Qt::WA_PendingResizeEvent, true); executed: q->setAttribute(Qt::WA_PendingResizeEvent, true); Execution Count:3160 | 3160 |
765 | } executed: } Execution Count:3307 | 3307 |
766 | | - |
767 | } | - |
768 | | - |
769 | void QWidgetPrivate::setConstraints_sys() | - |
770 | { | - |
771 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
772 | 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 |
773 | QWindow *win = q->windowHandle(); executed (the execution status of this line is deduced): QWindow *win = q->windowHandle(); | - |
774 | QWindowPrivate *winp = qt_window_private(win); executed (the execution status of this line is deduced): QWindowPrivate *winp = qt_window_private(win); | - |
775 | | - |
776 | winp->minimumSize = QSize(extra->minw, extra->minh); executed (the execution status of this line is deduced): winp->minimumSize = QSize(extra->minw, extra->minh); | - |
777 | winp->maximumSize = QSize(extra->maxw, extra->maxh); executed (the execution status of this line is deduced): winp->maximumSize = QSize(extra->maxw, extra->maxh); | - |
778 | | - |
779 | if (extra->topextra) { partially evaluated: extra->topextra yes Evaluation Count:609 | no Evaluation Count:0 |
| 0-609 |
780 | winp->baseSize = QSize(extra->topextra->basew, extra->topextra->baseh); executed (the execution status of this line is deduced): winp->baseSize = QSize(extra->topextra->basew, extra->topextra->baseh); | - |
781 | winp->sizeIncrement = QSize(extra->topextra->incw, extra->topextra->inch); executed (the execution status of this line is deduced): winp->sizeIncrement = QSize(extra->topextra->incw, extra->topextra->inch); | - |
782 | } executed: } Execution Count:609 | 609 |
783 | | - |
784 | if (winp->platformWindow) { evaluated: winp->platformWindow yes Evaluation Count:602 | yes Evaluation Count:7 |
| 7-602 |
785 | fixPosIncludesFrame(); executed (the execution status of this line is deduced): fixPosIncludesFrame(); | - |
786 | winp->platformWindow->propagateSizeHints(); executed (the execution status of this line is deduced): winp->platformWindow->propagateSizeHints(); | - |
787 | } executed: } Execution Count:602 | 602 |
788 | } executed: } Execution Count:609 | 609 |
789 | } executed: } Execution Count:1883 | 1883 |
790 | | - |
791 | void QWidgetPrivate::scroll_sys(int dx, int dy) | - |
792 | { | - |
793 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
794 | scrollChildren(dx, dy); executed (the execution status of this line is deduced): scrollChildren(dx, dy); | - |
795 | scrollRect(q->rect(), dx, dy); executed (the execution status of this line is deduced): scrollRect(q->rect(), dx, dy); | - |
796 | } executed: } Execution Count:14649 | 14649 |
797 | | - |
798 | void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) | - |
799 | { | - |
800 | scrollRect(r, dx, dy); never executed (the execution status of this line is deduced): scrollRect(r, dx, dy); | - |
801 | } | 0 |
802 | | - |
803 | int QWidget::metric(PaintDeviceMetric m) const | - |
804 | { | - |
805 | Q_D(const QWidget); executed (the execution status of this line is deduced): const QWidgetPrivate * const d = d_func(); | - |
806 | | - |
807 | QScreen *screen = 0; executed (the execution status of this line is deduced): QScreen *screen = 0; | - |
808 | if (QWidget *topLevel = window()) partially evaluated: QWidget *topLevel = window() yes Evaluation Count:281357 | no Evaluation Count:0 |
| 0-281357 |
809 | if (QWindow *topLevelWindow = topLevel->windowHandle()) { evaluated: QWindow *topLevelWindow = topLevel->windowHandle() yes Evaluation Count:171342 | yes Evaluation Count:110015 |
| 110015-171342 |
810 | QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(topLevelWindow); executed (the execution status of this line is deduced): QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(topLevelWindow); | - |
811 | if (platformScreen) partially evaluated: platformScreen yes Evaluation Count:171342 | no Evaluation Count:0 |
| 0-171342 |
812 | screen = platformScreen->screen(); executed: screen = platformScreen->screen(); Execution Count:171342 | 171342 |
813 | } executed: } Execution Count:171342 | 171342 |
814 | 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 |
815 | screen = QGuiApplication::primaryScreen(); executed: screen = QGuiApplication::primaryScreen(); Execution Count:110015 | 110015 |
816 | | - |
817 | if (!screen) { partially evaluated: !screen no Evaluation Count:0 | yes Evaluation Count:281357 |
| 0-281357 |
818 | if (m == PdmDpiX || m == PdmDpiY) never evaluated: m == PdmDpiX never evaluated: m == PdmDpiY | 0 |
819 | return 72; never executed: return 72; | 0 |
820 | return QPaintDevice::metric(m); never executed: return QPaintDevice::metric(m); | 0 |
821 | } | - |
822 | int val; executed (the execution status of this line is deduced): int val; | - |
823 | if (m == PdmWidth) { evaluated: m == PdmWidth yes Evaluation Count:44 | yes Evaluation Count:281313 |
| 44-281313 |
824 | val = data->crect.width(); executed (the execution status of this line is deduced): val = data->crect.width(); | - |
825 | } else if (m == PdmWidthMM) { executed: } Execution Count:44 partially evaluated: m == PdmWidthMM no Evaluation Count:0 | yes Evaluation Count:281313 |
| 0-281313 |
826 | val = data->crect.width() * screen->physicalSize().width() / screen->geometry().width(); never executed (the execution status of this line is deduced): val = data->crect.width() * screen->physicalSize().width() / screen->geometry().width(); | - |
827 | } else if (m == PdmHeight) { never executed: } evaluated: m == PdmHeight yes Evaluation Count:44 | yes Evaluation Count:281269 |
| 0-281269 |
828 | val = data->crect.height(); executed (the execution status of this line is deduced): val = data->crect.height(); | - |
829 | } else if (m == PdmHeightMM) { executed: } Execution Count:44 partially evaluated: m == PdmHeightMM no Evaluation Count:0 | yes Evaluation Count:281269 |
| 0-281269 |
830 | val = data->crect.height() * screen->physicalSize().height() / screen->geometry().height(); never executed (the execution status of this line is deduced): val = data->crect.height() * screen->physicalSize().height() / screen->geometry().height(); | - |
831 | } else if (m == PdmDepth) { never executed: } evaluated: m == PdmDepth yes Evaluation Count:3 | yes Evaluation Count:281266 |
| 0-281266 |
832 | return screen->depth(); executed: return screen->depth(); Execution Count:3 | 3 |
833 | } else if (m == PdmDpiX) { evaluated: m == PdmDpiX yes Evaluation Count:27 | yes Evaluation Count:281239 |
| 27-281239 |
834 | 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 |
835 | return d->extra->customDpiX; executed: return d->extra->customDpiX; Execution Count:2 | 2 |
836 | else if (d->parent) evaluated: d->parent yes Evaluation Count:7 | yes Evaluation Count:18 |
| 7-18 |
837 | return static_cast<QWidget *>(d->parent)->metric(m); executed: return static_cast<QWidget *>(d->parent)->metric(m); Execution Count:7 | 7 |
838 | return qRound(screen->logicalDotsPerInchX()); executed: return qRound(screen->logicalDotsPerInchX()); Execution Count:18 | 18 |
839 | } else if (m == PdmDpiY) { evaluated: m == PdmDpiY yes Evaluation Count:281207 | yes Evaluation Count:32 |
| 32-281207 |
840 | 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 |
841 | return d->extra->customDpiY; executed: return d->extra->customDpiY; Execution Count:4 | 4 |
842 | else if (d->parent) evaluated: d->parent yes Evaluation Count:158090 | yes Evaluation Count:123113 |
| 123113-158090 |
843 | return static_cast<QWidget *>(d->parent)->metric(m); executed: return static_cast<QWidget *>(d->parent)->metric(m); Execution Count:158090 | 158090 |
844 | return qRound(screen->logicalDotsPerInchY()); executed: return qRound(screen->logicalDotsPerInchY()); Execution Count:123113 | 123113 |
845 | } else if (m == PdmPhysicalDpiX) { evaluated: m == PdmPhysicalDpiX yes Evaluation Count:16 | yes Evaluation Count:16 |
| 16 |
846 | return qRound(screen->physicalDotsPerInchX()); executed: return qRound(screen->physicalDotsPerInchX()); Execution Count:16 | 16 |
847 | } else if (m == PdmPhysicalDpiY) { partially evaluated: m == PdmPhysicalDpiY yes Evaluation Count:16 | no Evaluation Count:0 |
| 0-16 |
848 | return qRound(screen->physicalDotsPerInchY()); executed: return qRound(screen->physicalDotsPerInchY()); Execution Count:16 | 16 |
849 | } else { | - |
850 | val = QPaintDevice::metric(m);// XXX never executed (the execution status of this line is deduced): val = QPaintDevice::metric(m); | - |
851 | } | 0 |
852 | return val; executed: return val; Execution Count:88 | 88 |
853 | } | - |
854 | | - |
855 | /*! | - |
856 | \preliminary | - |
857 | | - |
858 | Returns the QPlatformWindow this widget will be drawn into. | - |
859 | */ | - |
860 | QWindow *QWidget::windowHandle() const | - |
861 | { | - |
862 | Q_D(const QWidget); executed (the execution status of this line is deduced): const QWidgetPrivate * const d = d_func(); | - |
863 | QTLWExtra *extra = d->maybeTopData(); executed (the execution status of this line is deduced): QTLWExtra *extra = d->maybeTopData(); | - |
864 | if (extra) evaluated: extra yes Evaluation Count:456101 | yes Evaluation Count:371034 |
| 371034-456101 |
865 | return extra->window; executed: return extra->window; Execution Count:456101 | 456101 |
866 | | - |
867 | return 0; executed: return 0; Execution Count:371034 | 371034 |
868 | } | - |
869 | | - |
870 | void QWidgetPrivate::createSysExtra() | - |
871 | { | - |
872 | } | - |
873 | | - |
874 | void QWidgetPrivate::deleteSysExtra() | - |
875 | { | - |
876 | | - |
877 | } | - |
878 | | - |
879 | void QWidgetPrivate::createTLSysExtra() | - |
880 | { | - |
881 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
882 | extra->topextra->screenIndex = 0; executed (the execution status of this line is deduced): extra->topextra->screenIndex = 0; | - |
883 | extra->topextra->window = 0; executed (the execution status of this line is deduced): extra->topextra->window = 0; | - |
884 | 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 |
885 | extra->topextra->window = new QWidgetWindow(q); executed (the execution status of this line is deduced): extra->topextra->window = new QWidgetWindow(q); | - |
886 | 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 |
887 | extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh)); executed: extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh)); Execution Count:199 | 199 |
888 | if (extra->maxw != QWIDGETSIZE_MAX || extra->maxh != QWIDGETSIZE_MAX) 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 |
889 | extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh)); executed: extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh)); Execution Count:191 | 191 |
890 | } executed: } Execution Count:3470 | 3470 |
891 | } executed: } Execution Count:3527 | 3527 |
892 | | - |
893 | void QWidgetPrivate::deleteTLSysExtra() | - |
894 | { | - |
895 | 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 |
896 | //the toplevel might have a context with a "qglcontext associated with it. We need to | - |
897 | //delete the qglcontext before we delete the qplatformopenglcontext. | - |
898 | //One unfortunate thing about this is that we potentially create a glContext just to | - |
899 | //delete it straight afterwards. | - |
900 | if (extra->topextra->window) { evaluated: extra->topextra->window yes Evaluation Count:3468 | yes Evaluation Count:3337 |
| 3337-3468 |
901 | extra->topextra->window->destroy(); executed (the execution status of this line is deduced): extra->topextra->window->destroy(); | - |
902 | } executed: } Execution Count:3468 | 3468 |
903 | setWinId(0); executed (the execution status of this line is deduced): setWinId(0); | - |
904 | delete extra->topextra->window; executed (the execution status of this line is deduced): delete extra->topextra->window; | - |
905 | extra->topextra->window = 0; executed (the execution status of this line is deduced): extra->topextra->window = 0; | - |
906 | | - |
907 | extra->topextra->backingStoreTracker.destroy(); executed (the execution status of this line is deduced): extra->topextra->backingStoreTracker.destroy(); | - |
908 | delete extra->topextra->backingStore; executed (the execution status of this line is deduced): delete extra->topextra->backingStore; | - |
909 | extra->topextra->backingStore = 0; executed (the execution status of this line is deduced): extra->topextra->backingStore = 0; | - |
910 | | - |
911 | } executed: } Execution Count:6805 | 6805 |
912 | } executed: } Execution Count:48216 | 48216 |
913 | | - |
914 | void QWidgetPrivate::registerDropSite(bool on) | - |
915 | { | - |
916 | Q_UNUSED(on); executed (the execution status of this line is deduced): (void)on;; | - |
917 | } executed: } Execution Count:53811 | 53811 |
918 | | - |
919 | void QWidgetPrivate::setMask_sys(const QRegion ®ion) | - |
920 | { | - |
921 | if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowMasks)) { partially evaluated: !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowMasks) no Evaluation Count:0 | yes Evaluation Count:40 |
| 0-40 |
922 | qWarning("%s: Not supported on %s.", Q_FUNC_INFO, qPrintable(QGuiApplication::platformName())); never executed (the execution status of this line is deduced): QMessageLogger("kernel/qwidget_qpa.cpp", 922, __PRETTY_FUNCTION__).warning("%s: Not supported on %s.", __PRETTY_FUNCTION__, QString(QGuiApplication::platformName()).toLocal8Bit().constData()); | - |
923 | return; | 0 |
924 | } | - |
925 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
926 | if (const QWindow *window = q->windowHandle()) evaluated: const QWindow *window = q->windowHandle() yes Evaluation Count:8 | yes Evaluation Count:32 |
| 8-32 |
927 | if (QPlatformWindow *platformWindow = window->handle()) partially evaluated: QPlatformWindow *platformWindow = window->handle() yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
928 | platformWindow->setMask(region); executed: platformWindow->setMask(region); Execution Count:8 | 8 |
929 | } executed: } Execution Count:40 | 40 |
930 | | - |
931 | void QWidgetPrivate::updateFrameStrut() | - |
932 | { | - |
933 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
934 | if (q->data->fstrut_dirty) { evaluated: q->data->fstrut_dirty yes Evaluation Count:14306 | yes Evaluation Count:6 |
| 6-14306 |
935 | if (QTLWExtra *te = maybeTopData()) { evaluated: QTLWExtra *te = maybeTopData() yes Evaluation Count:5430 | yes Evaluation Count:8876 |
| 5430-8876 |
936 | if (te->window) { evaluated: te->window yes Evaluation Count:5341 | yes Evaluation Count:89 |
| 89-5341 |
937 | if (const QPlatformWindow *pw = te->window->handle()) { evaluated: const QPlatformWindow *pw = te->window->handle() yes Evaluation Count:5116 | yes Evaluation Count:225 |
| 225-5116 |
938 | const QMargins margins = pw->frameMargins(); executed (the execution status of this line is deduced): const QMargins margins = pw->frameMargins(); | - |
939 | if (!margins.isNull()) { evaluated: !margins.isNull() yes Evaluation Count:1 | yes Evaluation Count:5115 |
| 1-5115 |
940 | te->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom()); executed (the execution status of this line is deduced): te->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom()); | - |
941 | q->data->fstrut_dirty = false; executed (the execution status of this line is deduced): q->data->fstrut_dirty = false; | - |
942 | } executed: } Execution Count:1 | 1 |
943 | } executed: } Execution Count:5116 | 5116 |
944 | } executed: } Execution Count:5341 | 5341 |
945 | } executed: } Execution Count:5430 | 5430 |
946 | } executed: } Execution Count:14306 | 14306 |
947 | } executed: } Execution Count:14312 | 14312 |
948 | | - |
949 | void QWidgetPrivate::setWindowOpacity_sys(qreal level) | - |
950 | { | - |
951 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
952 | if (q->windowHandle()) partially evaluated: q->windowHandle() yes Evaluation Count:355 | no Evaluation Count:0 |
| 0-355 |
953 | q->windowHandle()->setOpacity(level); executed: q->windowHandle()->setOpacity(level); Execution Count:355 | 355 |
954 | } executed: } Execution Count:355 | 355 |
955 | | - |
956 | void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) | - |
957 | { | - |
958 | Q_UNUSED(dontShow); executed (the execution status of this line is deduced): (void)dontShow;; | - |
959 | Q_UNUSED(oldRect); executed (the execution status of this line is deduced): (void)oldRect;; | - |
960 | // XXX | - |
961 | } executed: } Execution Count:6 | 6 |
962 | | - |
963 | QPaintEngine *QWidget::paintEngine() const | - |
964 | { | - |
965 | qWarning("QWidget::paintEngine: Should no longer be called"); executed (the execution status of this line is deduced): QMessageLogger("kernel/qwidget_qpa.cpp", 965, __PRETTY_FUNCTION__).warning("QWidget::paintEngine: Should no longer be called"); | - |
966 | | - |
967 | #ifdef Q_OS_WIN | - |
968 | // We set this bit which is checked in setAttribute for | - |
969 | // Qt::WA_PaintOnScreen. We do this to allow these two scenarios: | - |
970 | // | - |
971 | // 1. Users accidentally set Qt::WA_PaintOnScreen on X and port to | - |
972 | // Windows which would mean suddenly their widgets stop working. | - |
973 | // | - |
974 | // 2. Users set paint on screen and subclass paintEngine() to | - |
975 | // return 0, in which case we have a "hole" in the backingstore | - |
976 | // allowing use of GDI or DirectX directly. | - |
977 | // | - |
978 | // 1 is WRONG, but to minimize silent failures, we have set this | - |
979 | // bit to ignore the setAttribute call. 2. needs to be | - |
980 | // supported because its our only means of embedding native | - |
981 | // graphics stuff. | - |
982 | const_cast<QWidgetPrivate *>(d_func())->noPaintOnScreen = 1; | - |
983 | #endif | - |
984 | | - |
985 | return 0; //##### @@@ executed: return 0; Execution Count:16 | 16 |
986 | } | - |
987 | | - |
988 | void QWidgetPrivate::setModal_sys() | - |
989 | { | - |
990 | Q_Q(QWidget); executed (the execution status of this line is deduced): QWidget * const q = q_func(); | - |
991 | if (q->windowHandle()) evaluated: q->windowHandle() yes Evaluation Count:2721 | yes Evaluation Count:8967 |
| 2721-8967 |
992 | q->windowHandle()->setModality(q->windowModality()); executed: q->windowHandle()->setModality(q->windowModality()); Execution Count:2721 | 2721 |
993 | } executed: } Execution Count:11688 | 11688 |
994 | | - |
995 | #ifndef QT_NO_CURSOR | - |
996 | static inline void applyCursor(QWidget *w, QCursor c) | - |
997 | { | - |
998 | if (QWindow *window = w->windowHandle()) partially evaluated: QWindow *window = w->windowHandle() yes Evaluation Count:3775 | no Evaluation Count:0 |
| 0-3775 |
999 | window->setCursor(c); executed: window->setCursor(c); Execution Count:3775 | 3775 |
1000 | } executed: } Execution Count:3775 | 3775 |
1001 | | - |
1002 | void qt_qpa_set_cursor(QWidget *w, bool force) | - |
1003 | { | - |
1004 | if (!w->testAttribute(Qt::WA_WState_Created)) evaluated: !w->testAttribute(Qt::WA_WState_Created) yes Evaluation Count:2599 | yes Evaluation Count:3883 |
| 2599-3883 |
1005 | return; executed: return; Execution Count:2599 | 2599 |
1006 | | - |
1007 | static QPointer<QWidget> lastUnderMouse = 0; | - |
1008 | if (force) { evaluated: force yes Evaluation Count:1047 | yes Evaluation Count:2836 |
| 1047-2836 |
1009 | lastUnderMouse = w; executed (the execution status of this line is deduced): lastUnderMouse = w; | - |
1010 | } else if (lastUnderMouse) { executed: } Execution Count:1047 evaluated: lastUnderMouse yes Evaluation Count:199 | yes Evaluation Count:2637 |
| 199-2637 |
1011 | const WId lastWinId = lastUnderMouse->effectiveWinId(); executed (the execution status of this line is deduced): const WId lastWinId = lastUnderMouse->effectiveWinId(); | - |
1012 | const WId winId = w->effectiveWinId(); executed (the execution status of this line is deduced): const WId winId = w->effectiveWinId(); | - |
1013 | 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 |
1014 | w = lastUnderMouse; executed: w = lastUnderMouse; Execution Count:140 | 140 |
1015 | } else if (!w->internalWinId()) { executed: } Execution Count:199 evaluated: !w->internalWinId() yes Evaluation Count:108 | yes Evaluation Count:2529 |
| 108-2529 |
1016 | return; // The mouse is not under this widget, and it's not native, so don't change it. executed: return; Execution Count:108 | 108 |
1017 | } | - |
1018 | | - |
1019 | 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 |
1020 | && !w->testAttribute(Qt::WA_SetCursor)) evaluated: !w->testAttribute(Qt::WA_SetCursor) yes Evaluation Count:1399 | yes Evaluation Count:159 |
| 159-1399 |
1021 | w = w->parentWidget(); executed: w = w->parentWidget(); Execution Count:1399 | 1399 |
1022 | | - |
1023 | QWidget *nativeParent = w; executed (the execution status of this line is deduced): QWidget *nativeParent = w; | - |
1024 | if (!w->internalWinId()) evaluated: !w->internalWinId() yes Evaluation Count:159 | yes Evaluation Count:3616 |
| 159-3616 |
1025 | nativeParent = w->nativeParentWidget(); executed: nativeParent = w->nativeParentWidget(); Execution Count:159 | 159 |
1026 | 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 |
1027 | return; | 0 |
1028 | | - |
1029 | 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 |
1030 | if (w->isEnabled()) evaluated: w->isEnabled() yes Evaluation Count:3753 | yes Evaluation Count:7 |
| 7-3753 |
1031 | applyCursor(nativeParent, w->cursor()); executed: applyCursor(nativeParent, w->cursor()); Execution Count:3753 | 3753 |
1032 | else | - |
1033 | // Enforce the windows behavior of clearing the cursor on | - |
1034 | // disabled widgets. | - |
1035 | applyCursor(nativeParent, Qt::ArrowCursor); executed: applyCursor(nativeParent, Qt::ArrowCursor); Execution Count:7 | 7 |
1036 | } else { | - |
1037 | applyCursor(nativeParent, Qt::ArrowCursor); executed (the execution status of this line is deduced): applyCursor(nativeParent, Qt::ArrowCursor); | - |
1038 | } executed: } Execution Count:15 | 15 |
1039 | } | - |
1040 | #endif //QT_NO_CURSOR | - |
1041 | | - |
1042 | QT_END_NAMESPACE | - |
1043 | | - |
| | |