Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/kernel/qwidget.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||||||||||||||
9 | - | |||||||||||||||||||||||||||||||||||||
10 | - | |||||||||||||||||||||||||||||||||||||
11 | - | |||||||||||||||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||||||||||||||
14 | - | |||||||||||||||||||||||||||||||||||||
15 | - | |||||||||||||||||||||||||||||||||||||
16 | - | |||||||||||||||||||||||||||||||||||||
17 | - | |||||||||||||||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||||||||||||||
19 | - | |||||||||||||||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||||||||||||||
21 | - | |||||||||||||||||||||||||||||||||||||
22 | static bool qt_enable_backingstore = true; | - | ||||||||||||||||||||||||||||||||||||
23 | static inline bool qRectIntersects(const QRect &r1, const QRect &r2) | - | ||||||||||||||||||||||||||||||||||||
24 | { | - | ||||||||||||||||||||||||||||||||||||
25 | return never executed: (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right())return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom()));
never executed: return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom())); | 0 | ||||||||||||||||||||||||||||||||||||
26 | qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom())
never executed: return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom())); | 0 | ||||||||||||||||||||||||||||||||||||
27 | } | - | ||||||||||||||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||||||||||||||
29 | static inline bool hasBackingStoreSupport() | - | ||||||||||||||||||||||||||||||||||||
30 | { | - | ||||||||||||||||||||||||||||||||||||
31 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
32 | } | - | ||||||||||||||||||||||||||||||||||||
33 | - | |||||||||||||||||||||||||||||||||||||
34 | - | |||||||||||||||||||||||||||||||||||||
35 | - | |||||||||||||||||||||||||||||||||||||
36 | - | |||||||||||||||||||||||||||||||||||||
37 | - | |||||||||||||||||||||||||||||||||||||
38 | extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); | - | ||||||||||||||||||||||||||||||||||||
39 | extern QDesktopWidget *qt_desktopWidget; | - | ||||||||||||||||||||||||||||||||||||
40 | QWidgetBackingStoreTracker::QWidgetBackingStoreTracker() | - | ||||||||||||||||||||||||||||||||||||
41 | : m_ptr(0) | - | ||||||||||||||||||||||||||||||||||||
42 | { | - | ||||||||||||||||||||||||||||||||||||
43 | - | |||||||||||||||||||||||||||||||||||||
44 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
45 | - | |||||||||||||||||||||||||||||||||||||
46 | QWidgetBackingStoreTracker::~QWidgetBackingStoreTracker() | - | ||||||||||||||||||||||||||||||||||||
47 | { | - | ||||||||||||||||||||||||||||||||||||
48 | delete m_ptr; | - | ||||||||||||||||||||||||||||||||||||
49 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
50 | - | |||||||||||||||||||||||||||||||||||||
51 | - | |||||||||||||||||||||||||||||||||||||
52 | - | |||||||||||||||||||||||||||||||||||||
53 | - | |||||||||||||||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||||||||||||||
56 | - | |||||||||||||||||||||||||||||||||||||
57 | void QWidgetBackingStoreTracker::create(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
58 | { | - | ||||||||||||||||||||||||||||||||||||
59 | destroy(); | - | ||||||||||||||||||||||||||||||||||||
60 | m_ptr = new QWidgetBackingStore(widget); | - | ||||||||||||||||||||||||||||||||||||
61 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
62 | - | |||||||||||||||||||||||||||||||||||||
63 | - | |||||||||||||||||||||||||||||||||||||
64 | - | |||||||||||||||||||||||||||||||||||||
65 | - | |||||||||||||||||||||||||||||||||||||
66 | - | |||||||||||||||||||||||||||||||||||||
67 | - | |||||||||||||||||||||||||||||||||||||
68 | void QWidgetBackingStoreTracker::destroy() | - | ||||||||||||||||||||||||||||||||||||
69 | { | - | ||||||||||||||||||||||||||||||||||||
70 | delete m_ptr; | - | ||||||||||||||||||||||||||||||||||||
71 | m_ptr = 0; | - | ||||||||||||||||||||||||||||||||||||
72 | m_widgets.clear(); | - | ||||||||||||||||||||||||||||||||||||
73 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
74 | - | |||||||||||||||||||||||||||||||||||||
75 | - | |||||||||||||||||||||||||||||||||||||
76 | - | |||||||||||||||||||||||||||||||||||||
77 | - | |||||||||||||||||||||||||||||||||||||
78 | - | |||||||||||||||||||||||||||||||||||||
79 | - | |||||||||||||||||||||||||||||||||||||
80 | void QWidgetBackingStoreTracker::registerWidget(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
81 | { | - | ||||||||||||||||||||||||||||||||||||
82 | ((!(m_ptr)) ? qt_assert("m_ptr",__FILE__,196) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
83 | ((!(w->internalWinId())) ? qt_assert("w->internalWinId()",__FILE__,197) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
84 | ((!(qt_widget_private(w)->maybeBackingStore() == m_ptr)) ? qt_assert("qt_widget_private(w)->maybeBackingStore() == m_ptr",__FILE__,198) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
85 | m_widgets.insert(w); | - | ||||||||||||||||||||||||||||||||||||
86 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
87 | void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
88 | { | - | ||||||||||||||||||||||||||||||||||||
89 | if (m_widgets.remove(w)
| 0 | ||||||||||||||||||||||||||||||||||||
90 | delete m_ptr; | - | ||||||||||||||||||||||||||||||||||||
91 | m_ptr = 0; | - | ||||||||||||||||||||||||||||||||||||
92 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
93 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
94 | - | |||||||||||||||||||||||||||||||||||||
95 | - | |||||||||||||||||||||||||||||||||||||
96 | - | |||||||||||||||||||||||||||||||||||||
97 | - | |||||||||||||||||||||||||||||||||||||
98 | - | |||||||||||||||||||||||||||||||||||||
99 | void QWidgetBackingStoreTracker::unregisterWidgetSubtree(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
100 | { | - | ||||||||||||||||||||||||||||||||||||
101 | unregisterWidget(widget); | - | ||||||||||||||||||||||||||||||||||||
102 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(widget->children())>::type> _container_((widget->children())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QObject *child = *_container_.i; _container_.control; _container_.control = 0) | - | ||||||||||||||||||||||||||||||||||||
103 | if (QWidget *childWidget = qobject_cast<QWidget *>(child)
| 0 | ||||||||||||||||||||||||||||||||||||
104 | unregisterWidgetSubtree(childWidget); never executed: unregisterWidgetSubtree(childWidget); | 0 | ||||||||||||||||||||||||||||||||||||
105 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
106 | - | |||||||||||||||||||||||||||||||||||||
107 | QWidgetPrivate::QWidgetPrivate(int version) | - | ||||||||||||||||||||||||||||||||||||
108 | : QObjectPrivate(version) | - | ||||||||||||||||||||||||||||||||||||
109 | , extra(0) | - | ||||||||||||||||||||||||||||||||||||
110 | , focus_next(0) | - | ||||||||||||||||||||||||||||||||||||
111 | , focus_prev(0) | - | ||||||||||||||||||||||||||||||||||||
112 | , focus_child(0) | - | ||||||||||||||||||||||||||||||||||||
113 | , layout(0) | - | ||||||||||||||||||||||||||||||||||||
114 | , needsFlush(0) | - | ||||||||||||||||||||||||||||||||||||
115 | , redirectDev(0) | - | ||||||||||||||||||||||||||||||||||||
116 | , widgetItem(0) | - | ||||||||||||||||||||||||||||||||||||
117 | , extraPaintEngine(0) | - | ||||||||||||||||||||||||||||||||||||
118 | , polished(0) | - | ||||||||||||||||||||||||||||||||||||
119 | , graphicsEffect(0) | - | ||||||||||||||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||||||||||||||
121 | , imHints(Qt::ImhNone) | - | ||||||||||||||||||||||||||||||||||||
122 | - | |||||||||||||||||||||||||||||||||||||
123 | - | |||||||||||||||||||||||||||||||||||||
124 | , toolTipDuration(-1) | - | ||||||||||||||||||||||||||||||||||||
125 | - | |||||||||||||||||||||||||||||||||||||
126 | , inheritedFontResolveMask(0) | - | ||||||||||||||||||||||||||||||||||||
127 | , inheritedPaletteResolveMask(0) | - | ||||||||||||||||||||||||||||||||||||
128 | , leftmargin(0) | - | ||||||||||||||||||||||||||||||||||||
129 | , topmargin(0) | - | ||||||||||||||||||||||||||||||||||||
130 | , rightmargin(0) | - | ||||||||||||||||||||||||||||||||||||
131 | , bottommargin(0) | - | ||||||||||||||||||||||||||||||||||||
132 | , leftLayoutItemMargin(0) | - | ||||||||||||||||||||||||||||||||||||
133 | , topLayoutItemMargin(0) | - | ||||||||||||||||||||||||||||||||||||
134 | , rightLayoutItemMargin(0) | - | ||||||||||||||||||||||||||||||||||||
135 | , bottomLayoutItemMargin(0) | - | ||||||||||||||||||||||||||||||||||||
136 | , hd(0) | - | ||||||||||||||||||||||||||||||||||||
137 | , size_policy(QSizePolicy::Preferred, QSizePolicy::Preferred) | - | ||||||||||||||||||||||||||||||||||||
138 | , fg_role(QPalette::NoRole) | - | ||||||||||||||||||||||||||||||||||||
139 | , bg_role(QPalette::NoRole) | - | ||||||||||||||||||||||||||||||||||||
140 | , dirtyOpaqueChildren(1) | - | ||||||||||||||||||||||||||||||||||||
141 | , isOpaque(0) | - | ||||||||||||||||||||||||||||||||||||
142 | , retainSizeWhenHiddenChanged(0) | - | ||||||||||||||||||||||||||||||||||||
143 | , inDirtyList(0) | - | ||||||||||||||||||||||||||||||||||||
144 | , isScrolled(0) | - | ||||||||||||||||||||||||||||||||||||
145 | , isMoved(0) | - | ||||||||||||||||||||||||||||||||||||
146 | , usesDoubleBufferedGLContext(0) | - | ||||||||||||||||||||||||||||||||||||
147 | , mustHaveWindowHandle(0) | - | ||||||||||||||||||||||||||||||||||||
148 | , renderToTexture(0) | - | ||||||||||||||||||||||||||||||||||||
149 | , textureChildSeen(0) | - | ||||||||||||||||||||||||||||||||||||
150 | - | |||||||||||||||||||||||||||||||||||||
151 | , inheritsInputMethodHints(0) | - | ||||||||||||||||||||||||||||||||||||
152 | - | |||||||||||||||||||||||||||||||||||||
153 | - | |||||||||||||||||||||||||||||||||||||
154 | , renderToTextureReallyDirty(1) | - | ||||||||||||||||||||||||||||||||||||
155 | , renderToTextureComposeActive(0) | - | ||||||||||||||||||||||||||||||||||||
156 | - | |||||||||||||||||||||||||||||||||||||
157 | , childrenHiddenByWState(0) | - | ||||||||||||||||||||||||||||||||||||
158 | , childrenShownByExpose(0) | - | ||||||||||||||||||||||||||||||||||||
159 | { | - | ||||||||||||||||||||||||||||||||||||
160 | if (!(static_cast<QApplication *>(QCoreApplication::instance()))
| 0 | ||||||||||||||||||||||||||||||||||||
161 | QMessageLogger(__FILE__, 297, __PRETTY_FUNCTION__).fatal("QWidget: Must construct a QApplication before a QWidget"); | - | ||||||||||||||||||||||||||||||||||||
162 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
163 | } | - | ||||||||||||||||||||||||||||||||||||
164 | - | |||||||||||||||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||||||||||||||
166 | - | |||||||||||||||||||||||||||||||||||||
167 | - | |||||||||||||||||||||||||||||||||||||
168 | (void)version;; | - | ||||||||||||||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||||||||||||||
170 | - | |||||||||||||||||||||||||||||||||||||
171 | - | |||||||||||||||||||||||||||||||||||||
172 | - | |||||||||||||||||||||||||||||||||||||
173 | - | |||||||||||||||||||||||||||||||||||||
174 | - | |||||||||||||||||||||||||||||||||||||
175 | isWidget = true; | - | ||||||||||||||||||||||||||||||||||||
176 | memset(high_attributes, 0, sizeof(high_attributes)); | - | ||||||||||||||||||||||||||||||||||||
177 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
178 | - | |||||||||||||||||||||||||||||||||||||
179 | - | |||||||||||||||||||||||||||||||||||||
180 | QWidgetPrivate::~QWidgetPrivate() | - | ||||||||||||||||||||||||||||||||||||
181 | { | - | ||||||||||||||||||||||||||||||||||||
182 | if (widgetItem
| 0 | ||||||||||||||||||||||||||||||||||||
183 | widgetItem->wid = 0; never executed: widgetItem->wid = 0; | 0 | ||||||||||||||||||||||||||||||||||||
184 | - | |||||||||||||||||||||||||||||||||||||
185 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
186 | deleteExtra(); never executed: deleteExtra(); | 0 | ||||||||||||||||||||||||||||||||||||
187 | - | |||||||||||||||||||||||||||||||||||||
188 | - | |||||||||||||||||||||||||||||||||||||
189 | delete graphicsEffect; | - | ||||||||||||||||||||||||||||||||||||
190 | - | |||||||||||||||||||||||||||||||||||||
191 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
192 | - | |||||||||||||||||||||||||||||||||||||
193 | - | |||||||||||||||||||||||||||||||||||||
194 | - | |||||||||||||||||||||||||||||||||||||
195 | - | |||||||||||||||||||||||||||||||||||||
196 | void QWidgetPrivate::scrollChildren(int dx, int dy) | - | ||||||||||||||||||||||||||||||||||||
197 | { | - | ||||||||||||||||||||||||||||||||||||
198 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
199 | if (q->children().size() > 0
| 0 | ||||||||||||||||||||||||||||||||||||
200 | QPoint pd(dx, dy); | - | ||||||||||||||||||||||||||||||||||||
201 | QObjectList childObjects = q->children(); | - | ||||||||||||||||||||||||||||||||||||
202 | for (int i = 0; i < childObjects.size()
| 0 | ||||||||||||||||||||||||||||||||||||
203 | QWidget *w = qobject_cast<QWidget*>(childObjects.at(i)); | - | ||||||||||||||||||||||||||||||||||||
204 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
205 | QPoint oldp = w->pos(); | - | ||||||||||||||||||||||||||||||||||||
206 | QRect r(w->pos() + pd, w->size()); | - | ||||||||||||||||||||||||||||||||||||
207 | w->data->crect = r; | - | ||||||||||||||||||||||||||||||||||||
208 | if (w->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
209 | w->d_func()->setWSGeometry(); never executed: w->d_func()->setWSGeometry(); | 0 | ||||||||||||||||||||||||||||||||||||
210 | w->d_func()->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
211 | QMoveEvent e(r.topLeft(), oldp); | - | ||||||||||||||||||||||||||||||||||||
212 | QApplication::sendEvent(w, &e); | - | ||||||||||||||||||||||||||||||||||||
213 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
214 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
215 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
216 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
217 | - | |||||||||||||||||||||||||||||||||||||
218 | void QWidgetPrivate::setWSGeometry() | - | ||||||||||||||||||||||||||||||||||||
219 | { | - | ||||||||||||||||||||||||||||||||||||
220 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
221 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
222 | window->setGeometry(data.crect); never executed: window->setGeometry(data.crect); | 0 | ||||||||||||||||||||||||||||||||||||
223 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
224 | - | |||||||||||||||||||||||||||||||||||||
225 | void QWidgetPrivate::updateWidgetTransform(QEvent *event) | - | ||||||||||||||||||||||||||||||||||||
226 | { | - | ||||||||||||||||||||||||||||||||||||
227 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
228 | if (q == QGuiApplication::focusObject()
| 0 | ||||||||||||||||||||||||||||||||||||
229 | QTransform t; | - | ||||||||||||||||||||||||||||||||||||
230 | QPoint p = q->mapTo(q->topLevelWidget(), QPoint(0,0)); | - | ||||||||||||||||||||||||||||||||||||
231 | t.translate(p.x(), p.y()); | - | ||||||||||||||||||||||||||||||||||||
232 | QGuiApplication::inputMethod()->setInputItemTransform(t); | - | ||||||||||||||||||||||||||||||||||||
233 | QGuiApplication::inputMethod()->setInputItemRectangle(q->rect()); | - | ||||||||||||||||||||||||||||||||||||
234 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
235 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
236 | bool QWidget::autoFillBackground() const | - | ||||||||||||||||||||||||||||||||||||
237 | { | - | ||||||||||||||||||||||||||||||||||||
238 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
239 | return never executed: d->extrareturn d->extra && d->extra->autoFillBackground;
never executed: return d->extra && d->extra->autoFillBackground; | 0 | ||||||||||||||||||||||||||||||||||||
240 | } | - | ||||||||||||||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||||||||||||||
242 | void QWidget::setAutoFillBackground(bool enabled) | - | ||||||||||||||||||||||||||||||||||||
243 | { | - | ||||||||||||||||||||||||||||||||||||
244 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
245 | if (!d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
246 | d->createExtra(); never executed: d->createExtra(); | 0 | ||||||||||||||||||||||||||||||||||||
247 | if (d->extra->autoFillBackground == enabled
| 0 | ||||||||||||||||||||||||||||||||||||
248 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
249 | - | |||||||||||||||||||||||||||||||||||||
250 | d->extra->autoFillBackground = enabled; | - | ||||||||||||||||||||||||||||||||||||
251 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
252 | update(); | - | ||||||||||||||||||||||||||||||||||||
253 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
254 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
255 | QWidgetMapper *QWidgetPrivate::mapper = 0; | - | ||||||||||||||||||||||||||||||||||||
256 | QWidgetSet *QWidgetPrivate::allWidgets = 0; | - | ||||||||||||||||||||||||||||||||||||
257 | - | |||||||||||||||||||||||||||||||||||||
258 | - | |||||||||||||||||||||||||||||||||||||
259 | - | |||||||||||||||||||||||||||||||||||||
260 | - | |||||||||||||||||||||||||||||||||||||
261 | - | |||||||||||||||||||||||||||||||||||||
262 | - | |||||||||||||||||||||||||||||||||||||
263 | QRegion qt_dirtyRegion(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
264 | { | - | ||||||||||||||||||||||||||||||||||||
265 | if (!widget
| 0 | ||||||||||||||||||||||||||||||||||||
266 | return never executed: QRegion();return QRegion(); never executed: return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
267 | - | |||||||||||||||||||||||||||||||||||||
268 | QWidgetBackingStore *bs = qt_widget_private(widget)->maybeBackingStore(); | - | ||||||||||||||||||||||||||||||||||||
269 | if (!bs
| 0 | ||||||||||||||||||||||||||||||||||||
270 | return never executed: QRegion();return QRegion(); never executed: return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
271 | - | |||||||||||||||||||||||||||||||||||||
272 | return never executed: bs->dirtyRegion(widget);return bs->dirtyRegion(widget); never executed: return bs->dirtyRegion(widget); | 0 | ||||||||||||||||||||||||||||||||||||
273 | } | - | ||||||||||||||||||||||||||||||||||||
274 | struct QWidgetExceptionCleaner | - | ||||||||||||||||||||||||||||||||||||
275 | { | - | ||||||||||||||||||||||||||||||||||||
276 | - | |||||||||||||||||||||||||||||||||||||
277 | static inline void cleanup(QWidget *that, QWidgetPrivate *d) | - | ||||||||||||||||||||||||||||||||||||
278 | { | - | ||||||||||||||||||||||||||||||||||||
279 | - | |||||||||||||||||||||||||||||||||||||
280 | (void)that;; | - | ||||||||||||||||||||||||||||||||||||
281 | (void)d;; | - | ||||||||||||||||||||||||||||||||||||
282 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
283 | }; | - | ||||||||||||||||||||||||||||||||||||
284 | QWidget::QWidget(QWidget *parent, Qt::WindowFlags f) | - | ||||||||||||||||||||||||||||||||||||
285 | : QObject(*new QWidgetPrivate, 0), QPaintDevice() | - | ||||||||||||||||||||||||||||||||||||
286 | { | - | ||||||||||||||||||||||||||||||||||||
287 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
288 | d_func()->init(parent, f); | - | ||||||||||||||||||||||||||||||||||||
289 | } never executed: else {end of block dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
290 | QWidgetExceptionCleaner::cleanup(this, d_func()); dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
291 | qt_noop(); dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
292 | } dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
293 | } | - | ||||||||||||||||||||||||||||||||||||
294 | - | |||||||||||||||||||||||||||||||||||||
295 | - | |||||||||||||||||||||||||||||||||||||
296 | - | |||||||||||||||||||||||||||||||||||||
297 | - | |||||||||||||||||||||||||||||||||||||
298 | QWidget::QWidget(QWidgetPrivate &dd, QWidget* parent, Qt::WindowFlags f) | - | ||||||||||||||||||||||||||||||||||||
299 | : QObject(dd, 0), QPaintDevice() | - | ||||||||||||||||||||||||||||||||||||
300 | { | - | ||||||||||||||||||||||||||||||||||||
301 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
302 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
303 | d->init(parent, f); | - | ||||||||||||||||||||||||||||||||||||
304 | } never executed: else {end of block dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
305 | QWidgetExceptionCleaner::cleanup(this, d_func()); dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
306 | qt_noop(); dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
307 | } dead code: { QWidgetExceptionCleaner::cleanup(this, d_func()); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
308 | } | - | ||||||||||||||||||||||||||||||||||||
309 | - | |||||||||||||||||||||||||||||||||||||
310 | - | |||||||||||||||||||||||||||||||||||||
311 | - | |||||||||||||||||||||||||||||||||||||
312 | - | |||||||||||||||||||||||||||||||||||||
313 | int QWidget::devType() const | - | ||||||||||||||||||||||||||||||||||||
314 | { | - | ||||||||||||||||||||||||||||||||||||
315 | return never executed: QInternal::Widget;return QInternal::Widget; never executed: return QInternal::Widget; | 0 | ||||||||||||||||||||||||||||||||||||
316 | } | - | ||||||||||||||||||||||||||||||||||||
317 | - | |||||||||||||||||||||||||||||||||||||
318 | - | |||||||||||||||||||||||||||||||||||||
319 | - | |||||||||||||||||||||||||||||||||||||
320 | void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
321 | { | - | ||||||||||||||||||||||||||||||||||||
322 | bool customize = (flags & (Qt::CustomizeWindowHint | - | ||||||||||||||||||||||||||||||||||||
323 | | Qt::FramelessWindowHint | - | ||||||||||||||||||||||||||||||||||||
324 | | Qt::WindowTitleHint | - | ||||||||||||||||||||||||||||||||||||
325 | | Qt::WindowSystemMenuHint | - | ||||||||||||||||||||||||||||||||||||
326 | | Qt::WindowMinimizeButtonHint | - | ||||||||||||||||||||||||||||||||||||
327 | | Qt::WindowMaximizeButtonHint | - | ||||||||||||||||||||||||||||||||||||
328 | | Qt::WindowCloseButtonHint | - | ||||||||||||||||||||||||||||||||||||
329 | | Qt::WindowContextHelpButtonHint)); | - | ||||||||||||||||||||||||||||||||||||
330 | - | |||||||||||||||||||||||||||||||||||||
331 | uint type = (flags & Qt::WindowType_Mask); | - | ||||||||||||||||||||||||||||||||||||
332 | - | |||||||||||||||||||||||||||||||||||||
333 | if ((type == Qt::Widget
| 0 | ||||||||||||||||||||||||||||||||||||
334 | type = Qt::Window; | - | ||||||||||||||||||||||||||||||||||||
335 | flags |= Qt::Window; | - | ||||||||||||||||||||||||||||||||||||
336 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
337 | - | |||||||||||||||||||||||||||||||||||||
338 | if (flags & Qt::CustomizeWindowHint
| 0 | ||||||||||||||||||||||||||||||||||||
339 | - | |||||||||||||||||||||||||||||||||||||
340 | - | |||||||||||||||||||||||||||||||||||||
341 | - | |||||||||||||||||||||||||||||||||||||
342 | - | |||||||||||||||||||||||||||||||||||||
343 | - | |||||||||||||||||||||||||||||||||||||
344 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
345 | - | |||||||||||||||||||||||||||||||||||||
346 | - | |||||||||||||||||||||||||||||||||||||
347 | - | |||||||||||||||||||||||||||||||||||||
348 | ) { | - | ||||||||||||||||||||||||||||||||||||
349 | flags |= Qt::WindowSystemMenuHint; | - | ||||||||||||||||||||||||||||||||||||
350 | - | |||||||||||||||||||||||||||||||||||||
351 | - | |||||||||||||||||||||||||||||||||||||
352 | - | |||||||||||||||||||||||||||||||||||||
353 | - | |||||||||||||||||||||||||||||||||||||
354 | flags |= Qt::WindowTitleHint; | - | ||||||||||||||||||||||||||||||||||||
355 | flags &= ~Qt::FramelessWindowHint; | - | ||||||||||||||||||||||||||||||||||||
356 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
357 | } never executed: else if (customizeend of block
| 0 | ||||||||||||||||||||||||||||||||||||
358 | - | |||||||||||||||||||||||||||||||||||||
359 | - | |||||||||||||||||||||||||||||||||||||
360 | - | |||||||||||||||||||||||||||||||||||||
361 | flags |= Qt::WindowSystemMenuHint; | - | ||||||||||||||||||||||||||||||||||||
362 | flags |= Qt::WindowTitleHint; | - | ||||||||||||||||||||||||||||||||||||
363 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
364 | if (customize
| 0 | ||||||||||||||||||||||||||||||||||||
365 | ; never executed: ; | 0 | ||||||||||||||||||||||||||||||||||||
366 | else if (type == Qt::Dialog
| 0 | ||||||||||||||||||||||||||||||||||||
367 | - | |||||||||||||||||||||||||||||||||||||
368 | flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint; never executed: flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint; | 0 | ||||||||||||||||||||||||||||||||||||
369 | - | |||||||||||||||||||||||||||||||||||||
370 | - | |||||||||||||||||||||||||||||||||||||
371 | - | |||||||||||||||||||||||||||||||||||||
372 | else if (type == Qt::Tool
| 0 | ||||||||||||||||||||||||||||||||||||
373 | flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; never executed: flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; | 0 | ||||||||||||||||||||||||||||||||||||
374 | else | - | ||||||||||||||||||||||||||||||||||||
375 | flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | never executed: flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; | 0 | ||||||||||||||||||||||||||||||||||||
376 | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; never executed: flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; | 0 | ||||||||||||||||||||||||||||||||||||
377 | if (w->testAttribute(Qt::WA_TransparentForMouseEvents)
| 0 | ||||||||||||||||||||||||||||||||||||
378 | flags |= Qt::WindowTransparentForInput; never executed: flags |= Qt::WindowTransparentForInput; | 0 | ||||||||||||||||||||||||||||||||||||
379 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
380 | - | |||||||||||||||||||||||||||||||||||||
381 | void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) | - | ||||||||||||||||||||||||||||||||||||
382 | { | - | ||||||||||||||||||||||||||||||||||||
383 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
384 | if (!qobject_cast<QApplication *>(QCoreApplication::instance())
| 0 | ||||||||||||||||||||||||||||||||||||
385 | QMessageLogger(__FILE__, 1124, __PRETTY_FUNCTION__).fatal("QWidget: Cannot create a QWidget without QApplication"); never executed: QMessageLogger(__FILE__, 1124, __PRETTY_FUNCTION__).fatal("QWidget: Cannot create a QWidget without QApplication"); | 0 | ||||||||||||||||||||||||||||||||||||
386 | - | |||||||||||||||||||||||||||||||||||||
387 | ((!(allWidgets)) ? qt_assert("allWidgets",__FILE__,1126) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
388 | if (allWidgets
| 0 | ||||||||||||||||||||||||||||||||||||
389 | allWidgets->insert(q); never executed: allWidgets->insert(q); | 0 | ||||||||||||||||||||||||||||||||||||
390 | - | |||||||||||||||||||||||||||||||||||||
391 | int targetScreen = -1; | - | ||||||||||||||||||||||||||||||||||||
392 | if (parentWidget
| 0 | ||||||||||||||||||||||||||||||||||||
393 | const QDesktopScreenWidget *sw = qobject_cast<const QDesktopScreenWidget *>(parentWidget); | - | ||||||||||||||||||||||||||||||||||||
394 | targetScreen = sw
| 0 | ||||||||||||||||||||||||||||||||||||
395 | parentWidget = 0; | - | ||||||||||||||||||||||||||||||||||||
396 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
397 | - | |||||||||||||||||||||||||||||||||||||
398 | q->data = &data; | - | ||||||||||||||||||||||||||||||||||||
399 | - | |||||||||||||||||||||||||||||||||||||
400 | - | |||||||||||||||||||||||||||||||||||||
401 | if (!parent
| 0 | ||||||||||||||||||||||||||||||||||||
402 | ((!(q->thread() == (static_cast<QApplication *>(QCoreApplication::instance()))->thread())) ? qt_assert_x("QWidget", "Widgets must be created in the GUI thread.", | - | ||||||||||||||||||||||||||||||||||||
403 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
404 | , | - | ||||||||||||||||||||||||||||||||||||
405 | 1142 | - | ||||||||||||||||||||||||||||||||||||
406 | ) : qt_noop()) | - | ||||||||||||||||||||||||||||||||||||
407 | ; | - | ||||||||||||||||||||||||||||||||||||
408 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
409 | if (targetScreen >= 0
| 0 | ||||||||||||||||||||||||||||||||||||
410 | topData()->initialScreenIndex = targetScreen; | - | ||||||||||||||||||||||||||||||||||||
411 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
412 | window->setScreen(QGuiApplication::screens().value(targetScreen, nullptr)); never executed: window->setScreen(QGuiApplication::screens().value(targetScreen, nullptr)); | 0 | ||||||||||||||||||||||||||||||||||||
413 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
414 | - | |||||||||||||||||||||||||||||||||||||
415 | data.fstrut_dirty = true; | - | ||||||||||||||||||||||||||||||||||||
416 | - | |||||||||||||||||||||||||||||||||||||
417 | data.winid = 0; | - | ||||||||||||||||||||||||||||||||||||
418 | data.widget_attributes = 0; | - | ||||||||||||||||||||||||||||||||||||
419 | data.window_flags = f; | - | ||||||||||||||||||||||||||||||||||||
420 | data.window_state = 0; | - | ||||||||||||||||||||||||||||||||||||
421 | data.focus_policy = 0; | - | ||||||||||||||||||||||||||||||||||||
422 | data.context_menu_policy = Qt::DefaultContextMenu; | - | ||||||||||||||||||||||||||||||||||||
423 | data.window_modality = Qt::NonModal; | - | ||||||||||||||||||||||||||||||||||||
424 | - | |||||||||||||||||||||||||||||||||||||
425 | data.sizehint_forced = 0; | - | ||||||||||||||||||||||||||||||||||||
426 | data.is_closing = 0; | - | ||||||||||||||||||||||||||||||||||||
427 | data.in_show = 0; | - | ||||||||||||||||||||||||||||||||||||
428 | data.in_set_window_state = 0; | - | ||||||||||||||||||||||||||||||||||||
429 | data.in_destructor = false; | - | ||||||||||||||||||||||||||||||||||||
430 | - | |||||||||||||||||||||||||||||||||||||
431 | - | |||||||||||||||||||||||||||||||||||||
432 | if (f & Qt::MSWindowsOwnDC
| 0 | ||||||||||||||||||||||||||||||||||||
433 | mustHaveWindowHandle = 1; | - | ||||||||||||||||||||||||||||||||||||
434 | q->setAttribute(Qt::WA_NativeWindow); | - | ||||||||||||||||||||||||||||||||||||
435 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
436 | - | |||||||||||||||||||||||||||||||||||||
437 | - | |||||||||||||||||||||||||||||||||||||
438 | - | |||||||||||||||||||||||||||||||||||||
439 | - | |||||||||||||||||||||||||||||||||||||
440 | q->setAttribute(Qt::WA_QuitOnClose); | - | ||||||||||||||||||||||||||||||||||||
441 | adjustQuitOnCloseAttribute(); | - | ||||||||||||||||||||||||||||||||||||
442 | - | |||||||||||||||||||||||||||||||||||||
443 | q->setAttribute(Qt::WA_WState_Hidden); | - | ||||||||||||||||||||||||||||||||||||
444 | - | |||||||||||||||||||||||||||||||||||||
445 | - | |||||||||||||||||||||||||||||||||||||
446 | data.crect = parentWidget
| 0 | ||||||||||||||||||||||||||||||||||||
447 | focus_next = focus_prev = q; | - | ||||||||||||||||||||||||||||||||||||
448 | - | |||||||||||||||||||||||||||||||||||||
449 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
450 | q->create(); never executed: q->create(); | 0 | ||||||||||||||||||||||||||||||||||||
451 | else if (parentWidget
| 0 | ||||||||||||||||||||||||||||||||||||
452 | q->setParent(parentWidget, data.window_flags); never executed: q->setParent(parentWidget, data.window_flags); | 0 | ||||||||||||||||||||||||||||||||||||
453 | else { | - | ||||||||||||||||||||||||||||||||||||
454 | adjustFlags(data.window_flags, q); | - | ||||||||||||||||||||||||||||||||||||
455 | resolveLayoutDirection(); | - | ||||||||||||||||||||||||||||||||||||
456 | - | |||||||||||||||||||||||||||||||||||||
457 | const QBrush &background = q->palette().brush(QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||
458 | setOpaque(q->isWindow() && background.style() != Qt::NoBrush && background.isOpaque()); | - | ||||||||||||||||||||||||||||||||||||
459 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
460 | data.fnt = QFont(data.fnt, q); | - | ||||||||||||||||||||||||||||||||||||
461 | - | |||||||||||||||||||||||||||||||||||||
462 | - | |||||||||||||||||||||||||||||||||||||
463 | - | |||||||||||||||||||||||||||||||||||||
464 | - | |||||||||||||||||||||||||||||||||||||
465 | q->setAttribute(Qt::WA_PendingMoveEvent); | - | ||||||||||||||||||||||||||||||||||||
466 | q->setAttribute(Qt::WA_PendingResizeEvent); | - | ||||||||||||||||||||||||||||||||||||
467 | - | |||||||||||||||||||||||||||||||||||||
468 | if (++
| 0 | ||||||||||||||||||||||||||||||||||||
469 | QWidgetPrivate::maxInstances = QWidgetPrivate::instanceCounter; never executed: QWidgetPrivate::maxInstances = QWidgetPrivate::instanceCounter; | 0 | ||||||||||||||||||||||||||||||||||||
470 | - | |||||||||||||||||||||||||||||||||||||
471 | if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation)
| 0 | ||||||||||||||||||||||||||||||||||||
472 | q->create(); never executed: q->create(); | 0 | ||||||||||||||||||||||||||||||||||||
473 | - | |||||||||||||||||||||||||||||||||||||
474 | QEvent e(QEvent::Create); | - | ||||||||||||||||||||||||||||||||||||
475 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
476 | QApplication::postEvent(q, new QEvent(QEvent::PolishRequest)); | - | ||||||||||||||||||||||||||||||||||||
477 | - | |||||||||||||||||||||||||||||||||||||
478 | extraPaintEngine = 0; | - | ||||||||||||||||||||||||||||||||||||
479 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
480 | - | |||||||||||||||||||||||||||||||||||||
481 | - | |||||||||||||||||||||||||||||||||||||
482 | - | |||||||||||||||||||||||||||||||||||||
483 | void QWidgetPrivate::createRecursively() | - | ||||||||||||||||||||||||||||||||||||
484 | { | - | ||||||||||||||||||||||||||||||||||||
485 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
486 | q->create(0, true, true); | - | ||||||||||||||||||||||||||||||||||||
487 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
488 | QWidget *child = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
489 | if (child
| 0 | ||||||||||||||||||||||||||||||||||||
490 | child->d_func()->createRecursively(); never executed: child->d_func()->createRecursively(); | 0 | ||||||||||||||||||||||||||||||||||||
491 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
492 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
493 | void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow) | - | ||||||||||||||||||||||||||||||||||||
494 | { | - | ||||||||||||||||||||||||||||||||||||
495 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
496 | if (__builtin_expect(!!(window), false)
| 0 | ||||||||||||||||||||||||||||||||||||
497 | QMessageLogger(__FILE__, 1277, __PRETTY_FUNCTION__).warning("QWidget::create(): Parameter 'window' does not have any effect."); never executed: QMessageLogger(__FILE__, 1277, __PRETTY_FUNCTION__).warning("QWidget::create(): Parameter 'window' does not have any effect."); | 0 | ||||||||||||||||||||||||||||||||||||
498 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
499 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
500 | - | |||||||||||||||||||||||||||||||||||||
501 | if (d->data.in_destructor
| 0 | ||||||||||||||||||||||||||||||||||||
502 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
503 | - | |||||||||||||||||||||||||||||||||||||
504 | Qt::WindowType type = windowType(); | - | ||||||||||||||||||||||||||||||||||||
505 | Qt::WindowFlags &flags = data->window_flags; | - | ||||||||||||||||||||||||||||||||||||
506 | - | |||||||||||||||||||||||||||||||||||||
507 | if ((type == Qt::Widget
| 0 | ||||||||||||||||||||||||||||||||||||
508 | type = Qt::Window; | - | ||||||||||||||||||||||||||||||||||||
509 | flags |= Qt::Window; | - | ||||||||||||||||||||||||||||||||||||
510 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
511 | - | |||||||||||||||||||||||||||||||||||||
512 | if (QWidget *parent = parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
513 | if (type & Qt::Window
| 0 | ||||||||||||||||||||||||||||||||||||
514 | if (!parent->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
515 | parent->createWinId(); never executed: parent->createWinId(); | 0 | ||||||||||||||||||||||||||||||||||||
516 | } never executed: else if (testAttribute(Qt::WA_NativeWindow)end of block
| 0 | ||||||||||||||||||||||||||||||||||||
517 | && !testAttribute(Qt::WA_DontCreateNativeAncestors)
| 0 | ||||||||||||||||||||||||||||||||||||
518 | - | |||||||||||||||||||||||||||||||||||||
519 | - | |||||||||||||||||||||||||||||||||||||
520 | - | |||||||||||||||||||||||||||||||||||||
521 | d->createWinId(); | - | ||||||||||||||||||||||||||||||||||||
522 | - | |||||||||||||||||||||||||||||||||||||
523 | ((!(testAttribute(Qt::WA_WState_Created))) ? qt_assert("testAttribute(Qt::WA_WState_Created)",__FILE__,1303) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
524 | ((!(internalWinId())) ? qt_assert("internalWinId()",__FILE__,1304) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
525 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
526 | } | - | ||||||||||||||||||||||||||||||||||||
527 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
528 | - | |||||||||||||||||||||||||||||||||||||
529 | - | |||||||||||||||||||||||||||||||||||||
530 | static const bool paintOnScreenEnv = qEnvironmentVariableIntValue("QT_ONSCREEN_PAINT") > 0; | - | ||||||||||||||||||||||||||||||||||||
531 | if (paintOnScreenEnv
| 0 | ||||||||||||||||||||||||||||||||||||
532 | setAttribute(Qt::WA_PaintOnScreen); never executed: setAttribute(Qt::WA_PaintOnScreen); | 0 | ||||||||||||||||||||||||||||||||||||
533 | - | |||||||||||||||||||||||||||||||||||||
534 | if (QApplicationPrivate::testAttribute(Qt::AA_NativeWindows)
| 0 | ||||||||||||||||||||||||||||||||||||
535 | setAttribute(Qt::WA_NativeWindow); never executed: setAttribute(Qt::WA_NativeWindow); | 0 | ||||||||||||||||||||||||||||||||||||
536 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
537 | - | |||||||||||||||||||||||||||||||||||||
538 | setAttribute(Qt::WA_WState_Created); | - | ||||||||||||||||||||||||||||||||||||
539 | d->create_sys(window, initializeWindow, destroyOldWindow); | - | ||||||||||||||||||||||||||||||||||||
540 | - | |||||||||||||||||||||||||||||||||||||
541 | - | |||||||||||||||||||||||||||||||||||||
542 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
543 | d->topData()->backingStoreTracker.destroy(); | - | ||||||||||||||||||||||||||||||||||||
544 | if (hasBackingStoreSupport()
| 0 | ||||||||||||||||||||||||||||||||||||
545 | d->topData()->backingStoreTracker.create(this); never executed: d->topData()->backingStoreTracker.create(this); | 0 | ||||||||||||||||||||||||||||||||||||
546 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
547 | - | |||||||||||||||||||||||||||||||||||||
548 | d->setModal_sys(); | - | ||||||||||||||||||||||||||||||||||||
549 | - | |||||||||||||||||||||||||||||||||||||
550 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
551 | setAttribute(Qt::WA_DropSiteRegistered, true); never executed: setAttribute(Qt::WA_DropSiteRegistered, true); | 0 | ||||||||||||||||||||||||||||||||||||
552 | - | |||||||||||||||||||||||||||||||||||||
553 | - | |||||||||||||||||||||||||||||||||||||
554 | - | |||||||||||||||||||||||||||||||||||||
555 | - | |||||||||||||||||||||||||||||||||||||
556 | - | |||||||||||||||||||||||||||||||||||||
557 | - | |||||||||||||||||||||||||||||||||||||
558 | - | |||||||||||||||||||||||||||||||||||||
559 | if (testAttribute(Qt::WA_SetWindowIcon)
| 0 | ||||||||||||||||||||||||||||||||||||
560 | d->setWindowIcon_sys(); never executed: d->setWindowIcon_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
561 | - | |||||||||||||||||||||||||||||||||||||
562 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
563 | d->setWindowIconText_helper(d->topData()->iconText); never executed: d->setWindowIconText_helper(d->topData()->iconText); | 0 | ||||||||||||||||||||||||||||||||||||
564 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
565 | d->setWindowTitle_helper(d->topData()->caption); never executed: d->setWindowTitle_helper(d->topData()->caption); | 0 | ||||||||||||||||||||||||||||||||||||
566 | if (windowType() != Qt::Desktop
| 0 | ||||||||||||||||||||||||||||||||||||
567 | d->updateSystemBackground(); | - | ||||||||||||||||||||||||||||||||||||
568 | - | |||||||||||||||||||||||||||||||||||||
569 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
570 | d->setWindowIcon_sys(); never executed: d->setWindowIcon_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
571 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
572 | - | |||||||||||||||||||||||||||||||||||||
573 | - | |||||||||||||||||||||||||||||||||||||
574 | - | |||||||||||||||||||||||||||||||||||||
575 | - | |||||||||||||||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||||||||||||||
577 | - | |||||||||||||||||||||||||||||||||||||
578 | d->updateFrameStrut(); | - | ||||||||||||||||||||||||||||||||||||
579 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
580 | - | |||||||||||||||||||||||||||||||||||||
581 | void q_createNativeChildrenAndSetParent(const QWidget *parentWidget) | - | ||||||||||||||||||||||||||||||||||||
582 | { | - | ||||||||||||||||||||||||||||||||||||
583 | QObjectList children = parentWidget->children(); | - | ||||||||||||||||||||||||||||||||||||
584 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
585 | if (children.at(i)->isWidgetType()
| 0 | ||||||||||||||||||||||||||||||||||||
586 | const QWidget *childWidget = qobject_cast<const QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
587 | if (childWidget
| 0 | ||||||||||||||||||||||||||||||||||||
588 | if (childWidget->testAttribute(Qt::WA_NativeWindow)
| 0 | ||||||||||||||||||||||||||||||||||||
589 | if (!childWidget->internalWinId()
| 0 | ||||||||||||||||||||||||||||||||||||
590 | childWidget->winId(); never executed: childWidget->winId(); | 0 | ||||||||||||||||||||||||||||||||||||
591 | if (childWidget->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
592 | if (childWidget->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
593 | childWidget->windowHandle()->setTransientParent(parentWidget->window()->windowHandle()); | - | ||||||||||||||||||||||||||||||||||||
594 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
595 | childWidget->windowHandle()->setParent(childWidget->nativeParentWidget()->windowHandle()); | - | ||||||||||||||||||||||||||||||||||||
596 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
597 | } | - | ||||||||||||||||||||||||||||||||||||
598 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
599 | q_createNativeChildrenAndSetParent(childWidget); | - | ||||||||||||||||||||||||||||||||||||
600 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
601 | } | - | ||||||||||||||||||||||||||||||||||||
602 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
603 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
604 | - | |||||||||||||||||||||||||||||||||||||
605 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
606 | - | |||||||||||||||||||||||||||||||||||||
607 | void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyOldWindow) | - | ||||||||||||||||||||||||||||||||||||
608 | { | - | ||||||||||||||||||||||||||||||||||||
609 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
610 | - | |||||||||||||||||||||||||||||||||||||
611 | (void)window;; | - | ||||||||||||||||||||||||||||||||||||
612 | (void)initializeWindow;; | - | ||||||||||||||||||||||||||||||||||||
613 | (void)destroyOldWindow;; | - | ||||||||||||||||||||||||||||||||||||
614 | - | |||||||||||||||||||||||||||||||||||||
615 | Qt::WindowFlags flags = data.window_flags; | - | ||||||||||||||||||||||||||||||||||||
616 | - | |||||||||||||||||||||||||||||||||||||
617 | if (!q->testAttribute(Qt::WA_NativeWindow)
| 0 | ||||||||||||||||||||||||||||||||||||
618 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
619 | - | |||||||||||||||||||||||||||||||||||||
620 | QWindow *win = topData()->window; | - | ||||||||||||||||||||||||||||||||||||
621 | - | |||||||||||||||||||||||||||||||||||||
622 | - | |||||||||||||||||||||||||||||||||||||
623 | if (!win
| 0 | ||||||||||||||||||||||||||||||||||||
624 | createTLSysExtra(); | - | ||||||||||||||||||||||||||||||||||||
625 | win = topData()->window; | - | ||||||||||||||||||||||||||||||||||||
626 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
627 | - | |||||||||||||||||||||||||||||||||||||
628 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(q->dynamicPropertyNames())>::type> _container_((q->dynamicPropertyNames())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QByteArray &propertyName = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||||||||||||||
629 | if (!qstrncmp(propertyName, "_q_platform_", 12)
| 0 | ||||||||||||||||||||||||||||||||||||
630 | win->setProperty(propertyName, q->property(propertyName)); never executed: win->setProperty(propertyName, q->property(propertyName)); | 0 | ||||||||||||||||||||||||||||||||||||
631 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
632 | - | |||||||||||||||||||||||||||||||||||||
633 | if (q->testAttribute(Qt::WA_ShowWithoutActivating)
| 0 | ||||||||||||||||||||||||||||||||||||
634 | win->setProperty("_q_showWithoutActivating", QVariant(true)); never executed: win->setProperty("_q_showWithoutActivating", QVariant(true)); | 0 | ||||||||||||||||||||||||||||||||||||
635 | if (q->testAttribute(Qt::WA_MacAlwaysShowToolWindow)
| 0 | ||||||||||||||||||||||||||||||||||||
636 | win->setProperty("_q_macAlwaysShowToolWindow", QVariant::fromValue(QVariant(true))); never executed: win->setProperty("_q_macAlwaysShowToolWindow", QVariant::fromValue(QVariant(true))); | 0 | ||||||||||||||||||||||||||||||||||||
637 | setNetWmWindowTypes(true); | - | ||||||||||||||||||||||||||||||||||||
638 | win->setFlags(data.window_flags); | - | ||||||||||||||||||||||||||||||||||||
639 | fixPosIncludesFrame(); | - | ||||||||||||||||||||||||||||||||||||
640 | if (q->testAttribute(Qt::WA_Moved)
| 0 | ||||||||||||||||||||||||||||||||||||
641 | || !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowManagement)
| 0 | ||||||||||||||||||||||||||||||||||||
642 | win->setGeometry(q->geometry()); never executed: win->setGeometry(q->geometry()); | 0 | ||||||||||||||||||||||||||||||||||||
643 | else | - | ||||||||||||||||||||||||||||||||||||
644 | win->resize(q->size()); never executed: win->resize(q->size()); | 0 | ||||||||||||||||||||||||||||||||||||
645 | if (win->isTopLevel()
| 0 | ||||||||||||||||||||||||||||||||||||
646 | int screenNumber = topData()->initialScreenIndex; | - | ||||||||||||||||||||||||||||||||||||
647 | topData()->initialScreenIndex = -1; | - | ||||||||||||||||||||||||||||||||||||
648 | if (screenNumber < 0
| 0 | ||||||||||||||||||||||||||||||||||||
649 | screenNumber = q->windowType() != Qt::Desktop
| 0 | ||||||||||||||||||||||||||||||||||||
650 | ? QApplication::desktop()->screenNumber(q) : 0; | - | ||||||||||||||||||||||||||||||||||||
651 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
652 | win->setScreen(QGuiApplication::screens().value(screenNumber, nullptr)); | - | ||||||||||||||||||||||||||||||||||||
653 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
654 | - | |||||||||||||||||||||||||||||||||||||
655 | QSurfaceFormat format = win->requestedFormat(); | - | ||||||||||||||||||||||||||||||||||||
656 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
657 | && q->testAttribute(Qt::WA_TranslucentBackground)
| 0 | ||||||||||||||||||||||||||||||||||||
658 | format.setAlphaBufferSize(8); | - | ||||||||||||||||||||||||||||||||||||
659 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
660 | win->setFormat(format); | - | ||||||||||||||||||||||||||||||||||||
661 | - | |||||||||||||||||||||||||||||||||||||
662 | if (QWidget *nativeParent = q->nativeParentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
663 | if (nativeParent->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
664 | if (flags & Qt::Window
| 0 | ||||||||||||||||||||||||||||||||||||
665 | win->setTransientParent(nativeParent->window()->windowHandle()); | - | ||||||||||||||||||||||||||||||||||||
666 | win->setParent(0); | - | ||||||||||||||||||||||||||||||||||||
667 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
668 | win->setTransientParent(0); | - | ||||||||||||||||||||||||||||||||||||
669 | win->setParent(nativeParent->windowHandle()); | - | ||||||||||||||||||||||||||||||||||||
670 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
671 | } | - | ||||||||||||||||||||||||||||||||||||
672 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
673 | - | |||||||||||||||||||||||||||||||||||||
674 | qt_window_private(win)->positionPolicy = topData()->posIncludesFrame
| 0 | ||||||||||||||||||||||||||||||||||||
675 | QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive; | - | ||||||||||||||||||||||||||||||||||||
676 | win->create(); | - | ||||||||||||||||||||||||||||||||||||
677 | - | |||||||||||||||||||||||||||||||||||||
678 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
679 | if (QPlatformWindow *platformWindow = win->handle()
| 0 | ||||||||||||||||||||||||||||||||||||
680 | platformWindow->setFrameStrutEventsEnabled(true); never executed: platformWindow->setFrameStrutEventsEnabled(true); | 0 | ||||||||||||||||||||||||||||||||||||
681 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
682 | - | |||||||||||||||||||||||||||||||||||||
683 | data.window_flags = win->flags(); | - | ||||||||||||||||||||||||||||||||||||
684 | - | |||||||||||||||||||||||||||||||||||||
685 | if (!topData()->role.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
686 | QXcbWindowFunctions::setWmWindowRole(win, topData()->role.toLatin1()); never executed: QXcbWindowFunctions::setWmWindowRole(win, topData()->role.toLatin1()); | 0 | ||||||||||||||||||||||||||||||||||||
687 | - | |||||||||||||||||||||||||||||||||||||
688 | QBackingStore *store = q->backingStore(); | - | ||||||||||||||||||||||||||||||||||||
689 | - | |||||||||||||||||||||||||||||||||||||
690 | if (!store
| 0 | ||||||||||||||||||||||||||||||||||||
691 | if (win
| 0 | ||||||||||||||||||||||||||||||||||||
692 | if (q->isTopLevel()
| 0 | ||||||||||||||||||||||||||||||||||||
693 | q->setBackingStore(new QBackingStore(win)); never executed: q->setBackingStore(new QBackingStore(win)); | 0 | ||||||||||||||||||||||||||||||||||||
694 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
695 | q->setAttribute(Qt::WA_PaintOnScreen, true); | - | ||||||||||||||||||||||||||||||||||||
696 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
697 | } | - | ||||||||||||||||||||||||||||||||||||
698 | - | |||||||||||||||||||||||||||||||||||||
699 | setWindowModified_helper(); | - | ||||||||||||||||||||||||||||||||||||
700 | WId id = win->winId(); | - | ||||||||||||||||||||||||||||||||||||
701 | - | |||||||||||||||||||||||||||||||||||||
702 | ((!(id != WId(0))) ? qt_assert("id != WId(0)",__FILE__,1497) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
703 | setWinId(id); | - | ||||||||||||||||||||||||||||||||||||
704 | - | |||||||||||||||||||||||||||||||||||||
705 | - | |||||||||||||||||||||||||||||||||||||
706 | q_createNativeChildrenAndSetParent(q); | - | ||||||||||||||||||||||||||||||||||||
707 | - | |||||||||||||||||||||||||||||||||||||
708 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
709 | setMask_sys(extra->mask); never executed: setMask_sys(extra->mask); | 0 | ||||||||||||||||||||||||||||||||||||
710 | - | |||||||||||||||||||||||||||||||||||||
711 | if (data.crect.width() == 0
| 0 | ||||||||||||||||||||||||||||||||||||
712 | q->setAttribute(Qt::WA_OutsideWSRange, true); | - | ||||||||||||||||||||||||||||||||||||
713 | } never executed: else if (q->isVisible()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
714 | - | |||||||||||||||||||||||||||||||||||||
715 | win->setVisible(true); | - | ||||||||||||||||||||||||||||||||||||
716 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
717 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
718 | - | |||||||||||||||||||||||||||||||||||||
719 | - | |||||||||||||||||||||||||||||||||||||
720 | - | |||||||||||||||||||||||||||||||||||||
721 | - | |||||||||||||||||||||||||||||||||||||
722 | - | |||||||||||||||||||||||||||||||||||||
723 | void QWidgetPrivate::createTLSysExtra() | - | ||||||||||||||||||||||||||||||||||||
724 | { | - | ||||||||||||||||||||||||||||||||||||
725 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
726 | if (!extra->topextra->window
| 0 | ||||||||||||||||||||||||||||||||||||
727 | extra->topextra->window = new QWidgetWindow(q); | - | ||||||||||||||||||||||||||||||||||||
728 | if (extra->minw
| 0 | ||||||||||||||||||||||||||||||||||||
729 | extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh)); never executed: extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh)); | 0 | ||||||||||||||||||||||||||||||||||||
730 | if (extra->maxw != ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
731 | extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh)); never executed: extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh)); | 0 | ||||||||||||||||||||||||||||||||||||
732 | if (extra->topextra->opacity != 255
| 0 | ||||||||||||||||||||||||||||||||||||
733 | extra->topextra->window->setOpacity(qreal(extra->topextra->opacity) / qreal(255)); never executed: extra->topextra->window->setOpacity(qreal(extra->topextra->opacity) / qreal(255)); | 0 | ||||||||||||||||||||||||||||||||||||
734 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
735 | - | |||||||||||||||||||||||||||||||||||||
736 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
737 | QWidget::~QWidget() | - | ||||||||||||||||||||||||||||||||||||
738 | { | - | ||||||||||||||||||||||||||||||||||||
739 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
740 | d->data.in_destructor = true; | - | ||||||||||||||||||||||||||||||||||||
741 | - | |||||||||||||||||||||||||||||||||||||
742 | - | |||||||||||||||||||||||||||||||||||||
743 | - | |||||||||||||||||||||||||||||||||||||
744 | - | |||||||||||||||||||||||||||||||||||||
745 | - | |||||||||||||||||||||||||||||||||||||
746 | - | |||||||||||||||||||||||||||||||||||||
747 | - | |||||||||||||||||||||||||||||||||||||
748 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(d->gestureContext.keys())>::type> _container_((d->gestureContext.keys())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (Qt::GestureType type = *_container_.i; _container_.control; _container_.control = 0) | - | ||||||||||||||||||||||||||||||||||||
749 | ungrabGesture(type); never executed: ungrabGesture(type); | 0 | ||||||||||||||||||||||||||||||||||||
750 | - | |||||||||||||||||||||||||||||||||||||
751 | - | |||||||||||||||||||||||||||||||||||||
752 | - | |||||||||||||||||||||||||||||||||||||
753 | d->registerDropSite(false); | - | ||||||||||||||||||||||||||||||||||||
754 | - | |||||||||||||||||||||||||||||||||||||
755 | - | |||||||||||||||||||||||||||||||||||||
756 | - | |||||||||||||||||||||||||||||||||||||
757 | for (int i = 0; i < d->actions.size()
| 0 | ||||||||||||||||||||||||||||||||||||
758 | QActionPrivate *apriv = d->actions.at(i)->d_func(); | - | ||||||||||||||||||||||||||||||||||||
759 | apriv->widgets.removeAll(this); | - | ||||||||||||||||||||||||||||||||||||
760 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
761 | d->actions.clear(); | - | ||||||||||||||||||||||||||||||||||||
762 | - | |||||||||||||||||||||||||||||||||||||
763 | - | |||||||||||||||||||||||||||||||||||||
764 | - | |||||||||||||||||||||||||||||||||||||
765 | - | |||||||||||||||||||||||||||||||||||||
766 | - | |||||||||||||||||||||||||||||||||||||
767 | if (!QApplicationPrivate::is_app_closing
| 0 | ||||||||||||||||||||||||||||||||||||
768 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.removeShortcut(0, this, QKeySequence());(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.removeShortcut(0, this, QKeySequence()); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.removeShortcut(0, this, QKeySequence()); | 0 | ||||||||||||||||||||||||||||||||||||
769 | - | |||||||||||||||||||||||||||||||||||||
770 | - | |||||||||||||||||||||||||||||||||||||
771 | - | |||||||||||||||||||||||||||||||||||||
772 | delete d->layout; | - | ||||||||||||||||||||||||||||||||||||
773 | d->layout = 0; | - | ||||||||||||||||||||||||||||||||||||
774 | - | |||||||||||||||||||||||||||||||||||||
775 | - | |||||||||||||||||||||||||||||||||||||
776 | ((!(d->focus_next->d_func()->focus_prev == this)) ? qt_assert("d->focus_next->d_func()->focus_prev == this",__FILE__,1587) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
777 | ((!(d->focus_prev->d_func()->focus_next == this)) ? qt_assert("d->focus_prev->d_func()->focus_next == this",__FILE__,1588) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
778 | - | |||||||||||||||||||||||||||||||||||||
779 | if (d->focus_next != this
| 0 | ||||||||||||||||||||||||||||||||||||
780 | d->focus_next->d_func()->focus_prev = d->focus_prev; | - | ||||||||||||||||||||||||||||||||||||
781 | d->focus_prev->d_func()->focus_next = d->focus_next; | - | ||||||||||||||||||||||||||||||||||||
782 | d->focus_next = d->focus_prev = 0; | - | ||||||||||||||||||||||||||||||||||||
783 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
784 | - | |||||||||||||||||||||||||||||||||||||
785 | - | |||||||||||||||||||||||||||||||||||||
786 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
787 | - | |||||||||||||||||||||||||||||||||||||
788 | const QWidget* w = this; | - | ||||||||||||||||||||||||||||||||||||
789 | while (w->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
790 | w = w->d_func()->extra->focus_proxy; never executed: w = w->d_func()->extra->focus_proxy; | 0 | ||||||||||||||||||||||||||||||||||||
791 | QWidget *window = w->window(); | - | ||||||||||||||||||||||||||||||||||||
792 | QWExtra *e = window
| 0 | ||||||||||||||||||||||||||||||||||||
793 | if (!e
| 0 | ||||||||||||||||||||||||||||||||||||
794 | - | |||||||||||||||||||||||||||||||||||||
795 | clearFocus(); never executed: clearFocus(); | 0 | ||||||||||||||||||||||||||||||||||||
796 | } never executed: else {end of block dead code: { } | - | ||||||||||||||||||||||||||||||||||||
797 | - | |||||||||||||||||||||||||||||||||||||
798 | } dead code: { } | - | ||||||||||||||||||||||||||||||||||||
799 | - | |||||||||||||||||||||||||||||||||||||
800 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
801 | - | |||||||||||||||||||||||||||||||||||||
802 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
803 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
804 | d->close_helper(QWidgetPrivate::CloseNoEvent); | - | ||||||||||||||||||||||||||||||||||||
805 | } never executed: else {end of block dead code: { if (true) { hide(); } else { } } | - | ||||||||||||||||||||||||||||||||||||
806 | - | |||||||||||||||||||||||||||||||||||||
807 | if (true) { dead code: { if (true) { hide(); } else { } } | - | ||||||||||||||||||||||||||||||||||||
808 | hide(); dead code: { if (true) { hide(); } else { } } | - | ||||||||||||||||||||||||||||||||||||
809 | } else { dead code: { } dead code: { if (true) { hide(); } else { } } | - | ||||||||||||||||||||||||||||||||||||
810 | - | |||||||||||||||||||||||||||||||||||||
811 | } dead code: { } dead code: { if (true) { hide(); } else { } } | - | ||||||||||||||||||||||||||||||||||||
812 | } dead code: { if (true) { hide(); } else { } } | - | ||||||||||||||||||||||||||||||||||||
813 | } | - | ||||||||||||||||||||||||||||||||||||
814 | - | |||||||||||||||||||||||||||||||||||||
815 | - | |||||||||||||||||||||||||||||||||||||
816 | - | |||||||||||||||||||||||||||||||||||||
817 | - | |||||||||||||||||||||||||||||||||||||
818 | - | |||||||||||||||||||||||||||||||||||||
819 | - | |||||||||||||||||||||||||||||||||||||
820 | else if (isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
821 | (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->sendSyntheticEnterLeave(this); | - | ||||||||||||||||||||||||||||||||||||
822 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
823 | - | |||||||||||||||||||||||||||||||||||||
824 | if (QWidgetBackingStore *bs = d->maybeBackingStore()
| 0 | ||||||||||||||||||||||||||||||||||||
825 | bs->removeDirtyWidget(this); | - | ||||||||||||||||||||||||||||||||||||
826 | if (testAttribute(Qt::WA_StaticContents)
| 0 | ||||||||||||||||||||||||||||||||||||
827 | bs->removeStaticWidget(this); never executed: bs->removeStaticWidget(this); | 0 | ||||||||||||||||||||||||||||||||||||
828 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
829 | - | |||||||||||||||||||||||||||||||||||||
830 | delete d->needsFlush; | - | ||||||||||||||||||||||||||||||||||||
831 | d->needsFlush = 0; | - | ||||||||||||||||||||||||||||||||||||
832 | - | |||||||||||||||||||||||||||||||||||||
833 | - | |||||||||||||||||||||||||||||||||||||
834 | - | |||||||||||||||||||||||||||||||||||||
835 | bool blocked = d->blockSig; | - | ||||||||||||||||||||||||||||||||||||
836 | d->blockSig = 0; | - | ||||||||||||||||||||||||||||||||||||
837 | - | |||||||||||||||||||||||||||||||||||||
838 | if (d->isSignalConnected(0)
| 0 | ||||||||||||||||||||||||||||||||||||
839 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
840 | destroyed(this); | - | ||||||||||||||||||||||||||||||||||||
841 | } never executed: else {end of block dead code: { QMessageLogger(__FILE__, 1655, __PRETTY_FUNCTION__).warning("Detected an unexpected exception in ~QWidget while emitting destroyed()."); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
842 | - | |||||||||||||||||||||||||||||||||||||
843 | - | |||||||||||||||||||||||||||||||||||||
844 | QMessageLogger(__FILE__, 1655, __PRETTY_FUNCTION__).warning("Detected an unexpected exception in ~QWidget while emitting destroyed()."); dead code: { QMessageLogger(__FILE__, 1655, __PRETTY_FUNCTION__).warning("Detected an unexpected exception in ~QWidget while emitting destroyed()."); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
845 | qt_noop(); dead code: { QMessageLogger(__FILE__, 1655, __PRETTY_FUNCTION__).warning("Detected an unexpected exception in ~QWidget while emitting destroyed()."); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
846 | } dead code: { QMessageLogger(__FILE__, 1655, __PRETTY_FUNCTION__).warning("Detected an unexpected exception in ~QWidget while emitting destroyed()."); qt_noop(); } | - | ||||||||||||||||||||||||||||||||||||
847 | } | - | ||||||||||||||||||||||||||||||||||||
848 | - | |||||||||||||||||||||||||||||||||||||
849 | if (d->declarativeData
| 0 | ||||||||||||||||||||||||||||||||||||
850 | if (static_cast<
| 0 | ||||||||||||||||||||||||||||||||||||
851 | if (QAbstractDeclarativeData::destroyed_qml1
| 0 | ||||||||||||||||||||||||||||||||||||
852 | QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); never executed: QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); | 0 | ||||||||||||||||||||||||||||||||||||
853 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
854 | if (QAbstractDeclarativeData::destroyed
| 0 | ||||||||||||||||||||||||||||||||||||
855 | QAbstractDeclarativeData::destroyed(d->declarativeData, this); never executed: QAbstractDeclarativeData::destroyed(d->declarativeData, this); | 0 | ||||||||||||||||||||||||||||||||||||
856 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
857 | d->declarativeData = 0; | - | ||||||||||||||||||||||||||||||||||||
858 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
859 | - | |||||||||||||||||||||||||||||||||||||
860 | d->blockSig = blocked; | - | ||||||||||||||||||||||||||||||||||||
861 | if (!d->children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
862 | d->deleteChildren(); never executed: d->deleteChildren(); | 0 | ||||||||||||||||||||||||||||||||||||
863 | - | |||||||||||||||||||||||||||||||||||||
864 | QApplication::removePostedEvents(this); | - | ||||||||||||||||||||||||||||||||||||
865 | - | |||||||||||||||||||||||||||||||||||||
866 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
867 | destroy(); | - | ||||||||||||||||||||||||||||||||||||
868 | } never executed: else {end of block dead code: { } | - | ||||||||||||||||||||||||||||||||||||
869 | - | |||||||||||||||||||||||||||||||||||||
870 | } dead code: { } | - | ||||||||||||||||||||||||||||||||||||
871 | --QWidgetPrivate::instanceCounter; | - | ||||||||||||||||||||||||||||||||||||
872 | - | |||||||||||||||||||||||||||||||||||||
873 | if (QWidgetPrivate::allWidgets
| 0 | ||||||||||||||||||||||||||||||||||||
874 | QWidgetPrivate::allWidgets->remove(this); never executed: QWidgetPrivate::allWidgets->remove(this); | 0 | ||||||||||||||||||||||||||||||||||||
875 | - | |||||||||||||||||||||||||||||||||||||
876 | if (true) { | - | ||||||||||||||||||||||||||||||||||||
877 | QEvent e(QEvent::Destroy); | - | ||||||||||||||||||||||||||||||||||||
878 | QCoreApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
879 | } never executed: else {end of block dead code: { } | - | ||||||||||||||||||||||||||||||||||||
880 | - | |||||||||||||||||||||||||||||||||||||
881 | } dead code: { } | - | ||||||||||||||||||||||||||||||||||||
882 | } | - | ||||||||||||||||||||||||||||||||||||
883 | - | |||||||||||||||||||||||||||||||||||||
884 | int QWidgetPrivate::instanceCounter = 0; | - | ||||||||||||||||||||||||||||||||||||
885 | int QWidgetPrivate::maxInstances = 0; | - | ||||||||||||||||||||||||||||||||||||
886 | - | |||||||||||||||||||||||||||||||||||||
887 | void QWidgetPrivate::setWinId(WId id) | - | ||||||||||||||||||||||||||||||||||||
888 | { | - | ||||||||||||||||||||||||||||||||||||
889 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
890 | - | |||||||||||||||||||||||||||||||||||||
891 | - | |||||||||||||||||||||||||||||||||||||
892 | - | |||||||||||||||||||||||||||||||||||||
893 | - | |||||||||||||||||||||||||||||||||||||
894 | - | |||||||||||||||||||||||||||||||||||||
895 | bool userDesktopWidget = qt_desktopWidget != 0
| 0 | ||||||||||||||||||||||||||||||||||||
896 | if (mapper
| 0 | ||||||||||||||||||||||||||||||||||||
897 | mapper->remove(data.winid); | - | ||||||||||||||||||||||||||||||||||||
898 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
899 | - | |||||||||||||||||||||||||||||||||||||
900 | const WId oldWinId = data.winid; | - | ||||||||||||||||||||||||||||||||||||
901 | - | |||||||||||||||||||||||||||||||||||||
902 | data.winid = id; | - | ||||||||||||||||||||||||||||||||||||
903 | - | |||||||||||||||||||||||||||||||||||||
904 | - | |||||||||||||||||||||||||||||||||||||
905 | - | |||||||||||||||||||||||||||||||||||||
906 | if (mapper
| 0 | ||||||||||||||||||||||||||||||||||||
907 | mapper->insert(data.winid, q); | - | ||||||||||||||||||||||||||||||||||||
908 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
909 | - | |||||||||||||||||||||||||||||||||||||
910 | if(oldWinId != id
| 0 | ||||||||||||||||||||||||||||||||||||
911 | QEvent e(QEvent::WinIdChange); | - | ||||||||||||||||||||||||||||||||||||
912 | QCoreApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
913 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
914 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
915 | - | |||||||||||||||||||||||||||||||||||||
916 | void QWidgetPrivate::createTLExtra() | - | ||||||||||||||||||||||||||||||||||||
917 | { | - | ||||||||||||||||||||||||||||||||||||
918 | if (!extra
| 0 | ||||||||||||||||||||||||||||||||||||
919 | createExtra(); never executed: createExtra(); | 0 | ||||||||||||||||||||||||||||||||||||
920 | if (!extra->topextra
| 0 | ||||||||||||||||||||||||||||||||||||
921 | QTLWExtra* x = extra->topextra = new QTLWExtra; | - | ||||||||||||||||||||||||||||||||||||
922 | x->icon = 0; | - | ||||||||||||||||||||||||||||||||||||
923 | x->backingStore = 0; | - | ||||||||||||||||||||||||||||||||||||
924 | x->sharedPainter = 0; | - | ||||||||||||||||||||||||||||||||||||
925 | x->incw = x->inch = 0; | - | ||||||||||||||||||||||||||||||||||||
926 | x->basew = x->baseh = 0; | - | ||||||||||||||||||||||||||||||||||||
927 | x->frameStrut.setCoords(0, 0, 0, 0); | - | ||||||||||||||||||||||||||||||||||||
928 | x->normalGeometry = QRect(0,0,-1,-1); | - | ||||||||||||||||||||||||||||||||||||
929 | x->savedFlags = 0; | - | ||||||||||||||||||||||||||||||||||||
930 | x->opacity = 255; | - | ||||||||||||||||||||||||||||||||||||
931 | x->posIncludesFrame = 0; | - | ||||||||||||||||||||||||||||||||||||
932 | x->sizeAdjusted = false; | - | ||||||||||||||||||||||||||||||||||||
933 | x->inTopLevelResize = false; | - | ||||||||||||||||||||||||||||||||||||
934 | x->inRepaint = false; | - | ||||||||||||||||||||||||||||||||||||
935 | x->embedded = 0; | - | ||||||||||||||||||||||||||||||||||||
936 | x->window = 0; | - | ||||||||||||||||||||||||||||||||||||
937 | x->shareContext = 0; | - | ||||||||||||||||||||||||||||||||||||
938 | x->initialScreenIndex = -1; | - | ||||||||||||||||||||||||||||||||||||
939 | - | |||||||||||||||||||||||||||||||||||||
940 | - | |||||||||||||||||||||||||||||||||||||
941 | - | |||||||||||||||||||||||||||||||||||||
942 | - | |||||||||||||||||||||||||||||||||||||
943 | - | |||||||||||||||||||||||||||||||||||||
944 | - | |||||||||||||||||||||||||||||||||||||
945 | - | |||||||||||||||||||||||||||||||||||||
946 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
947 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
948 | - | |||||||||||||||||||||||||||||||||||||
949 | - | |||||||||||||||||||||||||||||||||||||
950 | - | |||||||||||||||||||||||||||||||||||||
951 | - | |||||||||||||||||||||||||||||||||||||
952 | - | |||||||||||||||||||||||||||||||||||||
953 | - | |||||||||||||||||||||||||||||||||||||
954 | void QWidgetPrivate::createExtra() | - | ||||||||||||||||||||||||||||||||||||
955 | { | - | ||||||||||||||||||||||||||||||||||||
956 | if (!extra
| 0 | ||||||||||||||||||||||||||||||||||||
957 | extra = new QWExtra; | - | ||||||||||||||||||||||||||||||||||||
958 | extra->glContext = 0; | - | ||||||||||||||||||||||||||||||||||||
959 | extra->topextra = 0; | - | ||||||||||||||||||||||||||||||||||||
960 | - | |||||||||||||||||||||||||||||||||||||
961 | extra->proxyWidget = 0; | - | ||||||||||||||||||||||||||||||||||||
962 | - | |||||||||||||||||||||||||||||||||||||
963 | - | |||||||||||||||||||||||||||||||||||||
964 | extra->curs = 0; | - | ||||||||||||||||||||||||||||||||||||
965 | - | |||||||||||||||||||||||||||||||||||||
966 | extra->minw = 0; | - | ||||||||||||||||||||||||||||||||||||
967 | extra->minh = 0; | - | ||||||||||||||||||||||||||||||||||||
968 | extra->maxw = ((1<<24)-1); | - | ||||||||||||||||||||||||||||||||||||
969 | extra->maxh = ((1<<24)-1); | - | ||||||||||||||||||||||||||||||||||||
970 | extra->customDpiX = 0; | - | ||||||||||||||||||||||||||||||||||||
971 | extra->customDpiY = 0; | - | ||||||||||||||||||||||||||||||||||||
972 | extra->explicitMinSize = 0; | - | ||||||||||||||||||||||||||||||||||||
973 | extra->explicitMaxSize = 0; | - | ||||||||||||||||||||||||||||||||||||
974 | extra->autoFillBackground = 0; | - | ||||||||||||||||||||||||||||||||||||
975 | extra->nativeChildrenForced = 0; | - | ||||||||||||||||||||||||||||||||||||
976 | extra->inRenderWithPainter = 0; | - | ||||||||||||||||||||||||||||||||||||
977 | extra->hasWindowContainer = false; | - | ||||||||||||||||||||||||||||||||||||
978 | extra->hasMask = 0; | - | ||||||||||||||||||||||||||||||||||||
979 | createSysExtra(); | - | ||||||||||||||||||||||||||||||||||||
980 | - | |||||||||||||||||||||||||||||||||||||
981 | - | |||||||||||||||||||||||||||||||||||||
982 | - | |||||||||||||||||||||||||||||||||||||
983 | - | |||||||||||||||||||||||||||||||||||||
984 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
985 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
986 | - | |||||||||||||||||||||||||||||||||||||
987 | void QWidgetPrivate::createSysExtra() | - | ||||||||||||||||||||||||||||||||||||
988 | { | - | ||||||||||||||||||||||||||||||||||||
989 | } | - | ||||||||||||||||||||||||||||||||||||
990 | - | |||||||||||||||||||||||||||||||||||||
991 | - | |||||||||||||||||||||||||||||||||||||
992 | - | |||||||||||||||||||||||||||||||||||||
993 | - | |||||||||||||||||||||||||||||||||||||
994 | - | |||||||||||||||||||||||||||||||||||||
995 | - | |||||||||||||||||||||||||||||||||||||
996 | void QWidgetPrivate::deleteExtra() | - | ||||||||||||||||||||||||||||||||||||
997 | { | - | ||||||||||||||||||||||||||||||||||||
998 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
999 | - | |||||||||||||||||||||||||||||||||||||
1000 | delete extra->curs; | - | ||||||||||||||||||||||||||||||||||||
1001 | - | |||||||||||||||||||||||||||||||||||||
1002 | deleteSysExtra(); | - | ||||||||||||||||||||||||||||||||||||
1003 | - | |||||||||||||||||||||||||||||||||||||
1004 | - | |||||||||||||||||||||||||||||||||||||
1005 | if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(extra->style)
| 0 | ||||||||||||||||||||||||||||||||||||
1006 | proxy->deref(); never executed: proxy->deref(); | 0 | ||||||||||||||||||||||||||||||||||||
1007 | - | |||||||||||||||||||||||||||||||||||||
1008 | if (extra->topextra
| 0 | ||||||||||||||||||||||||||||||||||||
1009 | deleteTLSysExtra(); | - | ||||||||||||||||||||||||||||||||||||
1010 | - | |||||||||||||||||||||||||||||||||||||
1011 | delete extra->topextra->icon; | - | ||||||||||||||||||||||||||||||||||||
1012 | delete extra->topextra; | - | ||||||||||||||||||||||||||||||||||||
1013 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1014 | delete extra; | - | ||||||||||||||||||||||||||||||||||||
1015 | - | |||||||||||||||||||||||||||||||||||||
1016 | extra = 0; | - | ||||||||||||||||||||||||||||||||||||
1017 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1018 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1019 | - | |||||||||||||||||||||||||||||||||||||
1020 | void QWidgetPrivate::deleteSysExtra() | - | ||||||||||||||||||||||||||||||||||||
1021 | { | - | ||||||||||||||||||||||||||||||||||||
1022 | } | - | ||||||||||||||||||||||||||||||||||||
1023 | - | |||||||||||||||||||||||||||||||||||||
1024 | static void deleteBackingStore(QWidgetPrivate *d) | - | ||||||||||||||||||||||||||||||||||||
1025 | { | - | ||||||||||||||||||||||||||||||||||||
1026 | QTLWExtra *topData = d->topData(); | - | ||||||||||||||||||||||||||||||||||||
1027 | - | |||||||||||||||||||||||||||||||||||||
1028 | - | |||||||||||||||||||||||||||||||||||||
1029 | - | |||||||||||||||||||||||||||||||||||||
1030 | - | |||||||||||||||||||||||||||||||||||||
1031 | - | |||||||||||||||||||||||||||||||||||||
1032 | QScopedPointer<QOffscreenSurface> tempSurface; | - | ||||||||||||||||||||||||||||||||||||
1033 | - | |||||||||||||||||||||||||||||||||||||
1034 | if (d->textureChildSeen
| 0 | ||||||||||||||||||||||||||||||||||||
1035 | if (topData->window->handle()
| 0 | ||||||||||||||||||||||||||||||||||||
1036 | topData->shareContext->makeCurrent(topData->window); | - | ||||||||||||||||||||||||||||||||||||
1037 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1038 | tempSurface.reset(new QOffscreenSurface); | - | ||||||||||||||||||||||||||||||||||||
1039 | tempSurface->setFormat(topData->shareContext->format()); | - | ||||||||||||||||||||||||||||||||||||
1040 | tempSurface->create(); | - | ||||||||||||||||||||||||||||||||||||
1041 | topData->shareContext->makeCurrent(tempSurface.data()); | - | ||||||||||||||||||||||||||||||||||||
1042 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1043 | } | - | ||||||||||||||||||||||||||||||||||||
1044 | - | |||||||||||||||||||||||||||||||||||||
1045 | - | |||||||||||||||||||||||||||||||||||||
1046 | delete topData->backingStore; | - | ||||||||||||||||||||||||||||||||||||
1047 | topData->backingStore = 0; | - | ||||||||||||||||||||||||||||||||||||
1048 | - | |||||||||||||||||||||||||||||||||||||
1049 | - | |||||||||||||||||||||||||||||||||||||
1050 | if (d->textureChildSeen
| 0 | ||||||||||||||||||||||||||||||||||||
1051 | topData->shareContext->doneCurrent(); never executed: topData->shareContext->doneCurrent(); | 0 | ||||||||||||||||||||||||||||||||||||
1052 | - | |||||||||||||||||||||||||||||||||||||
1053 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1054 | - | |||||||||||||||||||||||||||||||||||||
1055 | void QWidgetPrivate::deleteTLSysExtra() | - | ||||||||||||||||||||||||||||||||||||
1056 | { | - | ||||||||||||||||||||||||||||||||||||
1057 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
1058 | - | |||||||||||||||||||||||||||||||||||||
1059 | - | |||||||||||||||||||||||||||||||||||||
1060 | - | |||||||||||||||||||||||||||||||||||||
1061 | - | |||||||||||||||||||||||||||||||||||||
1062 | extra->topextra->backingStoreTracker.destroy(); | - | ||||||||||||||||||||||||||||||||||||
1063 | deleteBackingStore(this); | - | ||||||||||||||||||||||||||||||||||||
1064 | - | |||||||||||||||||||||||||||||||||||||
1065 | qDeleteAll(extra->topextra->widgetTextures); | - | ||||||||||||||||||||||||||||||||||||
1066 | extra->topextra->widgetTextures.clear(); | - | ||||||||||||||||||||||||||||||||||||
1067 | delete extra->topextra->shareContext; | - | ||||||||||||||||||||||||||||||||||||
1068 | extra->topextra->shareContext = 0; | - | ||||||||||||||||||||||||||||||||||||
1069 | - | |||||||||||||||||||||||||||||||||||||
1070 | - | |||||||||||||||||||||||||||||||||||||
1071 | - | |||||||||||||||||||||||||||||||||||||
1072 | - | |||||||||||||||||||||||||||||||||||||
1073 | - | |||||||||||||||||||||||||||||||||||||
1074 | - | |||||||||||||||||||||||||||||||||||||
1075 | if (extra->topextra->window
| 0 | ||||||||||||||||||||||||||||||||||||
1076 | extra->topextra->window->destroy(); | - | ||||||||||||||||||||||||||||||||||||
1077 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1078 | delete extra->topextra->window; | - | ||||||||||||||||||||||||||||||||||||
1079 | extra->topextra->window = 0; | - | ||||||||||||||||||||||||||||||||||||
1080 | - | |||||||||||||||||||||||||||||||||||||
1081 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1082 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1083 | - | |||||||||||||||||||||||||||||||||||||
1084 | - | |||||||||||||||||||||||||||||||||||||
1085 | - | |||||||||||||||||||||||||||||||||||||
1086 | - | |||||||||||||||||||||||||||||||||||||
1087 | - | |||||||||||||||||||||||||||||||||||||
1088 | - | |||||||||||||||||||||||||||||||||||||
1089 | bool QWidgetPrivate::isOverlapped(const QRect &rect) const | - | ||||||||||||||||||||||||||||||||||||
1090 | { | - | ||||||||||||||||||||||||||||||||||||
1091 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1092 | - | |||||||||||||||||||||||||||||||||||||
1093 | const QWidget *w = q; | - | ||||||||||||||||||||||||||||||||||||
1094 | QRect r = rect; | - | ||||||||||||||||||||||||||||||||||||
1095 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
1096 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1097 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
1098 | QWidgetPrivate *pd = w->parentWidget()->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1099 | bool above = false; | - | ||||||||||||||||||||||||||||||||||||
1100 | for (int i = 0; i < pd->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1101 | QWidget *sibling = qobject_cast<QWidget *>(pd->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1102 | if (!sibling
| 0 | ||||||||||||||||||||||||||||||||||||
1103 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1104 | if (!above
| 0 | ||||||||||||||||||||||||||||||||||||
1105 | above = (sibling == w); | - | ||||||||||||||||||||||||||||||||||||
1106 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1107 | } | - | ||||||||||||||||||||||||||||||||||||
1108 | - | |||||||||||||||||||||||||||||||||||||
1109 | if (qRectIntersects(sibling->d_func()->effectiveRectFor(sibling->data->crect), r)
| 0 | ||||||||||||||||||||||||||||||||||||
1110 | const QWExtra *siblingExtra = sibling->d_func()->extra; | - | ||||||||||||||||||||||||||||||||||||
1111 | if (siblingExtra
| 0 | ||||||||||||||||||||||||||||||||||||
1112 | && !siblingExtra->mask.translated(sibling->data->crect.topLeft()).intersects(r)
| 0 | ||||||||||||||||||||||||||||||||||||
1113 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1114 | } | - | ||||||||||||||||||||||||||||||||||||
1115 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
1116 | } | - | ||||||||||||||||||||||||||||||||||||
1117 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1118 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1119 | r.translate(pd->data.crect.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
1120 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1121 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
1122 | } | - | ||||||||||||||||||||||||||||||||||||
1123 | - | |||||||||||||||||||||||||||||||||||||
1124 | void QWidgetPrivate::syncBackingStore() | - | ||||||||||||||||||||||||||||||||||||
1125 | { | - | ||||||||||||||||||||||||||||||||||||
1126 | if (paintOnScreen()
| 0 | ||||||||||||||||||||||||||||||||||||
1127 | repaint_sys(dirty); | - | ||||||||||||||||||||||||||||||||||||
1128 | dirty = QRegion(); | - | ||||||||||||||||||||||||||||||||||||
1129 | } never executed: else if (QWidgetBackingStore *bs = maybeBackingStore()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
1130 | bs->sync(); | - | ||||||||||||||||||||||||||||||||||||
1131 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1132 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1133 | - | |||||||||||||||||||||||||||||||||||||
1134 | void QWidgetPrivate::syncBackingStore(const QRegion ®ion) | - | ||||||||||||||||||||||||||||||||||||
1135 | { | - | ||||||||||||||||||||||||||||||||||||
1136 | if (paintOnScreen()
| 0 | ||||||||||||||||||||||||||||||||||||
1137 | repaint_sys(region); never executed: repaint_sys(region); | 0 | ||||||||||||||||||||||||||||||||||||
1138 | else if (QWidgetBackingStore *bs = maybeBackingStore()
| 0 | ||||||||||||||||||||||||||||||||||||
1139 | bs->sync(q_func(), region); | - | ||||||||||||||||||||||||||||||||||||
1140 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1141 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1142 | - | |||||||||||||||||||||||||||||||||||||
1143 | void QWidgetPrivate::setUpdatesEnabled_helper(bool enable) | - | ||||||||||||||||||||||||||||||||||||
1144 | { | - | ||||||||||||||||||||||||||||||||||||
1145 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1146 | - | |||||||||||||||||||||||||||||||||||||
1147 | if (enable
| 0 | ||||||||||||||||||||||||||||||||||||
1148 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1149 | - | |||||||||||||||||||||||||||||||||||||
1150 | if (enable != q->testAttribute(Qt::WA_UpdatesDisabled)
| 0 | ||||||||||||||||||||||||||||||||||||
1151 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1152 | - | |||||||||||||||||||||||||||||||||||||
1153 | q->setAttribute(Qt::WA_UpdatesDisabled, !enable); | - | ||||||||||||||||||||||||||||||||||||
1154 | if (enable
| 0 | ||||||||||||||||||||||||||||||||||||
1155 | q->update(); never executed: q->update(); | 0 | ||||||||||||||||||||||||||||||||||||
1156 | - | |||||||||||||||||||||||||||||||||||||
1157 | Qt::WidgetAttribute attribute = enable
| 0 | ||||||||||||||||||||||||||||||||||||
1158 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1159 | QWidget *w = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1160 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
1161 | w->d_func()->setUpdatesEnabled_helper(enable); never executed: w->d_func()->setUpdatesEnabled_helper(enable); | 0 | ||||||||||||||||||||||||||||||||||||
1162 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1163 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1164 | void QWidgetPrivate::propagatePaletteChange() | - | ||||||||||||||||||||||||||||||||||||
1165 | { | - | ||||||||||||||||||||||||||||||||||||
1166 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1167 | - | |||||||||||||||||||||||||||||||||||||
1168 | - | |||||||||||||||||||||||||||||||||||||
1169 | if (!q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
1170 | QGraphicsProxyWidget *p = extra->proxyWidget; | - | ||||||||||||||||||||||||||||||||||||
1171 | inheritedPaletteResolveMask = p->d_func()->inheritedPaletteResolveMask | p->palette().resolve(); | - | ||||||||||||||||||||||||||||||||||||
1172 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
1173 | - | |||||||||||||||||||||||||||||||||||||
1174 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1175 | inheritedPaletteResolveMask = 0; | - | ||||||||||||||||||||||||||||||||||||
1176 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1177 | int mask = data.pal.resolve() | inheritedPaletteResolveMask; | - | ||||||||||||||||||||||||||||||||||||
1178 | - | |||||||||||||||||||||||||||||||||||||
1179 | QEvent pc(QEvent::PaletteChange); | - | ||||||||||||||||||||||||||||||||||||
1180 | QApplication::sendEvent(q, &pc); | - | ||||||||||||||||||||||||||||||||||||
1181 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1182 | QWidget *w = qobject_cast<QWidget*>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1183 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
1184 | && (!w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1185 | QWidgetPrivate *wd = w->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1186 | wd->inheritedPaletteResolveMask = mask; | - | ||||||||||||||||||||||||||||||||||||
1187 | wd->resolvePalette(); | - | ||||||||||||||||||||||||||||||||||||
1188 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1189 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1190 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1191 | - | |||||||||||||||||||||||||||||||||||||
1192 | - | |||||||||||||||||||||||||||||||||||||
1193 | - | |||||||||||||||||||||||||||||||||||||
1194 | - | |||||||||||||||||||||||||||||||||||||
1195 | QRect QWidgetPrivate::clipRect() const | - | ||||||||||||||||||||||||||||||||||||
1196 | { | - | ||||||||||||||||||||||||||||||||||||
1197 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1198 | const QWidget * w = q; | - | ||||||||||||||||||||||||||||||||||||
1199 | if (!w->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
1200 | return never executed: QRect();return QRect(); never executed: return QRect(); | 0 | ||||||||||||||||||||||||||||||||||||
1201 | QRect r = effectiveRectFor(q->rect()); | - | ||||||||||||||||||||||||||||||||||||
1202 | int ox = 0; | - | ||||||||||||||||||||||||||||||||||||
1203 | int oy = 0; | - | ||||||||||||||||||||||||||||||||||||
1204 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
1205 | && w->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
1206 | && !w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1207 | && w->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
1208 | ox -= w->x(); | - | ||||||||||||||||||||||||||||||||||||
1209 | oy -= w->y(); | - | ||||||||||||||||||||||||||||||||||||
1210 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1211 | r &= QRect(ox, oy, w->width(), w->height()); | - | ||||||||||||||||||||||||||||||||||||
1212 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1213 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||
1214 | } | - | ||||||||||||||||||||||||||||||||||||
1215 | - | |||||||||||||||||||||||||||||||||||||
1216 | - | |||||||||||||||||||||||||||||||||||||
1217 | - | |||||||||||||||||||||||||||||||||||||
1218 | - | |||||||||||||||||||||||||||||||||||||
1219 | QRegion QWidgetPrivate::clipRegion() const | - | ||||||||||||||||||||||||||||||||||||
1220 | { | - | ||||||||||||||||||||||||||||||||||||
1221 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1222 | if (!q->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
1223 | return never executed: QRegion();return QRegion(); never executed: return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
1224 | QRegion r(q->rect()); | - | ||||||||||||||||||||||||||||||||||||
1225 | const QWidget * w = q; | - | ||||||||||||||||||||||||||||||||||||
1226 | const QWidget *ignoreUpTo; | - | ||||||||||||||||||||||||||||||||||||
1227 | int ox = 0; | - | ||||||||||||||||||||||||||||||||||||
1228 | int oy = 0; | - | ||||||||||||||||||||||||||||||||||||
1229 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
1230 | && w->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
1231 | && !w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1232 | && w->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
1233 | ox -= w->x(); | - | ||||||||||||||||||||||||||||||||||||
1234 | oy -= w->y(); | - | ||||||||||||||||||||||||||||||||||||
1235 | ignoreUpTo = w; | - | ||||||||||||||||||||||||||||||||||||
1236 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1237 | r &= QRegion(ox, oy, w->width(), w->height()); | - | ||||||||||||||||||||||||||||||||||||
1238 | - | |||||||||||||||||||||||||||||||||||||
1239 | int i = 0; | - | ||||||||||||||||||||||||||||||||||||
1240 | while(w->d_func()->children.at(i++) != static_cast<const QObject *>(ignoreUpTo)
| 0 | ||||||||||||||||||||||||||||||||||||
1241 | ; never executed: ; | 0 | ||||||||||||||||||||||||||||||||||||
1242 | for ( ; i < w->d_func()->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1243 | if(QWidget *sibling = qobject_cast<QWidget *>(w->d_func()->children.at(i))
| 0 | ||||||||||||||||||||||||||||||||||||
1244 | if(sibling->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
1245 | QRect siblingRect(ox+sibling->x(), oy+sibling->y(), | - | ||||||||||||||||||||||||||||||||||||
1246 | sibling->width(), sibling->height()); | - | ||||||||||||||||||||||||||||||||||||
1247 | if (qRectIntersects(siblingRect, q->rect())
| 0 | ||||||||||||||||||||||||||||||||||||
1248 | r -= QRegion(siblingRect); never executed: r -= QRegion(siblingRect); | 0 | ||||||||||||||||||||||||||||||||||||
1249 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1250 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1251 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1252 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1253 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||
1254 | } | - | ||||||||||||||||||||||||||||||||||||
1255 | - | |||||||||||||||||||||||||||||||||||||
1256 | void QWidgetPrivate::setSystemClip(QPaintDevice *paintDevice, const QRegion ®ion) | - | ||||||||||||||||||||||||||||||||||||
1257 | { | - | ||||||||||||||||||||||||||||||||||||
1258 | - | |||||||||||||||||||||||||||||||||||||
1259 | QPaintEngine *paintEngine = paintDevice->paintEngine(); | - | ||||||||||||||||||||||||||||||||||||
1260 | QTransform scaleTransform; | - | ||||||||||||||||||||||||||||||||||||
1261 | const qreal devicePixelRatio = paintDevice->devicePixelRatioF(); | - | ||||||||||||||||||||||||||||||||||||
1262 | scaleTransform.scale(devicePixelRatio, devicePixelRatio); | - | ||||||||||||||||||||||||||||||||||||
1263 | paintEngine->d_func()->systemClip = scaleTransform.map(region); | - | ||||||||||||||||||||||||||||||||||||
1264 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1265 | - | |||||||||||||||||||||||||||||||||||||
1266 | - | |||||||||||||||||||||||||||||||||||||
1267 | void QWidgetPrivate::invalidateGraphicsEffectsRecursively() | - | ||||||||||||||||||||||||||||||||||||
1268 | { | - | ||||||||||||||||||||||||||||||||||||
1269 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1270 | QWidget *w = q; | - | ||||||||||||||||||||||||||||||||||||
1271 | do { | - | ||||||||||||||||||||||||||||||||||||
1272 | if (w->graphicsEffect()
| 0 | ||||||||||||||||||||||||||||||||||||
1273 | QWidgetEffectSourcePrivate *sourced = | - | ||||||||||||||||||||||||||||||||||||
1274 | static_cast<QWidgetEffectSourcePrivate *>(w->graphicsEffect()->source()->d_func()); | - | ||||||||||||||||||||||||||||||||||||
1275 | if (!sourced->updateDueToGraphicsEffect
| 0 | ||||||||||||||||||||||||||||||||||||
1276 | w->graphicsEffect()->source()->d_func()->invalidateCache(); never executed: w->graphicsEffect()->source()->d_func()->invalidateCache(); | 0 | ||||||||||||||||||||||||||||||||||||
1277 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1278 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1279 | } never executed: while (wend of block
| 0 | ||||||||||||||||||||||||||||||||||||
1280 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1281 | - | |||||||||||||||||||||||||||||||||||||
1282 | - | |||||||||||||||||||||||||||||||||||||
1283 | void QWidgetPrivate::setDirtyOpaqueRegion() | - | ||||||||||||||||||||||||||||||||||||
1284 | { | - | ||||||||||||||||||||||||||||||||||||
1285 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1286 | - | |||||||||||||||||||||||||||||||||||||
1287 | dirtyOpaqueChildren = true; | - | ||||||||||||||||||||||||||||||||||||
1288 | - | |||||||||||||||||||||||||||||||||||||
1289 | - | |||||||||||||||||||||||||||||||||||||
1290 | invalidateGraphicsEffectsRecursively(); | - | ||||||||||||||||||||||||||||||||||||
1291 | - | |||||||||||||||||||||||||||||||||||||
1292 | - | |||||||||||||||||||||||||||||||||||||
1293 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1294 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1295 | - | |||||||||||||||||||||||||||||||||||||
1296 | QWidget *parent = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1297 | if (!parent
| 0 | ||||||||||||||||||||||||||||||||||||
1298 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1299 | - | |||||||||||||||||||||||||||||||||||||
1300 | - | |||||||||||||||||||||||||||||||||||||
1301 | QWidgetPrivate *pd = parent->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1302 | if (!pd->dirtyOpaqueChildren
| 0 | ||||||||||||||||||||||||||||||||||||
1303 | pd->setDirtyOpaqueRegion(); never executed: pd->setDirtyOpaqueRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
1304 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1305 | - | |||||||||||||||||||||||||||||||||||||
1306 | const QRegion &QWidgetPrivate::getOpaqueChildren() const | - | ||||||||||||||||||||||||||||||||||||
1307 | { | - | ||||||||||||||||||||||||||||||||||||
1308 | if (!dirtyOpaqueChildren
| 0 | ||||||||||||||||||||||||||||||||||||
1309 | return never executed: opaqueChildren;return opaqueChildren; never executed: return opaqueChildren; | 0 | ||||||||||||||||||||||||||||||||||||
1310 | - | |||||||||||||||||||||||||||||||||||||
1311 | QWidgetPrivate *that = const_cast<QWidgetPrivate*>(this); | - | ||||||||||||||||||||||||||||||||||||
1312 | that->opaqueChildren = QRegion(); | - | ||||||||||||||||||||||||||||||||||||
1313 | - | |||||||||||||||||||||||||||||||||||||
1314 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1315 | QWidget *child = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1316 | if (!child
| 0 | ||||||||||||||||||||||||||||||||||||
1317 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1318 | - | |||||||||||||||||||||||||||||||||||||
1319 | const QPoint offset = child->geometry().topLeft(); | - | ||||||||||||||||||||||||||||||||||||
1320 | QWidgetPrivate *childd = child->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1321 | QRegion r = childd->isOpaque
| 0 | ||||||||||||||||||||||||||||||||||||
1322 | if (childd->extra
| 0 | ||||||||||||||||||||||||||||||||||||
1323 | r &= childd->extra->mask; never executed: r &= childd->extra->mask; | 0 | ||||||||||||||||||||||||||||||||||||
1324 | if (r.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1325 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1326 | r.translate(offset); | - | ||||||||||||||||||||||||||||||||||||
1327 | that->opaqueChildren += r; | - | ||||||||||||||||||||||||||||||||||||
1328 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1329 | - | |||||||||||||||||||||||||||||||||||||
1330 | that->opaqueChildren &= q_func()->rect(); | - | ||||||||||||||||||||||||||||||||||||
1331 | that->dirtyOpaqueChildren = false; | - | ||||||||||||||||||||||||||||||||||||
1332 | - | |||||||||||||||||||||||||||||||||||||
1333 | return never executed: that->opaqueChildren;return that->opaqueChildren; never executed: return that->opaqueChildren; | 0 | ||||||||||||||||||||||||||||||||||||
1334 | } | - | ||||||||||||||||||||||||||||||||||||
1335 | - | |||||||||||||||||||||||||||||||||||||
1336 | void QWidgetPrivate::subtractOpaqueChildren(QRegion &source, const QRect &clipRect) const | - | ||||||||||||||||||||||||||||||||||||
1337 | { | - | ||||||||||||||||||||||||||||||||||||
1338 | if (children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1339 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1340 | - | |||||||||||||||||||||||||||||||||||||
1341 | const QRegion &r = getOpaqueChildren(); | - | ||||||||||||||||||||||||||||||||||||
1342 | if (!r.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1343 | source -= (r & clipRect); never executed: source -= (r & clipRect); | 0 | ||||||||||||||||||||||||||||||||||||
1344 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1345 | - | |||||||||||||||||||||||||||||||||||||
1346 | - | |||||||||||||||||||||||||||||||||||||
1347 | void QWidgetPrivate::subtractOpaqueSiblings(QRegion &sourceRegion, bool *hasDirtySiblingsAbove, | - | ||||||||||||||||||||||||||||||||||||
1348 | bool alsoNonOpaque) const | - | ||||||||||||||||||||||||||||||||||||
1349 | { | - | ||||||||||||||||||||||||||||||||||||
1350 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1351 | static int disableSubtractOpaqueSiblings = qEnvironmentVariableIntValue("QT_NO_SUBTRACTOPAQUESIBLINGS"); | - | ||||||||||||||||||||||||||||||||||||
1352 | if (disableSubtractOpaqueSiblings
| 0 | ||||||||||||||||||||||||||||||||||||
1353 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1354 | - | |||||||||||||||||||||||||||||||||||||
1355 | - | |||||||||||||||||||||||||||||||||||||
1356 | - | |||||||||||||||||||||||||||||||||||||
1357 | - | |||||||||||||||||||||||||||||||||||||
1358 | - | |||||||||||||||||||||||||||||||||||||
1359 | - | |||||||||||||||||||||||||||||||||||||
1360 | QRect clipBoundingRect; | - | ||||||||||||||||||||||||||||||||||||
1361 | bool dirtyClipBoundingRect = true; | - | ||||||||||||||||||||||||||||||||||||
1362 | - | |||||||||||||||||||||||||||||||||||||
1363 | QRegion parentClip; | - | ||||||||||||||||||||||||||||||||||||
1364 | bool dirtyParentClip = true; | - | ||||||||||||||||||||||||||||||||||||
1365 | - | |||||||||||||||||||||||||||||||||||||
1366 | QPoint parentOffset = data.crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
1367 | - | |||||||||||||||||||||||||||||||||||||
1368 | const QWidget *w = q; | - | ||||||||||||||||||||||||||||||||||||
1369 | - | |||||||||||||||||||||||||||||||||||||
1370 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
1371 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1372 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
1373 | QWidgetPrivate *pd = w->parentWidget()->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1374 | const int myIndex = pd->children.indexOf(const_cast<QWidget *>(w)); | - | ||||||||||||||||||||||||||||||||||||
1375 | const QRect widgetGeometry = w->d_func()->effectiveRectFor(w->data->crect); | - | ||||||||||||||||||||||||||||||||||||
1376 | for (int i = myIndex + 1; i < pd->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1377 | QWidget *sibling = qobject_cast<QWidget *>(pd->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1378 | if (!sibling
| 0 | ||||||||||||||||||||||||||||||||||||
1379 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1380 | - | |||||||||||||||||||||||||||||||||||||
1381 | const QRect siblingGeometry = sibling->d_func()->effectiveRectFor(sibling->data->crect); | - | ||||||||||||||||||||||||||||||||||||
1382 | if (!qRectIntersects(siblingGeometry, widgetGeometry)
| 0 | ||||||||||||||||||||||||||||||||||||
1383 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1384 | - | |||||||||||||||||||||||||||||||||||||
1385 | if (dirtyClipBoundingRect
| 0 | ||||||||||||||||||||||||||||||||||||
1386 | clipBoundingRect = sourceRegion.boundingRect(); | - | ||||||||||||||||||||||||||||||||||||
1387 | dirtyClipBoundingRect = false; | - | ||||||||||||||||||||||||||||||||||||
1388 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1389 | - | |||||||||||||||||||||||||||||||||||||
1390 | if (!qRectIntersects(siblingGeometry, clipBoundingRect.translated(parentOffset))
| 0 | ||||||||||||||||||||||||||||||||||||
1391 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1392 | - | |||||||||||||||||||||||||||||||||||||
1393 | if (dirtyParentClip
| 0 | ||||||||||||||||||||||||||||||||||||
1394 | parentClip = sourceRegion.translated(parentOffset); | - | ||||||||||||||||||||||||||||||||||||
1395 | dirtyParentClip = false; | - | ||||||||||||||||||||||||||||||||||||
1396 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1397 | - | |||||||||||||||||||||||||||||||||||||
1398 | const QPoint siblingPos(sibling->data->crect.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
1399 | const QRect siblingClipRect(sibling->d_func()->clipRect()); | - | ||||||||||||||||||||||||||||||||||||
1400 | QRegion siblingDirty(parentClip); | - | ||||||||||||||||||||||||||||||||||||
1401 | siblingDirty &= (siblingClipRect.translated(siblingPos)); | - | ||||||||||||||||||||||||||||||||||||
1402 | const bool hasMask = sibling->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
1403 | && !sibling->d_func()->graphicsEffect
| 0 | ||||||||||||||||||||||||||||||||||||
1404 | if (hasMask
| 0 | ||||||||||||||||||||||||||||||||||||
1405 | siblingDirty &= sibling->d_func()->extra->mask.translated(siblingPos); never executed: siblingDirty &= sibling->d_func()->extra->mask.translated(siblingPos); | 0 | ||||||||||||||||||||||||||||||||||||
1406 | if (siblingDirty.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1407 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1408 | - | |||||||||||||||||||||||||||||||||||||
1409 | if (sibling->d_func()->isOpaque
| 0 | ||||||||||||||||||||||||||||||||||||
1410 | if (hasMask
| 0 | ||||||||||||||||||||||||||||||||||||
1411 | siblingDirty.translate(-parentOffset); | - | ||||||||||||||||||||||||||||||||||||
1412 | sourceRegion -= siblingDirty; | - | ||||||||||||||||||||||||||||||||||||
1413 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1414 | sourceRegion -= siblingGeometry.translated(-parentOffset); | - | ||||||||||||||||||||||||||||||||||||
1415 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1416 | } else { | - | ||||||||||||||||||||||||||||||||||||
1417 | if (hasDirtySiblingsAbove
| 0 | ||||||||||||||||||||||||||||||||||||
1418 | * never executed: hasDirtySiblingsAbove = true;*hasDirtySiblingsAbove = true; never executed: *hasDirtySiblingsAbove = true; | 0 | ||||||||||||||||||||||||||||||||||||
1419 | if (sibling->d_func()->children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1420 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
1421 | QRegion opaqueSiblingChildren(sibling->d_func()->getOpaqueChildren()); | - | ||||||||||||||||||||||||||||||||||||
1422 | opaqueSiblingChildren.translate(-parentOffset + siblingPos); | - | ||||||||||||||||||||||||||||||||||||
1423 | sourceRegion -= opaqueSiblingChildren; | - | ||||||||||||||||||||||||||||||||||||
1424 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1425 | if (sourceRegion.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1426 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1427 | - | |||||||||||||||||||||||||||||||||||||
1428 | dirtyClipBoundingRect = true; | - | ||||||||||||||||||||||||||||||||||||
1429 | dirtyParentClip = true; | - | ||||||||||||||||||||||||||||||||||||
1430 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1431 | - | |||||||||||||||||||||||||||||||||||||
1432 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1433 | parentOffset += pd->data.crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
1434 | dirtyParentClip = true; | - | ||||||||||||||||||||||||||||||||||||
1435 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1436 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1437 | - | |||||||||||||||||||||||||||||||||||||
1438 | void QWidgetPrivate::clipToEffectiveMask(QRegion ®ion) const | - | ||||||||||||||||||||||||||||||||||||
1439 | { | - | ||||||||||||||||||||||||||||||||||||
1440 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1441 | - | |||||||||||||||||||||||||||||||||||||
1442 | const QWidget *w = q; | - | ||||||||||||||||||||||||||||||||||||
1443 | QPoint offset; | - | ||||||||||||||||||||||||||||||||||||
1444 | - | |||||||||||||||||||||||||||||||||||||
1445 | - | |||||||||||||||||||||||||||||||||||||
1446 | if (graphicsEffect
| 0 | ||||||||||||||||||||||||||||||||||||
1447 | w = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1448 | offset -= data.crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
1449 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1450 | - | |||||||||||||||||||||||||||||||||||||
1451 | - | |||||||||||||||||||||||||||||||||||||
1452 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
1453 | const QWidgetPrivate *wd = w->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1454 | if (wd->extra
| 0 | ||||||||||||||||||||||||||||||||||||
1455 | region &= (
never executed: region &= (w != q) ? wd->extra->mask.translated(offset) : wd->extra->mask; | 0 | ||||||||||||||||||||||||||||||||||||
1456 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1457 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1458 | offset -= wd->data.crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
1459 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1460 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1461 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1462 | - | |||||||||||||||||||||||||||||||||||||
1463 | bool QWidgetPrivate::paintOnScreen() const | - | ||||||||||||||||||||||||||||||||||||
1464 | { | - | ||||||||||||||||||||||||||||||||||||
1465 | - | |||||||||||||||||||||||||||||||||||||
1466 | - | |||||||||||||||||||||||||||||||||||||
1467 | - | |||||||||||||||||||||||||||||||||||||
1468 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1469 | if (q->testAttribute(Qt::WA_PaintOnScreen)
| 0 | ||||||||||||||||||||||||||||||||||||
1470 | || (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1471 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
1472 | } | - | ||||||||||||||||||||||||||||||||||||
1473 | - | |||||||||||||||||||||||||||||||||||||
1474 | return never executed: !qt_enable_backingstore;return !qt_enable_backingstore; never executed: return !qt_enable_backingstore; | 0 | ||||||||||||||||||||||||||||||||||||
1475 | - | |||||||||||||||||||||||||||||||||||||
1476 | } | - | ||||||||||||||||||||||||||||||||||||
1477 | - | |||||||||||||||||||||||||||||||||||||
1478 | void QWidgetPrivate::updateIsOpaque() | - | ||||||||||||||||||||||||||||||||||||
1479 | { | - | ||||||||||||||||||||||||||||||||||||
1480 | - | |||||||||||||||||||||||||||||||||||||
1481 | setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
1482 | - | |||||||||||||||||||||||||||||||||||||
1483 | - | |||||||||||||||||||||||||||||||||||||
1484 | if (graphicsEffect
| 0 | ||||||||||||||||||||||||||||||||||||
1485 | - | |||||||||||||||||||||||||||||||||||||
1486 | setOpaque(false); | - | ||||||||||||||||||||||||||||||||||||
1487 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1488 | } | - | ||||||||||||||||||||||||||||||||||||
1489 | - | |||||||||||||||||||||||||||||||||||||
1490 | - | |||||||||||||||||||||||||||||||||||||
1491 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1492 | - | |||||||||||||||||||||||||||||||||||||
1493 | - | |||||||||||||||||||||||||||||||||||||
1494 | - | |||||||||||||||||||||||||||||||||||||
1495 | - | |||||||||||||||||||||||||||||||||||||
1496 | - | |||||||||||||||||||||||||||||||||||||
1497 | - | |||||||||||||||||||||||||||||||||||||
1498 | - | |||||||||||||||||||||||||||||||||||||
1499 | if (q->testAttribute(Qt::WA_OpaquePaintEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
1500 | setOpaque(true); | - | ||||||||||||||||||||||||||||||||||||
1501 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1502 | } | - | ||||||||||||||||||||||||||||||||||||
1503 | - | |||||||||||||||||||||||||||||||||||||
1504 | const QPalette &pal = q->palette(); | - | ||||||||||||||||||||||||||||||||||||
1505 | - | |||||||||||||||||||||||||||||||||||||
1506 | if (q->autoFillBackground()
| 0 | ||||||||||||||||||||||||||||||||||||
1507 | const QBrush &autoFillBrush = pal.brush(q->backgroundRole()); | - | ||||||||||||||||||||||||||||||||||||
1508 | if (autoFillBrush.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||
1509 | setOpaque(true); | - | ||||||||||||||||||||||||||||||||||||
1510 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1511 | } | - | ||||||||||||||||||||||||||||||||||||
1512 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1513 | - | |||||||||||||||||||||||||||||||||||||
1514 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1515 | const QBrush &windowBrush = q->palette().brush(QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||
1516 | if (windowBrush.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||
1517 | setOpaque(true); | - | ||||||||||||||||||||||||||||||||||||
1518 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1519 | } | - | ||||||||||||||||||||||||||||||||||||
1520 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1521 | setOpaque(false); | - | ||||||||||||||||||||||||||||||||||||
1522 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1523 | - | |||||||||||||||||||||||||||||||||||||
1524 | void QWidgetPrivate::setOpaque(bool opaque) | - | ||||||||||||||||||||||||||||||||||||
1525 | { | - | ||||||||||||||||||||||||||||||||||||
1526 | if (isOpaque != opaque
| 0 | ||||||||||||||||||||||||||||||||||||
1527 | isOpaque = opaque; | - | ||||||||||||||||||||||||||||||||||||
1528 | updateIsTranslucent(); | - | ||||||||||||||||||||||||||||||||||||
1529 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1530 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1531 | - | |||||||||||||||||||||||||||||||||||||
1532 | void QWidgetPrivate::updateIsTranslucent() | - | ||||||||||||||||||||||||||||||||||||
1533 | { | - | ||||||||||||||||||||||||||||||||||||
1534 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1535 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
1536 | QSurfaceFormat format = window->format(); | - | ||||||||||||||||||||||||||||||||||||
1537 | const int oldAlpha = format.alphaBufferSize(); | - | ||||||||||||||||||||||||||||||||||||
1538 | const int newAlpha = q->testAttribute(Qt::WA_TranslucentBackground)
| 0 | ||||||||||||||||||||||||||||||||||||
1539 | if (oldAlpha != newAlpha
| 0 | ||||||||||||||||||||||||||||||||||||
1540 | format.setAlphaBufferSize(newAlpha); | - | ||||||||||||||||||||||||||||||||||||
1541 | window->setFormat(format); | - | ||||||||||||||||||||||||||||||||||||
1542 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1543 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1544 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1545 | - | |||||||||||||||||||||||||||||||||||||
1546 | static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrush &brush) | - | ||||||||||||||||||||||||||||||||||||
1547 | { | - | ||||||||||||||||||||||||||||||||||||
1548 | ((!(painter)) ? qt_assert("painter",__FILE__,2377) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
1549 | - | |||||||||||||||||||||||||||||||||||||
1550 | if (brush.style() == Qt::TexturePattern
| 0 | ||||||||||||||||||||||||||||||||||||
1551 | - | |||||||||||||||||||||||||||||||||||||
1552 | - | |||||||||||||||||||||||||||||||||||||
1553 | - | |||||||||||||||||||||||||||||||||||||
1554 | - | |||||||||||||||||||||||||||||||||||||
1555 | - | |||||||||||||||||||||||||||||||||||||
1556 | - | |||||||||||||||||||||||||||||||||||||
1557 | - | |||||||||||||||||||||||||||||||||||||
1558 | { | - | ||||||||||||||||||||||||||||||||||||
1559 | const QRect rect(rgn.boundingRect()); | - | ||||||||||||||||||||||||||||||||||||
1560 | painter->setClipRegion(rgn); | - | ||||||||||||||||||||||||||||||||||||
1561 | painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
1562 | } | - | ||||||||||||||||||||||||||||||||||||
1563 | - | |||||||||||||||||||||||||||||||||||||
1564 | - | |||||||||||||||||||||||||||||||||||||
1565 | } never executed: else if (brush.gradient()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
1566 | && brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode
| 0 | ||||||||||||||||||||||||||||||||||||
1567 | painter->save(); | - | ||||||||||||||||||||||||||||||||||||
1568 | painter->setClipRegion(rgn); | - | ||||||||||||||||||||||||||||||||||||
1569 | painter->fillRect(0, 0, painter->device()->width(), painter->device()->height(), brush); | - | ||||||||||||||||||||||||||||||||||||
1570 | painter->restore(); | - | ||||||||||||||||||||||||||||||||||||
1571 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1572 | const QVector<QRect> &rects = rgn.rects(); | - | ||||||||||||||||||||||||||||||||||||
1573 | for (int i = 0; i < rects.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1574 | painter->fillRect(rects.at(i), brush); never executed: painter->fillRect(rects.at(i), brush); | 0 | ||||||||||||||||||||||||||||||||||||
1575 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1576 | } | - | ||||||||||||||||||||||||||||||||||||
1577 | - | |||||||||||||||||||||||||||||||||||||
1578 | void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int flags) const | - | ||||||||||||||||||||||||||||||||||||
1579 | { | - | ||||||||||||||||||||||||||||||||||||
1580 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1581 | - | |||||||||||||||||||||||||||||||||||||
1582 | - | |||||||||||||||||||||||||||||||||||||
1583 | bool resetBrushOrigin = false; | - | ||||||||||||||||||||||||||||||||||||
1584 | QPointF oldBrushOrigin; | - | ||||||||||||||||||||||||||||||||||||
1585 | - | |||||||||||||||||||||||||||||||||||||
1586 | QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(parent); | - | ||||||||||||||||||||||||||||||||||||
1587 | if (scrollArea
| 0 | ||||||||||||||||||||||||||||||||||||
1588 | QObjectData *scrollPrivate = static_cast<QWidget *>(scrollArea)->d_ptr.data(); | - | ||||||||||||||||||||||||||||||||||||
1589 | QAbstractScrollAreaPrivate *priv = static_cast<QAbstractScrollAreaPrivate *>(scrollPrivate); | - | ||||||||||||||||||||||||||||||||||||
1590 | oldBrushOrigin = painter->brushOrigin(); | - | ||||||||||||||||||||||||||||||||||||
1591 | resetBrushOrigin = true; | - | ||||||||||||||||||||||||||||||||||||
1592 | painter->setBrushOrigin(-priv->contentsOffset()); | - | ||||||||||||||||||||||||||||||||||||
1593 | - | |||||||||||||||||||||||||||||||||||||
1594 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1595 | - | |||||||||||||||||||||||||||||||||||||
1596 | - | |||||||||||||||||||||||||||||||||||||
1597 | const QBrush autoFillBrush = q->palette().brush(q->backgroundRole()); | - | ||||||||||||||||||||||||||||||||||||
1598 | - | |||||||||||||||||||||||||||||||||||||
1599 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
1600 | const QBrush bg = q->palette().brush(QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||
1601 | if (!(flags & DontSetCompositionMode)
| 0 | ||||||||||||||||||||||||||||||||||||
1602 | - | |||||||||||||||||||||||||||||||||||||
1603 | QPainter::CompositionMode oldMode = painter->compositionMode(); | - | ||||||||||||||||||||||||||||||||||||
1604 | painter->setCompositionMode(QPainter::CompositionMode_Source); | - | ||||||||||||||||||||||||||||||||||||
1605 | fillRegion(painter, rgn, bg); | - | ||||||||||||||||||||||||||||||||||||
1606 | painter->setCompositionMode(oldMode); | - | ||||||||||||||||||||||||||||||||||||
1607 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1608 | fillRegion(painter, rgn, bg); | - | ||||||||||||||||||||||||||||||||||||
1609 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1610 | } | - | ||||||||||||||||||||||||||||||||||||
1611 | - | |||||||||||||||||||||||||||||||||||||
1612 | if (q->autoFillBackground()
| 0 | ||||||||||||||||||||||||||||||||||||
1613 | fillRegion(painter, rgn, autoFillBrush); never executed: fillRegion(painter, rgn, autoFillBrush); | 0 | ||||||||||||||||||||||||||||||||||||
1614 | - | |||||||||||||||||||||||||||||||||||||
1615 | if (q->testAttribute(Qt::WA_StyledBackground)
| 0 | ||||||||||||||||||||||||||||||||||||
1616 | painter->setClipRegion(rgn); | - | ||||||||||||||||||||||||||||||||||||
1617 | QStyleOption opt; | - | ||||||||||||||||||||||||||||||||||||
1618 | opt.initFrom(q); | - | ||||||||||||||||||||||||||||||||||||
1619 | q->style()->drawPrimitive(QStyle::PE_Widget, &opt, painter, q); | - | ||||||||||||||||||||||||||||||||||||
1620 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1621 | - | |||||||||||||||||||||||||||||||||||||
1622 | - | |||||||||||||||||||||||||||||||||||||
1623 | if (resetBrushOrigin
| 0 | ||||||||||||||||||||||||||||||||||||
1624 | painter->setBrushOrigin(oldBrushOrigin); never executed: painter->setBrushOrigin(oldBrushOrigin); | 0 | ||||||||||||||||||||||||||||||||||||
1625 | - | |||||||||||||||||||||||||||||||||||||
1626 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1627 | extern QWidget *qt_button_down; | - | ||||||||||||||||||||||||||||||||||||
1628 | - | |||||||||||||||||||||||||||||||||||||
1629 | - | |||||||||||||||||||||||||||||||||||||
1630 | void QWidgetPrivate::deactivateWidgetCleanup() | - | ||||||||||||||||||||||||||||||||||||
1631 | { | - | ||||||||||||||||||||||||||||||||||||
1632 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1633 | - | |||||||||||||||||||||||||||||||||||||
1634 | if (QApplication::activeWindow() == q
| 0 | ||||||||||||||||||||||||||||||||||||
1635 | QApplication::setActiveWindow(0); never executed: QApplication::setActiveWindow(0); | 0 | ||||||||||||||||||||||||||||||||||||
1636 | - | |||||||||||||||||||||||||||||||||||||
1637 | if (q == qt_button_down
| 0 | ||||||||||||||||||||||||||||||||||||
1638 | qt_button_down = 0; never executed: qt_button_down = 0; | 0 | ||||||||||||||||||||||||||||||||||||
1639 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1640 | QWidget *QWidget::find(WId id) | - | ||||||||||||||||||||||||||||||||||||
1641 | { | - | ||||||||||||||||||||||||||||||||||||
1642 | return never executed: QWidgetPrivate::mapperreturn QWidgetPrivate::mapper ? QWidgetPrivate::mapper->value(id, 0) : 0;
never executed: return QWidgetPrivate::mapper ? QWidgetPrivate::mapper->value(id, 0) : 0; | 0 | ||||||||||||||||||||||||||||||||||||
1643 | } | - | ||||||||||||||||||||||||||||||||||||
1644 | WId QWidget::winId() const | - | ||||||||||||||||||||||||||||||||||||
1645 | { | - | ||||||||||||||||||||||||||||||||||||
1646 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
1647 | - | |||||||||||||||||||||||||||||||||||||
1648 | - | |||||||||||||||||||||||||||||||||||||
1649 | - | |||||||||||||||||||||||||||||||||||||
1650 | QWidget *that = const_cast<QWidget*>(this); | - | ||||||||||||||||||||||||||||||||||||
1651 | that->setAttribute(Qt::WA_NativeWindow); | - | ||||||||||||||||||||||||||||||||||||
1652 | that->d_func()->createWinId(); | - | ||||||||||||||||||||||||||||||||||||
1653 | return never executed: that->data->winid;return that->data->winid; never executed: return that->data->winid; | 0 | ||||||||||||||||||||||||||||||||||||
1654 | } | - | ||||||||||||||||||||||||||||||||||||
1655 | return never executed: data->winid;return data->winid; never executed: return data->winid; | 0 | ||||||||||||||||||||||||||||||||||||
1656 | } | - | ||||||||||||||||||||||||||||||||||||
1657 | - | |||||||||||||||||||||||||||||||||||||
1658 | void QWidgetPrivate::createWinId() | - | ||||||||||||||||||||||||||||||||||||
1659 | { | - | ||||||||||||||||||||||||||||||||||||
1660 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1661 | - | |||||||||||||||||||||||||||||||||||||
1662 | - | |||||||||||||||||||||||||||||||||||||
1663 | - | |||||||||||||||||||||||||||||||||||||
1664 | - | |||||||||||||||||||||||||||||||||||||
1665 | const bool forceNativeWindow = q->testAttribute(Qt::WA_NativeWindow); | - | ||||||||||||||||||||||||||||||||||||
1666 | if (!q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
1667 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1668 | QWidget *parent = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1669 | QWidgetPrivate *pd = parent->d_func(); | - | ||||||||||||||||||||||||||||||||||||
1670 | if (forceNativeWindow
| 0 | ||||||||||||||||||||||||||||||||||||
1671 | parent->setAttribute(Qt::WA_NativeWindow); never executed: parent->setAttribute(Qt::WA_NativeWindow); | 0 | ||||||||||||||||||||||||||||||||||||
1672 | if (!parent->internalWinId()
| 0 | ||||||||||||||||||||||||||||||||||||
1673 | pd->createWinId(); | - | ||||||||||||||||||||||||||||||||||||
1674 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1675 | - | |||||||||||||||||||||||||||||||||||||
1676 | for (int i = 0; i < pd->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1677 | QWidget *w = qobject_cast<QWidget *>(pd->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1678 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
1679 | || (!w->internalWinId()
| 0 | ||||||||||||||||||||||||||||||||||||
1680 | w->create(); | - | ||||||||||||||||||||||||||||||||||||
1681 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1682 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1683 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1684 | q->create(); | - | ||||||||||||||||||||||||||||||||||||
1685 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1686 | } | - | ||||||||||||||||||||||||||||||||||||
1687 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1688 | void QWidget::createWinId() | - | ||||||||||||||||||||||||||||||||||||
1689 | { | - | ||||||||||||||||||||||||||||||||||||
1690 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1691 | - | |||||||||||||||||||||||||||||||||||||
1692 | - | |||||||||||||||||||||||||||||||||||||
1693 | - | |||||||||||||||||||||||||||||||||||||
1694 | - | |||||||||||||||||||||||||||||||||||||
1695 | d->createWinId(); | - | ||||||||||||||||||||||||||||||||||||
1696 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1697 | WId QWidget::effectiveWinId() const | - | ||||||||||||||||||||||||||||||||||||
1698 | { | - | ||||||||||||||||||||||||||||||||||||
1699 | const WId id = internalWinId(); | - | ||||||||||||||||||||||||||||||||||||
1700 | if (id
| 0 | ||||||||||||||||||||||||||||||||||||
1701 | return never executed: id;return id; never executed: return id; | 0 | ||||||||||||||||||||||||||||||||||||
1702 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
1703 | return never executed: realParent->internalWinId();return realParent->internalWinId(); never executed: return realParent->internalWinId(); | 0 | ||||||||||||||||||||||||||||||||||||
1704 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1705 | } | - | ||||||||||||||||||||||||||||||||||||
1706 | QWindow *QWidget::windowHandle() const | - | ||||||||||||||||||||||||||||||||||||
1707 | { | - | ||||||||||||||||||||||||||||||||||||
1708 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1709 | QTLWExtra *extra = d->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
1710 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
1711 | return never executed: extra->window;return extra->window; never executed: return extra->window; | 0 | ||||||||||||||||||||||||||||||||||||
1712 | - | |||||||||||||||||||||||||||||||||||||
1713 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1714 | } | - | ||||||||||||||||||||||||||||||||||||
1715 | QString QWidget::styleSheet() const | - | ||||||||||||||||||||||||||||||||||||
1716 | { | - | ||||||||||||||||||||||||||||||||||||
1717 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1718 | if (!d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
1719 | return never executed: QString();return QString(); never executed: return QString(); | 0 | ||||||||||||||||||||||||||||||||||||
1720 | return never executed: d->extra->styleSheet;return d->extra->styleSheet; never executed: return d->extra->styleSheet; | 0 | ||||||||||||||||||||||||||||||||||||
1721 | } | - | ||||||||||||||||||||||||||||||||||||
1722 | - | |||||||||||||||||||||||||||||||||||||
1723 | void QWidget::setStyleSheet(const QString& styleSheet) | - | ||||||||||||||||||||||||||||||||||||
1724 | { | - | ||||||||||||||||||||||||||||||||||||
1725 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1726 | if (data->in_destructor
| 0 | ||||||||||||||||||||||||||||||||||||
1727 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1728 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
1729 | - | |||||||||||||||||||||||||||||||||||||
1730 | QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(d->extra->style); | - | ||||||||||||||||||||||||||||||||||||
1731 | d->extra->styleSheet = styleSheet; | - | ||||||||||||||||||||||||||||||||||||
1732 | if (styleSheet.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1733 | if (!proxy
| 0 | ||||||||||||||||||||||||||||||||||||
1734 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1735 | - | |||||||||||||||||||||||||||||||||||||
1736 | d->inheritStyle(); | - | ||||||||||||||||||||||||||||||||||||
1737 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1738 | } | - | ||||||||||||||||||||||||||||||||||||
1739 | - | |||||||||||||||||||||||||||||||||||||
1740 | if (proxy
| 0 | ||||||||||||||||||||||||||||||||||||
1741 | if (d->polished
| 0 | ||||||||||||||||||||||||||||||||||||
1742 | proxy->repolish(this); never executed: proxy->repolish(this); | 0 | ||||||||||||||||||||||||||||||||||||
1743 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1744 | } | - | ||||||||||||||||||||||||||||||||||||
1745 | - | |||||||||||||||||||||||||||||||||||||
1746 | if (testAttribute(Qt::WA_SetStyle)
| 0 | ||||||||||||||||||||||||||||||||||||
1747 | d->setStyle_helper(new QStyleSheetStyle(d->extra->style), true); | - | ||||||||||||||||||||||||||||||||||||
1748 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1749 | d->setStyle_helper(new QStyleSheetStyle(0), true); | - | ||||||||||||||||||||||||||||||||||||
1750 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1751 | } | - | ||||||||||||||||||||||||||||||||||||
1752 | - | |||||||||||||||||||||||||||||||||||||
1753 | - | |||||||||||||||||||||||||||||||||||||
1754 | - | |||||||||||||||||||||||||||||||||||||
1755 | - | |||||||||||||||||||||||||||||||||||||
1756 | - | |||||||||||||||||||||||||||||||||||||
1757 | - | |||||||||||||||||||||||||||||||||||||
1758 | - | |||||||||||||||||||||||||||||||||||||
1759 | QStyle *QWidget::style() const | - | ||||||||||||||||||||||||||||||||||||
1760 | { | - | ||||||||||||||||||||||||||||||||||||
1761 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1762 | - | |||||||||||||||||||||||||||||||||||||
1763 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
1764 | return never executed: d->extra->style;return d->extra->style; never executed: return d->extra->style; | 0 | ||||||||||||||||||||||||||||||||||||
1765 | return never executed: QApplication::style();return QApplication::style(); never executed: return QApplication::style(); | 0 | ||||||||||||||||||||||||||||||||||||
1766 | } | - | ||||||||||||||||||||||||||||||||||||
1767 | void QWidget::setStyle(QStyle *style) | - | ||||||||||||||||||||||||||||||||||||
1768 | { | - | ||||||||||||||||||||||||||||||||||||
1769 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1770 | setAttribute(Qt::WA_SetStyle, style != 0); | - | ||||||||||||||||||||||||||||||||||||
1771 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
1772 | - | |||||||||||||||||||||||||||||||||||||
1773 | if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(style)
| 0 | ||||||||||||||||||||||||||||||||||||
1774 | - | |||||||||||||||||||||||||||||||||||||
1775 | - | |||||||||||||||||||||||||||||||||||||
1776 | proxy->ref(); | - | ||||||||||||||||||||||||||||||||||||
1777 | d->setStyle_helper(style, false); | - | ||||||||||||||||||||||||||||||||||||
1778 | } never executed: else if (qobject_cast<QStyleSheetStyle *>(d->extra->style)end of block
| 0 | ||||||||||||||||||||||||||||||||||||
1779 | - | |||||||||||||||||||||||||||||||||||||
1780 | d->setStyle_helper(new QStyleSheetStyle(style), true); | - | ||||||||||||||||||||||||||||||||||||
1781 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
1782 | - | |||||||||||||||||||||||||||||||||||||
1783 | d->setStyle_helper(style, false); never executed: d->setStyle_helper(style, false); | 0 | ||||||||||||||||||||||||||||||||||||
1784 | } | - | ||||||||||||||||||||||||||||||||||||
1785 | - | |||||||||||||||||||||||||||||||||||||
1786 | void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool | - | ||||||||||||||||||||||||||||||||||||
1787 | - | |||||||||||||||||||||||||||||||||||||
1788 | - | |||||||||||||||||||||||||||||||||||||
1789 | - | |||||||||||||||||||||||||||||||||||||
1790 | ) | - | ||||||||||||||||||||||||||||||||||||
1791 | { | - | ||||||||||||||||||||||||||||||||||||
1792 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1793 | QStyle *oldStyle = q->style(); | - | ||||||||||||||||||||||||||||||||||||
1794 | - | |||||||||||||||||||||||||||||||||||||
1795 | QPointer<QStyle> origStyle; | - | ||||||||||||||||||||||||||||||||||||
1796 | { | - | ||||||||||||||||||||||||||||||||||||
1797 | createExtra(); | - | ||||||||||||||||||||||||||||||||||||
1798 | - | |||||||||||||||||||||||||||||||||||||
1799 | - | |||||||||||||||||||||||||||||||||||||
1800 | origStyle = extra->style.data(); | - | ||||||||||||||||||||||||||||||||||||
1801 | - | |||||||||||||||||||||||||||||||||||||
1802 | extra->style = newStyle; | - | ||||||||||||||||||||||||||||||||||||
1803 | } | - | ||||||||||||||||||||||||||||||||||||
1804 | - | |||||||||||||||||||||||||||||||||||||
1805 | - | |||||||||||||||||||||||||||||||||||||
1806 | if (q->windowType() != Qt::Desktop
| 0 | ||||||||||||||||||||||||||||||||||||
1807 | if (polished
| 0 | ||||||||||||||||||||||||||||||||||||
1808 | oldStyle->unpolish(q); | - | ||||||||||||||||||||||||||||||||||||
1809 | - | |||||||||||||||||||||||||||||||||||||
1810 | - | |||||||||||||||||||||||||||||||||||||
1811 | - | |||||||||||||||||||||||||||||||||||||
1812 | - | |||||||||||||||||||||||||||||||||||||
1813 | q->style()->polish(q); | - | ||||||||||||||||||||||||||||||||||||
1814 | - | |||||||||||||||||||||||||||||||||||||
1815 | - | |||||||||||||||||||||||||||||||||||||
1816 | - | |||||||||||||||||||||||||||||||||||||
1817 | - | |||||||||||||||||||||||||||||||||||||
1818 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1819 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1820 | - | |||||||||||||||||||||||||||||||||||||
1821 | if (propagate
| 0 | ||||||||||||||||||||||||||||||||||||
1822 | - | |||||||||||||||||||||||||||||||||||||
1823 | const QObjectList childrenList = children; | - | ||||||||||||||||||||||||||||||||||||
1824 | for (int i = 0; i < childrenList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
1825 | QWidget *c = qobject_cast<QWidget*>(childrenList.at(i)); | - | ||||||||||||||||||||||||||||||||||||
1826 | if (c
| 0 | ||||||||||||||||||||||||||||||||||||
1827 | c->d_func()->inheritStyle(); never executed: c->d_func()->inheritStyle(); | 0 | ||||||||||||||||||||||||||||||||||||
1828 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1829 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1830 | - | |||||||||||||||||||||||||||||||||||||
1831 | - | |||||||||||||||||||||||||||||||||||||
1832 | if (!qobject_cast<QStyleSheetStyle*>(newStyle)
| 0 | ||||||||||||||||||||||||||||||||||||
1833 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
1834 | cssStyle->clearWidgetFont(q); | - | ||||||||||||||||||||||||||||||||||||
1835 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1836 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1837 | - | |||||||||||||||||||||||||||||||||||||
1838 | - | |||||||||||||||||||||||||||||||||||||
1839 | QEvent e(QEvent::StyleChange); | - | ||||||||||||||||||||||||||||||||||||
1840 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
1841 | - | |||||||||||||||||||||||||||||||||||||
1842 | - | |||||||||||||||||||||||||||||||||||||
1843 | - | |||||||||||||||||||||||||||||||||||||
1844 | if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(origStyle.data())
| 0 | ||||||||||||||||||||||||||||||||||||
1845 | proxy->deref(); never executed: proxy->deref(); | 0 | ||||||||||||||||||||||||||||||||||||
1846 | - | |||||||||||||||||||||||||||||||||||||
1847 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1848 | - | |||||||||||||||||||||||||||||||||||||
1849 | - | |||||||||||||||||||||||||||||||||||||
1850 | void QWidgetPrivate::inheritStyle() | - | ||||||||||||||||||||||||||||||||||||
1851 | { | - | ||||||||||||||||||||||||||||||||||||
1852 | - | |||||||||||||||||||||||||||||||||||||
1853 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1854 | - | |||||||||||||||||||||||||||||||||||||
1855 | QStyleSheetStyle *proxy = extra
| 0 | ||||||||||||||||||||||||||||||||||||
1856 | - | |||||||||||||||||||||||||||||||||||||
1857 | if (!q->styleSheet().isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1858 | ((!(proxy)) ? qt_assert("proxy",__FILE__,2824) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
1859 | proxy->repolish(q); | - | ||||||||||||||||||||||||||||||||||||
1860 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1861 | } | - | ||||||||||||||||||||||||||||||||||||
1862 | - | |||||||||||||||||||||||||||||||||||||
1863 | QStyle *origStyle = proxy
| 0 | ||||||||||||||||||||||||||||||||||||
1864 | QWidget *parent = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
1865 | QStyle *parentStyle = (parent
| 0 | ||||||||||||||||||||||||||||||||||||
1866 | - | |||||||||||||||||||||||||||||||||||||
1867 | - | |||||||||||||||||||||||||||||||||||||
1868 | if (!(static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet().isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
1869 | QStyle *newStyle = parentStyle; | - | ||||||||||||||||||||||||||||||||||||
1870 | if (q->testAttribute(Qt::WA_SetStyle)
| 0 | ||||||||||||||||||||||||||||||||||||
1871 | newStyle = new QStyleSheetStyle(origStyle); never executed: newStyle = new QStyleSheetStyle(origStyle); | 0 | ||||||||||||||||||||||||||||||||||||
1872 | else if (QStyleSheetStyle *newProxy = qobject_cast<QStyleSheetStyle *>(parentStyle)
| 0 | ||||||||||||||||||||||||||||||||||||
1873 | newProxy->ref(); never executed: newProxy->ref(); | 0 | ||||||||||||||||||||||||||||||||||||
1874 | - | |||||||||||||||||||||||||||||||||||||
1875 | setStyle_helper(newStyle, true); | - | ||||||||||||||||||||||||||||||||||||
1876 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1877 | } | - | ||||||||||||||||||||||||||||||||||||
1878 | - | |||||||||||||||||||||||||||||||||||||
1879 | - | |||||||||||||||||||||||||||||||||||||
1880 | - | |||||||||||||||||||||||||||||||||||||
1881 | if (origStyle == (extra
| 0 | ||||||||||||||||||||||||||||||||||||
1882 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1883 | - | |||||||||||||||||||||||||||||||||||||
1884 | - | |||||||||||||||||||||||||||||||||||||
1885 | - | |||||||||||||||||||||||||||||||||||||
1886 | - | |||||||||||||||||||||||||||||||||||||
1887 | if (!q->testAttribute(Qt::WA_SetStyle)
| 0 | ||||||||||||||||||||||||||||||||||||
1888 | origStyle = 0; never executed: origStyle = 0; | 0 | ||||||||||||||||||||||||||||||||||||
1889 | - | |||||||||||||||||||||||||||||||||||||
1890 | setStyle_helper(origStyle, true); | - | ||||||||||||||||||||||||||||||||||||
1891 | - | |||||||||||||||||||||||||||||||||||||
1892 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1893 | Qt::WindowModality QWidget::windowModality() const | - | ||||||||||||||||||||||||||||||||||||
1894 | { | - | ||||||||||||||||||||||||||||||||||||
1895 | return never executed: static_cast<Qt::WindowModality>(data->window_modality);return static_cast<Qt::WindowModality>(data->window_modality); never executed: return static_cast<Qt::WindowModality>(data->window_modality); | 0 | ||||||||||||||||||||||||||||||||||||
1896 | } | - | ||||||||||||||||||||||||||||||||||||
1897 | - | |||||||||||||||||||||||||||||||||||||
1898 | void QWidget::setWindowModality(Qt::WindowModality windowModality) | - | ||||||||||||||||||||||||||||||||||||
1899 | { | - | ||||||||||||||||||||||||||||||||||||
1900 | data->window_modality = windowModality; | - | ||||||||||||||||||||||||||||||||||||
1901 | - | |||||||||||||||||||||||||||||||||||||
1902 | setAttribute(Qt::WA_ShowModal, (data->window_modality != Qt::NonModal)); | - | ||||||||||||||||||||||||||||||||||||
1903 | setAttribute(Qt::WA_SetWindowModality, true); | - | ||||||||||||||||||||||||||||||||||||
1904 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1905 | - | |||||||||||||||||||||||||||||||||||||
1906 | void QWidgetPrivate::setModal_sys() | - | ||||||||||||||||||||||||||||||||||||
1907 | { | - | ||||||||||||||||||||||||||||||||||||
1908 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
1909 | if (q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
1910 | q->windowHandle()->setModality(q->windowModality()); never executed: q->windowHandle()->setModality(q->windowModality()); | 0 | ||||||||||||||||||||||||||||||||||||
1911 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1912 | bool QWidget::isMinimized() const | - | ||||||||||||||||||||||||||||||||||||
1913 | { return never executed: data->window_state & Qt::WindowMinimized;return data->window_state & Qt::WindowMinimized; never executed: }return data->window_state & Qt::WindowMinimized; | 0 | ||||||||||||||||||||||||||||||||||||
1914 | void QWidget::showMinimized() | - | ||||||||||||||||||||||||||||||||||||
1915 | { | - | ||||||||||||||||||||||||||||||||||||
1916 | bool isMin = isMinimized(); | - | ||||||||||||||||||||||||||||||||||||
1917 | if (isMin
| 0 | ||||||||||||||||||||||||||||||||||||
1918 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1919 | - | |||||||||||||||||||||||||||||||||||||
1920 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
1921 | - | |||||||||||||||||||||||||||||||||||||
1922 | if (!isMin
| 0 | ||||||||||||||||||||||||||||||||||||
1923 | setWindowState((windowState() & ~Qt::WindowActive) | Qt::WindowMinimized); never executed: setWindowState((windowState() & ~Qt::WindowActive) | Qt::WindowMinimized); | 0 | ||||||||||||||||||||||||||||||||||||
1924 | setVisible(true); | - | ||||||||||||||||||||||||||||||||||||
1925 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1926 | bool QWidget::isMaximized() const | - | ||||||||||||||||||||||||||||||||||||
1927 | { return never executed: data->window_state & Qt::WindowMaximized;return data->window_state & Qt::WindowMaximized; never executed: }return data->window_state & Qt::WindowMaximized; | 0 | ||||||||||||||||||||||||||||||||||||
1928 | Qt::WindowStates QWidget::windowState() const | - | ||||||||||||||||||||||||||||||||||||
1929 | { | - | ||||||||||||||||||||||||||||||||||||
1930 | return never executed: Qt::WindowStates(data->window_state);return Qt::WindowStates(data->window_state); never executed: return Qt::WindowStates(data->window_state); | 0 | ||||||||||||||||||||||||||||||||||||
1931 | } | - | ||||||||||||||||||||||||||||||||||||
1932 | void QWidget::overrideWindowState(Qt::WindowStates newstate) | - | ||||||||||||||||||||||||||||||||||||
1933 | { | - | ||||||||||||||||||||||||||||||||||||
1934 | QWindowStateChangeEvent e(Qt::WindowStates(data->window_state), true); | - | ||||||||||||||||||||||||||||||||||||
1935 | data->window_state = newstate; | - | ||||||||||||||||||||||||||||||||||||
1936 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
1937 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1938 | - | |||||||||||||||||||||||||||||||||||||
1939 | Qt::WindowState effectiveState(Qt::WindowStates state) | - | ||||||||||||||||||||||||||||||||||||
1940 | { | - | ||||||||||||||||||||||||||||||||||||
1941 | if (state & Qt::WindowMinimized
| 0 | ||||||||||||||||||||||||||||||||||||
1942 | return never executed: Qt::WindowMinimized;return Qt::WindowMinimized; never executed: return Qt::WindowMinimized; | 0 | ||||||||||||||||||||||||||||||||||||
1943 | else if (state & Qt::WindowFullScreen
| 0 | ||||||||||||||||||||||||||||||||||||
1944 | return never executed: Qt::WindowFullScreen;return Qt::WindowFullScreen; never executed: return Qt::WindowFullScreen; | 0 | ||||||||||||||||||||||||||||||||||||
1945 | else if (state & Qt::WindowMaximized
| 0 | ||||||||||||||||||||||||||||||||||||
1946 | return never executed: Qt::WindowMaximized;return Qt::WindowMaximized; never executed: return Qt::WindowMaximized; | 0 | ||||||||||||||||||||||||||||||||||||
1947 | return never executed: Qt::WindowNoState;return Qt::WindowNoState; never executed: return Qt::WindowNoState; | 0 | ||||||||||||||||||||||||||||||||||||
1948 | } | - | ||||||||||||||||||||||||||||||||||||
1949 | void QWidget::setWindowState(Qt::WindowStates newstate) | - | ||||||||||||||||||||||||||||||||||||
1950 | { | - | ||||||||||||||||||||||||||||||||||||
1951 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
1952 | Qt::WindowStates oldstate = windowState(); | - | ||||||||||||||||||||||||||||||||||||
1953 | if (oldstate == newstate
| 0 | ||||||||||||||||||||||||||||||||||||
1954 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1955 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1956 | create(); never executed: create(); | 0 | ||||||||||||||||||||||||||||||||||||
1957 | - | |||||||||||||||||||||||||||||||||||||
1958 | data->window_state = newstate; | - | ||||||||||||||||||||||||||||||||||||
1959 | data->in_set_window_state = 1; | - | ||||||||||||||||||||||||||||||||||||
1960 | Qt::WindowState newEffectiveState = effectiveState(newstate); | - | ||||||||||||||||||||||||||||||||||||
1961 | Qt::WindowState oldEffectiveState = effectiveState(oldstate); | - | ||||||||||||||||||||||||||||||||||||
1962 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
1963 | - | |||||||||||||||||||||||||||||||||||||
1964 | if (!testAttribute(Qt::WA_Resized)
| 0 | ||||||||||||||||||||||||||||||||||||
1965 | adjustSize(); never executed: adjustSize(); | 0 | ||||||||||||||||||||||||||||||||||||
1966 | - | |||||||||||||||||||||||||||||||||||||
1967 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
1968 | if (oldEffectiveState == Qt::WindowNoState
| 0 | ||||||||||||||||||||||||||||||||||||
1969 | d->topData()->normalGeometry = geometry(); never executed: d->topData()->normalGeometry = geometry(); | 0 | ||||||||||||||||||||||||||||||||||||
1970 | - | |||||||||||||||||||||||||||||||||||||
1971 | ((!(windowHandle())) ? qt_assert("windowHandle()",__FILE__,3088) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
1972 | windowHandle()->setWindowState(newEffectiveState); | - | ||||||||||||||||||||||||||||||||||||
1973 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1974 | data->in_set_window_state = 0; | - | ||||||||||||||||||||||||||||||||||||
1975 | - | |||||||||||||||||||||||||||||||||||||
1976 | if (newstate & Qt::WindowActive
| 0 | ||||||||||||||||||||||||||||||||||||
1977 | activateWindow(); never executed: activateWindow(); | 0 | ||||||||||||||||||||||||||||||||||||
1978 | - | |||||||||||||||||||||||||||||||||||||
1979 | QWindowStateChangeEvent e(oldstate); | - | ||||||||||||||||||||||||||||||||||||
1980 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
1981 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1982 | bool QWidget::isFullScreen() const | - | ||||||||||||||||||||||||||||||||||||
1983 | { return never executed: data->window_state & Qt::WindowFullScreen;return data->window_state & Qt::WindowFullScreen; never executed: }return data->window_state & Qt::WindowFullScreen; | 0 | ||||||||||||||||||||||||||||||||||||
1984 | void QWidget::showFullScreen() | - | ||||||||||||||||||||||||||||||||||||
1985 | { | - | ||||||||||||||||||||||||||||||||||||
1986 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
1987 | - | |||||||||||||||||||||||||||||||||||||
1988 | setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowMaximized)) | - | ||||||||||||||||||||||||||||||||||||
1989 | | Qt::WindowFullScreen); | - | ||||||||||||||||||||||||||||||||||||
1990 | setVisible(true); | - | ||||||||||||||||||||||||||||||||||||
1991 | - | |||||||||||||||||||||||||||||||||||||
1992 | - | |||||||||||||||||||||||||||||||||||||
1993 | activateWindow(); | - | ||||||||||||||||||||||||||||||||||||
1994 | - | |||||||||||||||||||||||||||||||||||||
1995 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1996 | void QWidget::showMaximized() | - | ||||||||||||||||||||||||||||||||||||
1997 | { | - | ||||||||||||||||||||||||||||||||||||
1998 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
1999 | - | |||||||||||||||||||||||||||||||||||||
2000 | setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen)) | - | ||||||||||||||||||||||||||||||||||||
2001 | | Qt::WindowMaximized); | - | ||||||||||||||||||||||||||||||||||||
2002 | setVisible(true); | - | ||||||||||||||||||||||||||||||||||||
2003 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2004 | void QWidget::showNormal() | - | ||||||||||||||||||||||||||||||||||||
2005 | { | - | ||||||||||||||||||||||||||||||||||||
2006 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
2007 | - | |||||||||||||||||||||||||||||||||||||
2008 | setWindowState(windowState() & ~(Qt::WindowMinimized | - | ||||||||||||||||||||||||||||||||||||
2009 | | Qt::WindowMaximized | - | ||||||||||||||||||||||||||||||||||||
2010 | | Qt::WindowFullScreen)); | - | ||||||||||||||||||||||||||||||||||||
2011 | setVisible(true); | - | ||||||||||||||||||||||||||||||||||||
2012 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2013 | bool QWidget::isEnabledTo(const QWidget *ancestor) const | - | ||||||||||||||||||||||||||||||||||||
2014 | { | - | ||||||||||||||||||||||||||||||||||||
2015 | const QWidget * w = this; | - | ||||||||||||||||||||||||||||||||||||
2016 | while (!w->testAttribute(Qt::WA_ForceDisabled)
| 0 | ||||||||||||||||||||||||||||||||||||
2017 | && !w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2018 | && w->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
2019 | && w->parentWidget() != ancestor
| 0 | ||||||||||||||||||||||||||||||||||||
2020 | w = w->parentWidget(); never executed: w = w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||
2021 | return never executed: !w->testAttribute(Qt::WA_ForceDisabled);return !w->testAttribute(Qt::WA_ForceDisabled); never executed: return !w->testAttribute(Qt::WA_ForceDisabled); | 0 | ||||||||||||||||||||||||||||||||||||
2022 | } | - | ||||||||||||||||||||||||||||||||||||
2023 | void QWidget::addAction(QAction *action) | - | ||||||||||||||||||||||||||||||||||||
2024 | { | - | ||||||||||||||||||||||||||||||||||||
2025 | insertAction(0, action); | - | ||||||||||||||||||||||||||||||||||||
2026 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2027 | void QWidget::addActions(QList<QAction*> actions) | - | ||||||||||||||||||||||||||||||||||||
2028 | - | |||||||||||||||||||||||||||||||||||||
2029 | { | - | ||||||||||||||||||||||||||||||||||||
2030 | for(int i = 0; i < actions.count()
| 0 | ||||||||||||||||||||||||||||||||||||
2031 | insertAction(0, actions.at(i)); never executed: insertAction(0, actions.at(i)); | 0 | ||||||||||||||||||||||||||||||||||||
2032 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2033 | void QWidget::insertAction(QAction *before, QAction *action) | - | ||||||||||||||||||||||||||||||||||||
2034 | { | - | ||||||||||||||||||||||||||||||||||||
2035 | if(!action
| 0 | ||||||||||||||||||||||||||||||||||||
2036 | QMessageLogger(__FILE__, 3304, __PRETTY_FUNCTION__).warning("QWidget::insertAction: Attempt to insert null action"); | - | ||||||||||||||||||||||||||||||||||||
2037 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2038 | } | - | ||||||||||||||||||||||||||||||||||||
2039 | - | |||||||||||||||||||||||||||||||||||||
2040 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2041 | if(d->actions.contains(action)
| 0 | ||||||||||||||||||||||||||||||||||||
2042 | removeAction(action); never executed: removeAction(action); | 0 | ||||||||||||||||||||||||||||||||||||
2043 | - | |||||||||||||||||||||||||||||||||||||
2044 | int pos = d->actions.indexOf(before); | - | ||||||||||||||||||||||||||||||||||||
2045 | if (pos < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2046 | before = 0; | - | ||||||||||||||||||||||||||||||||||||
2047 | pos = d->actions.size(); | - | ||||||||||||||||||||||||||||||||||||
2048 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2049 | d->actions.insert(pos, action); | - | ||||||||||||||||||||||||||||||||||||
2050 | - | |||||||||||||||||||||||||||||||||||||
2051 | QActionPrivate *apriv = action->d_func(); | - | ||||||||||||||||||||||||||||||||||||
2052 | apriv->widgets.append(this); | - | ||||||||||||||||||||||||||||||||||||
2053 | - | |||||||||||||||||||||||||||||||||||||
2054 | QActionEvent e(QEvent::ActionAdded, action, before); | - | ||||||||||||||||||||||||||||||||||||
2055 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
2056 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2057 | void QWidget::insertActions(QAction *before, QList<QAction*> actions) | - | ||||||||||||||||||||||||||||||||||||
2058 | { | - | ||||||||||||||||||||||||||||||||||||
2059 | for(int i = 0; i < actions.count()
| 0 | ||||||||||||||||||||||||||||||||||||
2060 | insertAction(before, actions.at(i)); never executed: insertAction(before, actions.at(i)); | 0 | ||||||||||||||||||||||||||||||||||||
2061 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2062 | - | |||||||||||||||||||||||||||||||||||||
2063 | - | |||||||||||||||||||||||||||||||||||||
2064 | - | |||||||||||||||||||||||||||||||||||||
2065 | - | |||||||||||||||||||||||||||||||||||||
2066 | - | |||||||||||||||||||||||||||||||||||||
2067 | void QWidget::removeAction(QAction *action) | - | ||||||||||||||||||||||||||||||||||||
2068 | { | - | ||||||||||||||||||||||||||||||||||||
2069 | if (!action
| 0 | ||||||||||||||||||||||||||||||||||||
2070 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2071 | - | |||||||||||||||||||||||||||||||||||||
2072 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2073 | - | |||||||||||||||||||||||||||||||||||||
2074 | QActionPrivate *apriv = action->d_func(); | - | ||||||||||||||||||||||||||||||||||||
2075 | apriv->widgets.removeAll(this); | - | ||||||||||||||||||||||||||||||||||||
2076 | - | |||||||||||||||||||||||||||||||||||||
2077 | if (d->actions.removeAll(action)
| 0 | ||||||||||||||||||||||||||||||||||||
2078 | QActionEvent e(QEvent::ActionRemoved, action); | - | ||||||||||||||||||||||||||||||||||||
2079 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
2080 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2081 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2082 | - | |||||||||||||||||||||||||||||||||||||
2083 | - | |||||||||||||||||||||||||||||||||||||
2084 | - | |||||||||||||||||||||||||||||||||||||
2085 | - | |||||||||||||||||||||||||||||||||||||
2086 | - | |||||||||||||||||||||||||||||||||||||
2087 | - | |||||||||||||||||||||||||||||||||||||
2088 | QList<QAction*> QWidget::actions() const | - | ||||||||||||||||||||||||||||||||||||
2089 | { | - | ||||||||||||||||||||||||||||||||||||
2090 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2091 | return never executed: d->actions;return d->actions; never executed: return d->actions; | 0 | ||||||||||||||||||||||||||||||||||||
2092 | } | - | ||||||||||||||||||||||||||||||||||||
2093 | void QWidget::setEnabled(bool enable) | - | ||||||||||||||||||||||||||||||||||||
2094 | { | - | ||||||||||||||||||||||||||||||||||||
2095 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2096 | setAttribute(Qt::WA_ForceDisabled, !enable); | - | ||||||||||||||||||||||||||||||||||||
2097 | d->setEnabled_helper(enable); | - | ||||||||||||||||||||||||||||||||||||
2098 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2099 | - | |||||||||||||||||||||||||||||||||||||
2100 | void QWidgetPrivate::setEnabled_helper(bool enable) | - | ||||||||||||||||||||||||||||||||||||
2101 | { | - | ||||||||||||||||||||||||||||||||||||
2102 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2103 | - | |||||||||||||||||||||||||||||||||||||
2104 | if (enable
| 0 | ||||||||||||||||||||||||||||||||||||
2105 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2106 | - | |||||||||||||||||||||||||||||||||||||
2107 | if (enable != q->testAttribute(Qt::WA_Disabled)
| 0 | ||||||||||||||||||||||||||||||||||||
2108 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2109 | - | |||||||||||||||||||||||||||||||||||||
2110 | q->setAttribute(Qt::WA_Disabled, !enable); | - | ||||||||||||||||||||||||||||||||||||
2111 | updateSystemBackground(); | - | ||||||||||||||||||||||||||||||||||||
2112 | - | |||||||||||||||||||||||||||||||||||||
2113 | if (!enable
| 0 | ||||||||||||||||||||||||||||||||||||
2114 | bool parentIsEnabled = (!q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
2115 | if (!parentIsEnabled
| 0 | ||||||||||||||||||||||||||||||||||||
2116 | q->clearFocus(); never executed: q->clearFocus(); | 0 | ||||||||||||||||||||||||||||||||||||
2117 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2118 | - | |||||||||||||||||||||||||||||||||||||
2119 | Qt::WidgetAttribute attribute = enable
| 0 | ||||||||||||||||||||||||||||||||||||
2120 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
2121 | QWidget *w = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
2122 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
2123 | w->d_func()->setEnabled_helper(enable); never executed: w->d_func()->setEnabled_helper(enable); | 0 | ||||||||||||||||||||||||||||||||||||
2124 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2125 | if (q->testAttribute(Qt::WA_SetCursor)
| 0 | ||||||||||||||||||||||||||||||||||||
2126 | - | |||||||||||||||||||||||||||||||||||||
2127 | - | |||||||||||||||||||||||||||||||||||||
2128 | qt_qpa_set_cursor(q, false); | - | ||||||||||||||||||||||||||||||||||||
2129 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2130 | - | |||||||||||||||||||||||||||||||||||||
2131 | - | |||||||||||||||||||||||||||||||||||||
2132 | - | |||||||||||||||||||||||||||||||||||||
2133 | - | |||||||||||||||||||||||||||||||||||||
2134 | - | |||||||||||||||||||||||||||||||||||||
2135 | if (q->testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
2136 | QWidget *focusWidget = effectiveFocusWidget(); | - | ||||||||||||||||||||||||||||||||||||
2137 | - | |||||||||||||||||||||||||||||||||||||
2138 | if (enable
| 0 | ||||||||||||||||||||||||||||||||||||
2139 | if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
2140 | QGuiApplication::inputMethod()->update(Qt::ImEnabled); never executed: QGuiApplication::inputMethod()->update(Qt::ImEnabled); | 0 | ||||||||||||||||||||||||||||||||||||
2141 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
2142 | QGuiApplication::inputMethod()->commit(); | - | ||||||||||||||||||||||||||||||||||||
2143 | QGuiApplication::inputMethod()->update(Qt::ImEnabled); | - | ||||||||||||||||||||||||||||||||||||
2144 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2145 | } | - | ||||||||||||||||||||||||||||||||||||
2146 | - | |||||||||||||||||||||||||||||||||||||
2147 | QEvent e(QEvent::EnabledChange); | - | ||||||||||||||||||||||||||||||||||||
2148 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
2149 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2150 | bool QWidget::acceptDrops() const | - | ||||||||||||||||||||||||||||||||||||
2151 | { | - | ||||||||||||||||||||||||||||||||||||
2152 | return never executed: testAttribute(Qt::WA_AcceptDrops);return testAttribute(Qt::WA_AcceptDrops); never executed: return testAttribute(Qt::WA_AcceptDrops); | 0 | ||||||||||||||||||||||||||||||||||||
2153 | } | - | ||||||||||||||||||||||||||||||||||||
2154 | - | |||||||||||||||||||||||||||||||||||||
2155 | void QWidget::setAcceptDrops(bool on) | - | ||||||||||||||||||||||||||||||||||||
2156 | { | - | ||||||||||||||||||||||||||||||||||||
2157 | setAttribute(Qt::WA_AcceptDrops, on); | - | ||||||||||||||||||||||||||||||||||||
2158 | - | |||||||||||||||||||||||||||||||||||||
2159 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2160 | - | |||||||||||||||||||||||||||||||||||||
2161 | void QWidgetPrivate::registerDropSite(bool on) | - | ||||||||||||||||||||||||||||||||||||
2162 | { | - | ||||||||||||||||||||||||||||||||||||
2163 | (void)on;; | - | ||||||||||||||||||||||||||||||||||||
2164 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2165 | void QWidget::setDisabled(bool disable) | - | ||||||||||||||||||||||||||||||||||||
2166 | { | - | ||||||||||||||||||||||||||||||||||||
2167 | setEnabled(!disable); | - | ||||||||||||||||||||||||||||||||||||
2168 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2169 | QRect QWidget::frameGeometry() const | - | ||||||||||||||||||||||||||||||||||||
2170 | { | - | ||||||||||||||||||||||||||||||||||||
2171 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2172 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2173 | QRect fs = d->frameStrut(); | - | ||||||||||||||||||||||||||||||||||||
2174 | return never executed: QRect(data->crect.x() - fs.left(),return QRect(data->crect.x() - fs.left(), data->crect.y() - fs.top(), data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); never executed: return QRect(data->crect.x() - fs.left(), data->crect.y() - fs.top(), data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||
2175 | data->crect.y() - fs.top(), never executed: return QRect(data->crect.x() - fs.left(), data->crect.y() - fs.top(), data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||
2176 | data->crect.width() + fs.left() + fs.right(), never executed: return QRect(data->crect.x() - fs.left(), data->crect.y() - fs.top(), data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||
2177 | data->crect.height() + fs.top() + fs.bottom()); never executed: return QRect(data->crect.x() - fs.left(), data->crect.y() - fs.top(), data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||
2178 | } | - | ||||||||||||||||||||||||||||||||||||
2179 | return never executed: data->crect;return data->crect; never executed: return data->crect; | 0 | ||||||||||||||||||||||||||||||||||||
2180 | } | - | ||||||||||||||||||||||||||||||||||||
2181 | int QWidget::x() const | - | ||||||||||||||||||||||||||||||||||||
2182 | { | - | ||||||||||||||||||||||||||||||||||||
2183 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2184 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2185 | return never executed: data->crect.x() - d->frameStrut().left();return data->crect.x() - d->frameStrut().left(); never executed: return data->crect.x() - d->frameStrut().left(); | 0 | ||||||||||||||||||||||||||||||||||||
2186 | return never executed: data->crect.x();return data->crect.x(); never executed: return data->crect.x(); | 0 | ||||||||||||||||||||||||||||||||||||
2187 | } | - | ||||||||||||||||||||||||||||||||||||
2188 | int QWidget::y() const | - | ||||||||||||||||||||||||||||||||||||
2189 | { | - | ||||||||||||||||||||||||||||||||||||
2190 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2191 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2192 | return never executed: data->crect.y() - d->frameStrut().top();return data->crect.y() - d->frameStrut().top(); never executed: return data->crect.y() - d->frameStrut().top(); | 0 | ||||||||||||||||||||||||||||||||||||
2193 | return never executed: data->crect.y();return data->crect.y(); never executed: return data->crect.y(); | 0 | ||||||||||||||||||||||||||||||||||||
2194 | } | - | ||||||||||||||||||||||||||||||||||||
2195 | QPoint QWidget::pos() const | - | ||||||||||||||||||||||||||||||||||||
2196 | { | - | ||||||||||||||||||||||||||||||||||||
2197 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2198 | QPoint result = data->crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
2199 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2200 | if (!d->maybeTopData()
| 0 | ||||||||||||||||||||||||||||||||||||
2201 | result -= d->frameStrut().topLeft(); never executed: result -= d->frameStrut().topLeft(); | 0 | ||||||||||||||||||||||||||||||||||||
2202 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||||||||||||||||||||||||||
2203 | } | - | ||||||||||||||||||||||||||||||||||||
2204 | QRect QWidget::normalGeometry() const | - | ||||||||||||||||||||||||||||||||||||
2205 | { | - | ||||||||||||||||||||||||||||||||||||
2206 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2207 | if (!d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
2208 | return never executed: QRect();return QRect(); never executed: return QRect(); | 0 | ||||||||||||||||||||||||||||||||||||
2209 | - | |||||||||||||||||||||||||||||||||||||
2210 | if (!isMaximized()
| 0 | ||||||||||||||||||||||||||||||||||||
2211 | return never executed: geometry();return geometry(); never executed: return geometry(); | 0 | ||||||||||||||||||||||||||||||||||||
2212 | - | |||||||||||||||||||||||||||||||||||||
2213 | return never executed: d->topData()->normalGeometry;return d->topData()->normalGeometry; never executed: return d->topData()->normalGeometry; | 0 | ||||||||||||||||||||||||||||||||||||
2214 | } | - | ||||||||||||||||||||||||||||||||||||
2215 | QRect QWidget::childrenRect() const | - | ||||||||||||||||||||||||||||||||||||
2216 | { | - | ||||||||||||||||||||||||||||||||||||
2217 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2218 | QRect r(0, 0, 0, 0); | - | ||||||||||||||||||||||||||||||||||||
2219 | for (int i = 0; i < d->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
2220 | QWidget *w = qobject_cast<QWidget *>(d->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
2221 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
2222 | r |= w->geometry(); never executed: r |= w->geometry(); | 0 | ||||||||||||||||||||||||||||||||||||
2223 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2224 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||
2225 | } | - | ||||||||||||||||||||||||||||||||||||
2226 | QRegion QWidget::childrenRegion() const | - | ||||||||||||||||||||||||||||||||||||
2227 | { | - | ||||||||||||||||||||||||||||||||||||
2228 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2229 | QRegion r; | - | ||||||||||||||||||||||||||||||||||||
2230 | for (int i = 0; i < d->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
2231 | QWidget *w = qobject_cast<QWidget *>(d->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
2232 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
2233 | QRegion mask = w->mask(); | - | ||||||||||||||||||||||||||||||||||||
2234 | if (mask.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
2235 | r |= w->geometry(); never executed: r |= w->geometry(); | 0 | ||||||||||||||||||||||||||||||||||||
2236 | else | - | ||||||||||||||||||||||||||||||||||||
2237 | r |= mask.translated(w->pos()); never executed: r |= mask.translated(w->pos()); | 0 | ||||||||||||||||||||||||||||||||||||
2238 | } | - | ||||||||||||||||||||||||||||||||||||
2239 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2240 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||
2241 | } | - | ||||||||||||||||||||||||||||||||||||
2242 | QSize QWidget::minimumSize() const | - | ||||||||||||||||||||||||||||||||||||
2243 | { | - | ||||||||||||||||||||||||||||||||||||
2244 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2245 | return never executed: d->extrareturn d->extra ? QSize(d->extra->minw, d->extra->minh) : QSize(0, 0);
never executed: return d->extra ? QSize(d->extra->minw, d->extra->minh) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2246 | } | - | ||||||||||||||||||||||||||||||||||||
2247 | QSize QWidget::maximumSize() const | - | ||||||||||||||||||||||||||||||||||||
2248 | { | - | ||||||||||||||||||||||||||||||||||||
2249 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2250 | return never executed: d->extrareturn d->extra ? QSize(d->extra->maxw, d->extra->maxh) : QSize(((1<<24)-1), ((1<<24)-1));
never executed: return d->extra ? QSize(d->extra->maxw, d->extra->maxh) : QSize(((1<<24)-1), ((1<<24)-1)); | 0 | ||||||||||||||||||||||||||||||||||||
2251 | : QSize(((1<<24)-1), ((1<<24)-1)); never executed: return d->extra ? QSize(d->extra->maxw, d->extra->maxh) : QSize(((1<<24)-1), ((1<<24)-1)); | 0 | ||||||||||||||||||||||||||||||||||||
2252 | } | - | ||||||||||||||||||||||||||||||||||||
2253 | QSize QWidget::sizeIncrement() const | - | ||||||||||||||||||||||||||||||||||||
2254 | { | - | ||||||||||||||||||||||||||||||||||||
2255 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2256 | return never executed: (d->extrareturn (d->extra && d->extra->topextra) ? QSize(d->extra->topextra->incw, d->extra->topextra->inch) : QSize(0, 0);
never executed: return (d->extra && d->extra->topextra) ? QSize(d->extra->topextra->incw, d->extra->topextra->inch) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2257 | ? QSize(d->extra->topextra->incw, d->extra->topextra->inch) never executed: return (d->extra && d->extra->topextra) ? QSize(d->extra->topextra->incw, d->extra->topextra->inch) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2258 | : QSize(0, 0); never executed: return (d->extra && d->extra->topextra) ? QSize(d->extra->topextra->incw, d->extra->topextra->inch) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2259 | } | - | ||||||||||||||||||||||||||||||||||||
2260 | QSize QWidget::baseSize() const | - | ||||||||||||||||||||||||||||||||||||
2261 | { | - | ||||||||||||||||||||||||||||||||||||
2262 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2263 | return never executed: (d->extra != 0return (d->extra != 0 && d->extra->topextra != 0) ? QSize(d->extra->topextra->basew, d->extra->topextra->baseh) : QSize(0, 0);
never executed: return (d->extra != 0 && d->extra->topextra != 0) ? QSize(d->extra->topextra->basew, d->extra->topextra->baseh) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2264 | ? QSize(d->extra->topextra->basew, d->extra->topextra->baseh) never executed: return (d->extra != 0 && d->extra->topextra != 0) ? QSize(d->extra->topextra->basew, d->extra->topextra->baseh) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2265 | : QSize(0, 0); never executed: return (d->extra != 0 && d->extra->topextra != 0) ? QSize(d->extra->topextra->basew, d->extra->topextra->baseh) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2266 | } | - | ||||||||||||||||||||||||||||||||||||
2267 | - | |||||||||||||||||||||||||||||||||||||
2268 | bool QWidgetPrivate::setMinimumSize_helper(int &minw, int &minh) | - | ||||||||||||||||||||||||||||||||||||
2269 | { | - | ||||||||||||||||||||||||||||||||||||
2270 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2271 | - | |||||||||||||||||||||||||||||||||||||
2272 | int mw = minw, mh = minh; | - | ||||||||||||||||||||||||||||||||||||
2273 | if (mw == ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
2274 | mw = 0; never executed: mw = 0; | 0 | ||||||||||||||||||||||||||||||||||||
2275 | if (mh == ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
2276 | mh = 0; never executed: mh = 0; | 0 | ||||||||||||||||||||||||||||||||||||
2277 | if (minw > ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
2278 | QMessageLogger(__FILE__, 3950, __PRETTY_FUNCTION__).warning("QWidget::setMinimumSize: (%s/%s) " | - | ||||||||||||||||||||||||||||||||||||
2279 | "The largest allowed size is (%d,%d)", | - | ||||||||||||||||||||||||||||||||||||
2280 | q->objectName().toLocal8Bit().data(), q->metaObject()->className(), ((1<<24)-1), | - | ||||||||||||||||||||||||||||||||||||
2281 | ((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||
2282 | minw = mw = qMin<int>(minw, ((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||
2283 | minh = mh = qMin<int>(minh, ((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||
2284 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2285 | if (minw < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2286 | QMessageLogger(__FILE__, 3958, __PRETTY_FUNCTION__).warning("QWidget::setMinimumSize: (%s/%s) Negative sizes (%d,%d) " | - | ||||||||||||||||||||||||||||||||||||
2287 | "are not possible", | - | ||||||||||||||||||||||||||||||||||||
2288 | q->objectName().toLocal8Bit().data(), q->metaObject()->className(), minw, minh); | - | ||||||||||||||||||||||||||||||||||||
2289 | minw = mw = qMax(minw, 0); | - | ||||||||||||||||||||||||||||||||||||
2290 | minh = mh = qMax(minh, 0); | - | ||||||||||||||||||||||||||||||||||||
2291 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2292 | createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2293 | if (extra->minw == mw
| 0 | ||||||||||||||||||||||||||||||||||||
2294 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
2295 | extra->minw = mw; | - | ||||||||||||||||||||||||||||||||||||
2296 | extra->minh = mh; | - | ||||||||||||||||||||||||||||||||||||
2297 | extra->explicitMinSize = (mw
| 0 | ||||||||||||||||||||||||||||||||||||
2298 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
2299 | } | - | ||||||||||||||||||||||||||||||||||||
2300 | - | |||||||||||||||||||||||||||||||||||||
2301 | void QWidgetPrivate::setConstraints_sys() | - | ||||||||||||||||||||||||||||||||||||
2302 | { | - | ||||||||||||||||||||||||||||||||||||
2303 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2304 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
2305 | QWindow *win = q->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
2306 | QWindowPrivate *winp = qt_window_private(win); | - | ||||||||||||||||||||||||||||||||||||
2307 | - | |||||||||||||||||||||||||||||||||||||
2308 | winp->minimumSize = QSize(extra->minw, extra->minh); | - | ||||||||||||||||||||||||||||||||||||
2309 | winp->maximumSize = QSize(extra->maxw, extra->maxh); | - | ||||||||||||||||||||||||||||||||||||
2310 | - | |||||||||||||||||||||||||||||||||||||
2311 | if (extra->topextra
| 0 | ||||||||||||||||||||||||||||||||||||
2312 | winp->baseSize = QSize(extra->topextra->basew, extra->topextra->baseh); | - | ||||||||||||||||||||||||||||||||||||
2313 | winp->sizeIncrement = QSize(extra->topextra->incw, extra->topextra->inch); | - | ||||||||||||||||||||||||||||||||||||
2314 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2315 | - | |||||||||||||||||||||||||||||||||||||
2316 | if (winp->platformWindow
| 0 | ||||||||||||||||||||||||||||||||||||
2317 | fixPosIncludesFrame(); | - | ||||||||||||||||||||||||||||||||||||
2318 | winp->platformWindow->propagateSizeHints(); | - | ||||||||||||||||||||||||||||||||||||
2319 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2320 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2321 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2322 | void QWidget::setMinimumSize(int minw, int minh) | - | ||||||||||||||||||||||||||||||||||||
2323 | { | - | ||||||||||||||||||||||||||||||||||||
2324 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2325 | if (!d->setMinimumSize_helper(minw, minh)
| 0 | ||||||||||||||||||||||||||||||||||||
2326 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2327 | - | |||||||||||||||||||||||||||||||||||||
2328 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2329 | d->setConstraints_sys(); never executed: d->setConstraints_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
2330 | if (minw > width()
| 0 | ||||||||||||||||||||||||||||||||||||
2331 | bool resized = testAttribute(Qt::WA_Resized); | - | ||||||||||||||||||||||||||||||||||||
2332 | bool maximized = isMaximized(); | - | ||||||||||||||||||||||||||||||||||||
2333 | resize(qMax(minw,width()), qMax(minh,height())); | - | ||||||||||||||||||||||||||||||||||||
2334 | setAttribute(Qt::WA_Resized, resized); | - | ||||||||||||||||||||||||||||||||||||
2335 | if (maximized
| 0 | ||||||||||||||||||||||||||||||||||||
2336 | data->window_state = data->window_state | Qt::WindowMaximized; never executed: data->window_state = data->window_state | Qt::WindowMaximized; | 0 | ||||||||||||||||||||||||||||||||||||
2337 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2338 | - | |||||||||||||||||||||||||||||||||||||
2339 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
2340 | if (d->extra->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
2341 | d->extra->proxyWidget->setMinimumSize(minw, minh); never executed: d->extra->proxyWidget->setMinimumSize(minw, minh); | 0 | ||||||||||||||||||||||||||||||||||||
2342 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2343 | - | |||||||||||||||||||||||||||||||||||||
2344 | d->updateGeometry_helper(d->extra->minw == d->extra->maxw && d->extra->minh == d->extra->maxh); | - | ||||||||||||||||||||||||||||||||||||
2345 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2346 | - | |||||||||||||||||||||||||||||||||||||
2347 | bool QWidgetPrivate::setMaximumSize_helper(int &maxw, int &maxh) | - | ||||||||||||||||||||||||||||||||||||
2348 | { | - | ||||||||||||||||||||||||||||||||||||
2349 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2350 | if (maxw > ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
2351 | QMessageLogger(__FILE__, 4032, __PRETTY_FUNCTION__).warning("QWidget::setMaximumSize: (%s/%s) " | - | ||||||||||||||||||||||||||||||||||||
2352 | "The largest allowed size is (%d,%d)", | - | ||||||||||||||||||||||||||||||||||||
2353 | q->objectName().toLocal8Bit().data(), q->metaObject()->className(), ((1<<24)-1), | - | ||||||||||||||||||||||||||||||||||||
2354 | ((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||
2355 | maxw = qMin<int>(maxw, ((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||
2356 | maxh = qMin<int>(maxh, ((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||
2357 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2358 | if (maxw < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2359 | QMessageLogger(__FILE__, 4040, __PRETTY_FUNCTION__).warning("QWidget::setMaximumSize: (%s/%s) Negative sizes (%d,%d) " | - | ||||||||||||||||||||||||||||||||||||
2360 | "are not possible", | - | ||||||||||||||||||||||||||||||||||||
2361 | q->objectName().toLocal8Bit().data(), q->metaObject()->className(), maxw, maxh); | - | ||||||||||||||||||||||||||||||||||||
2362 | maxw = qMax(maxw, 0); | - | ||||||||||||||||||||||||||||||||||||
2363 | maxh = qMax(maxh, 0); | - | ||||||||||||||||||||||||||||||||||||
2364 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2365 | createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2366 | if (extra->maxw == maxw
| 0 | ||||||||||||||||||||||||||||||||||||
2367 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
2368 | extra->maxw = maxw; | - | ||||||||||||||||||||||||||||||||||||
2369 | extra->maxh = maxh; | - | ||||||||||||||||||||||||||||||||||||
2370 | extra->explicitMaxSize = (maxw != ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
2371 | (maxh != ((1<<24)-1) ? Qt::Vertical : 0); | - | ||||||||||||||||||||||||||||||||||||
2372 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
2373 | } | - | ||||||||||||||||||||||||||||||||||||
2374 | void QWidget::setMaximumSize(int maxw, int maxh) | - | ||||||||||||||||||||||||||||||||||||
2375 | { | - | ||||||||||||||||||||||||||||||||||||
2376 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2377 | if (!d->setMaximumSize_helper(maxw, maxh)
| 0 | ||||||||||||||||||||||||||||||||||||
2378 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2379 | - | |||||||||||||||||||||||||||||||||||||
2380 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2381 | d->setConstraints_sys(); never executed: d->setConstraints_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
2382 | if (maxw < width()
| 0 | ||||||||||||||||||||||||||||||||||||
2383 | bool resized = testAttribute(Qt::WA_Resized); | - | ||||||||||||||||||||||||||||||||||||
2384 | resize(qMin(maxw,width()), qMin(maxh,height())); | - | ||||||||||||||||||||||||||||||||||||
2385 | setAttribute(Qt::WA_Resized, resized); | - | ||||||||||||||||||||||||||||||||||||
2386 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2387 | - | |||||||||||||||||||||||||||||||||||||
2388 | - | |||||||||||||||||||||||||||||||||||||
2389 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
2390 | if (d->extra->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
2391 | d->extra->proxyWidget->setMaximumSize(maxw, maxh); never executed: d->extra->proxyWidget->setMaximumSize(maxw, maxh); | 0 | ||||||||||||||||||||||||||||||||||||
2392 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2393 | - | |||||||||||||||||||||||||||||||||||||
2394 | - | |||||||||||||||||||||||||||||||||||||
2395 | d->updateGeometry_helper(d->extra->minw == d->extra->maxw && d->extra->minh == d->extra->maxh); | - | ||||||||||||||||||||||||||||||||||||
2396 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2397 | - | |||||||||||||||||||||||||||||||||||||
2398 | - | |||||||||||||||||||||||||||||||||||||
2399 | - | |||||||||||||||||||||||||||||||||||||
2400 | - | |||||||||||||||||||||||||||||||||||||
2401 | - | |||||||||||||||||||||||||||||||||||||
2402 | - | |||||||||||||||||||||||||||||||||||||
2403 | - | |||||||||||||||||||||||||||||||||||||
2404 | void QWidget::setSizeIncrement(int w, int h) | - | ||||||||||||||||||||||||||||||||||||
2405 | { | - | ||||||||||||||||||||||||||||||||||||
2406 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2407 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
2408 | QTLWExtra* x = d->topData(); | - | ||||||||||||||||||||||||||||||||||||
2409 | if (x->incw == w
| 0 | ||||||||||||||||||||||||||||||||||||
2410 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2411 | x->incw = w; | - | ||||||||||||||||||||||||||||||||||||
2412 | x->inch = h; | - | ||||||||||||||||||||||||||||||||||||
2413 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2414 | d->setConstraints_sys(); never executed: d->setConstraints_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
2415 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2416 | - | |||||||||||||||||||||||||||||||||||||
2417 | - | |||||||||||||||||||||||||||||||||||||
2418 | - | |||||||||||||||||||||||||||||||||||||
2419 | - | |||||||||||||||||||||||||||||||||||||
2420 | - | |||||||||||||||||||||||||||||||||||||
2421 | - | |||||||||||||||||||||||||||||||||||||
2422 | - | |||||||||||||||||||||||||||||||||||||
2423 | void QWidget::setBaseSize(int basew, int baseh) | - | ||||||||||||||||||||||||||||||||||||
2424 | { | - | ||||||||||||||||||||||||||||||||||||
2425 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2426 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
2427 | QTLWExtra* x = d->topData(); | - | ||||||||||||||||||||||||||||||||||||
2428 | if (x->basew == basew
| 0 | ||||||||||||||||||||||||||||||||||||
2429 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2430 | x->basew = basew; | - | ||||||||||||||||||||||||||||||||||||
2431 | x->baseh = baseh; | - | ||||||||||||||||||||||||||||||||||||
2432 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2433 | d->setConstraints_sys(); never executed: d->setConstraints_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
2434 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2435 | void QWidget::setFixedSize(const QSize & s) | - | ||||||||||||||||||||||||||||||||||||
2436 | { | - | ||||||||||||||||||||||||||||||||||||
2437 | setFixedSize(s.width(), s.height()); | - | ||||||||||||||||||||||||||||||||||||
2438 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2439 | void QWidget::setFixedSize(int w, int h) | - | ||||||||||||||||||||||||||||||||||||
2440 | { | - | ||||||||||||||||||||||||||||||||||||
2441 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2442 | bool minSizeSet = d->setMinimumSize_helper(w, h); | - | ||||||||||||||||||||||||||||||||||||
2443 | bool maxSizeSet = d->setMaximumSize_helper(w, h); | - | ||||||||||||||||||||||||||||||||||||
2444 | if (!minSizeSet
| 0 | ||||||||||||||||||||||||||||||||||||
2445 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2446 | - | |||||||||||||||||||||||||||||||||||||
2447 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2448 | d->setConstraints_sys(); never executed: d->setConstraints_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
2449 | else | - | ||||||||||||||||||||||||||||||||||||
2450 | d->updateGeometry_helper(true); never executed: d->updateGeometry_helper(true); | 0 | ||||||||||||||||||||||||||||||||||||
2451 | - | |||||||||||||||||||||||||||||||||||||
2452 | if (w != ((1<<24)-1)
| 0 | ||||||||||||||||||||||||||||||||||||
2453 | resize(w, h); never executed: resize(w, h); | 0 | ||||||||||||||||||||||||||||||||||||
2454 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2455 | - | |||||||||||||||||||||||||||||||||||||
2456 | void QWidget::setMinimumWidth(int w) | - | ||||||||||||||||||||||||||||||||||||
2457 | { | - | ||||||||||||||||||||||||||||||||||||
2458 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2459 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2460 | uint expl = d->extra->explicitMinSize | (w ? Qt::Horizontal : 0); | - | ||||||||||||||||||||||||||||||||||||
2461 | setMinimumSize(w, minimumSize().height()); | - | ||||||||||||||||||||||||||||||||||||
2462 | d->extra->explicitMinSize = expl; | - | ||||||||||||||||||||||||||||||||||||
2463 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2464 | - | |||||||||||||||||||||||||||||||||||||
2465 | void QWidget::setMinimumHeight(int h) | - | ||||||||||||||||||||||||||||||||||||
2466 | { | - | ||||||||||||||||||||||||||||||||||||
2467 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2468 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2469 | uint expl = d->extra->explicitMinSize | (h ? Qt::Vertical : 0); | - | ||||||||||||||||||||||||||||||||||||
2470 | setMinimumSize(minimumSize().width(), h); | - | ||||||||||||||||||||||||||||||||||||
2471 | d->extra->explicitMinSize = expl; | - | ||||||||||||||||||||||||||||||||||||
2472 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2473 | - | |||||||||||||||||||||||||||||||||||||
2474 | void QWidget::setMaximumWidth(int w) | - | ||||||||||||||||||||||||||||||||||||
2475 | { | - | ||||||||||||||||||||||||||||||||||||
2476 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2477 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2478 | uint expl = d->extra->explicitMaxSize | (w == ((1<<24)-1) ? 0 : Qt::Horizontal); | - | ||||||||||||||||||||||||||||||||||||
2479 | setMaximumSize(w, maximumSize().height()); | - | ||||||||||||||||||||||||||||||||||||
2480 | d->extra->explicitMaxSize = expl; | - | ||||||||||||||||||||||||||||||||||||
2481 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2482 | - | |||||||||||||||||||||||||||||||||||||
2483 | void QWidget::setMaximumHeight(int h) | - | ||||||||||||||||||||||||||||||||||||
2484 | { | - | ||||||||||||||||||||||||||||||||||||
2485 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2486 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2487 | uint expl = d->extra->explicitMaxSize | (h == ((1<<24)-1) ? 0 : Qt::Vertical); | - | ||||||||||||||||||||||||||||||||||||
2488 | setMaximumSize(maximumSize().width(), h); | - | ||||||||||||||||||||||||||||||||||||
2489 | d->extra->explicitMaxSize = expl; | - | ||||||||||||||||||||||||||||||||||||
2490 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2491 | void QWidget::setFixedWidth(int w) | - | ||||||||||||||||||||||||||||||||||||
2492 | { | - | ||||||||||||||||||||||||||||||||||||
2493 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2494 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2495 | uint explMin = d->extra->explicitMinSize | Qt::Horizontal; | - | ||||||||||||||||||||||||||||||||||||
2496 | uint explMax = d->extra->explicitMaxSize | Qt::Horizontal; | - | ||||||||||||||||||||||||||||||||||||
2497 | setMinimumSize(w, minimumSize().height()); | - | ||||||||||||||||||||||||||||||||||||
2498 | setMaximumSize(w, maximumSize().height()); | - | ||||||||||||||||||||||||||||||||||||
2499 | d->extra->explicitMinSize = explMin; | - | ||||||||||||||||||||||||||||||||||||
2500 | d->extra->explicitMaxSize = explMax; | - | ||||||||||||||||||||||||||||||||||||
2501 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2502 | void QWidget::setFixedHeight(int h) | - | ||||||||||||||||||||||||||||||||||||
2503 | { | - | ||||||||||||||||||||||||||||||||||||
2504 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2505 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2506 | uint explMin = d->extra->explicitMinSize | Qt::Vertical; | - | ||||||||||||||||||||||||||||||||||||
2507 | uint explMax = d->extra->explicitMaxSize | Qt::Vertical; | - | ||||||||||||||||||||||||||||||||||||
2508 | setMinimumSize(minimumSize().width(), h); | - | ||||||||||||||||||||||||||||||||||||
2509 | setMaximumSize(maximumSize().width(), h); | - | ||||||||||||||||||||||||||||||||||||
2510 | d->extra->explicitMinSize = explMin; | - | ||||||||||||||||||||||||||||||||||||
2511 | d->extra->explicitMaxSize = explMax; | - | ||||||||||||||||||||||||||||||||||||
2512 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2513 | QPoint QWidget::mapTo(const QWidget * parent, const QPoint & pos) const | - | ||||||||||||||||||||||||||||||||||||
2514 | { | - | ||||||||||||||||||||||||||||||||||||
2515 | QPoint p = pos; | - | ||||||||||||||||||||||||||||||||||||
2516 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
2517 | const QWidget * w = this; | - | ||||||||||||||||||||||||||||||||||||
2518 | while (w != parent
| 0 | ||||||||||||||||||||||||||||||||||||
2519 | ((!(w)) ? qt_assert_x("QWidget::mapTo(const QWidget *parent, const QPoint &pos)", "parent must be in parent hierarchy", | - | ||||||||||||||||||||||||||||||||||||
2520 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
2521 | , | - | ||||||||||||||||||||||||||||||||||||
2522 | 4261 | - | ||||||||||||||||||||||||||||||||||||
2523 | ) : qt_noop()) | - | ||||||||||||||||||||||||||||||||||||
2524 | ; | - | ||||||||||||||||||||||||||||||||||||
2525 | p = w->mapToParent(p); | - | ||||||||||||||||||||||||||||||||||||
2526 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
2527 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2528 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2529 | return never executed: p;return p; never executed: return p; | 0 | ||||||||||||||||||||||||||||||||||||
2530 | } | - | ||||||||||||||||||||||||||||||||||||
2531 | QPoint QWidget::mapFrom(const QWidget * parent, const QPoint & pos) const | - | ||||||||||||||||||||||||||||||||||||
2532 | { | - | ||||||||||||||||||||||||||||||||||||
2533 | QPoint p(pos); | - | ||||||||||||||||||||||||||||||||||||
2534 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
2535 | const QWidget * w = this; | - | ||||||||||||||||||||||||||||||||||||
2536 | while (w != parent
| 0 | ||||||||||||||||||||||||||||||||||||
2537 | ((!(w)) ? qt_assert_x("QWidget::mapFrom(const QWidget *parent, const QPoint &pos)", "parent must be in parent hierarchy", | - | ||||||||||||||||||||||||||||||||||||
2538 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
2539 | , | - | ||||||||||||||||||||||||||||||||||||
2540 | 4285 | - | ||||||||||||||||||||||||||||||||||||
2541 | ) : qt_noop()) | - | ||||||||||||||||||||||||||||||||||||
2542 | ; | - | ||||||||||||||||||||||||||||||||||||
2543 | - | |||||||||||||||||||||||||||||||||||||
2544 | p = w->mapFromParent(p); | - | ||||||||||||||||||||||||||||||||||||
2545 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
2546 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2547 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2548 | return never executed: p;return p; never executed: return p; | 0 | ||||||||||||||||||||||||||||||||||||
2549 | } | - | ||||||||||||||||||||||||||||||||||||
2550 | QPoint QWidget::mapToParent(const QPoint &pos) const | - | ||||||||||||||||||||||||||||||||||||
2551 | { | - | ||||||||||||||||||||||||||||||||||||
2552 | return never executed: pos + data->crect.topLeft();return pos + data->crect.topLeft(); never executed: return pos + data->crect.topLeft(); | 0 | ||||||||||||||||||||||||||||||||||||
2553 | } | - | ||||||||||||||||||||||||||||||||||||
2554 | QPoint QWidget::mapFromParent(const QPoint &pos) const | - | ||||||||||||||||||||||||||||||||||||
2555 | { | - | ||||||||||||||||||||||||||||||||||||
2556 | return never executed: pos - data->crect.topLeft();return pos - data->crect.topLeft(); never executed: return pos - data->crect.topLeft(); | 0 | ||||||||||||||||||||||||||||||||||||
2557 | } | - | ||||||||||||||||||||||||||||||||||||
2558 | QWidget *QWidget::window() const | - | ||||||||||||||||||||||||||||||||||||
2559 | { | - | ||||||||||||||||||||||||||||||||||||
2560 | QWidget *w = const_cast<QWidget *>(this); | - | ||||||||||||||||||||||||||||||||||||
2561 | QWidget *p = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
2562 | while (!w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2563 | w = p; | - | ||||||||||||||||||||||||||||||||||||
2564 | p = p->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
2565 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2566 | return never executed: w;return w; never executed: return w; | 0 | ||||||||||||||||||||||||||||||||||||
2567 | } | - | ||||||||||||||||||||||||||||||||||||
2568 | QWidget *QWidget::nativeParentWidget() const | - | ||||||||||||||||||||||||||||||||||||
2569 | { | - | ||||||||||||||||||||||||||||||||||||
2570 | QWidget *parent = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
2571 | while (parent
| 0 | ||||||||||||||||||||||||||||||||||||
2572 | parent = parent->parentWidget(); never executed: parent = parent->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||
2573 | return never executed: parent;return parent; never executed: return parent; | 0 | ||||||||||||||||||||||||||||||||||||
2574 | } | - | ||||||||||||||||||||||||||||||||||||
2575 | QPalette::ColorRole QWidget::backgroundRole() const | - | ||||||||||||||||||||||||||||||||||||
2576 | { | - | ||||||||||||||||||||||||||||||||||||
2577 | - | |||||||||||||||||||||||||||||||||||||
2578 | const QWidget *w = this; | - | ||||||||||||||||||||||||||||||||||||
2579 | do { | - | ||||||||||||||||||||||||||||||||||||
2580 | QPalette::ColorRole role = w->d_func()->bg_role; | - | ||||||||||||||||||||||||||||||||||||
2581 | if (role != QPalette::NoRole
| 0 | ||||||||||||||||||||||||||||||||||||
2582 | return never executed: role;return role; never executed: return role; | 0 | ||||||||||||||||||||||||||||||||||||
2583 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2584 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
2585 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
2586 | } never executed: while (wend of block
| 0 | ||||||||||||||||||||||||||||||||||||
2587 | return never executed: QPalette::Window;return QPalette::Window; never executed: return QPalette::Window; | 0 | ||||||||||||||||||||||||||||||||||||
2588 | } | - | ||||||||||||||||||||||||||||||||||||
2589 | void QWidget::setBackgroundRole(QPalette::ColorRole role) | - | ||||||||||||||||||||||||||||||||||||
2590 | { | - | ||||||||||||||||||||||||||||||||||||
2591 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2592 | d->bg_role = role; | - | ||||||||||||||||||||||||||||||||||||
2593 | d->updateSystemBackground(); | - | ||||||||||||||||||||||||||||||||||||
2594 | d->propagatePaletteChange(); | - | ||||||||||||||||||||||||||||||||||||
2595 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
2596 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2597 | QPalette::ColorRole QWidget::foregroundRole() const | - | ||||||||||||||||||||||||||||||||||||
2598 | { | - | ||||||||||||||||||||||||||||||||||||
2599 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2600 | QPalette::ColorRole rl = QPalette::ColorRole(d->fg_role); | - | ||||||||||||||||||||||||||||||||||||
2601 | if (rl != QPalette::NoRole
| 0 | ||||||||||||||||||||||||||||||||||||
2602 | return never executed: rl;return rl; never executed: return rl; | 0 | ||||||||||||||||||||||||||||||||||||
2603 | QPalette::ColorRole role = QPalette::WindowText; | - | ||||||||||||||||||||||||||||||||||||
2604 | switch (backgroundRole()) { | - | ||||||||||||||||||||||||||||||||||||
2605 | case never executed: QPalette::Button:case QPalette::Button: never executed: case QPalette::Button: | 0 | ||||||||||||||||||||||||||||||||||||
2606 | role = QPalette::ButtonText; | - | ||||||||||||||||||||||||||||||||||||
2607 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
2608 | case never executed: QPalette::Base:case QPalette::Base: never executed: case QPalette::Base: | 0 | ||||||||||||||||||||||||||||||||||||
2609 | role = QPalette::Text; | - | ||||||||||||||||||||||||||||||||||||
2610 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
2611 | case never executed: QPalette::Dark:case QPalette::Dark: never executed: case QPalette::Dark: | 0 | ||||||||||||||||||||||||||||||||||||
2612 | case never executed: QPalette::Shadow:case QPalette::Shadow: never executed: case QPalette::Shadow: | 0 | ||||||||||||||||||||||||||||||||||||
2613 | role = QPalette::Light; | - | ||||||||||||||||||||||||||||||||||||
2614 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
2615 | case never executed: QPalette::Highlight:case QPalette::Highlight: never executed: case QPalette::Highlight: | 0 | ||||||||||||||||||||||||||||||||||||
2616 | role = QPalette::HighlightedText; | - | ||||||||||||||||||||||||||||||||||||
2617 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
2618 | case never executed: QPalette::ToolTipBase:case QPalette::ToolTipBase: never executed: case QPalette::ToolTipBase: | 0 | ||||||||||||||||||||||||||||||||||||
2619 | role = QPalette::ToolTipText; | - | ||||||||||||||||||||||||||||||||||||
2620 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
2621 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
2622 | ; | - | ||||||||||||||||||||||||||||||||||||
2623 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2624 | return never executed: role;return role; never executed: return role; | 0 | ||||||||||||||||||||||||||||||||||||
2625 | } | - | ||||||||||||||||||||||||||||||||||||
2626 | void QWidget::setForegroundRole(QPalette::ColorRole role) | - | ||||||||||||||||||||||||||||||||||||
2627 | { | - | ||||||||||||||||||||||||||||||||||||
2628 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2629 | d->fg_role = role; | - | ||||||||||||||||||||||||||||||||||||
2630 | d->updateSystemBackground(); | - | ||||||||||||||||||||||||||||||||||||
2631 | d->propagatePaletteChange(); | - | ||||||||||||||||||||||||||||||||||||
2632 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2633 | const QPalette &QWidget::palette() const | - | ||||||||||||||||||||||||||||||||||||
2634 | { | - | ||||||||||||||||||||||||||||||||||||
2635 | if (!isEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
2636 | data->pal.setCurrentColorGroup(QPalette::Disabled); | - | ||||||||||||||||||||||||||||||||||||
2637 | } never executed: else if ((!isVisible()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
2638 | - | |||||||||||||||||||||||||||||||||||||
2639 | - | |||||||||||||||||||||||||||||||||||||
2640 | - | |||||||||||||||||||||||||||||||||||||
2641 | ) { | - | ||||||||||||||||||||||||||||||||||||
2642 | data->pal.setCurrentColorGroup(QPalette::Active); | - | ||||||||||||||||||||||||||||||||||||
2643 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
2644 | - | |||||||||||||||||||||||||||||||||||||
2645 | - | |||||||||||||||||||||||||||||||||||||
2646 | - | |||||||||||||||||||||||||||||||||||||
2647 | - | |||||||||||||||||||||||||||||||||||||
2648 | - | |||||||||||||||||||||||||||||||||||||
2649 | - | |||||||||||||||||||||||||||||||||||||
2650 | data->pal.setCurrentColorGroup(QPalette::Inactive); | - | ||||||||||||||||||||||||||||||||||||
2651 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2652 | return never executed: data->pal;return data->pal; never executed: return data->pal; | 0 | ||||||||||||||||||||||||||||||||||||
2653 | } | - | ||||||||||||||||||||||||||||||||||||
2654 | - | |||||||||||||||||||||||||||||||||||||
2655 | void QWidget::setPalette(const QPalette &palette) | - | ||||||||||||||||||||||||||||||||||||
2656 | { | - | ||||||||||||||||||||||||||||||||||||
2657 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2658 | setAttribute(Qt::WA_SetPalette, palette.resolve() != 0); | - | ||||||||||||||||||||||||||||||||||||
2659 | - | |||||||||||||||||||||||||||||||||||||
2660 | - | |||||||||||||||||||||||||||||||||||||
2661 | - | |||||||||||||||||||||||||||||||||||||
2662 | - | |||||||||||||||||||||||||||||||||||||
2663 | - | |||||||||||||||||||||||||||||||||||||
2664 | QPalette naturalPalette = d->naturalWidgetPalette(d->inheritedPaletteResolveMask); | - | ||||||||||||||||||||||||||||||||||||
2665 | QPalette resolvedPalette = palette.resolve(naturalPalette); | - | ||||||||||||||||||||||||||||||||||||
2666 | d->setPalette_helper(resolvedPalette); | - | ||||||||||||||||||||||||||||||||||||
2667 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2668 | QPalette QWidgetPrivate::naturalWidgetPalette(uint inheritedMask) const | - | ||||||||||||||||||||||||||||||||||||
2669 | { | - | ||||||||||||||||||||||||||||||||||||
2670 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2671 | QPalette naturalPalette = QApplication::palette(q); | - | ||||||||||||||||||||||||||||||||||||
2672 | if (!q->testAttribute(Qt::WA_StyleSheet)
| 0 | ||||||||||||||||||||||||||||||||||||
2673 | && (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2674 | - | |||||||||||||||||||||||||||||||||||||
2675 | || (extra
| 0 | ||||||||||||||||||||||||||||||||||||
2676 | - | |||||||||||||||||||||||||||||||||||||
2677 | )) { | - | ||||||||||||||||||||||||||||||||||||
2678 | if (QWidget *p = q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
2679 | if (!p->testAttribute(Qt::WA_StyleSheet)
| 0 | ||||||||||||||||||||||||||||||||||||
2680 | if (!naturalPalette.isCopyOf(QApplication::palette())
| 0 | ||||||||||||||||||||||||||||||||||||
2681 | QPalette inheritedPalette = p->palette(); | - | ||||||||||||||||||||||||||||||||||||
2682 | inheritedPalette.resolve(inheritedMask); | - | ||||||||||||||||||||||||||||||||||||
2683 | naturalPalette = inheritedPalette.resolve(naturalPalette); | - | ||||||||||||||||||||||||||||||||||||
2684 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
2685 | naturalPalette = p->palette(); | - | ||||||||||||||||||||||||||||||||||||
2686 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2687 | } | - | ||||||||||||||||||||||||||||||||||||
2688 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2689 | - | |||||||||||||||||||||||||||||||||||||
2690 | else if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
2691 | QPalette inheritedPalette = extra->proxyWidget->palette(); | - | ||||||||||||||||||||||||||||||||||||
2692 | inheritedPalette.resolve(inheritedMask); | - | ||||||||||||||||||||||||||||||||||||
2693 | naturalPalette = inheritedPalette.resolve(naturalPalette); | - | ||||||||||||||||||||||||||||||||||||
2694 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2695 | - | |||||||||||||||||||||||||||||||||||||
2696 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2697 | naturalPalette.resolve(0); | - | ||||||||||||||||||||||||||||||||||||
2698 | return never executed: naturalPalette;return naturalPalette; never executed: return naturalPalette; | 0 | ||||||||||||||||||||||||||||||||||||
2699 | } | - | ||||||||||||||||||||||||||||||||||||
2700 | void QWidgetPrivate::resolvePalette() | - | ||||||||||||||||||||||||||||||||||||
2701 | { | - | ||||||||||||||||||||||||||||||||||||
2702 | QPalette naturalPalette = naturalWidgetPalette(inheritedPaletteResolveMask); | - | ||||||||||||||||||||||||||||||||||||
2703 | QPalette resolvedPalette = data.pal.resolve(naturalPalette); | - | ||||||||||||||||||||||||||||||||||||
2704 | setPalette_helper(resolvedPalette); | - | ||||||||||||||||||||||||||||||||||||
2705 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2706 | - | |||||||||||||||||||||||||||||||||||||
2707 | void QWidgetPrivate::setPalette_helper(const QPalette &palette) | - | ||||||||||||||||||||||||||||||||||||
2708 | { | - | ||||||||||||||||||||||||||||||||||||
2709 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2710 | if (data.pal == palette
| 0 | ||||||||||||||||||||||||||||||||||||
2711 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2712 | data.pal = palette; | - | ||||||||||||||||||||||||||||||||||||
2713 | updateSystemBackground(); | - | ||||||||||||||||||||||||||||||||||||
2714 | propagatePaletteChange(); | - | ||||||||||||||||||||||||||||||||||||
2715 | updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
2716 | q->update(); | - | ||||||||||||||||||||||||||||||||||||
2717 | updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
2718 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2719 | - | |||||||||||||||||||||||||||||||||||||
2720 | void QWidgetPrivate::updateSystemBackground() | - | ||||||||||||||||||||||||||||||||||||
2721 | { | - | ||||||||||||||||||||||||||||||||||||
2722 | } | - | ||||||||||||||||||||||||||||||||||||
2723 | void QWidget::setFont(const QFont &font) | - | ||||||||||||||||||||||||||||||||||||
2724 | { | - | ||||||||||||||||||||||||||||||||||||
2725 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2726 | - | |||||||||||||||||||||||||||||||||||||
2727 | - | |||||||||||||||||||||||||||||||||||||
2728 | const QStyleSheetStyle* style; | - | ||||||||||||||||||||||||||||||||||||
2729 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
2730 | style->saveWidgetFont(this, font); | - | ||||||||||||||||||||||||||||||||||||
2731 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2732 | - | |||||||||||||||||||||||||||||||||||||
2733 | - | |||||||||||||||||||||||||||||||||||||
2734 | setAttribute(Qt::WA_SetFont, font.resolve() != 0); | - | ||||||||||||||||||||||||||||||||||||
2735 | - | |||||||||||||||||||||||||||||||||||||
2736 | - | |||||||||||||||||||||||||||||||||||||
2737 | - | |||||||||||||||||||||||||||||||||||||
2738 | - | |||||||||||||||||||||||||||||||||||||
2739 | - | |||||||||||||||||||||||||||||||||||||
2740 | QFont naturalFont = d->naturalWidgetFont(d->inheritedFontResolveMask); | - | ||||||||||||||||||||||||||||||||||||
2741 | QFont resolvedFont = font.resolve(naturalFont); | - | ||||||||||||||||||||||||||||||||||||
2742 | d->setFont_helper(resolvedFont); | - | ||||||||||||||||||||||||||||||||||||
2743 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2744 | QFont QWidgetPrivate::naturalWidgetFont(uint inheritedMask) const | - | ||||||||||||||||||||||||||||||||||||
2745 | { | - | ||||||||||||||||||||||||||||||||||||
2746 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2747 | QFont naturalFont = QApplication::font(q); | - | ||||||||||||||||||||||||||||||||||||
2748 | if (!q->testAttribute(Qt::WA_StyleSheet)
| 0 | ||||||||||||||||||||||||||||||||||||
2749 | && (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2750 | - | |||||||||||||||||||||||||||||||||||||
2751 | || (extra
| 0 | ||||||||||||||||||||||||||||||||||||
2752 | - | |||||||||||||||||||||||||||||||||||||
2753 | )) { | - | ||||||||||||||||||||||||||||||||||||
2754 | if (QWidget *p = q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
2755 | if (!p->testAttribute(Qt::WA_StyleSheet)
| 0 | ||||||||||||||||||||||||||||||||||||
2756 | if (!naturalFont.isCopyOf(QApplication::font())
| 0 | ||||||||||||||||||||||||||||||||||||
2757 | if (inheritedMask != 0
| 0 | ||||||||||||||||||||||||||||||||||||
2758 | QFont inheritedFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||
2759 | inheritedFont.resolve(inheritedMask); | - | ||||||||||||||||||||||||||||||||||||
2760 | naturalFont = inheritedFont.resolve(naturalFont); | - | ||||||||||||||||||||||||||||||||||||
2761 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2762 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
2763 | naturalFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||
2764 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2765 | } | - | ||||||||||||||||||||||||||||||||||||
2766 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2767 | - | |||||||||||||||||||||||||||||||||||||
2768 | else if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
2769 | if (inheritedMask != 0
| 0 | ||||||||||||||||||||||||||||||||||||
2770 | QFont inheritedFont = extra->proxyWidget->font(); | - | ||||||||||||||||||||||||||||||||||||
2771 | inheritedFont.resolve(inheritedMask); | - | ||||||||||||||||||||||||||||||||||||
2772 | naturalFont = inheritedFont.resolve(naturalFont); | - | ||||||||||||||||||||||||||||||||||||
2773 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2774 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2775 | - | |||||||||||||||||||||||||||||||||||||
2776 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2777 | naturalFont.resolve(0); | - | ||||||||||||||||||||||||||||||||||||
2778 | return never executed: naturalFont;return naturalFont; never executed: return naturalFont; | 0 | ||||||||||||||||||||||||||||||||||||
2779 | } | - | ||||||||||||||||||||||||||||||||||||
2780 | void QWidgetPrivate::resolveFont() | - | ||||||||||||||||||||||||||||||||||||
2781 | { | - | ||||||||||||||||||||||||||||||||||||
2782 | QFont naturalFont = naturalWidgetFont(inheritedFontResolveMask); | - | ||||||||||||||||||||||||||||||||||||
2783 | QFont resolvedFont = data.fnt.resolve(naturalFont); | - | ||||||||||||||||||||||||||||||||||||
2784 | setFont_helper(resolvedFont); | - | ||||||||||||||||||||||||||||||||||||
2785 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2786 | void QWidgetPrivate::updateFont(const QFont &font) | - | ||||||||||||||||||||||||||||||||||||
2787 | { | - | ||||||||||||||||||||||||||||||||||||
2788 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2789 | - | |||||||||||||||||||||||||||||||||||||
2790 | const QStyleSheetStyle* cssStyle; | - | ||||||||||||||||||||||||||||||||||||
2791 | cssStyle = extra
| 0 | ||||||||||||||||||||||||||||||||||||
2792 | - | |||||||||||||||||||||||||||||||||||||
2793 | - | |||||||||||||||||||||||||||||||||||||
2794 | data.fnt = QFont(font, q); | - | ||||||||||||||||||||||||||||||||||||
2795 | - | |||||||||||||||||||||||||||||||||||||
2796 | - | |||||||||||||||||||||||||||||||||||||
2797 | - | |||||||||||||||||||||||||||||||||||||
2798 | - | |||||||||||||||||||||||||||||||||||||
2799 | - | |||||||||||||||||||||||||||||||||||||
2800 | - | |||||||||||||||||||||||||||||||||||||
2801 | if (!q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
2802 | QGraphicsProxyWidget *p = extra->proxyWidget; | - | ||||||||||||||||||||||||||||||||||||
2803 | inheritedFontResolveMask = p->d_func()->inheritedFontResolveMask | p->font().resolve(); | - | ||||||||||||||||||||||||||||||||||||
2804 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
2805 | - | |||||||||||||||||||||||||||||||||||||
2806 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2807 | inheritedFontResolveMask = 0; | - | ||||||||||||||||||||||||||||||||||||
2808 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2809 | uint newMask = data.fnt.resolve() | inheritedFontResolveMask; | - | ||||||||||||||||||||||||||||||||||||
2810 | - | |||||||||||||||||||||||||||||||||||||
2811 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
2812 | QWidget *w = qobject_cast<QWidget*>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
2813 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
2814 | if (0) { dead code: { } | - | ||||||||||||||||||||||||||||||||||||
2815 | - | |||||||||||||||||||||||||||||||||||||
2816 | } dead code: else if (w->testAttribute(Qt::WA_StyleSheet){ }
| - | ||||||||||||||||||||||||||||||||||||
2817 | - | |||||||||||||||||||||||||||||||||||||
2818 | if (cssStyle
| 0 | ||||||||||||||||||||||||||||||||||||
2819 | cssStyle->updateStyleSheetFont(w); never executed: cssStyle->updateStyleSheetFont(w); | 0 | ||||||||||||||||||||||||||||||||||||
2820 | - | |||||||||||||||||||||||||||||||||||||
2821 | } never executed: else if ((!w->isWindow()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
2822 | - | |||||||||||||||||||||||||||||||||||||
2823 | QWidgetPrivate *wd = w->d_func(); | - | ||||||||||||||||||||||||||||||||||||
2824 | wd->inheritedFontResolveMask = newMask; | - | ||||||||||||||||||||||||||||||||||||
2825 | wd->resolveFont(); | - | ||||||||||||||||||||||||||||||||||||
2826 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2827 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2828 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2829 | - | |||||||||||||||||||||||||||||||||||||
2830 | - | |||||||||||||||||||||||||||||||||||||
2831 | if (cssStyle
| 0 | ||||||||||||||||||||||||||||||||||||
2832 | cssStyle->updateStyleSheetFont(q); | - | ||||||||||||||||||||||||||||||||||||
2833 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2834 | - | |||||||||||||||||||||||||||||||||||||
2835 | - | |||||||||||||||||||||||||||||||||||||
2836 | QEvent e(QEvent::FontChange); | - | ||||||||||||||||||||||||||||||||||||
2837 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
2838 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2839 | - | |||||||||||||||||||||||||||||||||||||
2840 | void QWidgetPrivate::setLayoutDirection_helper(Qt::LayoutDirection direction) | - | ||||||||||||||||||||||||||||||||||||
2841 | { | - | ||||||||||||||||||||||||||||||||||||
2842 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2843 | - | |||||||||||||||||||||||||||||||||||||
2844 | if ( (
| 0 | ||||||||||||||||||||||||||||||||||||
2845 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2846 | q->setAttribute(Qt::WA_RightToLeft, (direction == Qt::RightToLeft)); | - | ||||||||||||||||||||||||||||||||||||
2847 | if (!children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
2848 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
2849 | QWidget *w = qobject_cast<QWidget*>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
2850 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
2851 | w->d_func()->setLayoutDirection_helper(direction); never executed: w->d_func()->setLayoutDirection_helper(direction); | 0 | ||||||||||||||||||||||||||||||||||||
2852 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2853 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2854 | QEvent e(QEvent::LayoutDirectionChange); | - | ||||||||||||||||||||||||||||||||||||
2855 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
2856 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2857 | - | |||||||||||||||||||||||||||||||||||||
2858 | void QWidgetPrivate::resolveLayoutDirection() | - | ||||||||||||||||||||||||||||||||||||
2859 | { | - | ||||||||||||||||||||||||||||||||||||
2860 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2861 | if (!q->testAttribute(Qt::WA_SetLayoutDirection)
| 0 | ||||||||||||||||||||||||||||||||||||
2862 | setLayoutDirection_helper(q->isWindow() ? QApplication::layoutDirection() : q->parentWidget()->layoutDirection()); never executed: setLayoutDirection_helper(q->isWindow() ? QApplication::layoutDirection() : q->parentWidget()->layoutDirection()); | 0 | ||||||||||||||||||||||||||||||||||||
2863 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2864 | void QWidget::setLayoutDirection(Qt::LayoutDirection direction) | - | ||||||||||||||||||||||||||||||||||||
2865 | { | - | ||||||||||||||||||||||||||||||||||||
2866 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2867 | - | |||||||||||||||||||||||||||||||||||||
2868 | if (direction == Qt::LayoutDirectionAuto
| 0 | ||||||||||||||||||||||||||||||||||||
2869 | unsetLayoutDirection(); | - | ||||||||||||||||||||||||||||||||||||
2870 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2871 | } | - | ||||||||||||||||||||||||||||||||||||
2872 | - | |||||||||||||||||||||||||||||||||||||
2873 | setAttribute(Qt::WA_SetLayoutDirection); | - | ||||||||||||||||||||||||||||||||||||
2874 | d->setLayoutDirection_helper(direction); | - | ||||||||||||||||||||||||||||||||||||
2875 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2876 | - | |||||||||||||||||||||||||||||||||||||
2877 | Qt::LayoutDirection QWidget::layoutDirection() const | - | ||||||||||||||||||||||||||||||||||||
2878 | { | - | ||||||||||||||||||||||||||||||||||||
2879 | return never executed: testAttribute(Qt::WA_RightToLeft)return testAttribute(Qt::WA_RightToLeft) ? Qt::RightToLeft : Qt::LeftToRight;
never executed: return testAttribute(Qt::WA_RightToLeft) ? Qt::RightToLeft : Qt::LeftToRight; | 0 | ||||||||||||||||||||||||||||||||||||
2880 | } | - | ||||||||||||||||||||||||||||||||||||
2881 | - | |||||||||||||||||||||||||||||||||||||
2882 | void QWidget::unsetLayoutDirection() | - | ||||||||||||||||||||||||||||||||||||
2883 | { | - | ||||||||||||||||||||||||||||||||||||
2884 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2885 | setAttribute(Qt::WA_SetLayoutDirection, false); | - | ||||||||||||||||||||||||||||||||||||
2886 | d->resolveLayoutDirection(); | - | ||||||||||||||||||||||||||||||||||||
2887 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2888 | QCursor QWidget::cursor() const | - | ||||||||||||||||||||||||||||||||||||
2889 | { | - | ||||||||||||||||||||||||||||||||||||
2890 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2891 | if (testAttribute(Qt::WA_SetCursor)
| 0 | ||||||||||||||||||||||||||||||||||||
2892 | return never executed: (d->extrareturn (d->extra && d->extra->curs) ? *d->extra->curs : QCursor(Qt::ArrowCursor);
never executed: return (d->extra && d->extra->curs) ? *d->extra->curs : QCursor(Qt::ArrowCursor); | 0 | ||||||||||||||||||||||||||||||||||||
2893 | ? *d->extra->curs never executed: return (d->extra && d->extra->curs) ? *d->extra->curs : QCursor(Qt::ArrowCursor); | 0 | ||||||||||||||||||||||||||||||||||||
2894 | : QCursor(Qt::ArrowCursor); never executed: return (d->extra && d->extra->curs) ? *d->extra->curs : QCursor(Qt::ArrowCursor); | 0 | ||||||||||||||||||||||||||||||||||||
2895 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2896 | return never executed: QCursor(Qt::ArrowCursor);return QCursor(Qt::ArrowCursor); never executed: return QCursor(Qt::ArrowCursor); | 0 | ||||||||||||||||||||||||||||||||||||
2897 | return never executed: parentWidget()->cursor();return parentWidget()->cursor(); never executed: return parentWidget()->cursor(); | 0 | ||||||||||||||||||||||||||||||||||||
2898 | } | - | ||||||||||||||||||||||||||||||||||||
2899 | - | |||||||||||||||||||||||||||||||||||||
2900 | void QWidget::setCursor(const QCursor &cursor) | - | ||||||||||||||||||||||||||||||||||||
2901 | { | - | ||||||||||||||||||||||||||||||||||||
2902 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2903 | - | |||||||||||||||||||||||||||||||||||||
2904 | - | |||||||||||||||||||||||||||||||||||||
2905 | if (cursor.shape() != Qt::ArrowCursor
| 0 | ||||||||||||||||||||||||||||||||||||
2906 | || (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
2907 | - | |||||||||||||||||||||||||||||||||||||
2908 | { | - | ||||||||||||||||||||||||||||||||||||
2909 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
2910 | QCursor *newCursor = new QCursor(cursor); | - | ||||||||||||||||||||||||||||||||||||
2911 | delete d->extra->curs; | - | ||||||||||||||||||||||||||||||||||||
2912 | d->extra->curs = newCursor; | - | ||||||||||||||||||||||||||||||||||||
2913 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2914 | setAttribute(Qt::WA_SetCursor); | - | ||||||||||||||||||||||||||||||||||||
2915 | d->setCursor_sys(cursor); | - | ||||||||||||||||||||||||||||||||||||
2916 | - | |||||||||||||||||||||||||||||||||||||
2917 | QEvent event(QEvent::CursorChange); | - | ||||||||||||||||||||||||||||||||||||
2918 | QApplication::sendEvent(this, &event); | - | ||||||||||||||||||||||||||||||||||||
2919 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2920 | - | |||||||||||||||||||||||||||||||||||||
2921 | void QWidgetPrivate::setCursor_sys(const QCursor &cursor) | - | ||||||||||||||||||||||||||||||||||||
2922 | { | - | ||||||||||||||||||||||||||||||||||||
2923 | (void)cursor;; | - | ||||||||||||||||||||||||||||||||||||
2924 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2925 | qt_qpa_set_cursor(q, false); | - | ||||||||||||||||||||||||||||||||||||
2926 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2927 | - | |||||||||||||||||||||||||||||||||||||
2928 | void QWidget::unsetCursor() | - | ||||||||||||||||||||||||||||||||||||
2929 | { | - | ||||||||||||||||||||||||||||||||||||
2930 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
2931 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
2932 | delete d->extra->curs; | - | ||||||||||||||||||||||||||||||||||||
2933 | d->extra->curs = 0; | - | ||||||||||||||||||||||||||||||||||||
2934 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2935 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2936 | setAttribute(Qt::WA_SetCursor, false); never executed: setAttribute(Qt::WA_SetCursor, false); | 0 | ||||||||||||||||||||||||||||||||||||
2937 | d->unsetCursor_sys(); | - | ||||||||||||||||||||||||||||||||||||
2938 | - | |||||||||||||||||||||||||||||||||||||
2939 | QEvent event(QEvent::CursorChange); | - | ||||||||||||||||||||||||||||||||||||
2940 | QApplication::sendEvent(this, &event); | - | ||||||||||||||||||||||||||||||||||||
2941 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2942 | - | |||||||||||||||||||||||||||||||||||||
2943 | void QWidgetPrivate::unsetCursor_sys() | - | ||||||||||||||||||||||||||||||||||||
2944 | { | - | ||||||||||||||||||||||||||||||||||||
2945 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
2946 | qt_qpa_set_cursor(q, false); | - | ||||||||||||||||||||||||||||||||||||
2947 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2948 | - | |||||||||||||||||||||||||||||||||||||
2949 | static inline void applyCursor(QWidget *w, QCursor c) | - | ||||||||||||||||||||||||||||||||||||
2950 | { | - | ||||||||||||||||||||||||||||||||||||
2951 | if (QWindow *window = w->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
2952 | window->setCursor(c); never executed: window->setCursor(c); | 0 | ||||||||||||||||||||||||||||||||||||
2953 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2954 | - | |||||||||||||||||||||||||||||||||||||
2955 | static inline void unsetCursor(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
2956 | { | - | ||||||||||||||||||||||||||||||||||||
2957 | if (QWindow *window = w->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
2958 | window->unsetCursor(); never executed: window->unsetCursor(); | 0 | ||||||||||||||||||||||||||||||||||||
2959 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2960 | - | |||||||||||||||||||||||||||||||||||||
2961 | void qt_qpa_set_cursor(QWidget *w, bool force) | - | ||||||||||||||||||||||||||||||||||||
2962 | { | - | ||||||||||||||||||||||||||||||||||||
2963 | if (!w->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
2964 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2965 | - | |||||||||||||||||||||||||||||||||||||
2966 | static QPointer<QWidget> lastUnderMouse = 0; | - | ||||||||||||||||||||||||||||||||||||
2967 | if (force
| 0 | ||||||||||||||||||||||||||||||||||||
2968 | lastUnderMouse = w; | - | ||||||||||||||||||||||||||||||||||||
2969 | } never executed: else if (lastUnderMouseend of block
| 0 | ||||||||||||||||||||||||||||||||||||
2970 | const WId lastWinId = lastUnderMouse->effectiveWinId(); | - | ||||||||||||||||||||||||||||||||||||
2971 | const WId winId = w->effectiveWinId(); | - | ||||||||||||||||||||||||||||||||||||
2972 | if (lastWinId
| 0 | ||||||||||||||||||||||||||||||||||||
2973 | w = lastUnderMouse; never executed: w = lastUnderMouse; | 0 | ||||||||||||||||||||||||||||||||||||
2974 | } never executed: else if (!w->internalWinId()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
2975 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2976 | } | - | ||||||||||||||||||||||||||||||||||||
2977 | - | |||||||||||||||||||||||||||||||||||||
2978 | while (!w->internalWinId()
| 0 | ||||||||||||||||||||||||||||||||||||
2979 | && !w->testAttribute(Qt::WA_SetCursor)
| 0 | ||||||||||||||||||||||||||||||||||||
2980 | w = w->parentWidget(); never executed: w = w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||
2981 | - | |||||||||||||||||||||||||||||||||||||
2982 | QWidget *nativeParent = w; | - | ||||||||||||||||||||||||||||||||||||
2983 | if (!w->internalWinId()
| 0 | ||||||||||||||||||||||||||||||||||||
2984 | nativeParent = w->nativeParentWidget(); never executed: nativeParent = w->nativeParentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||
2985 | if (!nativeParent
| 0 | ||||||||||||||||||||||||||||||||||||
2986 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
2987 | - | |||||||||||||||||||||||||||||||||||||
2988 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
2989 | if (w->isEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
2990 | applyCursor(nativeParent, w->cursor()); never executed: applyCursor(nativeParent, w->cursor()); | 0 | ||||||||||||||||||||||||||||||||||||
2991 | else | - | ||||||||||||||||||||||||||||||||||||
2992 | - | |||||||||||||||||||||||||||||||||||||
2993 | - | |||||||||||||||||||||||||||||||||||||
2994 | unsetCursor(nativeParent); never executed: unsetCursor(nativeParent); | 0 | ||||||||||||||||||||||||||||||||||||
2995 | } else { | - | ||||||||||||||||||||||||||||||||||||
2996 | unsetCursor(nativeParent); | - | ||||||||||||||||||||||||||||||||||||
2997 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2998 | } | - | ||||||||||||||||||||||||||||||||||||
2999 | void QWidget::render(QPaintDevice *target, const QPoint &targetOffset, | - | ||||||||||||||||||||||||||||||||||||
3000 | const QRegion &sourceRegion, RenderFlags renderFlags) | - | ||||||||||||||||||||||||||||||||||||
3001 | { | - | ||||||||||||||||||||||||||||||||||||
3002 | QPainter p(target); | - | ||||||||||||||||||||||||||||||||||||
3003 | render(&p, targetOffset, sourceRegion, renderFlags); | - | ||||||||||||||||||||||||||||||||||||
3004 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3005 | void QWidget::render(QPainter *painter, const QPoint &targetOffset, | - | ||||||||||||||||||||||||||||||||||||
3006 | const QRegion &sourceRegion, RenderFlags renderFlags) | - | ||||||||||||||||||||||||||||||||||||
3007 | { | - | ||||||||||||||||||||||||||||||||||||
3008 | if (!painter
| 0 | ||||||||||||||||||||||||||||||||||||
3009 | QMessageLogger(__FILE__, 5131, __PRETTY_FUNCTION__).warning("QWidget::render: Null pointer to painter"); | - | ||||||||||||||||||||||||||||||||||||
3010 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3011 | } | - | ||||||||||||||||||||||||||||||||||||
3012 | - | |||||||||||||||||||||||||||||||||||||
3013 | if (!painter->isActive()
| 0 | ||||||||||||||||||||||||||||||||||||
3014 | QMessageLogger(__FILE__, 5136, __PRETTY_FUNCTION__).warning("QWidget::render: Cannot render with an inactive painter"); | - | ||||||||||||||||||||||||||||||||||||
3015 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3016 | } | - | ||||||||||||||||||||||||||||||||||||
3017 | - | |||||||||||||||||||||||||||||||||||||
3018 | const qreal opacity = painter->opacity(); | - | ||||||||||||||||||||||||||||||||||||
3019 | if (qFuzzyIsNull(opacity)
| 0 | ||||||||||||||||||||||||||||||||||||
3020 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3021 | - | |||||||||||||||||||||||||||||||||||||
3022 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3023 | const bool inRenderWithPainter = d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3024 | const QRegion toBePainted = !inRenderWithPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3025 | : sourceRegion; | - | ||||||||||||||||||||||||||||||||||||
3026 | if (toBePainted.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3027 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3028 | - | |||||||||||||||||||||||||||||||||||||
3029 | if (!d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3030 | d->createExtra(); never executed: d->createExtra(); | 0 | ||||||||||||||||||||||||||||||||||||
3031 | d->extra->inRenderWithPainter = true; | - | ||||||||||||||||||||||||||||||||||||
3032 | - | |||||||||||||||||||||||||||||||||||||
3033 | QPaintEngine *engine = painter->paintEngine(); | - | ||||||||||||||||||||||||||||||||||||
3034 | ((!(engine)) ? qt_assert("engine",__FILE__,5156) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3035 | QPaintEnginePrivate *enginePriv = engine->d_func(); | - | ||||||||||||||||||||||||||||||||||||
3036 | ((!(enginePriv)) ? qt_assert("enginePriv",__FILE__,5158) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3037 | QPaintDevice *target = engine->paintDevice(); | - | ||||||||||||||||||||||||||||||||||||
3038 | ((!(target)) ? qt_assert("target",__FILE__,5160) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3039 | - | |||||||||||||||||||||||||||||||||||||
3040 | - | |||||||||||||||||||||||||||||||||||||
3041 | if (!inRenderWithPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3042 | d->render_helper(painter, targetOffset, toBePainted, renderFlags); | - | ||||||||||||||||||||||||||||||||||||
3043 | d->extra->inRenderWithPainter = inRenderWithPainter; | - | ||||||||||||||||||||||||||||||||||||
3044 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3045 | } | - | ||||||||||||||||||||||||||||||||||||
3046 | - | |||||||||||||||||||||||||||||||||||||
3047 | - | |||||||||||||||||||||||||||||||||||||
3048 | QPainter *oldPainter = d->sharedPainter(); | - | ||||||||||||||||||||||||||||||||||||
3049 | d->setSharedPainter(painter); | - | ||||||||||||||||||||||||||||||||||||
3050 | - | |||||||||||||||||||||||||||||||||||||
3051 | - | |||||||||||||||||||||||||||||||||||||
3052 | const QTransform oldTransform = enginePriv->systemTransform; | - | ||||||||||||||||||||||||||||||||||||
3053 | const QRegion oldSystemClip = enginePriv->systemClip; | - | ||||||||||||||||||||||||||||||||||||
3054 | const QRegion oldSystemViewport = enginePriv->systemViewport; | - | ||||||||||||||||||||||||||||||||||||
3055 | - | |||||||||||||||||||||||||||||||||||||
3056 | - | |||||||||||||||||||||||||||||||||||||
3057 | if (painter->hasClipping()
| 0 | ||||||||||||||||||||||||||||||||||||
3058 | const QRegion painterClip = painter->deviceTransform().map(painter->clipRegion()); | - | ||||||||||||||||||||||||||||||||||||
3059 | enginePriv->setSystemViewport(oldSystemClip.isEmpty() ? painterClip : oldSystemClip & painterClip); | - | ||||||||||||||||||||||||||||||||||||
3060 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3061 | enginePriv->setSystemViewport(oldSystemClip); | - | ||||||||||||||||||||||||||||||||||||
3062 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3063 | - | |||||||||||||||||||||||||||||||||||||
3064 | d->render(target, targetOffset, toBePainted, renderFlags); | - | ||||||||||||||||||||||||||||||||||||
3065 | - | |||||||||||||||||||||||||||||||||||||
3066 | - | |||||||||||||||||||||||||||||||||||||
3067 | enginePriv->systemClip = oldSystemClip; | - | ||||||||||||||||||||||||||||||||||||
3068 | enginePriv->setSystemViewport(oldSystemViewport); | - | ||||||||||||||||||||||||||||||||||||
3069 | enginePriv->setSystemTransform(oldTransform); | - | ||||||||||||||||||||||||||||||||||||
3070 | - | |||||||||||||||||||||||||||||||||||||
3071 | - | |||||||||||||||||||||||||||||||||||||
3072 | d->setSharedPainter(oldPainter); | - | ||||||||||||||||||||||||||||||||||||
3073 | - | |||||||||||||||||||||||||||||||||||||
3074 | d->extra->inRenderWithPainter = inRenderWithPainter; | - | ||||||||||||||||||||||||||||||||||||
3075 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3076 | - | |||||||||||||||||||||||||||||||||||||
3077 | static void sendResizeEvents(QWidget *target) | - | ||||||||||||||||||||||||||||||||||||
3078 | { | - | ||||||||||||||||||||||||||||||||||||
3079 | QResizeEvent e(target->size(), QSize()); | - | ||||||||||||||||||||||||||||||||||||
3080 | QApplication::sendEvent(target, &e); | - | ||||||||||||||||||||||||||||||||||||
3081 | - | |||||||||||||||||||||||||||||||||||||
3082 | const QObjectList children = target->children(); | - | ||||||||||||||||||||||||||||||||||||
3083 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
3084 | if (!children.at(i)->isWidgetType()
| 0 | ||||||||||||||||||||||||||||||||||||
3085 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
3086 | QWidget *child = static_cast<QWidget*>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
3087 | if (!child->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
3088 | sendResizeEvents(child); never executed: sendResizeEvents(child); | 0 | ||||||||||||||||||||||||||||||||||||
3089 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3090 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3091 | QPixmap QWidget::grab(const QRect &rectangle) | - | ||||||||||||||||||||||||||||||||||||
3092 | { | - | ||||||||||||||||||||||||||||||||||||
3093 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3094 | if (testAttribute(Qt::WA_PendingResizeEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
3095 | sendResizeEvents(this); never executed: sendResizeEvents(this); | 0 | ||||||||||||||||||||||||||||||||||||
3096 | - | |||||||||||||||||||||||||||||||||||||
3097 | const QWidget::RenderFlags renderFlags = QWidget::DrawWindowBackground | QWidget::DrawChildren | QWidget::IgnoreMask; | - | ||||||||||||||||||||||||||||||||||||
3098 | - | |||||||||||||||||||||||||||||||||||||
3099 | const bool oldDirtyOpaqueChildren = d->dirtyOpaqueChildren; | - | ||||||||||||||||||||||||||||||||||||
3100 | QRect r(rectangle); | - | ||||||||||||||||||||||||||||||||||||
3101 | if (r.width() < 0
| 0 | ||||||||||||||||||||||||||||||||||||
3102 | - | |||||||||||||||||||||||||||||||||||||
3103 | - | |||||||||||||||||||||||||||||||||||||
3104 | r = d->prepareToRender(QRegion(), renderFlags).boundingRect(); | - | ||||||||||||||||||||||||||||||||||||
3105 | r.setTopLeft(rectangle.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
3106 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3107 | - | |||||||||||||||||||||||||||||||||||||
3108 | if (!r.intersects(rect())
| 0 | ||||||||||||||||||||||||||||||||||||
3109 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||||||||||||||
3110 | - | |||||||||||||||||||||||||||||||||||||
3111 | const qreal dpr = devicePixelRatioF(); | - | ||||||||||||||||||||||||||||||||||||
3112 | QPixmap res((QSizeF(r.size()) * dpr).toSize()); | - | ||||||||||||||||||||||||||||||||||||
3113 | res.setDevicePixelRatio(dpr); | - | ||||||||||||||||||||||||||||||||||||
3114 | if (!d->isOpaque
| 0 | ||||||||||||||||||||||||||||||||||||
3115 | res.fill(Qt::transparent); never executed: res.fill(Qt::transparent); | 0 | ||||||||||||||||||||||||||||||||||||
3116 | d->render(&res, QPoint(), QRegion(r), renderFlags); | - | ||||||||||||||||||||||||||||||||||||
3117 | - | |||||||||||||||||||||||||||||||||||||
3118 | d->dirtyOpaqueChildren = oldDirtyOpaqueChildren; | - | ||||||||||||||||||||||||||||||||||||
3119 | return never executed: res;return res; never executed: return res; | 0 | ||||||||||||||||||||||||||||||||||||
3120 | } | - | ||||||||||||||||||||||||||||||||||||
3121 | QGraphicsEffect *QWidget::graphicsEffect() const | - | ||||||||||||||||||||||||||||||||||||
3122 | { | - | ||||||||||||||||||||||||||||||||||||
3123 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3124 | return never executed: d->graphicsEffect;return d->graphicsEffect; never executed: return d->graphicsEffect; | 0 | ||||||||||||||||||||||||||||||||||||
3125 | } | - | ||||||||||||||||||||||||||||||||||||
3126 | void QWidget::setGraphicsEffect(QGraphicsEffect *effect) | - | ||||||||||||||||||||||||||||||||||||
3127 | { | - | ||||||||||||||||||||||||||||||||||||
3128 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3129 | if (d->graphicsEffect == effect
| 0 | ||||||||||||||||||||||||||||||||||||
3130 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3131 | - | |||||||||||||||||||||||||||||||||||||
3132 | if (d->graphicsEffect
| 0 | ||||||||||||||||||||||||||||||||||||
3133 | d->invalidateBuffer(rect()); | - | ||||||||||||||||||||||||||||||||||||
3134 | delete d->graphicsEffect; | - | ||||||||||||||||||||||||||||||||||||
3135 | d->graphicsEffect = 0; | - | ||||||||||||||||||||||||||||||||||||
3136 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3137 | - | |||||||||||||||||||||||||||||||||||||
3138 | if (effect
| 0 | ||||||||||||||||||||||||||||||||||||
3139 | - | |||||||||||||||||||||||||||||||||||||
3140 | QGraphicsEffectSourcePrivate *sourced = new QWidgetEffectSourcePrivate(this); | - | ||||||||||||||||||||||||||||||||||||
3141 | QGraphicsEffectSource *source = new QGraphicsEffectSource(*sourced); | - | ||||||||||||||||||||||||||||||||||||
3142 | d->graphicsEffect = effect; | - | ||||||||||||||||||||||||||||||||||||
3143 | effect->d_func()->setGraphicsEffectSource(source); | - | ||||||||||||||||||||||||||||||||||||
3144 | update(); | - | ||||||||||||||||||||||||||||||||||||
3145 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3146 | - | |||||||||||||||||||||||||||||||||||||
3147 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
3148 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3149 | - | |||||||||||||||||||||||||||||||||||||
3150 | - | |||||||||||||||||||||||||||||||||||||
3151 | bool QWidgetPrivate::isAboutToShow() const | - | ||||||||||||||||||||||||||||||||||||
3152 | { | - | ||||||||||||||||||||||||||||||||||||
3153 | if (data.in_show
| 0 | ||||||||||||||||||||||||||||||||||||
3154 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
3155 | - | |||||||||||||||||||||||||||||||||||||
3156 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3157 | if (q->isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
3158 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
3159 | - | |||||||||||||||||||||||||||||||||||||
3160 | - | |||||||||||||||||||||||||||||||||||||
3161 | QWidget *parent = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
3162 | return never executed: parentreturn parent ? parent->d_func()->isAboutToShow() : false;
never executed: return parent ? parent->d_func()->isAboutToShow() : false; | 0 | ||||||||||||||||||||||||||||||||||||
3163 | } | - | ||||||||||||||||||||||||||||||||||||
3164 | - | |||||||||||||||||||||||||||||||||||||
3165 | QRegion QWidgetPrivate::prepareToRender(const QRegion ®ion, QWidget::RenderFlags renderFlags) | - | ||||||||||||||||||||||||||||||||||||
3166 | { | - | ||||||||||||||||||||||||||||||||||||
3167 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3168 | const bool isVisible = q->isVisible(); | - | ||||||||||||||||||||||||||||||||||||
3169 | - | |||||||||||||||||||||||||||||||||||||
3170 | - | |||||||||||||||||||||||||||||||||||||
3171 | if (!isVisible
| 0 | ||||||||||||||||||||||||||||||||||||
3172 | QWidget *topLevel = q->window(); | - | ||||||||||||||||||||||||||||||||||||
3173 | (void)topLevel->d_func()->topData(); | - | ||||||||||||||||||||||||||||||||||||
3174 | topLevel->ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
3175 | - | |||||||||||||||||||||||||||||||||||||
3176 | - | |||||||||||||||||||||||||||||||||||||
3177 | - | |||||||||||||||||||||||||||||||||||||
3178 | QWidget *widget = q; | - | ||||||||||||||||||||||||||||||||||||
3179 | QWidgetList hiddenWidgets; | - | ||||||||||||||||||||||||||||||||||||
3180 | while (widget
| 0 | ||||||||||||||||||||||||||||||||||||
3181 | if (widget->isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
3182 | widget->setAttribute(Qt::WA_WState_Hidden, false); | - | ||||||||||||||||||||||||||||||||||||
3183 | hiddenWidgets.append(widget); | - | ||||||||||||||||||||||||||||||||||||
3184 | if (!widget->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
3185 | widget->d_func()->updateGeometry_helper(true); never executed: widget->d_func()->updateGeometry_helper(true); | 0 | ||||||||||||||||||||||||||||||||||||
3186 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3187 | widget = widget->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
3188 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3189 | - | |||||||||||||||||||||||||||||||||||||
3190 | - | |||||||||||||||||||||||||||||||||||||
3191 | if (topLevel->d_func()->layout
| 0 | ||||||||||||||||||||||||||||||||||||
3192 | topLevel->d_func()->layout->activate(); never executed: topLevel->d_func()->layout->activate(); | 0 | ||||||||||||||||||||||||||||||||||||
3193 | - | |||||||||||||||||||||||||||||||||||||
3194 | - | |||||||||||||||||||||||||||||||||||||
3195 | QTLWExtra *topLevelExtra = topLevel->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
3196 | if (topLevelExtra
| 0 | ||||||||||||||||||||||||||||||||||||
3197 | && !topLevel->testAttribute(Qt::WA_Resized)
| 0 | ||||||||||||||||||||||||||||||||||||
3198 | topLevel->adjustSize(); | - | ||||||||||||||||||||||||||||||||||||
3199 | topLevel->setAttribute(Qt::WA_Resized, false); | - | ||||||||||||||||||||||||||||||||||||
3200 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3201 | - | |||||||||||||||||||||||||||||||||||||
3202 | - | |||||||||||||||||||||||||||||||||||||
3203 | topLevel->d_func()->activateChildLayoutsRecursively(); | - | ||||||||||||||||||||||||||||||||||||
3204 | - | |||||||||||||||||||||||||||||||||||||
3205 | - | |||||||||||||||||||||||||||||||||||||
3206 | for (int i = 0; i < hiddenWidgets.size()
| 0 | ||||||||||||||||||||||||||||||||||||
3207 | QWidget *widget = hiddenWidgets.at(i); | - | ||||||||||||||||||||||||||||||||||||
3208 | widget->setAttribute(Qt::WA_WState_Hidden); | - | ||||||||||||||||||||||||||||||||||||
3209 | if (!widget->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
3210 | widget->parentWidget()->d_func()->layout->invalidate(); never executed: widget->parentWidget()->d_func()->layout->invalidate(); | 0 | ||||||||||||||||||||||||||||||||||||
3211 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3212 | } never executed: else if (isVisibleend of block
| 0 | ||||||||||||||||||||||||||||||||||||
3213 | q->window()->d_func()->sendPendingMoveAndResizeEvents(true, true); | - | ||||||||||||||||||||||||||||||||||||
3214 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3215 | - | |||||||||||||||||||||||||||||||||||||
3216 | - | |||||||||||||||||||||||||||||||||||||
3217 | QRegion toBePainted = !region.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3218 | if (!(renderFlags & QWidget::IgnoreMask)
| 0 | ||||||||||||||||||||||||||||||||||||
3219 | toBePainted &= extra->mask; never executed: toBePainted &= extra->mask; | 0 | ||||||||||||||||||||||||||||||||||||
3220 | return never executed: toBePainted;return toBePainted; never executed: return toBePainted; | 0 | ||||||||||||||||||||||||||||||||||||
3221 | } | - | ||||||||||||||||||||||||||||||||||||
3222 | - | |||||||||||||||||||||||||||||||||||||
3223 | void QWidgetPrivate::render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &toBePainted, | - | ||||||||||||||||||||||||||||||||||||
3224 | QWidget::RenderFlags renderFlags) | - | ||||||||||||||||||||||||||||||||||||
3225 | { | - | ||||||||||||||||||||||||||||||||||||
3226 | ((!(painter)) ? qt_assert("painter",__FILE__,5400) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3227 | ((!(!toBePainted.isEmpty())) ? qt_assert("!toBePainted.isEmpty()",__FILE__,5401) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3228 | - | |||||||||||||||||||||||||||||||||||||
3229 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3230 | - | |||||||||||||||||||||||||||||||||||||
3231 | const QTransform originalTransform = painter->worldTransform(); | - | ||||||||||||||||||||||||||||||||||||
3232 | const bool useDeviceCoordinates = originalTransform.isScaling(); | - | ||||||||||||||||||||||||||||||||||||
3233 | if (!useDeviceCoordinates
| 0 | ||||||||||||||||||||||||||||||||||||
3234 | - | |||||||||||||||||||||||||||||||||||||
3235 | - | |||||||||||||||||||||||||||||||||||||
3236 | const QRect rect = toBePainted.boundingRect(); | - | ||||||||||||||||||||||||||||||||||||
3237 | const QSize size = rect.size(); | - | ||||||||||||||||||||||||||||||||||||
3238 | if (size.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
3239 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3240 | - | |||||||||||||||||||||||||||||||||||||
3241 | const qreal pixmapDevicePixelRatio = painter->device()->devicePixelRatioF(); | - | ||||||||||||||||||||||||||||||||||||
3242 | QPixmap pixmap(size * pixmapDevicePixelRatio); | - | ||||||||||||||||||||||||||||||||||||
3243 | pixmap.setDevicePixelRatio(pixmapDevicePixelRatio); | - | ||||||||||||||||||||||||||||||||||||
3244 | - | |||||||||||||||||||||||||||||||||||||
3245 | if (!(renderFlags & QWidget::DrawWindowBackground)
| 0 | ||||||||||||||||||||||||||||||||||||
3246 | pixmap.fill(Qt::transparent); never executed: pixmap.fill(Qt::transparent); | 0 | ||||||||||||||||||||||||||||||||||||
3247 | q->render(&pixmap, QPoint(), toBePainted, renderFlags); | - | ||||||||||||||||||||||||||||||||||||
3248 | - | |||||||||||||||||||||||||||||||||||||
3249 | const bool restore = !(painter->renderHints() & QPainter::SmoothPixmapTransform); | - | ||||||||||||||||||||||||||||||||||||
3250 | painter->setRenderHints(QPainter::SmoothPixmapTransform, true); | - | ||||||||||||||||||||||||||||||||||||
3251 | - | |||||||||||||||||||||||||||||||||||||
3252 | painter->drawPixmap(targetOffset, pixmap); | - | ||||||||||||||||||||||||||||||||||||
3253 | - | |||||||||||||||||||||||||||||||||||||
3254 | if (restore
| 0 | ||||||||||||||||||||||||||||||||||||
3255 | painter->setRenderHints(QPainter::SmoothPixmapTransform, false); never executed: painter->setRenderHints(QPainter::SmoothPixmapTransform, false); | 0 | ||||||||||||||||||||||||||||||||||||
3256 | - | |||||||||||||||||||||||||||||||||||||
3257 | - | |||||||||||||||||||||||||||||||||||||
3258 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3259 | - | |||||||||||||||||||||||||||||||||||||
3260 | QTransform transform = originalTransform; | - | ||||||||||||||||||||||||||||||||||||
3261 | transform.translate(targetOffset.x(), targetOffset.y()); | - | ||||||||||||||||||||||||||||||||||||
3262 | - | |||||||||||||||||||||||||||||||||||||
3263 | QPaintDevice *device = painter->device(); | - | ||||||||||||||||||||||||||||||||||||
3264 | ((!(device)) ? qt_assert("device",__FILE__,5438) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3265 | - | |||||||||||||||||||||||||||||||||||||
3266 | - | |||||||||||||||||||||||||||||||||||||
3267 | const QRectF rect(toBePainted.boundingRect()); | - | ||||||||||||||||||||||||||||||||||||
3268 | QRect deviceRect = transform.mapRect(QRectF(0, 0, rect.width(), rect.height())).toAlignedRect(); | - | ||||||||||||||||||||||||||||||||||||
3269 | deviceRect &= QRect(0, 0, device->width(), device->height()); | - | ||||||||||||||||||||||||||||||||||||
3270 | - | |||||||||||||||||||||||||||||||||||||
3271 | QPixmap pixmap(deviceRect.size()); | - | ||||||||||||||||||||||||||||||||||||
3272 | pixmap.fill(Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||
3273 | - | |||||||||||||||||||||||||||||||||||||
3274 | - | |||||||||||||||||||||||||||||||||||||
3275 | QPainter pixmapPainter(&pixmap); | - | ||||||||||||||||||||||||||||||||||||
3276 | pixmapPainter.setRenderHints(painter->renderHints()); | - | ||||||||||||||||||||||||||||||||||||
3277 | transform *= QTransform::fromTranslate(-deviceRect.x(), -deviceRect.y()); | - | ||||||||||||||||||||||||||||||||||||
3278 | pixmapPainter.setTransform(transform); | - | ||||||||||||||||||||||||||||||||||||
3279 | - | |||||||||||||||||||||||||||||||||||||
3280 | q->render(&pixmapPainter, QPoint(), toBePainted, renderFlags); | - | ||||||||||||||||||||||||||||||||||||
3281 | pixmapPainter.end(); | - | ||||||||||||||||||||||||||||||||||||
3282 | - | |||||||||||||||||||||||||||||||||||||
3283 | - | |||||||||||||||||||||||||||||||||||||
3284 | painter->setTransform(QTransform()); | - | ||||||||||||||||||||||||||||||||||||
3285 | painter->drawPixmap(deviceRect.topLeft(), pixmap); | - | ||||||||||||||||||||||||||||||||||||
3286 | painter->setTransform(originalTransform); | - | ||||||||||||||||||||||||||||||||||||
3287 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3288 | - | |||||||||||||||||||||||||||||||||||||
3289 | } | - | ||||||||||||||||||||||||||||||||||||
3290 | - | |||||||||||||||||||||||||||||||||||||
3291 | void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, | - | ||||||||||||||||||||||||||||||||||||
3292 | QPainter *sharedPainter, QWidgetBackingStore *backingStore) | - | ||||||||||||||||||||||||||||||||||||
3293 | { | - | ||||||||||||||||||||||||||||||||||||
3294 | if (rgn.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3295 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3296 | - | |||||||||||||||||||||||||||||||||||||
3297 | const bool asRoot = flags & DrawAsRoot; | - | ||||||||||||||||||||||||||||||||||||
3298 | bool onScreen = paintOnScreen(); | - | ||||||||||||||||||||||||||||||||||||
3299 | - | |||||||||||||||||||||||||||||||||||||
3300 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3301 | - | |||||||||||||||||||||||||||||||||||||
3302 | if (graphicsEffect
| 0 | ||||||||||||||||||||||||||||||||||||
3303 | QGraphicsEffectSource *source = graphicsEffect->d_func()->source; | - | ||||||||||||||||||||||||||||||||||||
3304 | QWidgetEffectSourcePrivate *sourced = static_cast<QWidgetEffectSourcePrivate *> | - | ||||||||||||||||||||||||||||||||||||
3305 | (source->d_func()); | - | ||||||||||||||||||||||||||||||||||||
3306 | if (!sourced->context
| 0 | ||||||||||||||||||||||||||||||||||||
3307 | QWidgetPaintContext context(pdev, rgn, offset, flags, sharedPainter, backingStore); | - | ||||||||||||||||||||||||||||||||||||
3308 | sourced->context = &context; | - | ||||||||||||||||||||||||||||||||||||
3309 | if (!sharedPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3310 | setSystemClip(pdev, rgn.translated(offset)); | - | ||||||||||||||||||||||||||||||||||||
3311 | QPainter p(pdev); | - | ||||||||||||||||||||||||||||||||||||
3312 | p.translate(offset); | - | ||||||||||||||||||||||||||||||||||||
3313 | context.painter = &p; | - | ||||||||||||||||||||||||||||||||||||
3314 | graphicsEffect->draw(&p); | - | ||||||||||||||||||||||||||||||||||||
3315 | setSystemClip(pdev, QRegion()); | - | ||||||||||||||||||||||||||||||||||||
3316 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3317 | context.painter = sharedPainter; | - | ||||||||||||||||||||||||||||||||||||
3318 | if (sharedPainter->worldTransform() != sourced->lastEffectTransform
| 0 | ||||||||||||||||||||||||||||||||||||
3319 | sourced->invalidateCache(); | - | ||||||||||||||||||||||||||||||||||||
3320 | sourced->lastEffectTransform = sharedPainter->worldTransform(); | - | ||||||||||||||||||||||||||||||||||||
3321 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3322 | sharedPainter->save(); | - | ||||||||||||||||||||||||||||||||||||
3323 | sharedPainter->translate(offset); | - | ||||||||||||||||||||||||||||||||||||
3324 | graphicsEffect->draw(sharedPainter); | - | ||||||||||||||||||||||||||||||||||||
3325 | sharedPainter->restore(); | - | ||||||||||||||||||||||||||||||||||||
3326 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3327 | sourced->context = 0; | - | ||||||||||||||||||||||||||||||||||||
3328 | - | |||||||||||||||||||||||||||||||||||||
3329 | - | |||||||||||||||||||||||||||||||||||||
3330 | - | |||||||||||||||||||||||||||||||||||||
3331 | if (backingStore
| 0 | ||||||||||||||||||||||||||||||||||||
3332 | backingStore->markDirtyOnScreen(rgn, q, offset); never executed: backingStore->markDirtyOnScreen(rgn, q, offset); | 0 | ||||||||||||||||||||||||||||||||||||
3333 | - | |||||||||||||||||||||||||||||||||||||
3334 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3335 | } | - | ||||||||||||||||||||||||||||||||||||
3336 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3337 | - | |||||||||||||||||||||||||||||||||||||
3338 | - | |||||||||||||||||||||||||||||||||||||
3339 | const bool alsoOnScreen = flags & DrawPaintOnScreen; | - | ||||||||||||||||||||||||||||||||||||
3340 | const bool recursive = flags & DrawRecursive; | - | ||||||||||||||||||||||||||||||||||||
3341 | const bool alsoInvisible = flags & DrawInvisible; | - | ||||||||||||||||||||||||||||||||||||
3342 | - | |||||||||||||||||||||||||||||||||||||
3343 | ((!(sharedPainter ? sharedPainter->isActive() : true)) ? qt_assert("sharedPainter ? sharedPainter->isActive() : true",__FILE__,5517) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3344 | - | |||||||||||||||||||||||||||||||||||||
3345 | QRegion toBePainted(rgn); | - | ||||||||||||||||||||||||||||||||||||
3346 | if (asRoot
| 0 | ||||||||||||||||||||||||||||||||||||
3347 | toBePainted &= clipRect(); never executed: toBePainted &= clipRect(); | 0 | ||||||||||||||||||||||||||||||||||||
3348 | if (!(flags & DontSubtractOpaqueChildren)
| 0 | ||||||||||||||||||||||||||||||||||||
3349 | subtractOpaqueChildren(toBePainted, q->rect()); never executed: subtractOpaqueChildren(toBePainted, q->rect()); | 0 | ||||||||||||||||||||||||||||||||||||
3350 | - | |||||||||||||||||||||||||||||||||||||
3351 | if (!toBePainted.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3352 | if (!onScreen
| 0 | ||||||||||||||||||||||||||||||||||||
3353 | - | |||||||||||||||||||||||||||||||||||||
3354 | if (q->testAttribute(Qt::WA_WState_InPaintEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
3355 | QMessageLogger(__FILE__, 5529, __PRETTY_FUNCTION__).warning("QWidget::repaint: Recursive repaint detected"); never executed: QMessageLogger(__FILE__, 5529, __PRETTY_FUNCTION__).warning("QWidget::repaint: Recursive repaint detected"); | 0 | ||||||||||||||||||||||||||||||||||||
3356 | q->setAttribute(Qt::WA_WState_InPaintEvent); | - | ||||||||||||||||||||||||||||||||||||
3357 | - | |||||||||||||||||||||||||||||||||||||
3358 | - | |||||||||||||||||||||||||||||||||||||
3359 | - | |||||||||||||||||||||||||||||||||||||
3360 | bool flushed = QWidgetBackingStore::flushPaint(q, toBePainted); | - | ||||||||||||||||||||||||||||||||||||
3361 | - | |||||||||||||||||||||||||||||||||||||
3362 | QPaintEngine *paintEngine = pdev->paintEngine(); | - | ||||||||||||||||||||||||||||||||||||
3363 | if (paintEngine
| 0 | ||||||||||||||||||||||||||||||||||||
3364 | setRedirected(pdev, -offset); | - | ||||||||||||||||||||||||||||||||||||
3365 | if (sharedPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3366 | setSystemClip(pdev, toBePainted); never executed: setSystemClip(pdev, toBePainted); | 0 | ||||||||||||||||||||||||||||||||||||
3367 | else | - | ||||||||||||||||||||||||||||||||||||
3368 | paintEngine->d_func()->systemRect = q->data->crect; never executed: paintEngine->d_func()->systemRect = q->data->crect; | 0 | ||||||||||||||||||||||||||||||||||||
3369 | - | |||||||||||||||||||||||||||||||||||||
3370 | - | |||||||||||||||||||||||||||||||||||||
3371 | if ((asRoot
| 0 | ||||||||||||||||||||||||||||||||||||
3372 | && !q->testAttribute(Qt::WA_OpaquePaintEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
3373 | - | |||||||||||||||||||||||||||||||||||||
3374 | beginBackingStorePainting(); | - | ||||||||||||||||||||||||||||||||||||
3375 | - | |||||||||||||||||||||||||||||||||||||
3376 | QPainter p(q); | - | ||||||||||||||||||||||||||||||||||||
3377 | paintBackground(&p, toBePainted, (asRoot || onScreen) ? flags | DrawAsRoot : 0); | - | ||||||||||||||||||||||||||||||||||||
3378 | - | |||||||||||||||||||||||||||||||||||||
3379 | endBackingStorePainting(); | - | ||||||||||||||||||||||||||||||||||||
3380 | - | |||||||||||||||||||||||||||||||||||||
3381 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3382 | - | |||||||||||||||||||||||||||||||||||||
3383 | if (!sharedPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3384 | setSystemClip(pdev, toBePainted.translated(offset)); never executed: setSystemClip(pdev, toBePainted.translated(offset)); | 0 | ||||||||||||||||||||||||||||||||||||
3385 | - | |||||||||||||||||||||||||||||||||||||
3386 | if (!onScreen
| 0 | ||||||||||||||||||||||||||||||||||||
3387 | - | |||||||||||||||||||||||||||||||||||||
3388 | beginBackingStorePainting(); | - | ||||||||||||||||||||||||||||||||||||
3389 | - | |||||||||||||||||||||||||||||||||||||
3390 | QPainter p(q); | - | ||||||||||||||||||||||||||||||||||||
3391 | QColor tint = q->palette().window().color(); | - | ||||||||||||||||||||||||||||||||||||
3392 | tint.setAlphaF(qreal(.6)); | - | ||||||||||||||||||||||||||||||||||||
3393 | p.fillRect(toBePainted.boundingRect(), tint); | - | ||||||||||||||||||||||||||||||||||||
3394 | - | |||||||||||||||||||||||||||||||||||||
3395 | endBackingStorePainting(); | - | ||||||||||||||||||||||||||||||||||||
3396 | - | |||||||||||||||||||||||||||||||||||||
3397 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3398 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3399 | - | |||||||||||||||||||||||||||||||||||||
3400 | - | |||||||||||||||||||||||||||||||||||||
3401 | - | |||||||||||||||||||||||||||||||||||||
3402 | - | |||||||||||||||||||||||||||||||||||||
3403 | - | |||||||||||||||||||||||||||||||||||||
3404 | - | |||||||||||||||||||||||||||||||||||||
3405 | - | |||||||||||||||||||||||||||||||||||||
3406 | bool skipPaintEvent = false; | - | ||||||||||||||||||||||||||||||||||||
3407 | - | |||||||||||||||||||||||||||||||||||||
3408 | if (renderToTexture
| 0 | ||||||||||||||||||||||||||||||||||||
3409 | - | |||||||||||||||||||||||||||||||||||||
3410 | - | |||||||||||||||||||||||||||||||||||||
3411 | if (!q->testAttribute(Qt::WA_AlwaysStackOnTop)
| 0 | ||||||||||||||||||||||||||||||||||||
3412 | beginBackingStorePainting(); | - | ||||||||||||||||||||||||||||||||||||
3413 | if (backingStore
| 0 | ||||||||||||||||||||||||||||||||||||
3414 | QPainter p(q); | - | ||||||||||||||||||||||||||||||||||||
3415 | p.setCompositionMode(QPainter::CompositionMode_Source); | - | ||||||||||||||||||||||||||||||||||||
3416 | p.fillRect(q->rect(), Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||
3417 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3418 | QImage img = grabFramebuffer(); | - | ||||||||||||||||||||||||||||||||||||
3419 | QPainter p(q); | - | ||||||||||||||||||||||||||||||||||||
3420 | - | |||||||||||||||||||||||||||||||||||||
3421 | p.drawImage(q->rect(), img); | - | ||||||||||||||||||||||||||||||||||||
3422 | skipPaintEvent = true; | - | ||||||||||||||||||||||||||||||||||||
3423 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3424 | endBackingStorePainting(); | - | ||||||||||||||||||||||||||||||||||||
3425 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3426 | if (renderToTextureReallyDirty
| 0 | ||||||||||||||||||||||||||||||||||||
3427 | renderToTextureReallyDirty = 0; never executed: renderToTextureReallyDirty = 0; | 0 | ||||||||||||||||||||||||||||||||||||
3428 | else | - | ||||||||||||||||||||||||||||||||||||
3429 | skipPaintEvent = true; never executed: skipPaintEvent = true; | 0 | ||||||||||||||||||||||||||||||||||||
3430 | } | - | ||||||||||||||||||||||||||||||||||||
3431 | - | |||||||||||||||||||||||||||||||||||||
3432 | - | |||||||||||||||||||||||||||||||||||||
3433 | if (!skipPaintEvent
| 0 | ||||||||||||||||||||||||||||||||||||
3434 | - | |||||||||||||||||||||||||||||||||||||
3435 | sendPaintEvent(toBePainted); | - | ||||||||||||||||||||||||||||||||||||
3436 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3437 | - | |||||||||||||||||||||||||||||||||||||
3438 | - | |||||||||||||||||||||||||||||||||||||
3439 | if (backingStore
| 0 | ||||||||||||||||||||||||||||||||||||
3440 | backingStore->markDirtyOnScreen(toBePainted, q, offset); never executed: backingStore->markDirtyOnScreen(toBePainted, q, offset); | 0 | ||||||||||||||||||||||||||||||||||||
3441 | - | |||||||||||||||||||||||||||||||||||||
3442 | - | |||||||||||||||||||||||||||||||||||||
3443 | if (paintEngine
| 0 | ||||||||||||||||||||||||||||||||||||
3444 | - | |||||||||||||||||||||||||||||||||||||
3445 | - | |||||||||||||||||||||||||||||||||||||
3446 | - | |||||||||||||||||||||||||||||||||||||
3447 | - | |||||||||||||||||||||||||||||||||||||
3448 | restoreRedirected(); | - | ||||||||||||||||||||||||||||||||||||
3449 | if (!sharedPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3450 | paintEngine->d_func()->systemRect = QRect(); never executed: paintEngine->d_func()->systemRect = QRect(); | 0 | ||||||||||||||||||||||||||||||||||||
3451 | else | - | ||||||||||||||||||||||||||||||||||||
3452 | paintEngine->d_func()->currentClipDevice = 0; never executed: paintEngine->d_func()->currentClipDevice = 0; | 0 | ||||||||||||||||||||||||||||||||||||
3453 | - | |||||||||||||||||||||||||||||||||||||
3454 | setSystemClip(pdev, QRegion()); | - | ||||||||||||||||||||||||||||||||||||
3455 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3456 | q->setAttribute(Qt::WA_WState_InPaintEvent, false); | - | ||||||||||||||||||||||||||||||||||||
3457 | if (q->paintingActive()
| 0 | ||||||||||||||||||||||||||||||||||||
3458 | QMessageLogger(__FILE__, 5642, __PRETTY_FUNCTION__).warning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent"); never executed: QMessageLogger(__FILE__, 5642, __PRETTY_FUNCTION__).warning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent"); | 0 | ||||||||||||||||||||||||||||||||||||
3459 | - | |||||||||||||||||||||||||||||||||||||
3460 | if (paintEngine
| 0 | ||||||||||||||||||||||||||||||||||||
3461 | delete paintEngine; | - | ||||||||||||||||||||||||||||||||||||
3462 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3463 | - | |||||||||||||||||||||||||||||||||||||
3464 | - | |||||||||||||||||||||||||||||||||||||
3465 | if (flushed
| 0 | ||||||||||||||||||||||||||||||||||||
3466 | QWidgetBackingStore::unflushPaint(q, toBePainted); never executed: QWidgetBackingStore::unflushPaint(q, toBePainted); | 0 | ||||||||||||||||||||||||||||||||||||
3467 | - | |||||||||||||||||||||||||||||||||||||
3468 | } never executed: else if (q->isWindow()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
3469 | QPaintEngine *engine = pdev->paintEngine(); | - | ||||||||||||||||||||||||||||||||||||
3470 | if (engine
| 0 | ||||||||||||||||||||||||||||||||||||
3471 | QPainter p(pdev); | - | ||||||||||||||||||||||||||||||||||||
3472 | p.setClipRegion(toBePainted); | - | ||||||||||||||||||||||||||||||||||||
3473 | const QBrush bg = q->palette().brush(QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||
3474 | if (bg.style() == Qt::TexturePattern
| 0 | ||||||||||||||||||||||||||||||||||||
3475 | p.drawTiledPixmap(q->rect(), bg.texture()); never executed: p.drawTiledPixmap(q->rect(), bg.texture()); | 0 | ||||||||||||||||||||||||||||||||||||
3476 | else | - | ||||||||||||||||||||||||||||||||||||
3477 | p.fillRect(q->rect(), bg); never executed: p.fillRect(q->rect(), bg); | 0 | ||||||||||||||||||||||||||||||||||||
3478 | - | |||||||||||||||||||||||||||||||||||||
3479 | if (engine->autoDestruct()
| 0 | ||||||||||||||||||||||||||||||||||||
3480 | delete engine; never executed: delete engine; | 0 | ||||||||||||||||||||||||||||||||||||
3481 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3482 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3483 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3484 | - | |||||||||||||||||||||||||||||||||||||
3485 | if (recursive
| 0 | ||||||||||||||||||||||||||||||||||||
3486 | paintSiblingsRecursive(pdev, children, children.size() - 1, rgn, offset, flags & ~DrawAsRoot | - | ||||||||||||||||||||||||||||||||||||
3487 | , sharedPainter, backingStore); | - | ||||||||||||||||||||||||||||||||||||
3488 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3489 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3490 | - | |||||||||||||||||||||||||||||||||||||
3491 | void QWidgetPrivate::sendPaintEvent(const QRegion &toBePainted) | - | ||||||||||||||||||||||||||||||||||||
3492 | { | - | ||||||||||||||||||||||||||||||||||||
3493 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3494 | QPaintEvent e(toBePainted); | - | ||||||||||||||||||||||||||||||||||||
3495 | QCoreApplication::sendSpontaneousEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
3496 | - | |||||||||||||||||||||||||||||||||||||
3497 | - | |||||||||||||||||||||||||||||||||||||
3498 | if (renderToTexture
| 0 | ||||||||||||||||||||||||||||||||||||
3499 | resolveSamples(); never executed: resolveSamples(); | 0 | ||||||||||||||||||||||||||||||||||||
3500 | - | |||||||||||||||||||||||||||||||||||||
3501 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3502 | - | |||||||||||||||||||||||||||||||||||||
3503 | void QWidgetPrivate::render(QPaintDevice *target, const QPoint &targetOffset, | - | ||||||||||||||||||||||||||||||||||||
3504 | const QRegion &sourceRegion, QWidget::RenderFlags renderFlags) | - | ||||||||||||||||||||||||||||||||||||
3505 | { | - | ||||||||||||||||||||||||||||||||||||
3506 | if (!target
| 0 | ||||||||||||||||||||||||||||||||||||
3507 | QMessageLogger(__FILE__, 5691, __PRETTY_FUNCTION__).warning("QWidget::render: null pointer to paint device"); | - | ||||||||||||||||||||||||||||||||||||
3508 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3509 | } | - | ||||||||||||||||||||||||||||||||||||
3510 | - | |||||||||||||||||||||||||||||||||||||
3511 | const bool inRenderWithPainter = extra
| 0 | ||||||||||||||||||||||||||||||||||||
3512 | QRegion paintRegion = !inRenderWithPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3513 | ? prepareToRender(sourceRegion, renderFlags) | - | ||||||||||||||||||||||||||||||||||||
3514 | : sourceRegion; | - | ||||||||||||||||||||||||||||||||||||
3515 | if (paintRegion.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3516 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3517 | - | |||||||||||||||||||||||||||||||||||||
3518 | - | |||||||||||||||||||||||||||||||||||||
3519 | QPainter *oldSharedPainter = inRenderWithPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3520 | - | |||||||||||||||||||||||||||||||||||||
3521 | - | |||||||||||||||||||||||||||||||||||||
3522 | - | |||||||||||||||||||||||||||||||||||||
3523 | if (target->devType() == QInternal::Widget
| 0 | ||||||||||||||||||||||||||||||||||||
3524 | QWidgetPrivate *targetPrivate = static_cast<QWidget *>(target)->d_func(); | - | ||||||||||||||||||||||||||||||||||||
3525 | if (targetPrivate->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3526 | QPainter *targetPainter = targetPrivate->sharedPainter(); | - | ||||||||||||||||||||||||||||||||||||
3527 | if (targetPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3528 | setSharedPainter(targetPainter); never executed: setSharedPainter(targetPainter); | 0 | ||||||||||||||||||||||||||||||||||||
3529 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3530 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3531 | - | |||||||||||||||||||||||||||||||||||||
3532 | - | |||||||||||||||||||||||||||||||||||||
3533 | - | |||||||||||||||||||||||||||||||||||||
3534 | - | |||||||||||||||||||||||||||||||||||||
3535 | - | |||||||||||||||||||||||||||||||||||||
3536 | QPoint offset = targetOffset; | - | ||||||||||||||||||||||||||||||||||||
3537 | offset -= paintRegion.boundingRect().topLeft(); | - | ||||||||||||||||||||||||||||||||||||
3538 | QPoint redirectionOffset; | - | ||||||||||||||||||||||||||||||||||||
3539 | QPaintDevice *redirected = 0; | - | ||||||||||||||||||||||||||||||||||||
3540 | - | |||||||||||||||||||||||||||||||||||||
3541 | if (target->devType() == QInternal::Widget
| 0 | ||||||||||||||||||||||||||||||||||||
3542 | redirected = static_cast<QWidget *>(target)->d_func()->redirected(&redirectionOffset); never executed: redirected = static_cast<QWidget *>(target)->d_func()->redirected(&redirectionOffset); | 0 | ||||||||||||||||||||||||||||||||||||
3543 | if (!redirected
| 0 | ||||||||||||||||||||||||||||||||||||
3544 | redirected = QPainter::redirected(target, &redirectionOffset); never executed: redirected = QPainter::redirected(target, &redirectionOffset); | 0 | ||||||||||||||||||||||||||||||||||||
3545 | - | |||||||||||||||||||||||||||||||||||||
3546 | if (redirected
| 0 | ||||||||||||||||||||||||||||||||||||
3547 | target = redirected; | - | ||||||||||||||||||||||||||||||||||||
3548 | offset -= redirectionOffset; | - | ||||||||||||||||||||||||||||||||||||
3549 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3550 | - | |||||||||||||||||||||||||||||||||||||
3551 | if (!inRenderWithPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3552 | if (QPaintEngine *targetEngine = target->paintEngine()
| 0 | ||||||||||||||||||||||||||||||||||||
3553 | const QRegion targetSystemClip = targetEngine->systemClip(); | - | ||||||||||||||||||||||||||||||||||||
3554 | if (!targetSystemClip.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3555 | paintRegion &= targetSystemClip.translated(-offset); never executed: paintRegion &= targetSystemClip.translated(-offset); | 0 | ||||||||||||||||||||||||||||||||||||
3556 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3557 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3558 | - | |||||||||||||||||||||||||||||||||||||
3559 | - | |||||||||||||||||||||||||||||||||||||
3560 | int flags = DrawPaintOnScreen | DrawInvisible; | - | ||||||||||||||||||||||||||||||||||||
3561 | if (renderFlags & QWidget::DrawWindowBackground
| 0 | ||||||||||||||||||||||||||||||||||||
3562 | flags |= DrawAsRoot; never executed: flags |= DrawAsRoot; | 0 | ||||||||||||||||||||||||||||||||||||
3563 | - | |||||||||||||||||||||||||||||||||||||
3564 | if (renderFlags & QWidget::DrawChildren
| 0 | ||||||||||||||||||||||||||||||||||||
3565 | flags |= DrawRecursive; never executed: flags |= DrawRecursive; | 0 | ||||||||||||||||||||||||||||||||||||
3566 | else | - | ||||||||||||||||||||||||||||||||||||
3567 | flags |= DontSubtractOpaqueChildren; never executed: flags |= DontSubtractOpaqueChildren; | 0 | ||||||||||||||||||||||||||||||||||||
3568 | - | |||||||||||||||||||||||||||||||||||||
3569 | flags |= DontSetCompositionMode; | - | ||||||||||||||||||||||||||||||||||||
3570 | - | |||||||||||||||||||||||||||||||||||||
3571 | - | |||||||||||||||||||||||||||||||||||||
3572 | drawWidget(target, paintRegion, offset, flags, sharedPainter()); | - | ||||||||||||||||||||||||||||||||||||
3573 | - | |||||||||||||||||||||||||||||||||||||
3574 | - | |||||||||||||||||||||||||||||||||||||
3575 | if (oldSharedPainter
| 0 | ||||||||||||||||||||||||||||||||||||
3576 | setSharedPainter(oldSharedPainter); never executed: setSharedPainter(oldSharedPainter); | 0 | ||||||||||||||||||||||||||||||||||||
3577 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3578 | - | |||||||||||||||||||||||||||||||||||||
3579 | void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectList& siblings, int index, const QRegion &rgn, | - | ||||||||||||||||||||||||||||||||||||
3580 | const QPoint &offset, int flags | - | ||||||||||||||||||||||||||||||||||||
3581 | , QPainter *sharedPainter, QWidgetBackingStore *backingStore) | - | ||||||||||||||||||||||||||||||||||||
3582 | { | - | ||||||||||||||||||||||||||||||||||||
3583 | QWidget *w = 0; | - | ||||||||||||||||||||||||||||||||||||
3584 | QRect boundingRect; | - | ||||||||||||||||||||||||||||||||||||
3585 | bool dirtyBoundingRect = true; | - | ||||||||||||||||||||||||||||||||||||
3586 | const bool exludeOpaqueChildren = (flags & DontDrawOpaqueChildren); | - | ||||||||||||||||||||||||||||||||||||
3587 | const bool excludeNativeChildren = (flags & DontDrawNativeChildren); | - | ||||||||||||||||||||||||||||||||||||
3588 | - | |||||||||||||||||||||||||||||||||||||
3589 | do { | - | ||||||||||||||||||||||||||||||||||||
3590 | QWidget *x = qobject_cast<QWidget*>(siblings.at(index)); | - | ||||||||||||||||||||||||||||||||||||
3591 | if (x
| 0 | ||||||||||||||||||||||||||||||||||||
3592 | && !(excludeNativeChildren
| 0 | ||||||||||||||||||||||||||||||||||||
3593 | if (dirtyBoundingRect
| 0 | ||||||||||||||||||||||||||||||||||||
3594 | boundingRect = rgn.boundingRect(); | - | ||||||||||||||||||||||||||||||||||||
3595 | dirtyBoundingRect = false; | - | ||||||||||||||||||||||||||||||||||||
3596 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3597 | - | |||||||||||||||||||||||||||||||||||||
3598 | if (qRectIntersects(boundingRect, x->d_func()->effectiveRectFor(x->data->crect))
| 0 | ||||||||||||||||||||||||||||||||||||
3599 | w = x; | - | ||||||||||||||||||||||||||||||||||||
3600 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
3601 | } | - | ||||||||||||||||||||||||||||||||||||
3602 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3603 | --index; | - | ||||||||||||||||||||||||||||||||||||
3604 | } never executed: while (index >= 0end of block
| 0 | ||||||||||||||||||||||||||||||||||||
3605 | - | |||||||||||||||||||||||||||||||||||||
3606 | if (!w
| 0 | ||||||||||||||||||||||||||||||||||||
3607 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3608 | - | |||||||||||||||||||||||||||||||||||||
3609 | QWidgetPrivate *wd = w->d_func(); | - | ||||||||||||||||||||||||||||||||||||
3610 | const QPoint widgetPos(w->data->crect.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
3611 | const bool hasMask = wd->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3612 | if (index > 0
| 0 | ||||||||||||||||||||||||||||||||||||
3613 | QRegion wr(rgn); | - | ||||||||||||||||||||||||||||||||||||
3614 | if (wd->isOpaque
| 0 | ||||||||||||||||||||||||||||||||||||
3615 | wr -= hasMask
never executed: wr -= hasMask ? wd->extra->mask.translated(widgetPos) : w->data->crect; | 0 | ||||||||||||||||||||||||||||||||||||
3616 | paintSiblingsRecursive(pdev, siblings, --index, wr, offset, flags | - | ||||||||||||||||||||||||||||||||||||
3617 | , sharedPainter, backingStore); | - | ||||||||||||||||||||||||||||||||||||
3618 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3619 | - | |||||||||||||||||||||||||||||||||||||
3620 | if (w->updatesEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
3621 | - | |||||||||||||||||||||||||||||||||||||
3622 | && (!w->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3623 | - | |||||||||||||||||||||||||||||||||||||
3624 | ) { | - | ||||||||||||||||||||||||||||||||||||
3625 | QRegion wRegion(rgn); | - | ||||||||||||||||||||||||||||||||||||
3626 | wRegion &= wd->effectiveRectFor(w->data->crect); | - | ||||||||||||||||||||||||||||||||||||
3627 | wRegion.translate(-widgetPos); | - | ||||||||||||||||||||||||||||||||||||
3628 | if (hasMask
| 0 | ||||||||||||||||||||||||||||||||||||
3629 | wRegion &= wd->extra->mask; never executed: wRegion &= wd->extra->mask; | 0 | ||||||||||||||||||||||||||||||||||||
3630 | wd->drawWidget(pdev, wRegion, offset + widgetPos, flags, sharedPainter, backingStore); | - | ||||||||||||||||||||||||||||||||||||
3631 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3632 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3633 | - | |||||||||||||||||||||||||||||||||||||
3634 | - | |||||||||||||||||||||||||||||||||||||
3635 | QRectF QWidgetEffectSourcePrivate::boundingRect(Qt::CoordinateSystem system) const | - | ||||||||||||||||||||||||||||||||||||
3636 | { | - | ||||||||||||||||||||||||||||||||||||
3637 | if (system != Qt::DeviceCoordinates
| 0 | ||||||||||||||||||||||||||||||||||||
3638 | return never executed: m_widget->rect();return m_widget->rect(); never executed: return m_widget->rect(); | 0 | ||||||||||||||||||||||||||||||||||||
3639 | - | |||||||||||||||||||||||||||||||||||||
3640 | if (!context
| 0 | ||||||||||||||||||||||||||||||||||||
3641 | - | |||||||||||||||||||||||||||||||||||||
3642 | QMessageLogger(__FILE__, 5826, __PRETTY_FUNCTION__).warning("QGraphicsEffectSource::boundingRect: Not yet implemented, lacking device context"); | - | ||||||||||||||||||||||||||||||||||||
3643 | return never executed: QRectF();return QRectF(); never executed: return QRectF(); | 0 | ||||||||||||||||||||||||||||||||||||
3644 | } | - | ||||||||||||||||||||||||||||||||||||
3645 | - | |||||||||||||||||||||||||||||||||||||
3646 | return never executed: context->painter->worldTransform().mapRect(m_widget->rect());return context->painter->worldTransform().mapRect(m_widget->rect()); never executed: return context->painter->worldTransform().mapRect(m_widget->rect()); | 0 | ||||||||||||||||||||||||||||||||||||
3647 | } | - | ||||||||||||||||||||||||||||||||||||
3648 | - | |||||||||||||||||||||||||||||||||||||
3649 | void QWidgetEffectSourcePrivate::draw(QPainter *painter) | - | ||||||||||||||||||||||||||||||||||||
3650 | { | - | ||||||||||||||||||||||||||||||||||||
3651 | if (!context
| 0 | ||||||||||||||||||||||||||||||||||||
3652 | m_widget->render(painter); | - | ||||||||||||||||||||||||||||||||||||
3653 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3654 | } | - | ||||||||||||||||||||||||||||||||||||
3655 | - | |||||||||||||||||||||||||||||||||||||
3656 | - | |||||||||||||||||||||||||||||||||||||
3657 | - | |||||||||||||||||||||||||||||||||||||
3658 | QRegion toBePainted = context->rgn; | - | ||||||||||||||||||||||||||||||||||||
3659 | toBePainted &= m_widget->rect(); | - | ||||||||||||||||||||||||||||||||||||
3660 | QWidgetPrivate *wd = qt_widget_private(m_widget); | - | ||||||||||||||||||||||||||||||||||||
3661 | if (wd->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3662 | toBePainted &= wd->extra->mask; never executed: toBePainted &= wd->extra->mask; | 0 | ||||||||||||||||||||||||||||||||||||
3663 | - | |||||||||||||||||||||||||||||||||||||
3664 | wd->drawWidget(context->pdev, toBePainted, context->offset, context->flags, | - | ||||||||||||||||||||||||||||||||||||
3665 | context->sharedPainter, context->backingStore); | - | ||||||||||||||||||||||||||||||||||||
3666 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3667 | - | |||||||||||||||||||||||||||||||||||||
3668 | QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *offset, | - | ||||||||||||||||||||||||||||||||||||
3669 | QGraphicsEffect::PixmapPadMode mode) const | - | ||||||||||||||||||||||||||||||||||||
3670 | { | - | ||||||||||||||||||||||||||||||||||||
3671 | const bool deviceCoordinates = (system == Qt::DeviceCoordinates); | - | ||||||||||||||||||||||||||||||||||||
3672 | if (!context
| 0 | ||||||||||||||||||||||||||||||||||||
3673 | - | |||||||||||||||||||||||||||||||||||||
3674 | QMessageLogger(__FILE__, 5858, __PRETTY_FUNCTION__).warning("QGraphicsEffectSource::pixmap: Not yet implemented, lacking device context"); | - | ||||||||||||||||||||||||||||||||||||
3675 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||||||||||||||
3676 | } | - | ||||||||||||||||||||||||||||||||||||
3677 | - | |||||||||||||||||||||||||||||||||||||
3678 | QPoint pixmapOffset; | - | ||||||||||||||||||||||||||||||||||||
3679 | QRectF sourceRect = m_widget->rect(); | - | ||||||||||||||||||||||||||||||||||||
3680 | - | |||||||||||||||||||||||||||||||||||||
3681 | if (deviceCoordinates
| 0 | ||||||||||||||||||||||||||||||||||||
3682 | const QTransform &painterTransform = context->painter->worldTransform(); | - | ||||||||||||||||||||||||||||||||||||
3683 | sourceRect = painterTransform.mapRect(sourceRect); | - | ||||||||||||||||||||||||||||||||||||
3684 | pixmapOffset = painterTransform.map(pixmapOffset); | - | ||||||||||||||||||||||||||||||||||||
3685 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3686 | - | |||||||||||||||||||||||||||||||||||||
3687 | QRect effectRect; | - | ||||||||||||||||||||||||||||||||||||
3688 | - | |||||||||||||||||||||||||||||||||||||
3689 | if (mode == QGraphicsEffect::PadToEffectiveBoundingRect
| 0 | ||||||||||||||||||||||||||||||||||||
3690 | effectRect = m_widget->graphicsEffect()->boundingRectFor(sourceRect).toAlignedRect(); never executed: effectRect = m_widget->graphicsEffect()->boundingRectFor(sourceRect).toAlignedRect(); | 0 | ||||||||||||||||||||||||||||||||||||
3691 | else if (mode == QGraphicsEffect::PadToTransparentBorder
| 0 | ||||||||||||||||||||||||||||||||||||
3692 | effectRect = sourceRect.adjusted(-1, -1, 1, 1).toAlignedRect(); never executed: effectRect = sourceRect.adjusted(-1, -1, 1, 1).toAlignedRect(); | 0 | ||||||||||||||||||||||||||||||||||||
3693 | else | - | ||||||||||||||||||||||||||||||||||||
3694 | effectRect = sourceRect.toAlignedRect(); never executed: effectRect = sourceRect.toAlignedRect(); | 0 | ||||||||||||||||||||||||||||||||||||
3695 | - | |||||||||||||||||||||||||||||||||||||
3696 | if (offset
| 0 | ||||||||||||||||||||||||||||||||||||
3697 | * never executed: offset = effectRect.topLeft();*offset = effectRect.topLeft(); never executed: *offset = effectRect.topLeft(); | 0 | ||||||||||||||||||||||||||||||||||||
3698 | - | |||||||||||||||||||||||||||||||||||||
3699 | pixmapOffset -= effectRect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
3700 | - | |||||||||||||||||||||||||||||||||||||
3701 | const qreal dpr = context->painter->device()->devicePixelRatio(); | - | ||||||||||||||||||||||||||||||||||||
3702 | QPixmap pixmap(effectRect.size() * dpr); | - | ||||||||||||||||||||||||||||||||||||
3703 | pixmap.setDevicePixelRatio(dpr); | - | ||||||||||||||||||||||||||||||||||||
3704 | - | |||||||||||||||||||||||||||||||||||||
3705 | pixmap.fill(Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||
3706 | m_widget->render(&pixmap, pixmapOffset, QRegion(), QWidget::DrawChildren); | - | ||||||||||||||||||||||||||||||||||||
3707 | return never executed: pixmap;return pixmap; never executed: return pixmap; | 0 | ||||||||||||||||||||||||||||||||||||
3708 | } | - | ||||||||||||||||||||||||||||||||||||
3709 | QGraphicsProxyWidget * QWidgetPrivate::nearestGraphicsProxyWidget(const QWidget *origin) | - | ||||||||||||||||||||||||||||||||||||
3710 | { | - | ||||||||||||||||||||||||||||||||||||
3711 | if (origin
| 0 | ||||||||||||||||||||||||||||||||||||
3712 | QWExtra *extra = origin->d_func()->extra; | - | ||||||||||||||||||||||||||||||||||||
3713 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
3714 | return never executed: extra->proxyWidget;return extra->proxyWidget; never executed: return extra->proxyWidget; | 0 | ||||||||||||||||||||||||||||||||||||
3715 | return never executed: nearestGraphicsProxyWidget(origin->parentWidget());return nearestGraphicsProxyWidget(origin->parentWidget()); never executed: return nearestGraphicsProxyWidget(origin->parentWidget()); | 0 | ||||||||||||||||||||||||||||||||||||
3716 | } | - | ||||||||||||||||||||||||||||||||||||
3717 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3718 | } | - | ||||||||||||||||||||||||||||||||||||
3719 | void QWidgetPrivate::setLocale_helper(const QLocale &loc, bool forceUpdate) | - | ||||||||||||||||||||||||||||||||||||
3720 | { | - | ||||||||||||||||||||||||||||||||||||
3721 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3722 | if (locale == loc
| 0 | ||||||||||||||||||||||||||||||||||||
3723 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3724 | - | |||||||||||||||||||||||||||||||||||||
3725 | locale = loc; | - | ||||||||||||||||||||||||||||||||||||
3726 | - | |||||||||||||||||||||||||||||||||||||
3727 | if (!children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3728 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
3729 | QWidget *w = qobject_cast<QWidget*>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
3730 | if (!w
| 0 | ||||||||||||||||||||||||||||||||||||
3731 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
3732 | if (w->testAttribute(Qt::WA_SetLocale)
| 0 | ||||||||||||||||||||||||||||||||||||
3733 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
3734 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
3735 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
3736 | w->d_func()->setLocale_helper(loc, forceUpdate); | - | ||||||||||||||||||||||||||||||||||||
3737 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3738 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3739 | QEvent e(QEvent::LocaleChange); | - | ||||||||||||||||||||||||||||||||||||
3740 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
3741 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3742 | - | |||||||||||||||||||||||||||||||||||||
3743 | void QWidget::setLocale(const QLocale &locale) | - | ||||||||||||||||||||||||||||||||||||
3744 | { | - | ||||||||||||||||||||||||||||||||||||
3745 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3746 | - | |||||||||||||||||||||||||||||||||||||
3747 | setAttribute(Qt::WA_SetLocale); | - | ||||||||||||||||||||||||||||||||||||
3748 | d->setLocale_helper(locale); | - | ||||||||||||||||||||||||||||||||||||
3749 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3750 | - | |||||||||||||||||||||||||||||||||||||
3751 | QLocale QWidget::locale() const | - | ||||||||||||||||||||||||||||||||||||
3752 | { | - | ||||||||||||||||||||||||||||||||||||
3753 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3754 | - | |||||||||||||||||||||||||||||||||||||
3755 | return never executed: d->locale;return d->locale; never executed: return d->locale; | 0 | ||||||||||||||||||||||||||||||||||||
3756 | } | - | ||||||||||||||||||||||||||||||||||||
3757 | - | |||||||||||||||||||||||||||||||||||||
3758 | void QWidgetPrivate::resolveLocale() | - | ||||||||||||||||||||||||||||||||||||
3759 | { | - | ||||||||||||||||||||||||||||||||||||
3760 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3761 | - | |||||||||||||||||||||||||||||||||||||
3762 | if (!q->testAttribute(Qt::WA_SetLocale)
| 0 | ||||||||||||||||||||||||||||||||||||
3763 | setLocale_helper(q->isWindow() | - | ||||||||||||||||||||||||||||||||||||
3764 | ? QLocale() | - | ||||||||||||||||||||||||||||||||||||
3765 | : q->parentWidget()->locale()); | - | ||||||||||||||||||||||||||||||||||||
3766 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3767 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3768 | - | |||||||||||||||||||||||||||||||||||||
3769 | void QWidget::unsetLocale() | - | ||||||||||||||||||||||||||||||||||||
3770 | { | - | ||||||||||||||||||||||||||||||||||||
3771 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3772 | setAttribute(Qt::WA_SetLocale, false); | - | ||||||||||||||||||||||||||||||||||||
3773 | d->resolveLocale(); | - | ||||||||||||||||||||||||||||||||||||
3774 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3775 | QString QWidget::windowTitle() const | - | ||||||||||||||||||||||||||||||||||||
3776 | { | - | ||||||||||||||||||||||||||||||||||||
3777 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3778 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3779 | if (!d->extra->topextra->caption.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3780 | return never executed: d->extra->topextra->caption;return d->extra->topextra->caption; never executed: return d->extra->topextra->caption; | 0 | ||||||||||||||||||||||||||||||||||||
3781 | if (!d->extra->topextra->filePath.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3782 | return never executed: QFileInfo(d->extra->topextra->filePath).fileName() + QLatin1String("[*]");return QFileInfo(d->extra->topextra->filePath).fileName() + QLatin1String("[*]"); never executed: return QFileInfo(d->extra->topextra->filePath).fileName() + QLatin1String("[*]"); | 0 | ||||||||||||||||||||||||||||||||||||
3783 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3784 | return never executed: QString();return QString(); never executed: return QString(); | 0 | ||||||||||||||||||||||||||||||||||||
3785 | } | - | ||||||||||||||||||||||||||||||||||||
3786 | QString qt_setWindowTitle_helperHelper(const QString &title, const QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
3787 | { | - | ||||||||||||||||||||||||||||||||||||
3788 | ((!(widget)) ? qt_assert("widget",__FILE__,6036) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
3789 | - | |||||||||||||||||||||||||||||||||||||
3790 | - | |||||||||||||||||||||||||||||||||||||
3791 | - | |||||||||||||||||||||||||||||||||||||
3792 | - | |||||||||||||||||||||||||||||||||||||
3793 | - | |||||||||||||||||||||||||||||||||||||
3794 | QString cap = title; | - | ||||||||||||||||||||||||||||||||||||
3795 | - | |||||||||||||||||||||||||||||||||||||
3796 | - | |||||||||||||||||||||||||||||||||||||
3797 | if (cap.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
3798 | return never executed: cap;return cap; never executed: return cap; | 0 | ||||||||||||||||||||||||||||||||||||
3799 | - | |||||||||||||||||||||||||||||||||||||
3800 | QLatin1String placeHolder("[*]"); | - | ||||||||||||||||||||||||||||||||||||
3801 | int index = cap.indexOf(placeHolder); | - | ||||||||||||||||||||||||||||||||||||
3802 | - | |||||||||||||||||||||||||||||||||||||
3803 | - | |||||||||||||||||||||||||||||||||||||
3804 | while (index != -1
| 0 | ||||||||||||||||||||||||||||||||||||
3805 | index += placeHolder.size(); | - | ||||||||||||||||||||||||||||||||||||
3806 | int count = 1; | - | ||||||||||||||||||||||||||||||||||||
3807 | while (cap.indexOf(placeHolder, index) == index
| 0 | ||||||||||||||||||||||||||||||||||||
3808 | ++count; | - | ||||||||||||||||||||||||||||||||||||
3809 | index += placeHolder.size(); | - | ||||||||||||||||||||||||||||||||||||
3810 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3811 | - | |||||||||||||||||||||||||||||||||||||
3812 | if (count%2
| 0 | ||||||||||||||||||||||||||||||||||||
3813 | int lastIndex = cap.lastIndexOf(placeHolder, index - 1); | - | ||||||||||||||||||||||||||||||||||||
3814 | if (widget->isWindowModified()
| 0 | ||||||||||||||||||||||||||||||||||||
3815 | && widget->style()->styleHint(QStyle::SH_TitleBar_ModifyNotification, 0, widget)
| 0 | ||||||||||||||||||||||||||||||||||||
3816 | cap.replace(lastIndex, 3, QWidget::tr("*")); never executed: cap.replace(lastIndex, 3, QWidget::tr("*")); | 0 | ||||||||||||||||||||||||||||||||||||
3817 | else | - | ||||||||||||||||||||||||||||||||||||
3818 | cap.remove(lastIndex, 3); never executed: cap.remove(lastIndex, 3); | 0 | ||||||||||||||||||||||||||||||||||||
3819 | } | - | ||||||||||||||||||||||||||||||||||||
3820 | - | |||||||||||||||||||||||||||||||||||||
3821 | index = cap.indexOf(placeHolder, index); | - | ||||||||||||||||||||||||||||||||||||
3822 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3823 | - | |||||||||||||||||||||||||||||||||||||
3824 | cap.replace(QLatin1String("[*][*]"), placeHolder); | - | ||||||||||||||||||||||||||||||||||||
3825 | - | |||||||||||||||||||||||||||||||||||||
3826 | return never executed: cap;return cap; never executed: return cap; | 0 | ||||||||||||||||||||||||||||||||||||
3827 | } | - | ||||||||||||||||||||||||||||||||||||
3828 | - | |||||||||||||||||||||||||||||||||||||
3829 | void QWidgetPrivate::setWindowTitle_helper(const QString &title) | - | ||||||||||||||||||||||||||||||||||||
3830 | { | - | ||||||||||||||||||||||||||||||||||||
3831 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3832 | if (q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
3833 | setWindowTitle_sys(qt_setWindowTitle_helperHelper(title, q)); never executed: setWindowTitle_sys(qt_setWindowTitle_helperHelper(title, q)); | 0 | ||||||||||||||||||||||||||||||||||||
3834 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3835 | - | |||||||||||||||||||||||||||||||||||||
3836 | void QWidgetPrivate::setWindowTitle_sys(const QString &caption) | - | ||||||||||||||||||||||||||||||||||||
3837 | { | - | ||||||||||||||||||||||||||||||||||||
3838 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3839 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
3840 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3841 | - | |||||||||||||||||||||||||||||||||||||
3842 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
3843 | window->setTitle(caption); never executed: window->setTitle(caption); | 0 | ||||||||||||||||||||||||||||||||||||
3844 | - | |||||||||||||||||||||||||||||||||||||
3845 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3846 | - | |||||||||||||||||||||||||||||||||||||
3847 | void QWidgetPrivate::setWindowIconText_helper(const QString &title) | - | ||||||||||||||||||||||||||||||||||||
3848 | { | - | ||||||||||||||||||||||||||||||||||||
3849 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3850 | if (q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
3851 | setWindowIconText_sys(qt_setWindowTitle_helperHelper(title, q)); never executed: setWindowIconText_sys(qt_setWindowTitle_helperHelper(title, q)); | 0 | ||||||||||||||||||||||||||||||||||||
3852 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3853 | - | |||||||||||||||||||||||||||||||||||||
3854 | void QWidgetPrivate::setWindowIconText_sys(const QString &iconText) | - | ||||||||||||||||||||||||||||||||||||
3855 | { | - | ||||||||||||||||||||||||||||||||||||
3856 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3857 | - | |||||||||||||||||||||||||||||||||||||
3858 | - | |||||||||||||||||||||||||||||||||||||
3859 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
3860 | QXcbWindowFunctions::setWmWindowIconText(window, iconText); never executed: QXcbWindowFunctions::setWmWindowIconText(window, iconText); | 0 | ||||||||||||||||||||||||||||||||||||
3861 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3862 | void QWidget::setWindowIconText(const QString &iconText) | - | ||||||||||||||||||||||||||||||||||||
3863 | { | - | ||||||||||||||||||||||||||||||||||||
3864 | if (QWidget::windowIconText() == iconText
| 0 | ||||||||||||||||||||||||||||||||||||
3865 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3866 | - | |||||||||||||||||||||||||||||||||||||
3867 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3868 | d->topData()->iconText = iconText; | - | ||||||||||||||||||||||||||||||||||||
3869 | d->setWindowIconText_helper(iconText); | - | ||||||||||||||||||||||||||||||||||||
3870 | - | |||||||||||||||||||||||||||||||||||||
3871 | QEvent e(QEvent::IconTextChange); | - | ||||||||||||||||||||||||||||||||||||
3872 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
3873 | - | |||||||||||||||||||||||||||||||||||||
3874 | windowIconTextChanged(iconText); | - | ||||||||||||||||||||||||||||||||||||
3875 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3876 | void QWidget::setWindowTitle(const QString &title) | - | ||||||||||||||||||||||||||||||||||||
3877 | { | - | ||||||||||||||||||||||||||||||||||||
3878 | if (QWidget::windowTitle() == title
| 0 | ||||||||||||||||||||||||||||||||||||
3879 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3880 | - | |||||||||||||||||||||||||||||||||||||
3881 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3882 | d->topData()->caption = title; | - | ||||||||||||||||||||||||||||||||||||
3883 | d->setWindowTitle_helper(title); | - | ||||||||||||||||||||||||||||||||||||
3884 | - | |||||||||||||||||||||||||||||||||||||
3885 | QEvent e(QEvent::WindowTitleChange); | - | ||||||||||||||||||||||||||||||||||||
3886 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
3887 | - | |||||||||||||||||||||||||||||||||||||
3888 | windowTitleChanged(title); | - | ||||||||||||||||||||||||||||||||||||
3889 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3890 | QIcon QWidget::windowIcon() const | - | ||||||||||||||||||||||||||||||||||||
3891 | { | - | ||||||||||||||||||||||||||||||||||||
3892 | const QWidget *w = this; | - | ||||||||||||||||||||||||||||||||||||
3893 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
3894 | const QWidgetPrivate *d = w->d_func(); | - | ||||||||||||||||||||||||||||||||||||
3895 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
3896 | return never executed: *d->extra->topextra->icon;return *d->extra->topextra->icon; never executed: return *d->extra->topextra->icon; | 0 | ||||||||||||||||||||||||||||||||||||
3897 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
3898 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3899 | return never executed: QApplication::windowIcon();return QApplication::windowIcon(); never executed: return QApplication::windowIcon(); | 0 | ||||||||||||||||||||||||||||||||||||
3900 | } | - | ||||||||||||||||||||||||||||||||||||
3901 | - | |||||||||||||||||||||||||||||||||||||
3902 | void QWidgetPrivate::setWindowIcon_helper() | - | ||||||||||||||||||||||||||||||||||||
3903 | { | - | ||||||||||||||||||||||||||||||||||||
3904 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3905 | QEvent e(QEvent::WindowIconChange); | - | ||||||||||||||||||||||||||||||||||||
3906 | - | |||||||||||||||||||||||||||||||||||||
3907 | - | |||||||||||||||||||||||||||||||||||||
3908 | - | |||||||||||||||||||||||||||||||||||||
3909 | - | |||||||||||||||||||||||||||||||||||||
3910 | - | |||||||||||||||||||||||||||||||||||||
3911 | if (!q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
3912 | QApplication::sendEvent(q, &e); never executed: QApplication::sendEvent(q, &e); | 0 | ||||||||||||||||||||||||||||||||||||
3913 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
3914 | QWidget *w = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
3915 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
3916 | QApplication::sendEvent(w, &e); never executed: QApplication::sendEvent(w, &e); | 0 | ||||||||||||||||||||||||||||||||||||
3917 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3918 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3919 | void QWidget::setWindowIcon(const QIcon &icon) | - | ||||||||||||||||||||||||||||||||||||
3920 | { | - | ||||||||||||||||||||||||||||||||||||
3921 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3922 | - | |||||||||||||||||||||||||||||||||||||
3923 | setAttribute(Qt::WA_SetWindowIcon, !icon.isNull()); | - | ||||||||||||||||||||||||||||||||||||
3924 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
3925 | - | |||||||||||||||||||||||||||||||||||||
3926 | if (!d->extra->topextra->icon
| 0 | ||||||||||||||||||||||||||||||||||||
3927 | d->extra->topextra->icon = new QIcon(); never executed: d->extra->topextra->icon = new QIcon(); | 0 | ||||||||||||||||||||||||||||||||||||
3928 | *d->extra->topextra->icon = icon; | - | ||||||||||||||||||||||||||||||||||||
3929 | - | |||||||||||||||||||||||||||||||||||||
3930 | d->setWindowIcon_sys(); | - | ||||||||||||||||||||||||||||||||||||
3931 | d->setWindowIcon_helper(); | - | ||||||||||||||||||||||||||||||||||||
3932 | - | |||||||||||||||||||||||||||||||||||||
3933 | windowIconChanged(icon); | - | ||||||||||||||||||||||||||||||||||||
3934 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3935 | - | |||||||||||||||||||||||||||||||||||||
3936 | void QWidgetPrivate::setWindowIcon_sys() | - | ||||||||||||||||||||||||||||||||||||
3937 | { | - | ||||||||||||||||||||||||||||||||||||
3938 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3939 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
3940 | window->setIcon(q->windowIcon()); never executed: window->setIcon(q->windowIcon()); | 0 | ||||||||||||||||||||||||||||||||||||
3941 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3942 | QString QWidget::windowIconText() const | - | ||||||||||||||||||||||||||||||||||||
3943 | { | - | ||||||||||||||||||||||||||||||||||||
3944 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3945 | return never executed: (d->extrareturn (d->extra && d->extra->topextra) ? d->extra->topextra->iconText : QString();
never executed: return (d->extra && d->extra->topextra) ? d->extra->topextra->iconText : QString(); | 0 | ||||||||||||||||||||||||||||||||||||
3946 | } | - | ||||||||||||||||||||||||||||||||||||
3947 | QString QWidget::windowFilePath() const | - | ||||||||||||||||||||||||||||||||||||
3948 | { | - | ||||||||||||||||||||||||||||||||||||
3949 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3950 | return never executed: (d->extrareturn (d->extra && d->extra->topextra) ? d->extra->topextra->filePath : QString();
never executed: return (d->extra && d->extra->topextra) ? d->extra->topextra->filePath : QString(); | 0 | ||||||||||||||||||||||||||||||||||||
3951 | } | - | ||||||||||||||||||||||||||||||||||||
3952 | - | |||||||||||||||||||||||||||||||||||||
3953 | void QWidget::setWindowFilePath(const QString &filePath) | - | ||||||||||||||||||||||||||||||||||||
3954 | { | - | ||||||||||||||||||||||||||||||||||||
3955 | if (filePath == windowFilePath()
| 0 | ||||||||||||||||||||||||||||||||||||
3956 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3957 | - | |||||||||||||||||||||||||||||||||||||
3958 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
3959 | - | |||||||||||||||||||||||||||||||||||||
3960 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
3961 | d->extra->topextra->filePath = filePath; | - | ||||||||||||||||||||||||||||||||||||
3962 | d->setWindowFilePath_helper(filePath); | - | ||||||||||||||||||||||||||||||||||||
3963 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3964 | - | |||||||||||||||||||||||||||||||||||||
3965 | void QWidgetPrivate::setWindowFilePath_helper(const QString &filePath) | - | ||||||||||||||||||||||||||||||||||||
3966 | { | - | ||||||||||||||||||||||||||||||||||||
3967 | if (extra->topextra
| 0 | ||||||||||||||||||||||||||||||||||||
3968 | - | |||||||||||||||||||||||||||||||||||||
3969 | - | |||||||||||||||||||||||||||||||||||||
3970 | - | |||||||||||||||||||||||||||||||||||||
3971 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3972 | (void)filePath;; | - | ||||||||||||||||||||||||||||||||||||
3973 | setWindowTitle_helper(q->windowTitle()); | - | ||||||||||||||||||||||||||||||||||||
3974 | - | |||||||||||||||||||||||||||||||||||||
3975 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3976 | - | |||||||||||||||||||||||||||||||||||||
3977 | - | |||||||||||||||||||||||||||||||||||||
3978 | - | |||||||||||||||||||||||||||||||||||||
3979 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3980 | - | |||||||||||||||||||||||||||||||||||||
3981 | void QWidgetPrivate::setWindowFilePath_sys(const QString &filePath) | - | ||||||||||||||||||||||||||||||||||||
3982 | { | - | ||||||||||||||||||||||||||||||||||||
3983 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
3984 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
3985 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3986 | - | |||||||||||||||||||||||||||||||||||||
3987 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
3988 | window->setFilePath(filePath); never executed: window->setFilePath(filePath); | 0 | ||||||||||||||||||||||||||||||||||||
3989 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3990 | - | |||||||||||||||||||||||||||||||||||||
3991 | - | |||||||||||||||||||||||||||||||||||||
3992 | - | |||||||||||||||||||||||||||||||||||||
3993 | - | |||||||||||||||||||||||||||||||||||||
3994 | - | |||||||||||||||||||||||||||||||||||||
3995 | - | |||||||||||||||||||||||||||||||||||||
3996 | - | |||||||||||||||||||||||||||||||||||||
3997 | QString QWidget::windowRole() const | - | ||||||||||||||||||||||||||||||||||||
3998 | { | - | ||||||||||||||||||||||||||||||||||||
3999 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4000 | return never executed: (d->extrareturn (d->extra && d->extra->topextra) ? d->extra->topextra->role : QString();
never executed: return (d->extra && d->extra->topextra) ? d->extra->topextra->role : QString(); | 0 | ||||||||||||||||||||||||||||||||||||
4001 | } | - | ||||||||||||||||||||||||||||||||||||
4002 | - | |||||||||||||||||||||||||||||||||||||
4003 | - | |||||||||||||||||||||||||||||||||||||
4004 | - | |||||||||||||||||||||||||||||||||||||
4005 | - | |||||||||||||||||||||||||||||||||||||
4006 | - | |||||||||||||||||||||||||||||||||||||
4007 | void QWidget::setWindowRole(const QString &role) | - | ||||||||||||||||||||||||||||||||||||
4008 | { | - | ||||||||||||||||||||||||||||||||||||
4009 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4010 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
4011 | d->topData()->role = role; | - | ||||||||||||||||||||||||||||||||||||
4012 | if (windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
4013 | QXcbWindowFunctions::setWmWindowRole(windowHandle(), role.toLatin1()); never executed: QXcbWindowFunctions::setWmWindowRole(windowHandle(), role.toLatin1()); | 0 | ||||||||||||||||||||||||||||||||||||
4014 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4015 | void QWidget::setFocusProxy(QWidget * w) | - | ||||||||||||||||||||||||||||||||||||
4016 | { | - | ||||||||||||||||||||||||||||||||||||
4017 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4018 | if (!w
| 0 | ||||||||||||||||||||||||||||||||||||
4019 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4020 | - | |||||||||||||||||||||||||||||||||||||
4021 | for (QWidget* fp = w; fp
| 0 | ||||||||||||||||||||||||||||||||||||
4022 | if (fp == this
| 0 | ||||||||||||||||||||||||||||||||||||
4023 | QMessageLogger(__FILE__, 6388, __PRETTY_FUNCTION__).warning("QWidget: %s (%s) already in focus proxy chain", metaObject()->className(), objectName().toLocal8Bit().constData()); | - | ||||||||||||||||||||||||||||||||||||
4024 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4025 | } | - | ||||||||||||||||||||||||||||||||||||
4026 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4027 | - | |||||||||||||||||||||||||||||||||||||
4028 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
4029 | d->extra->focus_proxy = w; | - | ||||||||||||||||||||||||||||||||||||
4030 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4031 | QWidget * QWidget::focusProxy() const | - | ||||||||||||||||||||||||||||||||||||
4032 | { | - | ||||||||||||||||||||||||||||||||||||
4033 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4034 | return never executed: d->extrareturn d->extra ? (QWidget *)d->extra->focus_proxy : 0;
never executed: return d->extra ? (QWidget *)d->extra->focus_proxy : 0; | 0 | ||||||||||||||||||||||||||||||||||||
4035 | } | - | ||||||||||||||||||||||||||||||||||||
4036 | bool QWidget::hasFocus() const | - | ||||||||||||||||||||||||||||||||||||
4037 | { | - | ||||||||||||||||||||||||||||||||||||
4038 | const QWidget* w = this; | - | ||||||||||||||||||||||||||||||||||||
4039 | while (w->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4040 | w = w->d_func()->extra->focus_proxy; never executed: w = w->d_func()->extra->focus_proxy; | 0 | ||||||||||||||||||||||||||||||||||||
4041 | - | |||||||||||||||||||||||||||||||||||||
4042 | if (QWidget *window = w->window()
| 0 | ||||||||||||||||||||||||||||||||||||
4043 | QWExtra *e = window->d_func()->extra; | - | ||||||||||||||||||||||||||||||||||||
4044 | if (e
| 0 | ||||||||||||||||||||||||||||||||||||
4045 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4046 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4047 | - | |||||||||||||||||||||||||||||||||||||
4048 | return never executed: (QApplication::focusWidget() == w);return (QApplication::focusWidget() == w); never executed: return (QApplication::focusWidget() == w); | 0 | ||||||||||||||||||||||||||||||||||||
4049 | } | - | ||||||||||||||||||||||||||||||||||||
4050 | void QWidget::setFocus(Qt::FocusReason reason) | - | ||||||||||||||||||||||||||||||||||||
4051 | { | - | ||||||||||||||||||||||||||||||||||||
4052 | if (!isEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
4053 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4054 | - | |||||||||||||||||||||||||||||||||||||
4055 | QWidget *f = this; | - | ||||||||||||||||||||||||||||||||||||
4056 | while (f->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4057 | f = f->d_func()->extra->focus_proxy; never executed: f = f->d_func()->extra->focus_proxy; | 0 | ||||||||||||||||||||||||||||||||||||
4058 | - | |||||||||||||||||||||||||||||||||||||
4059 | if (QApplication::focusWidget() == f
| 0 | ||||||||||||||||||||||||||||||||||||
4060 | - | |||||||||||||||||||||||||||||||||||||
4061 | - | |||||||||||||||||||||||||||||||||||||
4062 | - | |||||||||||||||||||||||||||||||||||||
4063 | ) | - | ||||||||||||||||||||||||||||||||||||
4064 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4065 | - | |||||||||||||||||||||||||||||||||||||
4066 | - | |||||||||||||||||||||||||||||||||||||
4067 | QWidget *previousProxyFocus = 0; | - | ||||||||||||||||||||||||||||||||||||
4068 | if (QWExtra *topData = window()->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4069 | if (topData->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
4070 | previousProxyFocus = topData->proxyWidget->widget()->focusWidget(); | - | ||||||||||||||||||||||||||||||||||||
4071 | if (previousProxyFocus
| 0 | ||||||||||||||||||||||||||||||||||||
4072 | previousProxyFocus = previousProxyFocus->focusProxy(); never executed: previousProxyFocus = previousProxyFocus->focusProxy(); | 0 | ||||||||||||||||||||||||||||||||||||
4073 | if (previousProxyFocus == this
| 0 | ||||||||||||||||||||||||||||||||||||
4074 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4075 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4076 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4077 | - | |||||||||||||||||||||||||||||||||||||
4078 | - | |||||||||||||||||||||||||||||||||||||
4079 | - | |||||||||||||||||||||||||||||||||||||
4080 | - | |||||||||||||||||||||||||||||||||||||
4081 | if (QWExtra *topData = window()->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4082 | if (topData->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
4083 | f->d_func()->updateFocusChild(); | - | ||||||||||||||||||||||||||||||||||||
4084 | topData->proxyWidget->d_func()->focusFromWidgetToProxy = 1; | - | ||||||||||||||||||||||||||||||||||||
4085 | topData->proxyWidget->setFocus(reason); | - | ||||||||||||||||||||||||||||||||||||
4086 | topData->proxyWidget->d_func()->focusFromWidgetToProxy = 0; | - | ||||||||||||||||||||||||||||||||||||
4087 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4088 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4089 | - | |||||||||||||||||||||||||||||||||||||
4090 | - | |||||||||||||||||||||||||||||||||||||
4091 | if (f->isActiveWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4092 | QWidget *prev = QApplicationPrivate::focus_widget; | - | ||||||||||||||||||||||||||||||||||||
4093 | if (prev
| 0 | ||||||||||||||||||||||||||||||||||||
4094 | if (reason != Qt::PopupFocusReason
| 0 | ||||||||||||||||||||||||||||||||||||
4095 | && prev->testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
4096 | QGuiApplication::inputMethod()->commit(); | - | ||||||||||||||||||||||||||||||||||||
4097 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4098 | - | |||||||||||||||||||||||||||||||||||||
4099 | if (reason != Qt::NoFocusReason
| 0 | ||||||||||||||||||||||||||||||||||||
4100 | QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange, reason); | - | ||||||||||||||||||||||||||||||||||||
4101 | QApplication::sendEvent(prev, &focusAboutToChange); | - | ||||||||||||||||||||||||||||||||||||
4102 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4103 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4104 | - | |||||||||||||||||||||||||||||||||||||
4105 | f->d_func()->updateFocusChild(); | - | ||||||||||||||||||||||||||||||||||||
4106 | - | |||||||||||||||||||||||||||||||||||||
4107 | QApplicationPrivate::setFocusWidget(f, reason); | - | ||||||||||||||||||||||||||||||||||||
4108 | - | |||||||||||||||||||||||||||||||||||||
4109 | - | |||||||||||||||||||||||||||||||||||||
4110 | - | |||||||||||||||||||||||||||||||||||||
4111 | - | |||||||||||||||||||||||||||||||||||||
4112 | - | |||||||||||||||||||||||||||||||||||||
4113 | - | |||||||||||||||||||||||||||||||||||||
4114 | - | |||||||||||||||||||||||||||||||||||||
4115 | if (!(f->inherits("QMenuBar")
| 0 | ||||||||||||||||||||||||||||||||||||
4116 | { | - | ||||||||||||||||||||||||||||||||||||
4117 | QAccessibleEvent event(f, QAccessible::Focus); | - | ||||||||||||||||||||||||||||||||||||
4118 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
4119 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4120 | - | |||||||||||||||||||||||||||||||||||||
4121 | - | |||||||||||||||||||||||||||||||||||||
4122 | if (QWExtra *topData = window()->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4123 | if (topData->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
4124 | if (previousProxyFocus
| 0 | ||||||||||||||||||||||||||||||||||||
4125 | - | |||||||||||||||||||||||||||||||||||||
4126 | QFocusEvent event(QEvent::FocusOut, reason); | - | ||||||||||||||||||||||||||||||||||||
4127 | QPointer<QWidget> that = previousProxyFocus; | - | ||||||||||||||||||||||||||||||||||||
4128 | QApplication::sendEvent(previousProxyFocus, &event); | - | ||||||||||||||||||||||||||||||||||||
4129 | if (that
| 0 | ||||||||||||||||||||||||||||||||||||
4130 | QApplication::sendEvent(that->style(), &event); never executed: QApplication::sendEvent(that->style(), &event); | 0 | ||||||||||||||||||||||||||||||||||||
4131 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4132 | if (!isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
4133 | - | |||||||||||||||||||||||||||||||||||||
4134 | - | |||||||||||||||||||||||||||||||||||||
4135 | if (QWExtra *topData = window()->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4136 | if (topData->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
4137 | topData->proxyWidget->d_func()->updateProxyInputMethodAcceptanceFromWidget(); never executed: topData->proxyWidget->d_func()->updateProxyInputMethodAcceptanceFromWidget(); | 0 | ||||||||||||||||||||||||||||||||||||
4138 | - | |||||||||||||||||||||||||||||||||||||
4139 | - | |||||||||||||||||||||||||||||||||||||
4140 | QFocusEvent event(QEvent::FocusIn, reason); | - | ||||||||||||||||||||||||||||||||||||
4141 | QPointer<QWidget> that = f; | - | ||||||||||||||||||||||||||||||||||||
4142 | QApplication::sendEvent(f, &event); | - | ||||||||||||||||||||||||||||||||||||
4143 | if (that
| 0 | ||||||||||||||||||||||||||||||||||||
4144 | QApplication::sendEvent(that->style(), &event); never executed: QApplication::sendEvent(that->style(), &event); | 0 | ||||||||||||||||||||||||||||||||||||
4145 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4146 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4147 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4148 | - | |||||||||||||||||||||||||||||||||||||
4149 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4150 | f->d_func()->updateFocusChild(); | - | ||||||||||||||||||||||||||||||||||||
4151 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4152 | - | |||||||||||||||||||||||||||||||||||||
4153 | if (QTLWExtra *extra = f->window()->d_func()->maybeTopData()
| 0 | ||||||||||||||||||||||||||||||||||||
4154 | if (extra->window
| 0 | ||||||||||||||||||||||||||||||||||||
4155 | extra->window->focusObjectChanged(f); never executed: extra->window->focusObjectChanged(f); | 0 | ||||||||||||||||||||||||||||||||||||
4156 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4157 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4158 | - | |||||||||||||||||||||||||||||||||||||
4159 | void QWidgetPrivate::setFocus_sys() | - | ||||||||||||||||||||||||||||||||||||
4160 | { | - | ||||||||||||||||||||||||||||||||||||
4161 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4162 | - | |||||||||||||||||||||||||||||||||||||
4163 | const QWidget *topLevel = q->window(); | - | ||||||||||||||||||||||||||||||||||||
4164 | if (topLevel->windowType() != Qt::Popup
| 0 | ||||||||||||||||||||||||||||||||||||
4165 | if (QWindow *nativeWindow = q->window()->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
4166 | if (nativeWindow != QGuiApplication::focusWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4167 | && q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
4168 | nativeWindow->requestActivate(); | - | ||||||||||||||||||||||||||||||||||||
4169 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4170 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4171 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4172 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4173 | - | |||||||||||||||||||||||||||||||||||||
4174 | - | |||||||||||||||||||||||||||||||||||||
4175 | void QWidgetPrivate::updateFocusChild() | - | ||||||||||||||||||||||||||||||||||||
4176 | { | - | ||||||||||||||||||||||||||||||||||||
4177 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4178 | - | |||||||||||||||||||||||||||||||||||||
4179 | QWidget *w = q; | - | ||||||||||||||||||||||||||||||||||||
4180 | if (q->isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
4181 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
4182 | w->d_func()->focus_child = q; | - | ||||||||||||||||||||||||||||||||||||
4183 | w = w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4184 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4185 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4186 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
4187 | w->d_func()->focus_child = q; | - | ||||||||||||||||||||||||||||||||||||
4188 | w = w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4189 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4190 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4191 | } | - | ||||||||||||||||||||||||||||||||||||
4192 | void QWidget::clearFocus() | - | ||||||||||||||||||||||||||||||||||||
4193 | { | - | ||||||||||||||||||||||||||||||||||||
4194 | if (hasFocus()
| 0 | ||||||||||||||||||||||||||||||||||||
4195 | if (testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
4196 | QGuiApplication::inputMethod()->commit(); never executed: QGuiApplication::inputMethod()->commit(); | 0 | ||||||||||||||||||||||||||||||||||||
4197 | - | |||||||||||||||||||||||||||||||||||||
4198 | QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange); | - | ||||||||||||||||||||||||||||||||||||
4199 | QApplication::sendEvent(this, &focusAboutToChange); | - | ||||||||||||||||||||||||||||||||||||
4200 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4201 | - | |||||||||||||||||||||||||||||||||||||
4202 | QWidget *w = this; | - | ||||||||||||||||||||||||||||||||||||
4203 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
4204 | - | |||||||||||||||||||||||||||||||||||||
4205 | if (w->d_func()->focus_child == this
| 0 | ||||||||||||||||||||||||||||||||||||
4206 | w->d_func()->focus_child = 0; never executed: w->d_func()->focus_child = 0; | 0 | ||||||||||||||||||||||||||||||||||||
4207 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
4208 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4209 | - | |||||||||||||||||||||||||||||||||||||
4210 | - | |||||||||||||||||||||||||||||||||||||
4211 | - | |||||||||||||||||||||||||||||||||||||
4212 | - | |||||||||||||||||||||||||||||||||||||
4213 | - | |||||||||||||||||||||||||||||||||||||
4214 | QWExtra *topData = d_func()->extra; | - | ||||||||||||||||||||||||||||||||||||
4215 | if (topData
| 0 | ||||||||||||||||||||||||||||||||||||
4216 | topData->proxyWidget->clearFocus(); never executed: topData->proxyWidget->clearFocus(); | 0 | ||||||||||||||||||||||||||||||||||||
4217 | - | |||||||||||||||||||||||||||||||||||||
4218 | - | |||||||||||||||||||||||||||||||||||||
4219 | if (hasFocus()
| 0 | ||||||||||||||||||||||||||||||||||||
4220 | - | |||||||||||||||||||||||||||||||||||||
4221 | QApplicationPrivate::setFocusWidget(0, Qt::OtherFocusReason); | - | ||||||||||||||||||||||||||||||||||||
4222 | - | |||||||||||||||||||||||||||||||||||||
4223 | - | |||||||||||||||||||||||||||||||||||||
4224 | - | |||||||||||||||||||||||||||||||||||||
4225 | - | |||||||||||||||||||||||||||||||||||||
4226 | - | |||||||||||||||||||||||||||||||||||||
4227 | { | - | ||||||||||||||||||||||||||||||||||||
4228 | - | |||||||||||||||||||||||||||||||||||||
4229 | QAccessibleEvent event(this, QAccessible::Focus); | - | ||||||||||||||||||||||||||||||||||||
4230 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
4231 | - | |||||||||||||||||||||||||||||||||||||
4232 | } | - | ||||||||||||||||||||||||||||||||||||
4233 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4234 | - | |||||||||||||||||||||||||||||||||||||
4235 | - | |||||||||||||||||||||||||||||||||||||
4236 | - | |||||||||||||||||||||||||||||||||||||
4237 | - | |||||||||||||||||||||||||||||||||||||
4238 | - | |||||||||||||||||||||||||||||||||||||
4239 | if (QTLWExtra *extra = window()->d_func()->maybeTopData()
| 0 | ||||||||||||||||||||||||||||||||||||
4240 | if (extra->window
| 0 | ||||||||||||||||||||||||||||||||||||
4241 | extra->window->focusObjectChanged(extra->window->focusObject()); never executed: extra->window->focusObjectChanged(extra->window->focusObject()); | 0 | ||||||||||||||||||||||||||||||||||||
4242 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4243 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4244 | bool QWidget::focusNextPrevChild(bool next) | - | ||||||||||||||||||||||||||||||||||||
4245 | { | - | ||||||||||||||||||||||||||||||||||||
4246 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4247 | QWidget* p = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
4248 | bool isSubWindow = (windowType() == Qt::SubWindow); | - | ||||||||||||||||||||||||||||||||||||
4249 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4250 | return never executed: p->focusNextPrevChild(next);return p->focusNextPrevChild(next); never executed: return p->focusNextPrevChild(next); | 0 | ||||||||||||||||||||||||||||||||||||
4251 | - | |||||||||||||||||||||||||||||||||||||
4252 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4253 | return never executed: d->extra->proxyWidget->focusNextPrevChild(next);return d->extra->proxyWidget->focusNextPrevChild(next); never executed: return d->extra->proxyWidget->focusNextPrevChild(next); | 0 | ||||||||||||||||||||||||||||||||||||
4254 | - | |||||||||||||||||||||||||||||||||||||
4255 | - | |||||||||||||||||||||||||||||||||||||
4256 | bool wrappingOccurred = false; | - | ||||||||||||||||||||||||||||||||||||
4257 | QWidget *w = QApplicationPrivate::focusNextPrevChild_helper(this, next, | - | ||||||||||||||||||||||||||||||||||||
4258 | &wrappingOccurred); | - | ||||||||||||||||||||||||||||||||||||
4259 | if (!w
never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4260 | - | |||||||||||||||||||||||||||||||||||||
4261 | Qt::FocusReason reason = next
| 0 | ||||||||||||||||||||||||||||||||||||
4262 | - | |||||||||||||||||||||||||||||||||||||
4263 | - | |||||||||||||||||||||||||||||||||||||
4264 | - | |||||||||||||||||||||||||||||||||||||
4265 | - | |||||||||||||||||||||||||||||||||||||
4266 | - | |||||||||||||||||||||||||||||||||||||
4267 | - | |||||||||||||||||||||||||||||||||||||
4268 | if (wrappingOccurred
| 0 | ||||||||||||||||||||||||||||||||||||
4269 | QWindow *window = windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
4270 | if (window != 0
| 0 | ||||||||||||||||||||||||||||||||||||
4271 | QWindowPrivate *winp = qt_window_private(window); | - | ||||||||||||||||||||||||||||||||||||
4272 | - | |||||||||||||||||||||||||||||||||||||
4273 | if (winp->platformWindow != 0
| 0 | ||||||||||||||||||||||||||||||||||||
4274 | QFocusEvent event(QEvent::FocusIn, reason); | - | ||||||||||||||||||||||||||||||||||||
4275 | event.ignore(); | - | ||||||||||||||||||||||||||||||||||||
4276 | winp->platformWindow->windowEvent(&event); | - | ||||||||||||||||||||||||||||||||||||
4277 | if (event.isAccepted()
never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4278 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4279 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4280 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4281 | - | |||||||||||||||||||||||||||||||||||||
4282 | w->setFocus(reason); | - | ||||||||||||||||||||||||||||||||||||
4283 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4284 | } | - | ||||||||||||||||||||||||||||||||||||
4285 | QWidget *QWidget::focusWidget() const | - | ||||||||||||||||||||||||||||||||||||
4286 | { | - | ||||||||||||||||||||||||||||||||||||
4287 | return never executed: const_cast<QWidget *>(d_func()->focus_child);return const_cast<QWidget *>(d_func()->focus_child); never executed: return const_cast<QWidget *>(d_func()->focus_child); | 0 | ||||||||||||||||||||||||||||||||||||
4288 | } | - | ||||||||||||||||||||||||||||||||||||
4289 | - | |||||||||||||||||||||||||||||||||||||
4290 | - | |||||||||||||||||||||||||||||||||||||
4291 | - | |||||||||||||||||||||||||||||||||||||
4292 | - | |||||||||||||||||||||||||||||||||||||
4293 | - | |||||||||||||||||||||||||||||||||||||
4294 | - | |||||||||||||||||||||||||||||||||||||
4295 | QWidget *QWidget::nextInFocusChain() const | - | ||||||||||||||||||||||||||||||||||||
4296 | { | - | ||||||||||||||||||||||||||||||||||||
4297 | return never executed: const_cast<QWidget *>(d_func()->focus_next);return const_cast<QWidget *>(d_func()->focus_next); never executed: return const_cast<QWidget *>(d_func()->focus_next); | 0 | ||||||||||||||||||||||||||||||||||||
4298 | } | - | ||||||||||||||||||||||||||||||||||||
4299 | QWidget *QWidget::previousInFocusChain() const | - | ||||||||||||||||||||||||||||||||||||
4300 | { | - | ||||||||||||||||||||||||||||||||||||
4301 | return never executed: const_cast<QWidget *>(d_func()->focus_prev);return const_cast<QWidget *>(d_func()->focus_prev); never executed: return const_cast<QWidget *>(d_func()->focus_prev); | 0 | ||||||||||||||||||||||||||||||||||||
4302 | } | - | ||||||||||||||||||||||||||||||||||||
4303 | bool QWidget::isActiveWindow() const | - | ||||||||||||||||||||||||||||||||||||
4304 | { | - | ||||||||||||||||||||||||||||||||||||
4305 | QWidget *tlw = window(); | - | ||||||||||||||||||||||||||||||||||||
4306 | if(tlw == QApplication::activeWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4307 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4308 | - | |||||||||||||||||||||||||||||||||||||
4309 | - | |||||||||||||||||||||||||||||||||||||
4310 | if (QWExtra *tlwExtra = tlw->d_func()->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4311 | if (isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
4312 | return never executed: tlwExtra->proxyWidget->isActiveWindow();return tlwExtra->proxyWidget->isActiveWindow(); never executed: return tlwExtra->proxyWidget->isActiveWindow(); | 0 | ||||||||||||||||||||||||||||||||||||
4313 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4314 | - | |||||||||||||||||||||||||||||||||||||
4315 | - | |||||||||||||||||||||||||||||||||||||
4316 | if(style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, this)
| 0 | ||||||||||||||||||||||||||||||||||||
4317 | if(tlw->windowType() == Qt::Tool
| 0 | ||||||||||||||||||||||||||||||||||||
4318 | !tlw->isModal()
| 0 | ||||||||||||||||||||||||||||||||||||
4319 | (!tlw->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
4320 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4321 | QWidget *w = QApplication::activeWindow(); | - | ||||||||||||||||||||||||||||||||||||
4322 | while(w
| 0 | ||||||||||||||||||||||||||||||||||||
4323 | !w->isModal()
| 0 | ||||||||||||||||||||||||||||||||||||
4324 | w = w->parentWidget()->window(); | - | ||||||||||||||||||||||||||||||||||||
4325 | if(w == tlw
| 0 | ||||||||||||||||||||||||||||||||||||
4326 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4327 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4328 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4329 | - | |||||||||||||||||||||||||||||||||||||
4330 | - | |||||||||||||||||||||||||||||||||||||
4331 | if (QWindow *ww = QGuiApplication::focusWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4332 | while (ww
| 0 | ||||||||||||||||||||||||||||||||||||
4333 | QWidgetWindow *qww = qobject_cast<QWidgetWindow *>(ww); | - | ||||||||||||||||||||||||||||||||||||
4334 | QWindowContainer *qwc = qww
| 0 | ||||||||||||||||||||||||||||||||||||
4335 | if (qwc
| 0 | ||||||||||||||||||||||||||||||||||||
4336 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4337 | ww = ww->parent(); | - | ||||||||||||||||||||||||||||||||||||
4338 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4339 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4340 | - | |||||||||||||||||||||||||||||||||||||
4341 | - | |||||||||||||||||||||||||||||||||||||
4342 | - | |||||||||||||||||||||||||||||||||||||
4343 | - | |||||||||||||||||||||||||||||||||||||
4344 | - | |||||||||||||||||||||||||||||||||||||
4345 | - | |||||||||||||||||||||||||||||||||||||
4346 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
4347 | if (w->handle()
| 0 | ||||||||||||||||||||||||||||||||||||
4348 | return never executed: w->handle()->isActive();return w->handle()->isActive(); never executed: return w->handle()->isActive(); | 0 | ||||||||||||||||||||||||||||||||||||
4349 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4350 | - | |||||||||||||||||||||||||||||||||||||
4351 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4352 | } | - | ||||||||||||||||||||||||||||||||||||
4353 | void QWidget::setTabOrder(QWidget* first, QWidget *second) | - | ||||||||||||||||||||||||||||||||||||
4354 | { | - | ||||||||||||||||||||||||||||||||||||
4355 | if (!first
| 0 | ||||||||||||||||||||||||||||||||||||
4356 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4357 | - | |||||||||||||||||||||||||||||||||||||
4358 | if (first->window() != second->window()
| 0 | ||||||||||||||||||||||||||||||||||||
4359 | QMessageLogger(__FILE__, 6902, __PRETTY_FUNCTION__).warning("QWidget::setTabOrder: 'first' and 'second' must be in the same window"); | - | ||||||||||||||||||||||||||||||||||||
4360 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4361 | } | - | ||||||||||||||||||||||||||||||||||||
4362 | - | |||||||||||||||||||||||||||||||||||||
4363 | QWidget *fp = first->focusProxy(); | - | ||||||||||||||||||||||||||||||||||||
4364 | if (fp
| 0 | ||||||||||||||||||||||||||||||||||||
4365 | - | |||||||||||||||||||||||||||||||||||||
4366 | - | |||||||||||||||||||||||||||||||||||||
4367 | - | |||||||||||||||||||||||||||||||||||||
4368 | - | |||||||||||||||||||||||||||||||||||||
4369 | QList<QWidget *> l = first->findChildren<QWidget *>(); | - | ||||||||||||||||||||||||||||||||||||
4370 | for (int i = l.size()-1; i >= 0
| 0 | ||||||||||||||||||||||||||||||||||||
4371 | QWidget * next = l.at(i); | - | ||||||||||||||||||||||||||||||||||||
4372 | if (next->window() == fp->window()
| 0 | ||||||||||||||||||||||||||||||||||||
4373 | fp = next; | - | ||||||||||||||||||||||||||||||||||||
4374 | if (fp->focusPolicy() != Qt::NoFocus
| 0 | ||||||||||||||||||||||||||||||||||||
4375 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
4376 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4377 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4378 | first = fp; | - | ||||||||||||||||||||||||||||||||||||
4379 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4380 | - | |||||||||||||||||||||||||||||||||||||
4381 | if (fp == second
| 0 | ||||||||||||||||||||||||||||||||||||
4382 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4383 | - | |||||||||||||||||||||||||||||||||||||
4384 | if (QWidget *sp = second->focusProxy()
| 0 | ||||||||||||||||||||||||||||||||||||
4385 | second = sp; never executed: second = sp; | 0 | ||||||||||||||||||||||||||||||||||||
4386 | - | |||||||||||||||||||||||||||||||||||||
4387 | - | |||||||||||||||||||||||||||||||||||||
4388 | QWidget *fn = first->d_func()->focus_next; | - | ||||||||||||||||||||||||||||||||||||
4389 | - | |||||||||||||||||||||||||||||||||||||
4390 | if (fn == second
| 0 | ||||||||||||||||||||||||||||||||||||
4391 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4392 | - | |||||||||||||||||||||||||||||||||||||
4393 | QWidget *sp = second->d_func()->focus_prev; | - | ||||||||||||||||||||||||||||||||||||
4394 | QWidget *sn = second->d_func()->focus_next; | - | ||||||||||||||||||||||||||||||||||||
4395 | - | |||||||||||||||||||||||||||||||||||||
4396 | fn->d_func()->focus_prev = second; | - | ||||||||||||||||||||||||||||||||||||
4397 | first->d_func()->focus_next = second; | - | ||||||||||||||||||||||||||||||||||||
4398 | - | |||||||||||||||||||||||||||||||||||||
4399 | second->d_func()->focus_next = fn; | - | ||||||||||||||||||||||||||||||||||||
4400 | second->d_func()->focus_prev = first; | - | ||||||||||||||||||||||||||||||||||||
4401 | - | |||||||||||||||||||||||||||||||||||||
4402 | sp->d_func()->focus_next = sn; | - | ||||||||||||||||||||||||||||||||||||
4403 | sn->d_func()->focus_prev = sp; | - | ||||||||||||||||||||||||||||||||||||
4404 | - | |||||||||||||||||||||||||||||||||||||
4405 | - | |||||||||||||||||||||||||||||||||||||
4406 | ((!(first->d_func()->focus_next->d_func()->focus_prev == first)) ? qt_assert("first->d_func()->focus_next->d_func()->focus_prev == first",__FILE__,6949) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
4407 | ((!(first->d_func()->focus_prev->d_func()->focus_next == first)) ? qt_assert("first->d_func()->focus_prev->d_func()->focus_next == first",__FILE__,6950) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
4408 | - | |||||||||||||||||||||||||||||||||||||
4409 | ((!(second->d_func()->focus_next->d_func()->focus_prev == second)) ? qt_assert("second->d_func()->focus_next->d_func()->focus_prev == second",__FILE__,6952) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
4410 | ((!(second->d_func()->focus_prev->d_func()->focus_next == second)) ? qt_assert("second->d_func()->focus_prev->d_func()->focus_next == second",__FILE__,6953) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
4411 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4412 | void QWidgetPrivate::reparentFocusWidgets(QWidget * oldtlw) | - | ||||||||||||||||||||||||||||||||||||
4413 | { | - | ||||||||||||||||||||||||||||||||||||
4414 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4415 | if (oldtlw == q->window()
| 0 | ||||||||||||||||||||||||||||||||||||
4416 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4417 | - | |||||||||||||||||||||||||||||||||||||
4418 | if(focus_child
| 0 | ||||||||||||||||||||||||||||||||||||
4419 | focus_child->clearFocus(); never executed: focus_child->clearFocus(); | 0 | ||||||||||||||||||||||||||||||||||||
4420 | - | |||||||||||||||||||||||||||||||||||||
4421 | - | |||||||||||||||||||||||||||||||||||||
4422 | QWidget *firstOld = 0; | - | ||||||||||||||||||||||||||||||||||||
4423 | - | |||||||||||||||||||||||||||||||||||||
4424 | QWidget *o = 0; | - | ||||||||||||||||||||||||||||||||||||
4425 | QWidget *n = q; | - | ||||||||||||||||||||||||||||||||||||
4426 | - | |||||||||||||||||||||||||||||||||||||
4427 | bool prevWasNew = true; | - | ||||||||||||||||||||||||||||||||||||
4428 | QWidget *w = focus_next; | - | ||||||||||||||||||||||||||||||||||||
4429 | - | |||||||||||||||||||||||||||||||||||||
4430 | - | |||||||||||||||||||||||||||||||||||||
4431 | - | |||||||||||||||||||||||||||||||||||||
4432 | - | |||||||||||||||||||||||||||||||||||||
4433 | while (w != q
| 0 | ||||||||||||||||||||||||||||||||||||
4434 | bool currentIsNew = q->isAncestorOf(w); | - | ||||||||||||||||||||||||||||||||||||
4435 | if (currentIsNew
| 0 | ||||||||||||||||||||||||||||||||||||
4436 | if (!prevWasNew
| 0 | ||||||||||||||||||||||||||||||||||||
4437 | - | |||||||||||||||||||||||||||||||||||||
4438 | n->d_func()->focus_next = w; | - | ||||||||||||||||||||||||||||||||||||
4439 | w->d_func()->focus_prev = n; | - | ||||||||||||||||||||||||||||||||||||
4440 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4441 | n = w; | - | ||||||||||||||||||||||||||||||||||||
4442 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4443 | if (prevWasNew
| 0 | ||||||||||||||||||||||||||||||||||||
4444 | - | |||||||||||||||||||||||||||||||||||||
4445 | if (o
| 0 | ||||||||||||||||||||||||||||||||||||
4446 | o->d_func()->focus_next = w; | - | ||||||||||||||||||||||||||||||||||||
4447 | w->d_func()->focus_prev = o; | - | ||||||||||||||||||||||||||||||||||||
4448 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4449 | - | |||||||||||||||||||||||||||||||||||||
4450 | firstOld = w; | - | ||||||||||||||||||||||||||||||||||||
4451 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4452 | } | - | ||||||||||||||||||||||||||||||||||||
4453 | o = w; | - | ||||||||||||||||||||||||||||||||||||
4454 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4455 | w = w->d_func()->focus_next; | - | ||||||||||||||||||||||||||||||||||||
4456 | prevWasNew = currentIsNew; | - | ||||||||||||||||||||||||||||||||||||
4457 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4458 | - | |||||||||||||||||||||||||||||||||||||
4459 | - | |||||||||||||||||||||||||||||||||||||
4460 | if (firstOld
| 0 | ||||||||||||||||||||||||||||||||||||
4461 | o->d_func()->focus_next = firstOld; | - | ||||||||||||||||||||||||||||||||||||
4462 | firstOld->d_func()->focus_prev = o; | - | ||||||||||||||||||||||||||||||||||||
4463 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4464 | - | |||||||||||||||||||||||||||||||||||||
4465 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4466 | QWidget *topLevel = q->window(); | - | ||||||||||||||||||||||||||||||||||||
4467 | - | |||||||||||||||||||||||||||||||||||||
4468 | - | |||||||||||||||||||||||||||||||||||||
4469 | QWidget *prev = topLevel->d_func()->focus_prev; | - | ||||||||||||||||||||||||||||||||||||
4470 | - | |||||||||||||||||||||||||||||||||||||
4471 | topLevel->d_func()->focus_prev = n; | - | ||||||||||||||||||||||||||||||||||||
4472 | prev->d_func()->focus_next = q; | - | ||||||||||||||||||||||||||||||||||||
4473 | - | |||||||||||||||||||||||||||||||||||||
4474 | focus_prev = prev; | - | ||||||||||||||||||||||||||||||||||||
4475 | n->d_func()->focus_next = topLevel; | - | ||||||||||||||||||||||||||||||||||||
4476 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4477 | - | |||||||||||||||||||||||||||||||||||||
4478 | n->d_func()->focus_next = q; | - | ||||||||||||||||||||||||||||||||||||
4479 | focus_prev = n; | - | ||||||||||||||||||||||||||||||||||||
4480 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4481 | - | |||||||||||||||||||||||||||||||||||||
4482 | } | - | ||||||||||||||||||||||||||||||||||||
4483 | int QWidgetPrivate::pointToRect(const QPoint &p, const QRect &r) | - | ||||||||||||||||||||||||||||||||||||
4484 | { | - | ||||||||||||||||||||||||||||||||||||
4485 | int dx = 0; | - | ||||||||||||||||||||||||||||||||||||
4486 | int dy = 0; | - | ||||||||||||||||||||||||||||||||||||
4487 | if (p.x() < r.left()
| 0 | ||||||||||||||||||||||||||||||||||||
4488 | dx = r.left() - p.x(); never executed: dx = r.left() - p.x(); | 0 | ||||||||||||||||||||||||||||||||||||
4489 | else if (p.x() > r.right()
| 0 | ||||||||||||||||||||||||||||||||||||
4490 | dx = p.x() - r.right(); never executed: dx = p.x() - r.right(); | 0 | ||||||||||||||||||||||||||||||||||||
4491 | if (p.y() < r.top()
| 0 | ||||||||||||||||||||||||||||||||||||
4492 | dy = r.top() - p.y(); never executed: dy = r.top() - p.y(); | 0 | ||||||||||||||||||||||||||||||||||||
4493 | else if (p.y() > r.bottom()
| 0 | ||||||||||||||||||||||||||||||||||||
4494 | dy = p.y() - r.bottom(); never executed: dy = p.y() - r.bottom(); | 0 | ||||||||||||||||||||||||||||||||||||
4495 | return never executed: dx + dy;return dx + dy; never executed: return dx + dy; | 0 | ||||||||||||||||||||||||||||||||||||
4496 | } | - | ||||||||||||||||||||||||||||||||||||
4497 | QSize QWidget::frameSize() const | - | ||||||||||||||||||||||||||||||||||||
4498 | { | - | ||||||||||||||||||||||||||||||||||||
4499 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4500 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4501 | QRect fs = d->frameStrut(); | - | ||||||||||||||||||||||||||||||||||||
4502 | return never executed: QSize(data->crect.width() + fs.left() + fs.right(),return QSize(data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); never executed: return QSize(data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||
4503 | data->crect.height() + fs.top() + fs.bottom()); never executed: return QSize(data->crect.width() + fs.left() + fs.right(), data->crect.height() + fs.top() + fs.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||
4504 | } | - | ||||||||||||||||||||||||||||||||||||
4505 | return never executed: data->crect.size();return data->crect.size(); never executed: return data->crect.size(); | 0 | ||||||||||||||||||||||||||||||||||||
4506 | } | - | ||||||||||||||||||||||||||||||||||||
4507 | void QWidget::move(const QPoint &p) | - | ||||||||||||||||||||||||||||||||||||
4508 | { | - | ||||||||||||||||||||||||||||||||||||
4509 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4510 | setAttribute(Qt::WA_Moved); | - | ||||||||||||||||||||||||||||||||||||
4511 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
4512 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4513 | d->topData()->posIncludesFrame = false; never executed: d->topData()->posIncludesFrame = false; | 0 | ||||||||||||||||||||||||||||||||||||
4514 | d->setGeometry_sys(p.x() + geometry().x() - QWidget::x(), | - | ||||||||||||||||||||||||||||||||||||
4515 | p.y() + geometry().y() - QWidget::y(), | - | ||||||||||||||||||||||||||||||||||||
4516 | width(), height(), true); | - | ||||||||||||||||||||||||||||||||||||
4517 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
4518 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4519 | - | |||||||||||||||||||||||||||||||||||||
4520 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4521 | d->topData()->posIncludesFrame = true; never executed: d->topData()->posIncludesFrame = true; | 0 | ||||||||||||||||||||||||||||||||||||
4522 | data->crect.moveTopLeft(p); | - | ||||||||||||||||||||||||||||||||||||
4523 | setAttribute(Qt::WA_PendingMoveEvent); | - | ||||||||||||||||||||||||||||||||||||
4524 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4525 | - | |||||||||||||||||||||||||||||||||||||
4526 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4527 | QWindowContainer::parentWasMoved(this); never executed: QWindowContainer::parentWasMoved(this); | 0 | ||||||||||||||||||||||||||||||||||||
4528 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4529 | - | |||||||||||||||||||||||||||||||||||||
4530 | - | |||||||||||||||||||||||||||||||||||||
4531 | - | |||||||||||||||||||||||||||||||||||||
4532 | - | |||||||||||||||||||||||||||||||||||||
4533 | void QWidgetPrivate::fixPosIncludesFrame() | - | ||||||||||||||||||||||||||||||||||||
4534 | { | - | ||||||||||||||||||||||||||||||||||||
4535 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4536 | if (QTLWExtra *te = maybeTopData()
| 0 | ||||||||||||||||||||||||||||||||||||
4537 | if (te->posIncludesFrame
| 0 | ||||||||||||||||||||||||||||||||||||
4538 | - | |||||||||||||||||||||||||||||||||||||
4539 | - | |||||||||||||||||||||||||||||||||||||
4540 | if (q->testAttribute(Qt::WA_DontShowOnScreen)
| 0 | ||||||||||||||||||||||||||||||||||||
4541 | te->posIncludesFrame = 0; | - | ||||||||||||||||||||||||||||||||||||
4542 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4543 | if (q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
4544 | updateFrameStrut(); | - | ||||||||||||||||||||||||||||||||||||
4545 | if (!q->data->fstrut_dirty
| 0 | ||||||||||||||||||||||||||||||||||||
4546 | data.crect.translate(te->frameStrut.x(), te->frameStrut.y()); | - | ||||||||||||||||||||||||||||||||||||
4547 | te->posIncludesFrame = 0; | - | ||||||||||||||||||||||||||||||||||||
4548 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4549 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4550 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4551 | } | - | ||||||||||||||||||||||||||||||||||||
4552 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4553 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4554 | - | |||||||||||||||||||||||||||||||||||||
4555 | - | |||||||||||||||||||||||||||||||||||||
4556 | - | |||||||||||||||||||||||||||||||||||||
4557 | - | |||||||||||||||||||||||||||||||||||||
4558 | - | |||||||||||||||||||||||||||||||||||||
4559 | - | |||||||||||||||||||||||||||||||||||||
4560 | - | |||||||||||||||||||||||||||||||||||||
4561 | void QWidget::resize(const QSize &s) | - | ||||||||||||||||||||||||||||||||||||
4562 | { | - | ||||||||||||||||||||||||||||||||||||
4563 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4564 | setAttribute(Qt::WA_Resized); | - | ||||||||||||||||||||||||||||||||||||
4565 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
4566 | d->fixPosIncludesFrame(); | - | ||||||||||||||||||||||||||||||||||||
4567 | d->setGeometry_sys(geometry().x(), geometry().y(), s.width(), s.height(), false); | - | ||||||||||||||||||||||||||||||||||||
4568 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
4569 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4570 | data->crect.setSize(s.boundedTo(maximumSize()).expandedTo(minimumSize())); | - | ||||||||||||||||||||||||||||||||||||
4571 | setAttribute(Qt::WA_PendingResizeEvent); | - | ||||||||||||||||||||||||||||||||||||
4572 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4573 | } | - | ||||||||||||||||||||||||||||||||||||
4574 | - | |||||||||||||||||||||||||||||||||||||
4575 | void QWidget::setGeometry(const QRect &r) | - | ||||||||||||||||||||||||||||||||||||
4576 | { | - | ||||||||||||||||||||||||||||||||||||
4577 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4578 | setAttribute(Qt::WA_Resized); | - | ||||||||||||||||||||||||||||||||||||
4579 | setAttribute(Qt::WA_Moved); | - | ||||||||||||||||||||||||||||||||||||
4580 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4581 | d->topData()->posIncludesFrame = 0; never executed: d->topData()->posIncludesFrame = 0; | 0 | ||||||||||||||||||||||||||||||||||||
4582 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
4583 | d->setGeometry_sys(r.x(), r.y(), r.width(), r.height(), true); | - | ||||||||||||||||||||||||||||||||||||
4584 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
4585 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4586 | data->crect.setTopLeft(r.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
4587 | data->crect.setSize(r.size().boundedTo(maximumSize()).expandedTo(minimumSize())); | - | ||||||||||||||||||||||||||||||||||||
4588 | setAttribute(Qt::WA_PendingMoveEvent); | - | ||||||||||||||||||||||||||||||||||||
4589 | setAttribute(Qt::WA_PendingResizeEvent); | - | ||||||||||||||||||||||||||||||||||||
4590 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4591 | - | |||||||||||||||||||||||||||||||||||||
4592 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4593 | QWindowContainer::parentWasMoved(this); never executed: QWindowContainer::parentWasMoved(this); | 0 | ||||||||||||||||||||||||||||||||||||
4594 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4595 | - | |||||||||||||||||||||||||||||||||||||
4596 | void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) | - | ||||||||||||||||||||||||||||||||||||
4597 | { | - | ||||||||||||||||||||||||||||||||||||
4598 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4599 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
4600 | w = qMin(w,extra->maxw); | - | ||||||||||||||||||||||||||||||||||||
4601 | h = qMin(h,extra->maxh); | - | ||||||||||||||||||||||||||||||||||||
4602 | w = qMax(w,extra->minw); | - | ||||||||||||||||||||||||||||||||||||
4603 | h = qMax(h,extra->minh); | - | ||||||||||||||||||||||||||||||||||||
4604 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4605 | - | |||||||||||||||||||||||||||||||||||||
4606 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4607 | QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration(); | - | ||||||||||||||||||||||||||||||||||||
4608 | if (!integration->hasCapability(QPlatformIntegration::NonFullScreenWindows)
| 0 | ||||||||||||||||||||||||||||||||||||
4609 | x = 0; | - | ||||||||||||||||||||||||||||||||||||
4610 | y = 0; | - | ||||||||||||||||||||||||||||||||||||
4611 | w = q->windowHandle()->width(); | - | ||||||||||||||||||||||||||||||||||||
4612 | h = q->windowHandle()->height(); | - | ||||||||||||||||||||||||||||||||||||
4613 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4614 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4615 | - | |||||||||||||||||||||||||||||||||||||
4616 | QPoint oldp = q->geometry().topLeft(); | - | ||||||||||||||||||||||||||||||||||||
4617 | QSize olds = q->size(); | - | ||||||||||||||||||||||||||||||||||||
4618 | QRect r(x, y, w, h); | - | ||||||||||||||||||||||||||||||||||||
4619 | - | |||||||||||||||||||||||||||||||||||||
4620 | bool isResize = olds != r.size(); | - | ||||||||||||||||||||||||||||||||||||
4621 | isMove = oldp != r.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
4622 | - | |||||||||||||||||||||||||||||||||||||
4623 | - | |||||||||||||||||||||||||||||||||||||
4624 | - | |||||||||||||||||||||||||||||||||||||
4625 | - | |||||||||||||||||||||||||||||||||||||
4626 | if (r.size() == olds
| 0 | ||||||||||||||||||||||||||||||||||||
4627 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4628 | - | |||||||||||||||||||||||||||||||||||||
4629 | if (!data.in_set_window_state
| 0 | ||||||||||||||||||||||||||||||||||||
4630 | q->data->window_state &= ~Qt::WindowMaximized; | - | ||||||||||||||||||||||||||||||||||||
4631 | q->data->window_state &= ~Qt::WindowFullScreen; | - | ||||||||||||||||||||||||||||||||||||
4632 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4633 | topData()->normalGeometry = QRect(0, 0, -1, -1); never executed: topData()->normalGeometry = QRect(0, 0, -1, -1); | 0 | ||||||||||||||||||||||||||||||||||||
4634 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4635 | - | |||||||||||||||||||||||||||||||||||||
4636 | QPoint oldPos = q->pos(); | - | ||||||||||||||||||||||||||||||||||||
4637 | data.crect = r; | - | ||||||||||||||||||||||||||||||||||||
4638 | - | |||||||||||||||||||||||||||||||||||||
4639 | bool needsShow = false; | - | ||||||||||||||||||||||||||||||||||||
4640 | - | |||||||||||||||||||||||||||||||||||||
4641 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4642 | if (!(data.window_state & Qt::WindowFullScreen)
| 0 | ||||||||||||||||||||||||||||||||||||
4643 | q->setAttribute(Qt::WA_OutsideWSRange, true); | - | ||||||||||||||||||||||||||||||||||||
4644 | if (q->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
4645 | hide_sys(); never executed: hide_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
4646 | data.crect = QRect(x, y, w, h); | - | ||||||||||||||||||||||||||||||||||||
4647 | } never executed: else if (q->testAttribute(Qt::WA_OutsideWSRange)end of block
| 0 | ||||||||||||||||||||||||||||||||||||
4648 | q->setAttribute(Qt::WA_OutsideWSRange, false); | - | ||||||||||||||||||||||||||||||||||||
4649 | needsShow = true; | - | ||||||||||||||||||||||||||||||||||||
4650 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4651 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4652 | - | |||||||||||||||||||||||||||||||||||||
4653 | if (q->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
4654 | if (!q->testAttribute(Qt::WA_DontShowOnScreen)
| 0 | ||||||||||||||||||||||||||||||||||||
4655 | if (q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
4656 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4657 | q->windowHandle()->setGeometry(q->geometry()); | - | ||||||||||||||||||||||||||||||||||||
4658 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4659 | QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint()); | - | ||||||||||||||||||||||||||||||||||||
4660 | q->windowHandle()->setGeometry(QRect(posInNativeParent,r.size())); | - | ||||||||||||||||||||||||||||||||||||
4661 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4662 | - | |||||||||||||||||||||||||||||||||||||
4663 | if (needsShow
| 0 | ||||||||||||||||||||||||||||||||||||
4664 | show_sys(); never executed: show_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
4665 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4666 | - | |||||||||||||||||||||||||||||||||||||
4667 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4668 | if (renderToTexture
| 0 | ||||||||||||||||||||||||||||||||||||
4669 | QRegion updateRegion(q->geometry()); | - | ||||||||||||||||||||||||||||||||||||
4670 | updateRegion += QRect(oldPos, olds); | - | ||||||||||||||||||||||||||||||||||||
4671 | q->parentWidget()->d_func()->invalidateBuffer(updateRegion); | - | ||||||||||||||||||||||||||||||||||||
4672 | } never executed: else if (isMoveend of block
| 0 | ||||||||||||||||||||||||||||||||||||
4673 | moveRect(QRect(oldPos, olds), x - oldPos.x(), y - oldPos.y()); | - | ||||||||||||||||||||||||||||||||||||
4674 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4675 | invalidateBuffer_resizeHelper(oldPos, olds); | - | ||||||||||||||||||||||||||||||||||||
4676 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4677 | } | - | ||||||||||||||||||||||||||||||||||||
4678 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4679 | - | |||||||||||||||||||||||||||||||||||||
4680 | if (isMove
| 0 | ||||||||||||||||||||||||||||||||||||
4681 | QMoveEvent e(q->pos(), oldPos); | - | ||||||||||||||||||||||||||||||||||||
4682 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
4683 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4684 | if (isResize
| 0 | ||||||||||||||||||||||||||||||||||||
4685 | QResizeEvent e(r.size(), olds); | - | ||||||||||||||||||||||||||||||||||||
4686 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
4687 | if (q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
4688 | q->update(); never executed: q->update(); | 0 | ||||||||||||||||||||||||||||||||||||
4689 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4690 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4691 | if (isMove
| 0 | ||||||||||||||||||||||||||||||||||||
4692 | q->setAttribute(Qt::WA_PendingMoveEvent, true); never executed: q->setAttribute(Qt::WA_PendingMoveEvent, true); | 0 | ||||||||||||||||||||||||||||||||||||
4693 | if (isResize
| 0 | ||||||||||||||||||||||||||||||||||||
4694 | q->setAttribute(Qt::WA_PendingResizeEvent, true); never executed: q->setAttribute(Qt::WA_PendingResizeEvent, true); | 0 | ||||||||||||||||||||||||||||||||||||
4695 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4696 | - | |||||||||||||||||||||||||||||||||||||
4697 | } | - | ||||||||||||||||||||||||||||||||||||
4698 | QByteArray QWidget::saveGeometry() const | - | ||||||||||||||||||||||||||||||||||||
4699 | { | - | ||||||||||||||||||||||||||||||||||||
4700 | QByteArray array; | - | ||||||||||||||||||||||||||||||||||||
4701 | QDataStream stream(&array, QIODevice::WriteOnly); | - | ||||||||||||||||||||||||||||||||||||
4702 | stream.setVersion(QDataStream::Qt_4_0); | - | ||||||||||||||||||||||||||||||||||||
4703 | const quint32 magicNumber = 0x1D9D0CB; | - | ||||||||||||||||||||||||||||||||||||
4704 | - | |||||||||||||||||||||||||||||||||||||
4705 | - | |||||||||||||||||||||||||||||||||||||
4706 | - | |||||||||||||||||||||||||||||||||||||
4707 | quint16 majorVersion = 2; | - | ||||||||||||||||||||||||||||||||||||
4708 | quint16 minorVersion = 0; | - | ||||||||||||||||||||||||||||||||||||
4709 | const int screenNumber = QApplication::desktop()->screenNumber(this); | - | ||||||||||||||||||||||||||||||||||||
4710 | stream << magicNumber | - | ||||||||||||||||||||||||||||||||||||
4711 | << majorVersion | - | ||||||||||||||||||||||||||||||||||||
4712 | << minorVersion | - | ||||||||||||||||||||||||||||||||||||
4713 | - | |||||||||||||||||||||||||||||||||||||
4714 | - | |||||||||||||||||||||||||||||||||||||
4715 | - | |||||||||||||||||||||||||||||||||||||
4716 | - | |||||||||||||||||||||||||||||||||||||
4717 | << frameGeometry() | - | ||||||||||||||||||||||||||||||||||||
4718 | << normalGeometry() | - | ||||||||||||||||||||||||||||||||||||
4719 | - | |||||||||||||||||||||||||||||||||||||
4720 | << qint32(screenNumber) | - | ||||||||||||||||||||||||||||||||||||
4721 | << quint8(windowState() & Qt::WindowMaximized) | - | ||||||||||||||||||||||||||||||||||||
4722 | << quint8(windowState() & Qt::WindowFullScreen) | - | ||||||||||||||||||||||||||||||||||||
4723 | << qint32(QApplication::desktop()->screenGeometry(screenNumber).width()); | - | ||||||||||||||||||||||||||||||||||||
4724 | return never executed: array;return array; never executed: return array; | 0 | ||||||||||||||||||||||||||||||||||||
4725 | } | - | ||||||||||||||||||||||||||||||||||||
4726 | bool QWidget::restoreGeometry(const QByteArray &geometry) | - | ||||||||||||||||||||||||||||||||||||
4727 | { | - | ||||||||||||||||||||||||||||||||||||
4728 | if (geometry.size() < 4
| 0 | ||||||||||||||||||||||||||||||||||||
4729 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4730 | QDataStream stream(geometry); | - | ||||||||||||||||||||||||||||||||||||
4731 | stream.setVersion(QDataStream::Qt_4_0); | - | ||||||||||||||||||||||||||||||||||||
4732 | - | |||||||||||||||||||||||||||||||||||||
4733 | const quint32 magicNumber = 0x1D9D0CB; | - | ||||||||||||||||||||||||||||||||||||
4734 | quint32 storedMagicNumber; | - | ||||||||||||||||||||||||||||||||||||
4735 | stream >> storedMagicNumber; | - | ||||||||||||||||||||||||||||||||||||
4736 | if (storedMagicNumber != magicNumber
| 0 | ||||||||||||||||||||||||||||||||||||
4737 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4738 | - | |||||||||||||||||||||||||||||||||||||
4739 | const quint16 currentMajorVersion = 2; | - | ||||||||||||||||||||||||||||||||||||
4740 | quint16 majorVersion = 0; | - | ||||||||||||||||||||||||||||||||||||
4741 | quint16 minorVersion = 0; | - | ||||||||||||||||||||||||||||||||||||
4742 | - | |||||||||||||||||||||||||||||||||||||
4743 | stream >> majorVersion >> minorVersion; | - | ||||||||||||||||||||||||||||||||||||
4744 | - | |||||||||||||||||||||||||||||||||||||
4745 | if (majorVersion > currentMajorVersion
| 0 | ||||||||||||||||||||||||||||||||||||
4746 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4747 | - | |||||||||||||||||||||||||||||||||||||
4748 | - | |||||||||||||||||||||||||||||||||||||
4749 | QRect restoredFrameGeometry; | - | ||||||||||||||||||||||||||||||||||||
4750 | QRect restoredNormalGeometry; | - | ||||||||||||||||||||||||||||||||||||
4751 | qint32 restoredScreenNumber; | - | ||||||||||||||||||||||||||||||||||||
4752 | quint8 maximized; | - | ||||||||||||||||||||||||||||||||||||
4753 | quint8 fullScreen; | - | ||||||||||||||||||||||||||||||||||||
4754 | qint32 restoredScreenWidth = 0; | - | ||||||||||||||||||||||||||||||||||||
4755 | - | |||||||||||||||||||||||||||||||||||||
4756 | stream >> restoredFrameGeometry | - | ||||||||||||||||||||||||||||||||||||
4757 | >> restoredNormalGeometry | - | ||||||||||||||||||||||||||||||||||||
4758 | >> restoredScreenNumber | - | ||||||||||||||||||||||||||||||||||||
4759 | >> maximized | - | ||||||||||||||||||||||||||||||||||||
4760 | >> fullScreen; | - | ||||||||||||||||||||||||||||||||||||
4761 | - | |||||||||||||||||||||||||||||||||||||
4762 | if (majorVersion > 1
| 0 | ||||||||||||||||||||||||||||||||||||
4763 | stream >> restoredScreenWidth; never executed: stream >> restoredScreenWidth; | 0 | ||||||||||||||||||||||||||||||||||||
4764 | - | |||||||||||||||||||||||||||||||||||||
4765 | const QDesktopWidget * const desktop = QApplication::desktop(); | - | ||||||||||||||||||||||||||||||||||||
4766 | if (restoredScreenNumber >= desktop->numScreens()
| 0 | ||||||||||||||||||||||||||||||||||||
4767 | restoredScreenNumber = desktop->primaryScreen(); never executed: restoredScreenNumber = desktop->primaryScreen(); | 0 | ||||||||||||||||||||||||||||||||||||
4768 | const qreal screenWidthF = qreal(desktop->screenGeometry(restoredScreenNumber).width()); | - | ||||||||||||||||||||||||||||||||||||
4769 | - | |||||||||||||||||||||||||||||||||||||
4770 | - | |||||||||||||||||||||||||||||||||||||
4771 | if (restoredScreenWidth
| 0 | ||||||||||||||||||||||||||||||||||||
4772 | const qreal factor = qreal(restoredScreenWidth) / screenWidthF; | - | ||||||||||||||||||||||||||||||||||||
4773 | if (factor < 0.8
| 0 | ||||||||||||||||||||||||||||||||||||
4774 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4775 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4776 | - | |||||||||||||||||||||||||||||||||||||
4777 | - | |||||||||||||||||||||||||||||||||||||
4778 | if (!maximized
| 0 | ||||||||||||||||||||||||||||||||||||
4779 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
4780 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4781 | - | |||||||||||||||||||||||||||||||||||||
4782 | const int frameHeight = 20; | - | ||||||||||||||||||||||||||||||||||||
4783 | if (!restoredFrameGeometry.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||
4784 | restoredFrameGeometry = QRect(QPoint(0,0), sizeHint()); never executed: restoredFrameGeometry = QRect(QPoint(0,0), sizeHint()); | 0 | ||||||||||||||||||||||||||||||||||||
4785 | - | |||||||||||||||||||||||||||||||||||||
4786 | if (!restoredNormalGeometry.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||
4787 | restoredNormalGeometry = QRect(QPoint(0, frameHeight), sizeHint()); never executed: restoredNormalGeometry = QRect(QPoint(0, frameHeight), sizeHint()); | 0 | ||||||||||||||||||||||||||||||||||||
4788 | if (!restoredNormalGeometry.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||
4789 | - | |||||||||||||||||||||||||||||||||||||
4790 | restoredNormalGeometry.setSize(restoredNormalGeometry | - | ||||||||||||||||||||||||||||||||||||
4791 | .size() | - | ||||||||||||||||||||||||||||||||||||
4792 | .expandedTo(d_func()->adjustedSize())); | - | ||||||||||||||||||||||||||||||||||||
4793 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4794 | - | |||||||||||||||||||||||||||||||||||||
4795 | const QRect availableGeometry = desktop->availableGeometry(restoredScreenNumber); | - | ||||||||||||||||||||||||||||||||||||
4796 | if (!restoredFrameGeometry.intersects(availableGeometry)
| 0 | ||||||||||||||||||||||||||||||||||||
4797 | restoredFrameGeometry.moveBottom(qMin(restoredFrameGeometry.bottom(), availableGeometry.bottom())); | - | ||||||||||||||||||||||||||||||||||||
4798 | restoredFrameGeometry.moveLeft(qMax(restoredFrameGeometry.left(), availableGeometry.left())); | - | ||||||||||||||||||||||||||||||||||||
4799 | restoredFrameGeometry.moveRight(qMin(restoredFrameGeometry.right(), availableGeometry.right())); | - | ||||||||||||||||||||||||||||||||||||
4800 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4801 | restoredFrameGeometry.moveTop(qMax(restoredFrameGeometry.top(), availableGeometry.top())); | - | ||||||||||||||||||||||||||||||||||||
4802 | - | |||||||||||||||||||||||||||||||||||||
4803 | if (!restoredNormalGeometry.intersects(availableGeometry)
| 0 | ||||||||||||||||||||||||||||||||||||
4804 | restoredNormalGeometry.moveBottom(qMin(restoredNormalGeometry.bottom(), availableGeometry.bottom())); | - | ||||||||||||||||||||||||||||||||||||
4805 | restoredNormalGeometry.moveLeft(qMax(restoredNormalGeometry.left(), availableGeometry.left())); | - | ||||||||||||||||||||||||||||||||||||
4806 | restoredNormalGeometry.moveRight(qMin(restoredNormalGeometry.right(), availableGeometry.right())); | - | ||||||||||||||||||||||||||||||||||||
4807 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4808 | restoredNormalGeometry.moveTop(qMax(restoredNormalGeometry.top(), availableGeometry.top() + frameHeight)); | - | ||||||||||||||||||||||||||||||||||||
4809 | - | |||||||||||||||||||||||||||||||||||||
4810 | if (maximized
| 0 | ||||||||||||||||||||||||||||||||||||
4811 | - | |||||||||||||||||||||||||||||||||||||
4812 | - | |||||||||||||||||||||||||||||||||||||
4813 | Qt::WindowStates ws = windowState(); | - | ||||||||||||||||||||||||||||||||||||
4814 | - | |||||||||||||||||||||||||||||||||||||
4815 | setGeometry(restoredNormalGeometry); | - | ||||||||||||||||||||||||||||||||||||
4816 | if (maximized
| 0 | ||||||||||||||||||||||||||||||||||||
4817 | ws |= Qt::WindowMaximized; never executed: ws |= Qt::WindowMaximized; | 0 | ||||||||||||||||||||||||||||||||||||
4818 | if (fullScreen
| 0 | ||||||||||||||||||||||||||||||||||||
4819 | ws |= Qt::WindowFullScreen; never executed: ws |= Qt::WindowFullScreen; | 0 | ||||||||||||||||||||||||||||||||||||
4820 | setWindowState(ws); | - | ||||||||||||||||||||||||||||||||||||
4821 | d_func()->topData()->normalGeometry = restoredNormalGeometry; | - | ||||||||||||||||||||||||||||||||||||
4822 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4823 | QPoint offset; | - | ||||||||||||||||||||||||||||||||||||
4824 | - | |||||||||||||||||||||||||||||||||||||
4825 | - | |||||||||||||||||||||||||||||||||||||
4826 | - | |||||||||||||||||||||||||||||||||||||
4827 | - | |||||||||||||||||||||||||||||||||||||
4828 | setWindowState(windowState() & ~(Qt::WindowMaximized | Qt::WindowFullScreen)); | - | ||||||||||||||||||||||||||||||||||||
4829 | move(restoredFrameGeometry.topLeft() + offset); | - | ||||||||||||||||||||||||||||||||||||
4830 | resize(restoredNormalGeometry.size()); | - | ||||||||||||||||||||||||||||||||||||
4831 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4832 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
4833 | } | - | ||||||||||||||||||||||||||||||||||||
4834 | void QWidget::setContentsMargins(int left, int top, int right, int bottom) | - | ||||||||||||||||||||||||||||||||||||
4835 | { | - | ||||||||||||||||||||||||||||||||||||
4836 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4837 | if (left == d->leftmargin
| 0 | ||||||||||||||||||||||||||||||||||||
4838 | && right == d->rightmargin
| 0 | ||||||||||||||||||||||||||||||||||||
4839 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4840 | d->leftmargin = left; | - | ||||||||||||||||||||||||||||||||||||
4841 | d->topmargin = top; | - | ||||||||||||||||||||||||||||||||||||
4842 | d->rightmargin = right; | - | ||||||||||||||||||||||||||||||||||||
4843 | d->bottommargin = bottom; | - | ||||||||||||||||||||||||||||||||||||
4844 | - | |||||||||||||||||||||||||||||||||||||
4845 | if (QLayout *l=d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
4846 | l->update(); never executed: l->update(); | 0 | ||||||||||||||||||||||||||||||||||||
4847 | else | - | ||||||||||||||||||||||||||||||||||||
4848 | updateGeometry(); never executed: updateGeometry(); | 0 | ||||||||||||||||||||||||||||||||||||
4849 | - | |||||||||||||||||||||||||||||||||||||
4850 | if (isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
4851 | update(); | - | ||||||||||||||||||||||||||||||||||||
4852 | QResizeEvent e(data->crect.size(), data->crect.size()); | - | ||||||||||||||||||||||||||||||||||||
4853 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
4854 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
4855 | setAttribute(Qt::WA_PendingResizeEvent, true); | - | ||||||||||||||||||||||||||||||||||||
4856 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4857 | - | |||||||||||||||||||||||||||||||||||||
4858 | QEvent e(QEvent::ContentsRectChange); | - | ||||||||||||||||||||||||||||||||||||
4859 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
4860 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4861 | void QWidget::setContentsMargins(const QMargins &margins) | - | ||||||||||||||||||||||||||||||||||||
4862 | { | - | ||||||||||||||||||||||||||||||||||||
4863 | setContentsMargins(margins.left(), margins.top(), | - | ||||||||||||||||||||||||||||||||||||
4864 | margins.right(), margins.bottom()); | - | ||||||||||||||||||||||||||||||||||||
4865 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4866 | - | |||||||||||||||||||||||||||||||||||||
4867 | - | |||||||||||||||||||||||||||||||||||||
4868 | - | |||||||||||||||||||||||||||||||||||||
4869 | - | |||||||||||||||||||||||||||||||||||||
4870 | - | |||||||||||||||||||||||||||||||||||||
4871 | - | |||||||||||||||||||||||||||||||||||||
4872 | - | |||||||||||||||||||||||||||||||||||||
4873 | void QWidget::getContentsMargins(int *left, int *top, int *right, int *bottom) const | - | ||||||||||||||||||||||||||||||||||||
4874 | { | - | ||||||||||||||||||||||||||||||||||||
4875 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4876 | if (left
| 0 | ||||||||||||||||||||||||||||||||||||
4877 | * never executed: left = d->leftmargin;*left = d->leftmargin; never executed: *left = d->leftmargin; | 0 | ||||||||||||||||||||||||||||||||||||
4878 | if (top
| 0 | ||||||||||||||||||||||||||||||||||||
4879 | * never executed: top = d->topmargin;*top = d->topmargin; never executed: *top = d->topmargin; | 0 | ||||||||||||||||||||||||||||||||||||
4880 | if (right
| 0 | ||||||||||||||||||||||||||||||||||||
4881 | * never executed: right = d->rightmargin;*right = d->rightmargin; never executed: *right = d->rightmargin; | 0 | ||||||||||||||||||||||||||||||||||||
4882 | if (bottom
| 0 | ||||||||||||||||||||||||||||||||||||
4883 | * never executed: bottom = d->bottommargin;*bottom = d->bottommargin; never executed: *bottom = d->bottommargin; | 0 | ||||||||||||||||||||||||||||||||||||
4884 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4885 | QMargins QWidget::contentsMargins() const | - | ||||||||||||||||||||||||||||||||||||
4886 | { | - | ||||||||||||||||||||||||||||||||||||
4887 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4888 | return never executed: QMargins(d->leftmargin, d->topmargin, d->rightmargin, d->bottommargin);return QMargins(d->leftmargin, d->topmargin, d->rightmargin, d->bottommargin); never executed: return QMargins(d->leftmargin, d->topmargin, d->rightmargin, d->bottommargin); | 0 | ||||||||||||||||||||||||||||||||||||
4889 | } | - | ||||||||||||||||||||||||||||||||||||
4890 | - | |||||||||||||||||||||||||||||||||||||
4891 | - | |||||||||||||||||||||||||||||||||||||
4892 | - | |||||||||||||||||||||||||||||||||||||
4893 | - | |||||||||||||||||||||||||||||||||||||
4894 | - | |||||||||||||||||||||||||||||||||||||
4895 | - | |||||||||||||||||||||||||||||||||||||
4896 | - | |||||||||||||||||||||||||||||||||||||
4897 | QRect QWidget::contentsRect() const | - | ||||||||||||||||||||||||||||||||||||
4898 | { | - | ||||||||||||||||||||||||||||||||||||
4899 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4900 | return never executed: QRect(QPoint(d->leftmargin, d->topmargin),return QRect(QPoint(d->leftmargin, d->topmargin), QPoint(data->crect.width() - 1 - d->rightmargin, data->crect.height() - 1 - d->bottommargin)); never executed: return QRect(QPoint(d->leftmargin, d->topmargin), QPoint(data->crect.width() - 1 - d->rightmargin, data->crect.height() - 1 - d->bottommargin)); | 0 | ||||||||||||||||||||||||||||||||||||
4901 | QPoint(data->crect.width() - 1 - d->rightmargin, never executed: return QRect(QPoint(d->leftmargin, d->topmargin), QPoint(data->crect.width() - 1 - d->rightmargin, data->crect.height() - 1 - d->bottommargin)); | 0 | ||||||||||||||||||||||||||||||||||||
4902 | data->crect.height() - 1 - d->bottommargin)); never executed: return QRect(QPoint(d->leftmargin, d->topmargin), QPoint(data->crect.width() - 1 - d->rightmargin, data->crect.height() - 1 - d->bottommargin)); | 0 | ||||||||||||||||||||||||||||||||||||
4903 | - | |||||||||||||||||||||||||||||||||||||
4904 | } | - | ||||||||||||||||||||||||||||||||||||
4905 | Qt::ContextMenuPolicy QWidget::contextMenuPolicy() const | - | ||||||||||||||||||||||||||||||||||||
4906 | { | - | ||||||||||||||||||||||||||||||||||||
4907 | return never executed: (Qt::ContextMenuPolicy)data->context_menu_policy;return (Qt::ContextMenuPolicy)data->context_menu_policy; never executed: return (Qt::ContextMenuPolicy)data->context_menu_policy; | 0 | ||||||||||||||||||||||||||||||||||||
4908 | } | - | ||||||||||||||||||||||||||||||||||||
4909 | - | |||||||||||||||||||||||||||||||||||||
4910 | void QWidget::setContextMenuPolicy(Qt::ContextMenuPolicy policy) | - | ||||||||||||||||||||||||||||||||||||
4911 | { | - | ||||||||||||||||||||||||||||||||||||
4912 | data->context_menu_policy = (uint) policy; | - | ||||||||||||||||||||||||||||||||||||
4913 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4914 | Qt::FocusPolicy QWidget::focusPolicy() const | - | ||||||||||||||||||||||||||||||||||||
4915 | { | - | ||||||||||||||||||||||||||||||||||||
4916 | return never executed: (Qt::FocusPolicy)data->focus_policy;return (Qt::FocusPolicy)data->focus_policy; never executed: return (Qt::FocusPolicy)data->focus_policy; | 0 | ||||||||||||||||||||||||||||||||||||
4917 | } | - | ||||||||||||||||||||||||||||||||||||
4918 | - | |||||||||||||||||||||||||||||||||||||
4919 | void QWidget::setFocusPolicy(Qt::FocusPolicy policy) | - | ||||||||||||||||||||||||||||||||||||
4920 | { | - | ||||||||||||||||||||||||||||||||||||
4921 | data->focus_policy = (uint) policy; | - | ||||||||||||||||||||||||||||||||||||
4922 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4923 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
4924 | d->extra->focus_proxy->setFocusPolicy(policy); never executed: d->extra->focus_proxy->setFocusPolicy(policy); | 0 | ||||||||||||||||||||||||||||||||||||
4925 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4926 | void QWidget::setUpdatesEnabled(bool enable) | - | ||||||||||||||||||||||||||||||||||||
4927 | { | - | ||||||||||||||||||||||||||||||||||||
4928 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
4929 | setAttribute(Qt::WA_ForceUpdatesDisabled, !enable); | - | ||||||||||||||||||||||||||||||||||||
4930 | d->setUpdatesEnabled_helper(enable); | - | ||||||||||||||||||||||||||||||||||||
4931 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4932 | void QWidget::show() | - | ||||||||||||||||||||||||||||||||||||
4933 | { | - | ||||||||||||||||||||||||||||||||||||
4934 | Qt::WindowState defaultState = QGuiApplicationPrivate::platformIntegration()->defaultWindowState(data->window_flags); | - | ||||||||||||||||||||||||||||||||||||
4935 | if (defaultState == Qt::WindowFullScreen
| 0 | ||||||||||||||||||||||||||||||||||||
4936 | showFullScreen(); never executed: showFullScreen(); | 0 | ||||||||||||||||||||||||||||||||||||
4937 | else if (defaultState == Qt::WindowMaximized
| 0 | ||||||||||||||||||||||||||||||||||||
4938 | showMaximized(); never executed: showMaximized(); | 0 | ||||||||||||||||||||||||||||||||||||
4939 | else | - | ||||||||||||||||||||||||||||||||||||
4940 | setVisible(true); never executed: setVisible(true); | 0 | ||||||||||||||||||||||||||||||||||||
4941 | } | - | ||||||||||||||||||||||||||||||||||||
4942 | - | |||||||||||||||||||||||||||||||||||||
4943 | - | |||||||||||||||||||||||||||||||||||||
4944 | - | |||||||||||||||||||||||||||||||||||||
4945 | - | |||||||||||||||||||||||||||||||||||||
4946 | - | |||||||||||||||||||||||||||||||||||||
4947 | - | |||||||||||||||||||||||||||||||||||||
4948 | void QWidgetPrivate::show_recursive() | - | ||||||||||||||||||||||||||||||||||||
4949 | { | - | ||||||||||||||||||||||||||||||||||||
4950 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4951 | - | |||||||||||||||||||||||||||||||||||||
4952 | - | |||||||||||||||||||||||||||||||||||||
4953 | if (!q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
4954 | createRecursively(); never executed: createRecursively(); | 0 | ||||||||||||||||||||||||||||||||||||
4955 | q->ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
4956 | - | |||||||||||||||||||||||||||||||||||||
4957 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
4958 | q->parentWidget()->d_func()->layout->activate(); never executed: q->parentWidget()->d_func()->layout->activate(); | 0 | ||||||||||||||||||||||||||||||||||||
4959 | - | |||||||||||||||||||||||||||||||||||||
4960 | if (layout
| 0 | ||||||||||||||||||||||||||||||||||||
4961 | layout->activate(); never executed: layout->activate(); | 0 | ||||||||||||||||||||||||||||||||||||
4962 | - | |||||||||||||||||||||||||||||||||||||
4963 | show_helper(); | - | ||||||||||||||||||||||||||||||||||||
4964 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4965 | - | |||||||||||||||||||||||||||||||||||||
4966 | void QWidgetPrivate::sendPendingMoveAndResizeEvents(bool recursive, bool disableUpdates) | - | ||||||||||||||||||||||||||||||||||||
4967 | { | - | ||||||||||||||||||||||||||||||||||||
4968 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
4969 | - | |||||||||||||||||||||||||||||||||||||
4970 | disableUpdates = disableUpdates
| 0 | ||||||||||||||||||||||||||||||||||||
4971 | if (disableUpdates
| 0 | ||||||||||||||||||||||||||||||||||||
4972 | q->setAttribute(Qt::WA_UpdatesDisabled); never executed: q->setAttribute(Qt::WA_UpdatesDisabled); | 0 | ||||||||||||||||||||||||||||||||||||
4973 | - | |||||||||||||||||||||||||||||||||||||
4974 | if (q->testAttribute(Qt::WA_PendingMoveEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
4975 | QMoveEvent e(data.crect.topLeft(), data.crect.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
4976 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
4977 | q->setAttribute(Qt::WA_PendingMoveEvent, false); | - | ||||||||||||||||||||||||||||||||||||
4978 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4979 | - | |||||||||||||||||||||||||||||||||||||
4980 | if (q->testAttribute(Qt::WA_PendingResizeEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
4981 | QResizeEvent e(data.crect.size(), QSize()); | - | ||||||||||||||||||||||||||||||||||||
4982 | QApplication::sendEvent(q, &e); | - | ||||||||||||||||||||||||||||||||||||
4983 | q->setAttribute(Qt::WA_PendingResizeEvent, false); | - | ||||||||||||||||||||||||||||||||||||
4984 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4985 | - | |||||||||||||||||||||||||||||||||||||
4986 | if (disableUpdates
| 0 | ||||||||||||||||||||||||||||||||||||
4987 | q->setAttribute(Qt::WA_UpdatesDisabled, false); never executed: q->setAttribute(Qt::WA_UpdatesDisabled, false); | 0 | ||||||||||||||||||||||||||||||||||||
4988 | - | |||||||||||||||||||||||||||||||||||||
4989 | if (!recursive
| 0 | ||||||||||||||||||||||||||||||||||||
4990 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
4991 | - | |||||||||||||||||||||||||||||||||||||
4992 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
4993 | if (QWidget *child = qobject_cast<QWidget *>(children.at(i))
| 0 | ||||||||||||||||||||||||||||||||||||
4994 | child->d_func()->sendPendingMoveAndResizeEvents(recursive, disableUpdates); never executed: child->d_func()->sendPendingMoveAndResizeEvents(recursive, disableUpdates); | 0 | ||||||||||||||||||||||||||||||||||||
4995 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4996 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4997 | - | |||||||||||||||||||||||||||||||||||||
4998 | void QWidgetPrivate::activateChildLayoutsRecursively() | - | ||||||||||||||||||||||||||||||||||||
4999 | { | - | ||||||||||||||||||||||||||||||||||||
5000 | sendPendingMoveAndResizeEvents(false, true); | - | ||||||||||||||||||||||||||||||||||||
5001 | - | |||||||||||||||||||||||||||||||||||||
5002 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5003 | QWidget *child = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
5004 | if (!child
| 0 | ||||||||||||||||||||||||||||||||||||
5005 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
5006 | - | |||||||||||||||||||||||||||||||||||||
5007 | child->ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
5008 | - | |||||||||||||||||||||||||||||||||||||
5009 | - | |||||||||||||||||||||||||||||||||||||
5010 | QWidgetPrivate *childPrivate = child->d_func(); | - | ||||||||||||||||||||||||||||||||||||
5011 | if (childPrivate->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5012 | childPrivate->layout->activate(); never executed: childPrivate->layout->activate(); | 0 | ||||||||||||||||||||||||||||||||||||
5013 | - | |||||||||||||||||||||||||||||||||||||
5014 | - | |||||||||||||||||||||||||||||||||||||
5015 | const bool wasVisible = child->isVisible(); | - | ||||||||||||||||||||||||||||||||||||
5016 | if (!wasVisible
| 0 | ||||||||||||||||||||||||||||||||||||
5017 | child->setAttribute(Qt::WA_WState_Visible); never executed: child->setAttribute(Qt::WA_WState_Visible); | 0 | ||||||||||||||||||||||||||||||||||||
5018 | - | |||||||||||||||||||||||||||||||||||||
5019 | - | |||||||||||||||||||||||||||||||||||||
5020 | childPrivate->activateChildLayoutsRecursively(); | - | ||||||||||||||||||||||||||||||||||||
5021 | - | |||||||||||||||||||||||||||||||||||||
5022 | - | |||||||||||||||||||||||||||||||||||||
5023 | if (!wasVisible
| 0 | ||||||||||||||||||||||||||||||||||||
5024 | child->setAttribute(Qt::WA_WState_Visible, false); never executed: child->setAttribute(Qt::WA_WState_Visible, false); | 0 | ||||||||||||||||||||||||||||||||||||
5025 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5026 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5027 | - | |||||||||||||||||||||||||||||||||||||
5028 | void QWidgetPrivate::show_helper() | - | ||||||||||||||||||||||||||||||||||||
5029 | { | - | ||||||||||||||||||||||||||||||||||||
5030 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5031 | data.in_show = true; | - | ||||||||||||||||||||||||||||||||||||
5032 | - | |||||||||||||||||||||||||||||||||||||
5033 | sendPendingMoveAndResizeEvents(); | - | ||||||||||||||||||||||||||||||||||||
5034 | - | |||||||||||||||||||||||||||||||||||||
5035 | - | |||||||||||||||||||||||||||||||||||||
5036 | q->setAttribute(Qt::WA_WState_Visible); | - | ||||||||||||||||||||||||||||||||||||
5037 | - | |||||||||||||||||||||||||||||||||||||
5038 | - | |||||||||||||||||||||||||||||||||||||
5039 | showChildren(false); | - | ||||||||||||||||||||||||||||||||||||
5040 | - | |||||||||||||||||||||||||||||||||||||
5041 | - | |||||||||||||||||||||||||||||||||||||
5042 | - | |||||||||||||||||||||||||||||||||||||
5043 | const bool isWindow = q->isWindow(); | - | ||||||||||||||||||||||||||||||||||||
5044 | - | |||||||||||||||||||||||||||||||||||||
5045 | bool isEmbedded = isWindow
| 0 | ||||||||||||||||||||||||||||||||||||
5046 | - | |||||||||||||||||||||||||||||||||||||
5047 | - | |||||||||||||||||||||||||||||||||||||
5048 | - | |||||||||||||||||||||||||||||||||||||
5049 | - | |||||||||||||||||||||||||||||||||||||
5050 | - | |||||||||||||||||||||||||||||||||||||
5051 | - | |||||||||||||||||||||||||||||||||||||
5052 | - | |||||||||||||||||||||||||||||||||||||
5053 | if (isWindow
| 0 | ||||||||||||||||||||||||||||||||||||
5054 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
5055 | q->raise(); | - | ||||||||||||||||||||||||||||||||||||
5056 | if (q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
5057 | q->setAttribute(Qt::WA_KeyboardFocusChange); never executed: q->setAttribute(Qt::WA_KeyboardFocusChange); | 0 | ||||||||||||||||||||||||||||||||||||
5058 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5059 | while (QApplication::activePopupWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
5060 | if (!QApplication::activePopupWidget()->close()
| 0 | ||||||||||||||||||||||||||||||||||||
5061 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5062 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5063 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5064 | } | - | ||||||||||||||||||||||||||||||||||||
5065 | - | |||||||||||||||||||||||||||||||||||||
5066 | - | |||||||||||||||||||||||||||||||||||||
5067 | - | |||||||||||||||||||||||||||||||||||||
5068 | - | |||||||||||||||||||||||||||||||||||||
5069 | if (isWindow
| 0 | ||||||||||||||||||||||||||||||||||||
5070 | if (!isEmbedded
| 0 | ||||||||||||||||||||||||||||||||||||
5071 | QGraphicsProxyWidget *ancestorProxy = nearestGraphicsProxyWidget(q->parentWidget()); | - | ||||||||||||||||||||||||||||||||||||
5072 | if (ancestorProxy
| 0 | ||||||||||||||||||||||||||||||||||||
5073 | isEmbedded = true; | - | ||||||||||||||||||||||||||||||||||||
5074 | ancestorProxy->d_func()->embedSubWindow(q); | - | ||||||||||||||||||||||||||||||||||||
5075 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5076 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5077 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5078 | QShowEvent showEvent; | - | ||||||||||||||||||||||||||||||||||||
5079 | QApplication::sendEvent(q, &showEvent); | - | ||||||||||||||||||||||||||||||||||||
5080 | - | |||||||||||||||||||||||||||||||||||||
5081 | show_sys(); | - | ||||||||||||||||||||||||||||||||||||
5082 | - | |||||||||||||||||||||||||||||||||||||
5083 | if (!isEmbedded
| 0 | ||||||||||||||||||||||||||||||||||||
5084 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->openPopup(q);(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->openPopup(q); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->openPopup(q); | 0 | ||||||||||||||||||||||||||||||||||||
5085 | - | |||||||||||||||||||||||||||||||||||||
5086 | - | |||||||||||||||||||||||||||||||||||||
5087 | if (q->windowType() != Qt::ToolTip
| 0 | ||||||||||||||||||||||||||||||||||||
5088 | QAccessibleEvent event(q, QAccessible::ObjectShow); | - | ||||||||||||||||||||||||||||||||||||
5089 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
5090 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5091 | - | |||||||||||||||||||||||||||||||||||||
5092 | - | |||||||||||||||||||||||||||||||||||||
5093 | if (QApplicationPrivate::hidden_focus_widget == q
| 0 | ||||||||||||||||||||||||||||||||||||
5094 | QApplicationPrivate::hidden_focus_widget = 0; | - | ||||||||||||||||||||||||||||||||||||
5095 | q->setFocus(Qt::OtherFocusReason); | - | ||||||||||||||||||||||||||||||||||||
5096 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5097 | - | |||||||||||||||||||||||||||||||||||||
5098 | - | |||||||||||||||||||||||||||||||||||||
5099 | - | |||||||||||||||||||||||||||||||||||||
5100 | - | |||||||||||||||||||||||||||||||||||||
5101 | if (!(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->in_exec
| 0 | ||||||||||||||||||||||||||||||||||||
5102 | QApplication::processEvents(); never executed: QApplication::processEvents(); | 0 | ||||||||||||||||||||||||||||||||||||
5103 | - | |||||||||||||||||||||||||||||||||||||
5104 | data.in_show = false; | - | ||||||||||||||||||||||||||||||||||||
5105 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5106 | - | |||||||||||||||||||||||||||||||||||||
5107 | void QWidgetPrivate::show_sys() | - | ||||||||||||||||||||||||||||||||||||
5108 | { | - | ||||||||||||||||||||||||||||||||||||
5109 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5110 | - | |||||||||||||||||||||||||||||||||||||
5111 | QWindow *window = q->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
5112 | - | |||||||||||||||||||||||||||||||||||||
5113 | if (q->testAttribute(Qt::WA_DontShowOnScreen)
| 0 | ||||||||||||||||||||||||||||||||||||
5114 | invalidateBuffer(q->rect()); | - | ||||||||||||||||||||||||||||||||||||
5115 | q->setAttribute(Qt::WA_Mapped); | - | ||||||||||||||||||||||||||||||||||||
5116 | - | |||||||||||||||||||||||||||||||||||||
5117 | if (window
| 0 | ||||||||||||||||||||||||||||||||||||
5118 | - | |||||||||||||||||||||||||||||||||||||
5119 | && (!extra
| 0 | ||||||||||||||||||||||||||||||||||||
5120 | - | |||||||||||||||||||||||||||||||||||||
5121 | && q->windowModality() != Qt::NonModal
| 0 | ||||||||||||||||||||||||||||||||||||
5122 | QGuiApplicationPrivate::showModalWindow(window); | - | ||||||||||||||||||||||||||||||||||||
5123 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5124 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
5125 | } | - | ||||||||||||||||||||||||||||||||||||
5126 | - | |||||||||||||||||||||||||||||||||||||
5127 | if (renderToTexture
| 0 | ||||||||||||||||||||||||||||||||||||
5128 | QApplication::postEvent(q->parentWidget(), new QUpdateLaterEvent(q->geometry())); never executed: QApplication::postEvent(q->parentWidget(), new QUpdateLaterEvent(q->geometry())); | 0 | ||||||||||||||||||||||||||||||||||||
5129 | else | - | ||||||||||||||||||||||||||||||||||||
5130 | QApplication::postEvent(q, new QUpdateLaterEvent(q->rect())); never executed: QApplication::postEvent(q, new QUpdateLaterEvent(q->rect())); | 0 | ||||||||||||||||||||||||||||||||||||
5131 | - | |||||||||||||||||||||||||||||||||||||
5132 | if ((!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5133 | || q->testAttribute(Qt::WA_OutsideWSRange)
| 0 | ||||||||||||||||||||||||||||||||||||
5134 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
5135 | } | - | ||||||||||||||||||||||||||||||||||||
5136 | - | |||||||||||||||||||||||||||||||||||||
5137 | if (window
| 0 | ||||||||||||||||||||||||||||||||||||
5138 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5139 | fixPosIncludesFrame(); never executed: fixPosIncludesFrame(); | 0 | ||||||||||||||||||||||||||||||||||||
5140 | QRect geomRect = q->geometry(); | - | ||||||||||||||||||||||||||||||||||||
5141 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5142 | QPoint topLeftOfWindow = q->mapTo(q->nativeParentWidget(),QPoint()); | - | ||||||||||||||||||||||||||||||||||||
5143 | geomRect.moveTopLeft(topLeftOfWindow); | - | ||||||||||||||||||||||||||||||||||||
5144 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5145 | const QRect windowRect = window->geometry(); | - | ||||||||||||||||||||||||||||||||||||
5146 | if (windowRect != geomRect
| 0 | ||||||||||||||||||||||||||||||||||||
5147 | if (q->testAttribute(Qt::WA_Moved)
| 0 | ||||||||||||||||||||||||||||||||||||
5148 | || !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowManagement)
| 0 | ||||||||||||||||||||||||||||||||||||
5149 | window->setGeometry(geomRect); never executed: window->setGeometry(geomRect); | 0 | ||||||||||||||||||||||||||||||||||||
5150 | else | - | ||||||||||||||||||||||||||||||||||||
5151 | window->resize(geomRect.size()); never executed: window->resize(geomRect.size()); | 0 | ||||||||||||||||||||||||||||||||||||
5152 | } | - | ||||||||||||||||||||||||||||||||||||
5153 | - | |||||||||||||||||||||||||||||||||||||
5154 | - | |||||||||||||||||||||||||||||||||||||
5155 | qt_qpa_set_cursor(q, false); | - | ||||||||||||||||||||||||||||||||||||
5156 | - | |||||||||||||||||||||||||||||||||||||
5157 | invalidateBuffer(q->rect()); | - | ||||||||||||||||||||||||||||||||||||
5158 | window->setVisible(true); | - | ||||||||||||||||||||||||||||||||||||
5159 | - | |||||||||||||||||||||||||||||||||||||
5160 | if (window->isTopLevel()
| 0 | ||||||||||||||||||||||||||||||||||||
5161 | const QPoint crectTopLeft = q->data->crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
5162 | const QPoint windowTopLeft = window->geometry().topLeft(); | - | ||||||||||||||||||||||||||||||||||||
5163 | if (crectTopLeft == QPoint(0, 0)
| 0 | ||||||||||||||||||||||||||||||||||||
5164 | q->data->crect.moveTopLeft(windowTopLeft); never executed: q->data->crect.moveTopLeft(windowTopLeft); | 0 | ||||||||||||||||||||||||||||||||||||
5165 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5166 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5167 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5168 | void QWidget::hide() | - | ||||||||||||||||||||||||||||||||||||
5169 | { | - | ||||||||||||||||||||||||||||||||||||
5170 | setVisible(false); | - | ||||||||||||||||||||||||||||||||||||
5171 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5172 | - | |||||||||||||||||||||||||||||||||||||
5173 | - | |||||||||||||||||||||||||||||||||||||
5174 | - | |||||||||||||||||||||||||||||||||||||
5175 | void QWidgetPrivate::hide_helper() | - | ||||||||||||||||||||||||||||||||||||
5176 | { | - | ||||||||||||||||||||||||||||||||||||
5177 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5178 | - | |||||||||||||||||||||||||||||||||||||
5179 | bool isEmbedded = false; | - | ||||||||||||||||||||||||||||||||||||
5180 | - | |||||||||||||||||||||||||||||||||||||
5181 | isEmbedded = q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5182 | - | |||||||||||||||||||||||||||||||||||||
5183 | - | |||||||||||||||||||||||||||||||||||||
5184 | - | |||||||||||||||||||||||||||||||||||||
5185 | - | |||||||||||||||||||||||||||||||||||||
5186 | if (!isEmbedded
| 0 | ||||||||||||||||||||||||||||||||||||
5187 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(q);(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(q); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(q); | 0 | ||||||||||||||||||||||||||||||||||||
5188 | - | |||||||||||||||||||||||||||||||||||||
5189 | - | |||||||||||||||||||||||||||||||||||||
5190 | - | |||||||||||||||||||||||||||||||||||||
5191 | - | |||||||||||||||||||||||||||||||||||||
5192 | - | |||||||||||||||||||||||||||||||||||||
5193 | - | |||||||||||||||||||||||||||||||||||||
5194 | - | |||||||||||||||||||||||||||||||||||||
5195 | q->setAttribute(Qt::WA_Mapped, false); | - | ||||||||||||||||||||||||||||||||||||
5196 | hide_sys(); | - | ||||||||||||||||||||||||||||||||||||
5197 | - | |||||||||||||||||||||||||||||||||||||
5198 | bool wasVisible = q->testAttribute(Qt::WA_WState_Visible); | - | ||||||||||||||||||||||||||||||||||||
5199 | - | |||||||||||||||||||||||||||||||||||||
5200 | if (wasVisible
| 0 | ||||||||||||||||||||||||||||||||||||
5201 | q->setAttribute(Qt::WA_WState_Visible, false); | - | ||||||||||||||||||||||||||||||||||||
5202 | - | |||||||||||||||||||||||||||||||||||||
5203 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5204 | - | |||||||||||||||||||||||||||||||||||||
5205 | QHideEvent hideEvent; | - | ||||||||||||||||||||||||||||||||||||
5206 | QApplication::sendEvent(q, &hideEvent); | - | ||||||||||||||||||||||||||||||||||||
5207 | hideChildren(false); | - | ||||||||||||||||||||||||||||||||||||
5208 | - | |||||||||||||||||||||||||||||||||||||
5209 | - | |||||||||||||||||||||||||||||||||||||
5210 | - | |||||||||||||||||||||||||||||||||||||
5211 | if (wasVisible
| 0 | ||||||||||||||||||||||||||||||||||||
5212 | (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->sendSyntheticEnterLeave(q); | - | ||||||||||||||||||||||||||||||||||||
5213 | QWidget *fw = QApplication::focusWidget(); | - | ||||||||||||||||||||||||||||||||||||
5214 | while (fw
| 0 | ||||||||||||||||||||||||||||||||||||
5215 | if (fw == q
| 0 | ||||||||||||||||||||||||||||||||||||
5216 | q->focusNextPrevChild(true); | - | ||||||||||||||||||||||||||||||||||||
5217 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5218 | } | - | ||||||||||||||||||||||||||||||||||||
5219 | fw = fw->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5220 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5221 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5222 | - | |||||||||||||||||||||||||||||||||||||
5223 | if (QWidgetBackingStore *bs = maybeBackingStore()
| 0 | ||||||||||||||||||||||||||||||||||||
5224 | bs->removeDirtyWidget(q); never executed: bs->removeDirtyWidget(q); | 0 | ||||||||||||||||||||||||||||||||||||
5225 | - | |||||||||||||||||||||||||||||||||||||
5226 | - | |||||||||||||||||||||||||||||||||||||
5227 | if (wasVisible
| 0 | ||||||||||||||||||||||||||||||||||||
5228 | QAccessibleEvent event(q, QAccessible::ObjectHide); | - | ||||||||||||||||||||||||||||||||||||
5229 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
5230 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5231 | - | |||||||||||||||||||||||||||||||||||||
5232 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5233 | - | |||||||||||||||||||||||||||||||||||||
5234 | void QWidgetPrivate::hide_sys() | - | ||||||||||||||||||||||||||||||||||||
5235 | { | - | ||||||||||||||||||||||||||||||||||||
5236 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5237 | - | |||||||||||||||||||||||||||||||||||||
5238 | QWindow *window = q->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
5239 | - | |||||||||||||||||||||||||||||||||||||
5240 | if (q->testAttribute(Qt::WA_DontShowOnScreen)
| 0 | ||||||||||||||||||||||||||||||||||||
5241 | q->setAttribute(Qt::WA_Mapped, false); | - | ||||||||||||||||||||||||||||||||||||
5242 | - | |||||||||||||||||||||||||||||||||||||
5243 | if (window
| 0 | ||||||||||||||||||||||||||||||||||||
5244 | - | |||||||||||||||||||||||||||||||||||||
5245 | && (!extra
| 0 | ||||||||||||||||||||||||||||||||||||
5246 | - | |||||||||||||||||||||||||||||||||||||
5247 | && q->windowModality() != Qt::NonModal
| 0 | ||||||||||||||||||||||||||||||||||||
5248 | QGuiApplicationPrivate::hideModalWindow(window); | - | ||||||||||||||||||||||||||||||||||||
5249 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5250 | - | |||||||||||||||||||||||||||||||||||||
5251 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5252 | - | |||||||||||||||||||||||||||||||||||||
5253 | deactivateWidgetCleanup(); | - | ||||||||||||||||||||||||||||||||||||
5254 | - | |||||||||||||||||||||||||||||||||||||
5255 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5256 | QWidget *p = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5257 | if (p
| 0 | ||||||||||||||||||||||||||||||||||||
5258 | if (renderToTexture
| 0 | ||||||||||||||||||||||||||||||||||||
5259 | p->d_func()->invalidateBuffer(q->geometry()); never executed: p->d_func()->invalidateBuffer(q->geometry()); | 0 | ||||||||||||||||||||||||||||||||||||
5260 | else | - | ||||||||||||||||||||||||||||||||||||
5261 | invalidateBuffer(q->rect()); never executed: invalidateBuffer(q->rect()); | 0 | ||||||||||||||||||||||||||||||||||||
5262 | } | - | ||||||||||||||||||||||||||||||||||||
5263 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5264 | invalidateBuffer(q->rect()); | - | ||||||||||||||||||||||||||||||||||||
5265 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5266 | - | |||||||||||||||||||||||||||||||||||||
5267 | if (window
| 0 | ||||||||||||||||||||||||||||||||||||
5268 | window->setVisible(false); never executed: window->setVisible(false); | 0 | ||||||||||||||||||||||||||||||||||||
5269 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5270 | void QWidget::setVisible(bool visible) | - | ||||||||||||||||||||||||||||||||||||
5271 | { | - | ||||||||||||||||||||||||||||||||||||
5272 | if (visible
| 0 | ||||||||||||||||||||||||||||||||||||
5273 | if (testAttribute(Qt::WA_WState_ExplicitShowHide)
| 0 | ||||||||||||||||||||||||||||||||||||
5274 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
5275 | - | |||||||||||||||||||||||||||||||||||||
5276 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5277 | - | |||||||||||||||||||||||||||||||||||||
5278 | - | |||||||||||||||||||||||||||||||||||||
5279 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5280 | && !parentWidget()->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
5281 | parentWidget()->window()->d_func()->createRecursively(); never executed: parentWidget()->window()->d_func()->createRecursively(); | 0 | ||||||||||||||||||||||||||||||||||||
5282 | - | |||||||||||||||||||||||||||||||||||||
5283 | - | |||||||||||||||||||||||||||||||||||||
5284 | QWidget *pw = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5285 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
5286 | && (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5287 | create(); | - | ||||||||||||||||||||||||||||||||||||
5288 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5289 | - | |||||||||||||||||||||||||||||||||||||
5290 | bool wasResized = testAttribute(Qt::WA_Resized); | - | ||||||||||||||||||||||||||||||||||||
5291 | Qt::WindowStates initialWindowState = windowState(); | - | ||||||||||||||||||||||||||||||||||||
5292 | - | |||||||||||||||||||||||||||||||||||||
5293 | - | |||||||||||||||||||||||||||||||||||||
5294 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
5295 | - | |||||||||||||||||||||||||||||||||||||
5296 | - | |||||||||||||||||||||||||||||||||||||
5297 | setAttribute(Qt::WA_WState_ExplicitShowHide); | - | ||||||||||||||||||||||||||||||||||||
5298 | - | |||||||||||||||||||||||||||||||||||||
5299 | bool needUpdateGeometry = !isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5300 | - | |||||||||||||||||||||||||||||||||||||
5301 | setAttribute(Qt::WA_WState_Hidden, false); | - | ||||||||||||||||||||||||||||||||||||
5302 | - | |||||||||||||||||||||||||||||||||||||
5303 | if (needUpdateGeometry
| 0 | ||||||||||||||||||||||||||||||||||||
5304 | d->updateGeometry_helper(true); never executed: d->updateGeometry_helper(true); | 0 | ||||||||||||||||||||||||||||||||||||
5305 | - | |||||||||||||||||||||||||||||||||||||
5306 | - | |||||||||||||||||||||||||||||||||||||
5307 | if (d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5308 | d->layout->activate(); never executed: d->layout->activate(); | 0 | ||||||||||||||||||||||||||||||||||||
5309 | - | |||||||||||||||||||||||||||||||||||||
5310 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5311 | QWidget *parent = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5312 | while (parent
| 0 | ||||||||||||||||||||||||||||||||||||
5313 | parent->d_func()->layout->activate(); | - | ||||||||||||||||||||||||||||||||||||
5314 | if (parent->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5315 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5316 | parent = parent->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5317 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5318 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
5319 | parent->d_func()->setDirtyOpaqueRegion(); never executed: parent->d_func()->setDirtyOpaqueRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
5320 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5321 | - | |||||||||||||||||||||||||||||||||||||
5322 | - | |||||||||||||||||||||||||||||||||||||
5323 | if (!wasResized
| 0 | ||||||||||||||||||||||||||||||||||||
5324 | && (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5325 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5326 | adjustSize(); | - | ||||||||||||||||||||||||||||||||||||
5327 | if (windowState() != initialWindowState
| 0 | ||||||||||||||||||||||||||||||||||||
5328 | setWindowState(initialWindowState); never executed: setWindowState(initialWindowState); | 0 | ||||||||||||||||||||||||||||||||||||
5329 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5330 | adjustSize(); | - | ||||||||||||||||||||||||||||||||||||
5331 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5332 | setAttribute(Qt::WA_Resized, false); | - | ||||||||||||||||||||||||||||||||||||
5333 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5334 | - | |||||||||||||||||||||||||||||||||||||
5335 | setAttribute(Qt::WA_KeyboardFocusChange, false); | - | ||||||||||||||||||||||||||||||||||||
5336 | - | |||||||||||||||||||||||||||||||||||||
5337 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5338 | d->show_helper(); | - | ||||||||||||||||||||||||||||||||||||
5339 | - | |||||||||||||||||||||||||||||||||||||
5340 | (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->sendSyntheticEnterLeave(this); | - | ||||||||||||||||||||||||||||||||||||
5341 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5342 | - | |||||||||||||||||||||||||||||||||||||
5343 | QEvent showToParentEvent(QEvent::ShowToParent); | - | ||||||||||||||||||||||||||||||||||||
5344 | QApplication::sendEvent(this, &showToParentEvent); | - | ||||||||||||||||||||||||||||||||||||
5345 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5346 | if (testAttribute(Qt::WA_WState_ExplicitShowHide)
| 0 | ||||||||||||||||||||||||||||||||||||
5347 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
5348 | if (QApplicationPrivate::hidden_focus_widget == this
| 0 | ||||||||||||||||||||||||||||||||||||
5349 | QApplicationPrivate::hidden_focus_widget = 0; never executed: QApplicationPrivate::hidden_focus_widget = 0; | 0 | ||||||||||||||||||||||||||||||||||||
5350 | - | |||||||||||||||||||||||||||||||||||||
5351 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5352 | - | |||||||||||||||||||||||||||||||||||||
5353 | - | |||||||||||||||||||||||||||||||||||||
5354 | - | |||||||||||||||||||||||||||||||||||||
5355 | - | |||||||||||||||||||||||||||||||||||||
5356 | - | |||||||||||||||||||||||||||||||||||||
5357 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5358 | parentWidget()->d_func()->setDirtyOpaqueRegion(); never executed: parentWidget()->d_func()->setDirtyOpaqueRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
5359 | - | |||||||||||||||||||||||||||||||||||||
5360 | setAttribute(Qt::WA_WState_Hidden); | - | ||||||||||||||||||||||||||||||||||||
5361 | setAttribute(Qt::WA_WState_ExplicitShowHide); | - | ||||||||||||||||||||||||||||||||||||
5362 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
5363 | d->hide_helper(); never executed: d->hide_helper(); | 0 | ||||||||||||||||||||||||||||||||||||
5364 | - | |||||||||||||||||||||||||||||||||||||
5365 | - | |||||||||||||||||||||||||||||||||||||
5366 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5367 | if (parentWidget()->d_func()->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5368 | parentWidget()->d_func()->layout->invalidate(); never executed: parentWidget()->d_func()->layout->invalidate(); | 0 | ||||||||||||||||||||||||||||||||||||
5369 | else if (parentWidget()->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
5370 | QApplication::postEvent(parentWidget(), new QEvent(QEvent::LayoutRequest)); never executed: QApplication::postEvent(parentWidget(), new QEvent(QEvent::LayoutRequest)); | 0 | ||||||||||||||||||||||||||||||||||||
5371 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5372 | - | |||||||||||||||||||||||||||||||||||||
5373 | QEvent hideToParentEvent(QEvent::HideToParent); | - | ||||||||||||||||||||||||||||||||||||
5374 | QApplication::sendEvent(this, &hideToParentEvent); | - | ||||||||||||||||||||||||||||||||||||
5375 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5376 | } | - | ||||||||||||||||||||||||||||||||||||
5377 | - | |||||||||||||||||||||||||||||||||||||
5378 | - | |||||||||||||||||||||||||||||||||||||
5379 | - | |||||||||||||||||||||||||||||||||||||
5380 | - | |||||||||||||||||||||||||||||||||||||
5381 | void QWidget::setHidden(bool hidden) | - | ||||||||||||||||||||||||||||||||||||
5382 | { | - | ||||||||||||||||||||||||||||||||||||
5383 | setVisible(!hidden); | - | ||||||||||||||||||||||||||||||||||||
5384 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5385 | - | |||||||||||||||||||||||||||||||||||||
5386 | void QWidgetPrivate::_q_showIfNotHidden() | - | ||||||||||||||||||||||||||||||||||||
5387 | { | - | ||||||||||||||||||||||||||||||||||||
5388 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5389 | if ( !(q->isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
5390 | q->setVisible(true); never executed: q->setVisible(true); | 0 | ||||||||||||||||||||||||||||||||||||
5391 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5392 | - | |||||||||||||||||||||||||||||||||||||
5393 | void QWidgetPrivate::showChildren(bool spontaneous) | - | ||||||||||||||||||||||||||||||||||||
5394 | { | - | ||||||||||||||||||||||||||||||||||||
5395 | QList<QObject*> childList = children; | - | ||||||||||||||||||||||||||||||||||||
5396 | for (int i = 0; i < childList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5397 | QWidget *widget = qobject_cast<QWidget*>(childList.at(i)); | - | ||||||||||||||||||||||||||||||||||||
5398 | if (!widget
| 0 | ||||||||||||||||||||||||||||||||||||
5399 | || widget->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5400 | || widget->testAttribute(Qt::WA_WState_Hidden)
| 0 | ||||||||||||||||||||||||||||||||||||
5401 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
5402 | if (spontaneous
| 0 | ||||||||||||||||||||||||||||||||||||
5403 | widget->setAttribute(Qt::WA_Mapped); | - | ||||||||||||||||||||||||||||||||||||
5404 | widget->d_func()->showChildren(true); | - | ||||||||||||||||||||||||||||||||||||
5405 | QShowEvent e; | - | ||||||||||||||||||||||||||||||||||||
5406 | QApplication::sendSpontaneousEvent(widget, &e); | - | ||||||||||||||||||||||||||||||||||||
5407 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5408 | if (widget->testAttribute(Qt::WA_WState_ExplicitShowHide)
| 0 | ||||||||||||||||||||||||||||||||||||
5409 | widget->d_func()->show_recursive(); never executed: widget->d_func()->show_recursive(); | 0 | ||||||||||||||||||||||||||||||||||||
5410 | else | - | ||||||||||||||||||||||||||||||||||||
5411 | widget->show(); never executed: widget->show(); | 0 | ||||||||||||||||||||||||||||||||||||
5412 | } | - | ||||||||||||||||||||||||||||||||||||
5413 | } | - | ||||||||||||||||||||||||||||||||||||
5414 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5415 | - | |||||||||||||||||||||||||||||||||||||
5416 | void QWidgetPrivate::hideChildren(bool spontaneous) | - | ||||||||||||||||||||||||||||||||||||
5417 | { | - | ||||||||||||||||||||||||||||||||||||
5418 | QList<QObject*> childList = children; | - | ||||||||||||||||||||||||||||||||||||
5419 | for (int i = 0; i < childList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5420 | QWidget *widget = qobject_cast<QWidget*>(childList.at(i)); | - | ||||||||||||||||||||||||||||||||||||
5421 | if (!widget
| 0 | ||||||||||||||||||||||||||||||||||||
5422 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
5423 | if (spontaneous
| 0 | ||||||||||||||||||||||||||||||||||||
5424 | widget->setAttribute(Qt::WA_Mapped, false); never executed: widget->setAttribute(Qt::WA_Mapped, false); | 0 | ||||||||||||||||||||||||||||||||||||
5425 | else | - | ||||||||||||||||||||||||||||||||||||
5426 | widget->setAttribute(Qt::WA_WState_Visible, false); never executed: widget->setAttribute(Qt::WA_WState_Visible, false); | 0 | ||||||||||||||||||||||||||||||||||||
5427 | widget->d_func()->hideChildren(spontaneous); | - | ||||||||||||||||||||||||||||||||||||
5428 | QHideEvent e; | - | ||||||||||||||||||||||||||||||||||||
5429 | if (spontaneous
| 0 | ||||||||||||||||||||||||||||||||||||
5430 | QApplication::sendSpontaneousEvent(widget, &e); | - | ||||||||||||||||||||||||||||||||||||
5431 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5432 | QApplication::sendEvent(widget, &e); | - | ||||||||||||||||||||||||||||||||||||
5433 | if (widget->internalWinId()
| 0 | ||||||||||||||||||||||||||||||||||||
5434 | && widget->testAttribute(Qt::WA_DontCreateNativeAncestors)
| 0 | ||||||||||||||||||||||||||||||||||||
5435 | - | |||||||||||||||||||||||||||||||||||||
5436 | - | |||||||||||||||||||||||||||||||||||||
5437 | widget->d_func()->hide_sys(); | - | ||||||||||||||||||||||||||||||||||||
5438 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5439 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5440 | (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->sendSyntheticEnterLeave(widget); | - | ||||||||||||||||||||||||||||||||||||
5441 | - | |||||||||||||||||||||||||||||||||||||
5442 | if (!spontaneous
| 0 | ||||||||||||||||||||||||||||||||||||
5443 | QAccessibleEvent event(widget, QAccessible::ObjectHide); | - | ||||||||||||||||||||||||||||||||||||
5444 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
5445 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5446 | - | |||||||||||||||||||||||||||||||||||||
5447 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5448 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5449 | - | |||||||||||||||||||||||||||||||||||||
5450 | bool QWidgetPrivate::close_helper(CloseMode mode) | - | ||||||||||||||||||||||||||||||||||||
5451 | { | - | ||||||||||||||||||||||||||||||||||||
5452 | if (data.is_closing
| 0 | ||||||||||||||||||||||||||||||||||||
5453 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
5454 | - | |||||||||||||||||||||||||||||||||||||
5455 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5456 | data.is_closing = 1; | - | ||||||||||||||||||||||||||||||||||||
5457 | - | |||||||||||||||||||||||||||||||||||||
5458 | QPointer<QWidget> that = q; | - | ||||||||||||||||||||||||||||||||||||
5459 | QPointer<QWidget> parentWidget = q->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5460 | - | |||||||||||||||||||||||||||||||||||||
5461 | bool quitOnClose = q->testAttribute(Qt::WA_QuitOnClose); | - | ||||||||||||||||||||||||||||||||||||
5462 | if (mode != CloseNoEvent
| 0 | ||||||||||||||||||||||||||||||||||||
5463 | QCloseEvent e; | - | ||||||||||||||||||||||||||||||||||||
5464 | if (mode == CloseWithSpontaneousEvent
| 0 | ||||||||||||||||||||||||||||||||||||
5465 | QApplication::sendSpontaneousEvent(q, &e); never executed: QApplication::sendSpontaneousEvent(q, &e); | 0 | ||||||||||||||||||||||||||||||||||||
5466 | else | - | ||||||||||||||||||||||||||||||||||||
5467 | QApplication::sendEvent(q, &e); never executed: QApplication::sendEvent(q, &e); | 0 | ||||||||||||||||||||||||||||||||||||
5468 | if (!that.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
5469 | data.is_closing = 0; | - | ||||||||||||||||||||||||||||||||||||
5470 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
5471 | } | - | ||||||||||||||||||||||||||||||||||||
5472 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5473 | - | |||||||||||||||||||||||||||||||||||||
5474 | if (!that.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
5475 | q->hide(); never executed: q->hide(); | 0 | ||||||||||||||||||||||||||||||||||||
5476 | - | |||||||||||||||||||||||||||||||||||||
5477 | - | |||||||||||||||||||||||||||||||||||||
5478 | quitOnClose = quitOnClose
| 0 | ||||||||||||||||||||||||||||||||||||
5479 | - | |||||||||||||||||||||||||||||||||||||
5480 | if (quitOnClose
| 0 | ||||||||||||||||||||||||||||||||||||
5481 | - | |||||||||||||||||||||||||||||||||||||
5482 | - | |||||||||||||||||||||||||||||||||||||
5483 | - | |||||||||||||||||||||||||||||||||||||
5484 | QWidgetList list = QApplication::topLevelWidgets(); | - | ||||||||||||||||||||||||||||||||||||
5485 | bool lastWindowClosed = true; | - | ||||||||||||||||||||||||||||||||||||
5486 | for (int i = 0; i < list.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5487 | QWidget *w = list.at(i); | - | ||||||||||||||||||||||||||||||||||||
5488 | if (!w->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
5489 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
5490 | lastWindowClosed = false; | - | ||||||||||||||||||||||||||||||||||||
5491 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5492 | } | - | ||||||||||||||||||||||||||||||||||||
5493 | if (lastWindowClosed
| 0 | ||||||||||||||||||||||||||||||||||||
5494 | QGuiApplicationPrivate::emitLastWindowClosed(); | - | ||||||||||||||||||||||||||||||||||||
5495 | QCoreApplicationPrivate *applicationPrivate = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(QCoreApplication::instance())); | - | ||||||||||||||||||||||||||||||||||||
5496 | applicationPrivate->maybeQuit(); | - | ||||||||||||||||||||||||||||||||||||
5497 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5498 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5499 | - | |||||||||||||||||||||||||||||||||||||
5500 | - | |||||||||||||||||||||||||||||||||||||
5501 | if (!that.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
5502 | data.is_closing = 0; | - | ||||||||||||||||||||||||||||||||||||
5503 | if (q->testAttribute(Qt::WA_DeleteOnClose)
| 0 | ||||||||||||||||||||||||||||||||||||
5504 | q->setAttribute(Qt::WA_DeleteOnClose, false); | - | ||||||||||||||||||||||||||||||||||||
5505 | q->deleteLater(); | - | ||||||||||||||||||||||||||||||||||||
5506 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5507 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5508 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
5509 | } | - | ||||||||||||||||||||||||||||||||||||
5510 | bool QWidget::close() | - | ||||||||||||||||||||||||||||||||||||
5511 | { | - | ||||||||||||||||||||||||||||||||||||
5512 | return never executed: d_func()->close_helper(QWidgetPrivate::CloseWithEvent);return d_func()->close_helper(QWidgetPrivate::CloseWithEvent); never executed: return d_func()->close_helper(QWidgetPrivate::CloseWithEvent); | 0 | ||||||||||||||||||||||||||||||||||||
5513 | } | - | ||||||||||||||||||||||||||||||||||||
5514 | bool QWidget::isVisibleTo(const QWidget *ancestor) const | - | ||||||||||||||||||||||||||||||||||||
5515 | { | - | ||||||||||||||||||||||||||||||||||||
5516 | if (!ancestor
| 0 | ||||||||||||||||||||||||||||||||||||
5517 | return never executed: isVisible();return isVisible(); never executed: return isVisible(); | 0 | ||||||||||||||||||||||||||||||||||||
5518 | const QWidget * w = this; | - | ||||||||||||||||||||||||||||||||||||
5519 | while (!w->isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
5520 | && !w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5521 | && w->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
5522 | && w->parentWidget() != ancestor
| 0 | ||||||||||||||||||||||||||||||||||||
5523 | w = w->parentWidget(); never executed: w = w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||
5524 | return never executed: !w->isHidden();return !w->isHidden(); never executed: return !w->isHidden(); | 0 | ||||||||||||||||||||||||||||||||||||
5525 | } | - | ||||||||||||||||||||||||||||||||||||
5526 | QRegion QWidget::visibleRegion() const | - | ||||||||||||||||||||||||||||||||||||
5527 | { | - | ||||||||||||||||||||||||||||||||||||
5528 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5529 | - | |||||||||||||||||||||||||||||||||||||
5530 | QRect clipRect = d->clipRect(); | - | ||||||||||||||||||||||||||||||||||||
5531 | if (clipRect.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
5532 | return never executed: QRegion();return QRegion(); never executed: return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
5533 | QRegion r(clipRect); | - | ||||||||||||||||||||||||||||||||||||
5534 | d->subtractOpaqueChildren(r, clipRect); | - | ||||||||||||||||||||||||||||||||||||
5535 | d->subtractOpaqueSiblings(r); | - | ||||||||||||||||||||||||||||||||||||
5536 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||
5537 | } | - | ||||||||||||||||||||||||||||||||||||
5538 | - | |||||||||||||||||||||||||||||||||||||
5539 | - | |||||||||||||||||||||||||||||||||||||
5540 | QSize QWidgetPrivate::adjustedSize() const | - | ||||||||||||||||||||||||||||||||||||
5541 | { | - | ||||||||||||||||||||||||||||||||||||
5542 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
5543 | - | |||||||||||||||||||||||||||||||||||||
5544 | QSize s = q->sizeHint(); | - | ||||||||||||||||||||||||||||||||||||
5545 | - | |||||||||||||||||||||||||||||||||||||
5546 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5547 | Qt::Orientations exp; | - | ||||||||||||||||||||||||||||||||||||
5548 | if (layout
| 0 | ||||||||||||||||||||||||||||||||||||
5549 | if (layout->hasHeightForWidth()
| 0 | ||||||||||||||||||||||||||||||||||||
5550 | s.setHeight(layout->totalHeightForWidth(s.width())); never executed: s.setHeight(layout->totalHeightForWidth(s.width())); | 0 | ||||||||||||||||||||||||||||||||||||
5551 | exp = layout->expandingDirections(); | - | ||||||||||||||||||||||||||||||||||||
5552 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
5553 | { | - | ||||||||||||||||||||||||||||||||||||
5554 | if (q->sizePolicy().hasHeightForWidth()
| 0 | ||||||||||||||||||||||||||||||||||||
5555 | s.setHeight(q->heightForWidth(s.width())); never executed: s.setHeight(q->heightForWidth(s.width())); | 0 | ||||||||||||||||||||||||||||||||||||
5556 | exp = q->sizePolicy().expandingDirections(); | - | ||||||||||||||||||||||||||||||||||||
5557 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5558 | if (exp & Qt::Horizontal
| 0 | ||||||||||||||||||||||||||||||||||||
5559 | s.setWidth(qMax(s.width(), 200)); never executed: s.setWidth(qMax(s.width(), 200)); | 0 | ||||||||||||||||||||||||||||||||||||
5560 | if (exp & Qt::Vertical
| 0 | ||||||||||||||||||||||||||||||||||||
5561 | s.setHeight(qMax(s.height(), 100)); never executed: s.setHeight(qMax(s.height(), 100)); | 0 | ||||||||||||||||||||||||||||||||||||
5562 | - | |||||||||||||||||||||||||||||||||||||
5563 | - | |||||||||||||||||||||||||||||||||||||
5564 | - | |||||||||||||||||||||||||||||||||||||
5565 | QRect screen = QApplication::desktop()->screenGeometry(q->pos()); | - | ||||||||||||||||||||||||||||||||||||
5566 | - | |||||||||||||||||||||||||||||||||||||
5567 | - | |||||||||||||||||||||||||||||||||||||
5568 | - | |||||||||||||||||||||||||||||||||||||
5569 | - | |||||||||||||||||||||||||||||||||||||
5570 | - | |||||||||||||||||||||||||||||||||||||
5571 | s.setWidth(qMin(s.width(), screen.width()*2/3)); | - | ||||||||||||||||||||||||||||||||||||
5572 | s.setHeight(qMin(s.height(), screen.height()*2/3)); | - | ||||||||||||||||||||||||||||||||||||
5573 | - | |||||||||||||||||||||||||||||||||||||
5574 | if (QTLWExtra *extra = maybeTopData()
| 0 | ||||||||||||||||||||||||||||||||||||
5575 | extra->sizeAdjusted = true; never executed: extra->sizeAdjusted = true; | 0 | ||||||||||||||||||||||||||||||||||||
5576 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5577 | - | |||||||||||||||||||||||||||||||||||||
5578 | if (!s.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||
5579 | QRect r = q->childrenRect(); | - | ||||||||||||||||||||||||||||||||||||
5580 | if (r.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
5581 | return never executed: s;return s; never executed: return s; | 0 | ||||||||||||||||||||||||||||||||||||
5582 | s = r.size() + QSize(2 * r.x(), 2 * r.y()); | - | ||||||||||||||||||||||||||||||||||||
5583 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5584 | - | |||||||||||||||||||||||||||||||||||||
5585 | return never executed: s;return s; never executed: return s; | 0 | ||||||||||||||||||||||||||||||||||||
5586 | } | - | ||||||||||||||||||||||||||||||||||||
5587 | void QWidget::adjustSize() | - | ||||||||||||||||||||||||||||||||||||
5588 | { | - | ||||||||||||||||||||||||||||||||||||
5589 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5590 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
5591 | QSize s = d->adjustedSize(); | - | ||||||||||||||||||||||||||||||||||||
5592 | - | |||||||||||||||||||||||||||||||||||||
5593 | if (d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5594 | d->layout->activate(); never executed: d->layout->activate(); | 0 | ||||||||||||||||||||||||||||||||||||
5595 | - | |||||||||||||||||||||||||||||||||||||
5596 | if (s.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||
5597 | resize(s); never executed: resize(s); | 0 | ||||||||||||||||||||||||||||||||||||
5598 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5599 | QSize QWidget::sizeHint() const | - | ||||||||||||||||||||||||||||||||||||
5600 | { | - | ||||||||||||||||||||||||||||||||||||
5601 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5602 | if (d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5603 | return never executed: d->layout->totalSizeHint();return d->layout->totalSizeHint(); never executed: return d->layout->totalSizeHint(); | 0 | ||||||||||||||||||||||||||||||||||||
5604 | return never executed: QSize(-1, -1);return QSize(-1, -1); never executed: return QSize(-1, -1); | 0 | ||||||||||||||||||||||||||||||||||||
5605 | } | - | ||||||||||||||||||||||||||||||||||||
5606 | QSize QWidget::minimumSizeHint() const | - | ||||||||||||||||||||||||||||||||||||
5607 | { | - | ||||||||||||||||||||||||||||||||||||
5608 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5609 | if (d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5610 | return never executed: d->layout->totalMinimumSize();return d->layout->totalMinimumSize(); never executed: return d->layout->totalMinimumSize(); | 0 | ||||||||||||||||||||||||||||||||||||
5611 | return never executed: QSize(-1, -1);return QSize(-1, -1); never executed: return QSize(-1, -1); | 0 | ||||||||||||||||||||||||||||||||||||
5612 | } | - | ||||||||||||||||||||||||||||||||||||
5613 | bool QWidget::isAncestorOf(const QWidget *child) const | - | ||||||||||||||||||||||||||||||||||||
5614 | { | - | ||||||||||||||||||||||||||||||||||||
5615 | while (child
| 0 | ||||||||||||||||||||||||||||||||||||
5616 | if (child == this
| 0 | ||||||||||||||||||||||||||||||||||||
5617 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
5618 | if (child->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5619 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
5620 | child = child->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
5621 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5622 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
5623 | } | - | ||||||||||||||||||||||||||||||||||||
5624 | bool QWidget::event(QEvent *event) | - | ||||||||||||||||||||||||||||||||||||
5625 | { | - | ||||||||||||||||||||||||||||||||||||
5626 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
5627 | - | |||||||||||||||||||||||||||||||||||||
5628 | - | |||||||||||||||||||||||||||||||||||||
5629 | if (!isEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
5630 | switch(event->type()) { | - | ||||||||||||||||||||||||||||||||||||
5631 | case never executed: QEvent::TabletPress:case QEvent::TabletPress: never executed: case QEvent::TabletPress: | 0 | ||||||||||||||||||||||||||||||||||||
5632 | case never executed: QEvent::TabletRelease:case QEvent::TabletRelease: never executed: case QEvent::TabletRelease: | 0 | ||||||||||||||||||||||||||||||||||||
5633 | case never executed: QEvent::TabletMove:case QEvent::TabletMove: never executed: case QEvent::TabletMove: | 0 | ||||||||||||||||||||||||||||||||||||
5634 | case never executed: QEvent::MouseButtonPress:case QEvent::MouseButtonPress: never executed: case QEvent::MouseButtonPress: | 0 | ||||||||||||||||||||||||||||||||||||
5635 | case never executed: QEvent::MouseButtonRelease:case QEvent::MouseButtonRelease: never executed: case QEvent::MouseButtonRelease: | 0 | ||||||||||||||||||||||||||||||||||||
5636 | case never executed: QEvent::MouseButtonDblClick:case QEvent::MouseButtonDblClick: never executed: case QEvent::MouseButtonDblClick: | 0 | ||||||||||||||||||||||||||||||||||||
5637 | case never executed: QEvent::MouseMove:case QEvent::MouseMove: never executed: case QEvent::MouseMove: | 0 | ||||||||||||||||||||||||||||||||||||
5638 | case never executed: QEvent::TouchBegin:case QEvent::TouchBegin: never executed: case QEvent::TouchBegin: | 0 | ||||||||||||||||||||||||||||||||||||
5639 | case never executed: QEvent::TouchUpdate:case QEvent::TouchUpdate: never executed: case QEvent::TouchUpdate: | 0 | ||||||||||||||||||||||||||||||||||||
5640 | case never executed: QEvent::TouchEnd:case QEvent::TouchEnd: never executed: case QEvent::TouchEnd: | 0 | ||||||||||||||||||||||||||||||||||||
5641 | case never executed: QEvent::TouchCancel:case QEvent::TouchCancel: never executed: case QEvent::TouchCancel: | 0 | ||||||||||||||||||||||||||||||||||||
5642 | case never executed: QEvent::ContextMenu:case QEvent::ContextMenu: never executed: case QEvent::ContextMenu: | 0 | ||||||||||||||||||||||||||||||||||||
5643 | case never executed: QEvent::KeyPress:case QEvent::KeyPress: never executed: case QEvent::KeyPress: | 0 | ||||||||||||||||||||||||||||||||||||
5644 | case never executed: QEvent::KeyRelease:case QEvent::KeyRelease: never executed: case QEvent::KeyRelease: | 0 | ||||||||||||||||||||||||||||||||||||
5645 | - | |||||||||||||||||||||||||||||||||||||
5646 | case never executed: QEvent::Wheel:case QEvent::Wheel: never executed: case QEvent::Wheel: | 0 | ||||||||||||||||||||||||||||||||||||
5647 | - | |||||||||||||||||||||||||||||||||||||
5648 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
5649 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
5650 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5651 | } | - | ||||||||||||||||||||||||||||||||||||
5652 | } | - | ||||||||||||||||||||||||||||||||||||
5653 | switch (event->type()) { | - | ||||||||||||||||||||||||||||||||||||
5654 | case never executed: QEvent::MouseMove:case QEvent::MouseMove: never executed: case QEvent::MouseMove: | 0 | ||||||||||||||||||||||||||||||||||||
5655 | mouseMoveEvent((QMouseEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5656 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5657 | - | |||||||||||||||||||||||||||||||||||||
5658 | case never executed: QEvent::MouseButtonPress:case QEvent::MouseButtonPress: never executed: case QEvent::MouseButtonPress: | 0 | ||||||||||||||||||||||||||||||||||||
5659 | mousePressEvent((QMouseEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5660 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5661 | - | |||||||||||||||||||||||||||||||||||||
5662 | case never executed: QEvent::MouseButtonRelease:case QEvent::MouseButtonRelease: never executed: case QEvent::MouseButtonRelease: | 0 | ||||||||||||||||||||||||||||||||||||
5663 | mouseReleaseEvent((QMouseEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5664 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5665 | - | |||||||||||||||||||||||||||||||||||||
5666 | case never executed: QEvent::MouseButtonDblClick:case QEvent::MouseButtonDblClick: never executed: case QEvent::MouseButtonDblClick: | 0 | ||||||||||||||||||||||||||||||||||||
5667 | mouseDoubleClickEvent((QMouseEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5668 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5669 | - | |||||||||||||||||||||||||||||||||||||
5670 | case never executed: QEvent::Wheel:case QEvent::Wheel: never executed: case QEvent::Wheel: | 0 | ||||||||||||||||||||||||||||||||||||
5671 | wheelEvent((QWheelEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5672 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5673 | - | |||||||||||||||||||||||||||||||||||||
5674 | - | |||||||||||||||||||||||||||||||||||||
5675 | case never executed: QEvent::TabletMove:case QEvent::TabletMove: never executed: case QEvent::TabletMove: | 0 | ||||||||||||||||||||||||||||||||||||
5676 | case never executed: QEvent::TabletPress:case QEvent::TabletPress: never executed: case QEvent::TabletPress: | 0 | ||||||||||||||||||||||||||||||||||||
5677 | case never executed: QEvent::TabletRelease:case QEvent::TabletRelease: never executed: case QEvent::TabletRelease: | 0 | ||||||||||||||||||||||||||||||||||||
5678 | tabletEvent((QTabletEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5679 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5680 | - | |||||||||||||||||||||||||||||||||||||
5681 | case never executed: QEvent::KeyPress:case QEvent::KeyPress: never executed: {case QEvent::KeyPress: | 0 | ||||||||||||||||||||||||||||||||||||
5682 | QKeyEvent *k = (QKeyEvent *)event; | - | ||||||||||||||||||||||||||||||||||||
5683 | bool res = false; | - | ||||||||||||||||||||||||||||||||||||
5684 | if (!(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))
| 0 | ||||||||||||||||||||||||||||||||||||
5685 | if (k->key() == Qt::Key_Backtab
| 0 | ||||||||||||||||||||||||||||||||||||
5686 | || (k->key() == Qt::Key_Tab
| 0 | ||||||||||||||||||||||||||||||||||||
5687 | res = focusNextPrevChild(false); never executed: res = focusNextPrevChild(false); | 0 | ||||||||||||||||||||||||||||||||||||
5688 | else if (k->key() == Qt::Key_Tab
| 0 | ||||||||||||||||||||||||||||||||||||
5689 | res = focusNextPrevChild(true); never executed: res = focusNextPrevChild(true); | 0 | ||||||||||||||||||||||||||||||||||||
5690 | if (res
| 0 | ||||||||||||||||||||||||||||||||||||
5691 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5692 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5693 | keyPressEvent(k); | - | ||||||||||||||||||||||||||||||||||||
5694 | if (!k->isAccepted()
| 0 | ||||||||||||||||||||||||||||||||||||
5695 | && k->modifiers() & Qt::ShiftModifier
| 0 | ||||||||||||||||||||||||||||||||||||
5696 | && d->whatsThis.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5697 | QWhatsThis::showText(mapToGlobal(inputMethodQuery(Qt::ImCursorRectangle).toRect().center()), d->whatsThis, this); | - | ||||||||||||||||||||||||||||||||||||
5698 | k->accept(); | - | ||||||||||||||||||||||||||||||||||||
5699 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5700 | - | |||||||||||||||||||||||||||||||||||||
5701 | } | - | ||||||||||||||||||||||||||||||||||||
5702 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5703 | - | |||||||||||||||||||||||||||||||||||||
5704 | case never executed: QEvent::KeyRelease:case QEvent::KeyRelease: never executed: case QEvent::KeyRelease: | 0 | ||||||||||||||||||||||||||||||||||||
5705 | keyReleaseEvent((QKeyEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5706 | - | |||||||||||||||||||||||||||||||||||||
5707 | case never executed: QEvent::ShortcutOverride:case QEvent::ShortcutOverride: never executed: case QEvent::ShortcutOverride: code before this statement never executed: case QEvent::ShortcutOverride: | 0 | ||||||||||||||||||||||||||||||||||||
5708 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5709 | - | |||||||||||||||||||||||||||||||||||||
5710 | case never executed: QEvent::InputMethod:case QEvent::InputMethod: never executed: case QEvent::InputMethod: | 0 | ||||||||||||||||||||||||||||||||||||
5711 | inputMethodEvent((QInputMethodEvent *) event); | - | ||||||||||||||||||||||||||||||||||||
5712 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5713 | - | |||||||||||||||||||||||||||||||||||||
5714 | case never executed: QEvent::InputMethodQuery:case QEvent::InputMethodQuery: never executed: case QEvent::InputMethodQuery: | 0 | ||||||||||||||||||||||||||||||||||||
5715 | if (testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
5716 | QInputMethodQueryEvent *query = static_cast<QInputMethodQueryEvent *>(event); | - | ||||||||||||||||||||||||||||||||||||
5717 | Qt::InputMethodQueries queries = query->queries(); | - | ||||||||||||||||||||||||||||||||||||
5718 | for (uint i = 0; i < 32
| 0 | ||||||||||||||||||||||||||||||||||||
5719 | Qt::InputMethodQuery q = (Qt::InputMethodQuery)(int)(queries & (1<<i)); | - | ||||||||||||||||||||||||||||||||||||
5720 | if (q
| 0 | ||||||||||||||||||||||||||||||||||||
5721 | QVariant v = inputMethodQuery(q); | - | ||||||||||||||||||||||||||||||||||||
5722 | if (q == Qt::ImEnabled
| 0 | ||||||||||||||||||||||||||||||||||||
5723 | v = QVariant(true); never executed: v = QVariant(true); | 0 | ||||||||||||||||||||||||||||||||||||
5724 | query->setValue(q, v); | - | ||||||||||||||||||||||||||||||||||||
5725 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5726 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5727 | query->accept(); | - | ||||||||||||||||||||||||||||||||||||
5728 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5729 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5730 | - | |||||||||||||||||||||||||||||||||||||
5731 | case never executed: QEvent::PolishRequest:case QEvent::PolishRequest: never executed: case QEvent::PolishRequest: | 0 | ||||||||||||||||||||||||||||||||||||
5732 | ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||
5733 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5734 | - | |||||||||||||||||||||||||||||||||||||
5735 | case never executed: QEvent::Polish:case QEvent::Polish: never executed: {case QEvent::Polish: | 0 | ||||||||||||||||||||||||||||||||||||
5736 | style()->polish(this); | - | ||||||||||||||||||||||||||||||||||||
5737 | setAttribute(Qt::WA_WState_Polished); | - | ||||||||||||||||||||||||||||||||||||
5738 | if (!QApplication::font(this).isCopyOf(QApplication::font())
| 0 | ||||||||||||||||||||||||||||||||||||
5739 | d->resolveFont(); never executed: d->resolveFont(); | 0 | ||||||||||||||||||||||||||||||||||||
5740 | if (!QApplication::palette(this).isCopyOf(QApplication::palette())
| 0 | ||||||||||||||||||||||||||||||||||||
5741 | d->resolvePalette(); never executed: d->resolvePalette(); | 0 | ||||||||||||||||||||||||||||||||||||
5742 | } | - | ||||||||||||||||||||||||||||||||||||
5743 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5744 | - | |||||||||||||||||||||||||||||||||||||
5745 | case never executed: QEvent::ApplicationWindowIconChange:case QEvent::ApplicationWindowIconChange: never executed: case QEvent::ApplicationWindowIconChange: | 0 | ||||||||||||||||||||||||||||||||||||
5746 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5747 | d->setWindowIcon_sys(); | - | ||||||||||||||||||||||||||||||||||||
5748 | d->setWindowIcon_helper(); | - | ||||||||||||||||||||||||||||||||||||
5749 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5750 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5751 | case never executed: QEvent::FocusIn:case QEvent::FocusIn: never executed: case QEvent::FocusIn: | 0 | ||||||||||||||||||||||||||||||||||||
5752 | focusInEvent((QFocusEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5753 | d->updateWidgetTransform(event); | - | ||||||||||||||||||||||||||||||||||||
5754 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5755 | - | |||||||||||||||||||||||||||||||||||||
5756 | case never executed: QEvent::FocusOut:case QEvent::FocusOut: never executed: case QEvent::FocusOut: | 0 | ||||||||||||||||||||||||||||||||||||
5757 | focusOutEvent((QFocusEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5758 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5759 | - | |||||||||||||||||||||||||||||||||||||
5760 | case never executed: QEvent::Enter:case QEvent::Enter: never executed: case QEvent::Enter: | 0 | ||||||||||||||||||||||||||||||||||||
5761 | - | |||||||||||||||||||||||||||||||||||||
5762 | if (d->statusTip.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5763 | QStatusTipEvent tip(d->statusTip); | - | ||||||||||||||||||||||||||||||||||||
5764 | QApplication::sendEvent(const_cast<QWidget *>(this), &tip); | - | ||||||||||||||||||||||||||||||||||||
5765 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5766 | - | |||||||||||||||||||||||||||||||||||||
5767 | enterEvent(event); | - | ||||||||||||||||||||||||||||||||||||
5768 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5769 | - | |||||||||||||||||||||||||||||||||||||
5770 | case never executed: QEvent::Leave:case QEvent::Leave: never executed: case QEvent::Leave: | 0 | ||||||||||||||||||||||||||||||||||||
5771 | - | |||||||||||||||||||||||||||||||||||||
5772 | if (d->statusTip.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5773 | QString empty; | - | ||||||||||||||||||||||||||||||||||||
5774 | QStatusTipEvent tip(empty); | - | ||||||||||||||||||||||||||||||||||||
5775 | QApplication::sendEvent(const_cast<QWidget *>(this), &tip); | - | ||||||||||||||||||||||||||||||||||||
5776 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5777 | - | |||||||||||||||||||||||||||||||||||||
5778 | leaveEvent(event); | - | ||||||||||||||||||||||||||||||||||||
5779 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5780 | - | |||||||||||||||||||||||||||||||||||||
5781 | case never executed: QEvent::HoverEnter:case QEvent::HoverEnter: never executed: case QEvent::HoverEnter: | 0 | ||||||||||||||||||||||||||||||||||||
5782 | case never executed: QEvent::HoverLeave:case QEvent::HoverLeave: never executed: case QEvent::HoverLeave: | 0 | ||||||||||||||||||||||||||||||||||||
5783 | update(); | - | ||||||||||||||||||||||||||||||||||||
5784 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5785 | - | |||||||||||||||||||||||||||||||||||||
5786 | case never executed: QEvent::Paint:case QEvent::Paint: never executed: case QEvent::Paint: | 0 | ||||||||||||||||||||||||||||||||||||
5787 | - | |||||||||||||||||||||||||||||||||||||
5788 | - | |||||||||||||||||||||||||||||||||||||
5789 | - | |||||||||||||||||||||||||||||||||||||
5790 | paintEvent((QPaintEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5791 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5792 | - | |||||||||||||||||||||||||||||||||||||
5793 | case never executed: QEvent::Move:case QEvent::Move: never executed: case QEvent::Move: | 0 | ||||||||||||||||||||||||||||||||||||
5794 | moveEvent((QMoveEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5795 | d->updateWidgetTransform(event); | - | ||||||||||||||||||||||||||||||||||||
5796 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5797 | - | |||||||||||||||||||||||||||||||||||||
5798 | case never executed: QEvent::Resize:case QEvent::Resize: never executed: case QEvent::Resize: | 0 | ||||||||||||||||||||||||||||||||||||
5799 | resizeEvent((QResizeEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
5800 | d->updateWidgetTransform(event); | - | ||||||||||||||||||||||||||||||||||||
5801 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5802 | - | |||||||||||||||||||||||||||||||||||||
5803 | case never executed: QEvent::Close:case QEvent::Close: never executed: case QEvent::Close: | 0 | ||||||||||||||||||||||||||||||||||||
5804 | closeEvent((QCloseEvent *)event); | - | ||||||||||||||||||||||||||||||||||||
5805 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5806 | - | |||||||||||||||||||||||||||||||||||||
5807 | - | |||||||||||||||||||||||||||||||||||||
5808 | case never executed: QEvent::ContextMenu:case QEvent::ContextMenu: never executed: case QEvent::ContextMenu: | 0 | ||||||||||||||||||||||||||||||||||||
5809 | switch (data->context_menu_policy) { | - | ||||||||||||||||||||||||||||||||||||
5810 | case never executed: Qt::PreventContextMenu:case Qt::PreventContextMenu: never executed: case Qt::PreventContextMenu: | 0 | ||||||||||||||||||||||||||||||||||||
5811 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5812 | case never executed: Qt::DefaultContextMenu:case Qt::DefaultContextMenu: never executed: case Qt::DefaultContextMenu: | 0 | ||||||||||||||||||||||||||||||||||||
5813 | contextMenuEvent(static_cast<QContextMenuEvent *>(event)); | - | ||||||||||||||||||||||||||||||||||||
5814 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5815 | case never executed: Qt::CustomContextMenu:case Qt::CustomContextMenu: never executed: case Qt::CustomContextMenu: | 0 | ||||||||||||||||||||||||||||||||||||
5816 | customContextMenuRequested(static_cast<QContextMenuEvent *>(event)->pos()); | - | ||||||||||||||||||||||||||||||||||||
5817 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5818 | - | |||||||||||||||||||||||||||||||||||||
5819 | case never executed: Qt::ActionsContextMenu:case Qt::ActionsContextMenu: never executed: case Qt::ActionsContextMenu: | 0 | ||||||||||||||||||||||||||||||||||||
5820 | if (d->actions.count()
| 0 | ||||||||||||||||||||||||||||||||||||
5821 | QMenu::exec(d->actions, static_cast<QContextMenuEvent *>(event)->globalPos(), | - | ||||||||||||||||||||||||||||||||||||
5822 | 0, this); | - | ||||||||||||||||||||||||||||||||||||
5823 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5824 | } | - | ||||||||||||||||||||||||||||||||||||
5825 | - | |||||||||||||||||||||||||||||||||||||
5826 | - | |||||||||||||||||||||||||||||||||||||
5827 | default never executed: :default: never executed: default: code before this statement never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
5828 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
5829 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5830 | } | - | ||||||||||||||||||||||||||||||||||||
5831 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5832 | - | |||||||||||||||||||||||||||||||||||||
5833 | - | |||||||||||||||||||||||||||||||||||||
5834 | - | |||||||||||||||||||||||||||||||||||||
5835 | case never executed: QEvent::Drop:case QEvent::Drop: never executed: case QEvent::Drop: | 0 | ||||||||||||||||||||||||||||||||||||
5836 | dropEvent((QDropEvent*) event); | - | ||||||||||||||||||||||||||||||||||||
5837 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5838 | - | |||||||||||||||||||||||||||||||||||||
5839 | case never executed: QEvent::DragEnter:case QEvent::DragEnter: never executed: case QEvent::DragEnter: | 0 | ||||||||||||||||||||||||||||||||||||
5840 | dragEnterEvent((QDragEnterEvent*) event); | - | ||||||||||||||||||||||||||||||||||||
5841 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5842 | - | |||||||||||||||||||||||||||||||||||||
5843 | case never executed: QEvent::DragMove:case QEvent::DragMove: never executed: case QEvent::DragMove: | 0 | ||||||||||||||||||||||||||||||||||||
5844 | dragMoveEvent((QDragMoveEvent*) event); | - | ||||||||||||||||||||||||||||||||||||
5845 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5846 | - | |||||||||||||||||||||||||||||||||||||
5847 | case never executed: QEvent::DragLeave:case QEvent::DragLeave: never executed: case QEvent::DragLeave: | 0 | ||||||||||||||||||||||||||||||||||||
5848 | dragLeaveEvent((QDragLeaveEvent*) event); | - | ||||||||||||||||||||||||||||||||||||
5849 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5850 | - | |||||||||||||||||||||||||||||||||||||
5851 | - | |||||||||||||||||||||||||||||||||||||
5852 | case never executed: QEvent::Show:case QEvent::Show: never executed: case QEvent::Show: | 0 | ||||||||||||||||||||||||||||||||||||
5853 | showEvent((QShowEvent*) event); | - | ||||||||||||||||||||||||||||||||||||
5854 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5855 | - | |||||||||||||||||||||||||||||||||||||
5856 | case never executed: QEvent::Hide:case QEvent::Hide: never executed: case QEvent::Hide: | 0 | ||||||||||||||||||||||||||||||||||||
5857 | hideEvent((QHideEvent*) event); | - | ||||||||||||||||||||||||||||||||||||
5858 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5859 | - | |||||||||||||||||||||||||||||||||||||
5860 | case never executed: QEvent::ShowWindowRequest:case QEvent::ShowWindowRequest: never executed: case QEvent::ShowWindowRequest: | 0 | ||||||||||||||||||||||||||||||||||||
5861 | if (!isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
5862 | d->show_sys(); never executed: d->show_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
5863 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5864 | - | |||||||||||||||||||||||||||||||||||||
5865 | case never executed: QEvent::ApplicationFontChange:case QEvent::ApplicationFontChange: never executed: case QEvent::ApplicationFontChange: | 0 | ||||||||||||||||||||||||||||||||||||
5866 | d->resolveFont(); | - | ||||||||||||||||||||||||||||||||||||
5867 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5868 | case never executed: QEvent::ApplicationPaletteChange:case QEvent::ApplicationPaletteChange: never executed: case QEvent::ApplicationPaletteChange: | 0 | ||||||||||||||||||||||||||||||||||||
5869 | if (!(windowType() == Qt::Desktop)
| 0 | ||||||||||||||||||||||||||||||||||||
5870 | d->resolvePalette(); never executed: d->resolvePalette(); | 0 | ||||||||||||||||||||||||||||||||||||
5871 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5872 | - | |||||||||||||||||||||||||||||||||||||
5873 | case never executed: QEvent::ToolBarChange:case QEvent::ToolBarChange: never executed: case QEvent::ToolBarChange: | 0 | ||||||||||||||||||||||||||||||||||||
5874 | case never executed: QEvent::ActivationChange:case QEvent::ActivationChange: never executed: case QEvent::ActivationChange: | 0 | ||||||||||||||||||||||||||||||||||||
5875 | case never executed: QEvent::EnabledChange:case QEvent::EnabledChange: never executed: case QEvent::EnabledChange: | 0 | ||||||||||||||||||||||||||||||||||||
5876 | case never executed: QEvent::FontChange:case QEvent::FontChange: never executed: case QEvent::FontChange: | 0 | ||||||||||||||||||||||||||||||||||||
5877 | case never executed: QEvent::StyleChange:case QEvent::StyleChange: never executed: case QEvent::StyleChange: | 0 | ||||||||||||||||||||||||||||||||||||
5878 | case never executed: QEvent::PaletteChange:case QEvent::PaletteChange: never executed: case QEvent::PaletteChange: | 0 | ||||||||||||||||||||||||||||||||||||
5879 | case never executed: QEvent::WindowTitleChange:case QEvent::WindowTitleChange: never executed: case QEvent::WindowTitleChange: | 0 | ||||||||||||||||||||||||||||||||||||
5880 | case never executed: QEvent::IconTextChange:case QEvent::IconTextChange: never executed: case QEvent::IconTextChange: | 0 | ||||||||||||||||||||||||||||||||||||
5881 | case never executed: QEvent::ModifiedChange:case QEvent::ModifiedChange: never executed: case QEvent::ModifiedChange: | 0 | ||||||||||||||||||||||||||||||||||||
5882 | case never executed: QEvent::MouseTrackingChange:case QEvent::MouseTrackingChange: never executed: case QEvent::MouseTrackingChange: | 0 | ||||||||||||||||||||||||||||||||||||
5883 | case never executed: QEvent::ParentChange:case QEvent::ParentChange: never executed: case QEvent::ParentChange: | 0 | ||||||||||||||||||||||||||||||||||||
5884 | case never executed: QEvent::LocaleChange:case QEvent::LocaleChange: never executed: case QEvent::LocaleChange: | 0 | ||||||||||||||||||||||||||||||||||||
5885 | case never executed: QEvent::MacSizeChange:case QEvent::MacSizeChange: never executed: case QEvent::MacSizeChange: | 0 | ||||||||||||||||||||||||||||||||||||
5886 | case never executed: QEvent::ContentsRectChange:case QEvent::ContentsRectChange: never executed: case QEvent::ContentsRectChange: | 0 | ||||||||||||||||||||||||||||||||||||
5887 | case never executed: QEvent::ThemeChange:case QEvent::ThemeChange: never executed: case QEvent::ThemeChange: | 0 | ||||||||||||||||||||||||||||||||||||
5888 | case never executed: QEvent::ReadOnlyChange:case QEvent::ReadOnlyChange: never executed: case QEvent::ReadOnlyChange: | 0 | ||||||||||||||||||||||||||||||||||||
5889 | changeEvent(event); | - | ||||||||||||||||||||||||||||||||||||
5890 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5891 | - | |||||||||||||||||||||||||||||||||||||
5892 | case never executed: QEvent::WindowStateChange:case QEvent::WindowStateChange: never executed: {case QEvent::WindowStateChange: | 0 | ||||||||||||||||||||||||||||||||||||
5893 | const bool wasMinimized = static_cast<const QWindowStateChangeEvent *>(event)->oldState() & Qt::WindowMinimized; | - | ||||||||||||||||||||||||||||||||||||
5894 | if (wasMinimized != isMinimized()
| 0 | ||||||||||||||||||||||||||||||||||||
5895 | QWidget *widget = const_cast<QWidget *>(this); | - | ||||||||||||||||||||||||||||||||||||
5896 | if (wasMinimized
| 0 | ||||||||||||||||||||||||||||||||||||
5897 | - | |||||||||||||||||||||||||||||||||||||
5898 | if (!d->childrenShownByExpose
| 0 | ||||||||||||||||||||||||||||||||||||
5899 | - | |||||||||||||||||||||||||||||||||||||
5900 | d->showChildren(true); | - | ||||||||||||||||||||||||||||||||||||
5901 | QShowEvent showEvent; | - | ||||||||||||||||||||||||||||||||||||
5902 | QCoreApplication::sendSpontaneousEvent(widget, &showEvent); | - | ||||||||||||||||||||||||||||||||||||
5903 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5904 | d->childrenHiddenByWState = false; | - | ||||||||||||||||||||||||||||||||||||
5905 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
5906 | QHideEvent hideEvent; | - | ||||||||||||||||||||||||||||||||||||
5907 | QCoreApplication::sendSpontaneousEvent(widget, &hideEvent); | - | ||||||||||||||||||||||||||||||||||||
5908 | d->hideChildren(true); | - | ||||||||||||||||||||||||||||||||||||
5909 | d->childrenHiddenByWState = true; | - | ||||||||||||||||||||||||||||||||||||
5910 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5911 | d->childrenShownByExpose = false; | - | ||||||||||||||||||||||||||||||||||||
5912 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5913 | changeEvent(event); | - | ||||||||||||||||||||||||||||||||||||
5914 | } | - | ||||||||||||||||||||||||||||||||||||
5915 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5916 | - | |||||||||||||||||||||||||||||||||||||
5917 | case never executed: QEvent::WindowActivate:case QEvent::WindowActivate: never executed: case QEvent::WindowActivate: | 0 | ||||||||||||||||||||||||||||||||||||
5918 | case never executed: QEvent::WindowDeactivate:case QEvent::WindowDeactivate: never executed: {case QEvent::WindowDeactivate: | 0 | ||||||||||||||||||||||||||||||||||||
5919 | if (isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
5920 | update(); never executed: update(); | 0 | ||||||||||||||||||||||||||||||||||||
5921 | QList<QObject*> childList = d->children; | - | ||||||||||||||||||||||||||||||||||||
5922 | for (int i = 0; i < childList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5923 | QWidget *w = qobject_cast<QWidget *>(childList.at(i)); | - | ||||||||||||||||||||||||||||||||||||
5924 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
5925 | QApplication::sendEvent(w, event); never executed: QApplication::sendEvent(w, event); | 0 | ||||||||||||||||||||||||||||||||||||
5926 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5927 | break; never executed: }break; | 0 | ||||||||||||||||||||||||||||||||||||
5928 | - | |||||||||||||||||||||||||||||||||||||
5929 | case never executed: QEvent::LanguageChange:case QEvent::LanguageChange: never executed: case QEvent::LanguageChange: | 0 | ||||||||||||||||||||||||||||||||||||
5930 | changeEvent(event); | - | ||||||||||||||||||||||||||||||||||||
5931 | { | - | ||||||||||||||||||||||||||||||||||||
5932 | QList<QObject*> childList = d->children; | - | ||||||||||||||||||||||||||||||||||||
5933 | for (int i = 0; i < childList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5934 | QObject *o = childList.at(i); | - | ||||||||||||||||||||||||||||||||||||
5935 | if (o
| 0 | ||||||||||||||||||||||||||||||||||||
5936 | QApplication::sendEvent(o, event); never executed: QApplication::sendEvent(o, event); | 0 | ||||||||||||||||||||||||||||||||||||
5937 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5938 | } | - | ||||||||||||||||||||||||||||||||||||
5939 | update(); | - | ||||||||||||||||||||||||||||||||||||
5940 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5941 | - | |||||||||||||||||||||||||||||||||||||
5942 | case never executed: QEvent::ApplicationLayoutDirectionChange:case QEvent::ApplicationLayoutDirectionChange: never executed: case QEvent::ApplicationLayoutDirectionChange: | 0 | ||||||||||||||||||||||||||||||||||||
5943 | d->resolveLayoutDirection(); | - | ||||||||||||||||||||||||||||||||||||
5944 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5945 | - | |||||||||||||||||||||||||||||||||||||
5946 | case never executed: QEvent::LayoutDirectionChange:case QEvent::LayoutDirectionChange: never executed: case QEvent::LayoutDirectionChange: | 0 | ||||||||||||||||||||||||||||||||||||
5947 | if (d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
5948 | d->layout->invalidate(); never executed: d->layout->invalidate(); | 0 | ||||||||||||||||||||||||||||||||||||
5949 | update(); | - | ||||||||||||||||||||||||||||||||||||
5950 | changeEvent(event); | - | ||||||||||||||||||||||||||||||||||||
5951 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5952 | case never executed: QEvent::UpdateRequest:case QEvent::UpdateRequest: never executed: case QEvent::UpdateRequest: | 0 | ||||||||||||||||||||||||||||||||||||
5953 | d->syncBackingStore(); | - | ||||||||||||||||||||||||||||||||||||
5954 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5955 | case never executed: QEvent::UpdateLater:case QEvent::UpdateLater: never executed: case QEvent::UpdateLater: | 0 | ||||||||||||||||||||||||||||||||||||
5956 | update(static_cast<QUpdateLaterEvent*>(event)->region()); | - | ||||||||||||||||||||||||||||||||||||
5957 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5958 | case never executed: QEvent::StyleAnimationUpdate:case QEvent::StyleAnimationUpdate: never executed: case QEvent::StyleAnimationUpdate: | 0 | ||||||||||||||||||||||||||||||||||||
5959 | if (isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
5960 | event->accept(); | - | ||||||||||||||||||||||||||||||||||||
5961 | update(); | - | ||||||||||||||||||||||||||||||||||||
5962 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5963 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5964 | - | |||||||||||||||||||||||||||||||||||||
5965 | case never executed: QEvent::WindowBlocked:case QEvent::WindowBlocked: never executed: case QEvent::WindowBlocked: | 0 | ||||||||||||||||||||||||||||||||||||
5966 | case never executed: QEvent::WindowUnblocked:case QEvent::WindowUnblocked: never executed: case QEvent::WindowUnblocked: | 0 | ||||||||||||||||||||||||||||||||||||
5967 | if (!d->children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
5968 | QWidget *modalWidget = QApplication::activeModalWidget(); | - | ||||||||||||||||||||||||||||||||||||
5969 | for (int i = 0; i < d->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5970 | QObject *o = d->children.at(i); | - | ||||||||||||||||||||||||||||||||||||
5971 | if (o
| 0 | ||||||||||||||||||||||||||||||||||||
5972 | QWidget *w = static_cast<QWidget *>(o); | - | ||||||||||||||||||||||||||||||||||||
5973 | - | |||||||||||||||||||||||||||||||||||||
5974 | if (!w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
5975 | QApplication::sendEvent(w, event); never executed: QApplication::sendEvent(w, event); | 0 | ||||||||||||||||||||||||||||||||||||
5976 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5977 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5978 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5979 | - | |||||||||||||||||||||||||||||||||||||
5980 | - | |||||||||||||||||||||||||||||||||||||
5981 | - | |||||||||||||||||||||||||||||||||||||
5982 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5983 | - | |||||||||||||||||||||||||||||||||||||
5984 | case never executed: QEvent::ToolTip:case QEvent::ToolTip: never executed: case QEvent::ToolTip: | 0 | ||||||||||||||||||||||||||||||||||||
5985 | if (!d->toolTip.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
5986 | QToolTip::showText(static_cast<QHelpEvent*>(event)->globalPos(), d->toolTip, this, QRect(), d->toolTipDuration); never executed: QToolTip::showText(static_cast<QHelpEvent*>(event)->globalPos(), d->toolTip, this, QRect(), d->toolTipDuration); | 0 | ||||||||||||||||||||||||||||||||||||
5987 | else | - | ||||||||||||||||||||||||||||||||||||
5988 | event->ignore(); never executed: event->ignore(); | 0 | ||||||||||||||||||||||||||||||||||||
5989 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5990 | - | |||||||||||||||||||||||||||||||||||||
5991 | - | |||||||||||||||||||||||||||||||||||||
5992 | case never executed: QEvent::WhatsThis:case QEvent::WhatsThis: never executed: case QEvent::WhatsThis: | 0 | ||||||||||||||||||||||||||||||||||||
5993 | if (d->whatsThis.size()
| 0 | ||||||||||||||||||||||||||||||||||||
5994 | QWhatsThis::showText(static_cast<QHelpEvent *>(event)->globalPos(), d->whatsThis, this); never executed: QWhatsThis::showText(static_cast<QHelpEvent *>(event)->globalPos(), d->whatsThis, this); | 0 | ||||||||||||||||||||||||||||||||||||
5995 | else | - | ||||||||||||||||||||||||||||||||||||
5996 | event->ignore(); never executed: event->ignore(); | 0 | ||||||||||||||||||||||||||||||||||||
5997 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
5998 | case never executed: QEvent::QueryWhatsThis:case QEvent::QueryWhatsThis: never executed: case QEvent::QueryWhatsThis: | 0 | ||||||||||||||||||||||||||||||||||||
5999 | if (d->whatsThis.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
6000 | event->ignore(); never executed: event->ignore(); | 0 | ||||||||||||||||||||||||||||||||||||
6001 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6002 | - | |||||||||||||||||||||||||||||||||||||
6003 | case never executed: QEvent::EmbeddingControl:case QEvent::EmbeddingControl: never executed: case QEvent::EmbeddingControl: | 0 | ||||||||||||||||||||||||||||||||||||
6004 | d->topData()->frameStrut.setCoords(0 ,0, 0, 0); | - | ||||||||||||||||||||||||||||||||||||
6005 | data->fstrut_dirty = false; | - | ||||||||||||||||||||||||||||||||||||
6006 | - | |||||||||||||||||||||||||||||||||||||
6007 | - | |||||||||||||||||||||||||||||||||||||
6008 | - | |||||||||||||||||||||||||||||||||||||
6009 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6010 | - | |||||||||||||||||||||||||||||||||||||
6011 | case never executed: QEvent::ActionAdded:case QEvent::ActionAdded: never executed: case QEvent::ActionAdded: | 0 | ||||||||||||||||||||||||||||||||||||
6012 | case never executed: QEvent::ActionRemoved:case QEvent::ActionRemoved: never executed: case QEvent::ActionRemoved: | 0 | ||||||||||||||||||||||||||||||||||||
6013 | case never executed: QEvent::ActionChanged:case QEvent::ActionChanged: never executed: case QEvent::ActionChanged: | 0 | ||||||||||||||||||||||||||||||||||||
6014 | actionEvent((QActionEvent*)event); | - | ||||||||||||||||||||||||||||||||||||
6015 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6016 | - | |||||||||||||||||||||||||||||||||||||
6017 | - | |||||||||||||||||||||||||||||||||||||
6018 | case never executed: QEvent::KeyboardLayoutChange:case QEvent::KeyboardLayoutChange: never executed: case QEvent::KeyboardLayoutChange: | 0 | ||||||||||||||||||||||||||||||||||||
6019 | { | - | ||||||||||||||||||||||||||||||||||||
6020 | changeEvent(event); | - | ||||||||||||||||||||||||||||||||||||
6021 | - | |||||||||||||||||||||||||||||||||||||
6022 | - | |||||||||||||||||||||||||||||||||||||
6023 | QList<QObject*> childList = d->children; | - | ||||||||||||||||||||||||||||||||||||
6024 | for (int i = 0; i < childList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
6025 | QWidget *w = qobject_cast<QWidget *>(childList.at(i)); | - | ||||||||||||||||||||||||||||||||||||
6026 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
6027 | QApplication::sendEvent(w, event); never executed: QApplication::sendEvent(w, event); | 0 | ||||||||||||||||||||||||||||||||||||
6028 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6029 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6030 | } | - | ||||||||||||||||||||||||||||||||||||
6031 | - | |||||||||||||||||||||||||||||||||||||
6032 | - | |||||||||||||||||||||||||||||||||||||
6033 | - | |||||||||||||||||||||||||||||||||||||
6034 | - | |||||||||||||||||||||||||||||||||||||
6035 | - | |||||||||||||||||||||||||||||||||||||
6036 | case never executed: QEvent::TouchBegin:case QEvent::TouchBegin: never executed: case QEvent::TouchBegin: | 0 | ||||||||||||||||||||||||||||||||||||
6037 | case never executed: QEvent::TouchUpdate:case QEvent::TouchUpdate: never executed: case QEvent::TouchUpdate: | 0 | ||||||||||||||||||||||||||||||||||||
6038 | case never executed: QEvent::TouchEnd:case QEvent::TouchEnd: never executed: case QEvent::TouchEnd: | 0 | ||||||||||||||||||||||||||||||||||||
6039 | case never executed: QEvent::TouchCancel:case QEvent::TouchCancel: never executed: case QEvent::TouchCancel: | 0 | ||||||||||||||||||||||||||||||||||||
6040 | { | - | ||||||||||||||||||||||||||||||||||||
6041 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6042 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6043 | } | - | ||||||||||||||||||||||||||||||||||||
6044 | - | |||||||||||||||||||||||||||||||||||||
6045 | case never executed: QEvent::Gesture:case QEvent::Gesture: never executed: case QEvent::Gesture: | 0 | ||||||||||||||||||||||||||||||||||||
6046 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6047 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6048 | - | |||||||||||||||||||||||||||||||||||||
6049 | case never executed: QEvent::ScreenChangeInternal:case QEvent::ScreenChangeInternal: never executed: case QEvent::ScreenChangeInternal: | 0 | ||||||||||||||||||||||||||||||||||||
6050 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
6051 | const QWindow *win = te->window; | - | ||||||||||||||||||||||||||||||||||||
6052 | d->setWinId((win && win->handle()) ? win->handle()->winId() : 0); | - | ||||||||||||||||||||||||||||||||||||
6053 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6054 | - | |||||||||||||||||||||||||||||||||||||
6055 | d->renderToTextureReallyDirty = 1; | - | ||||||||||||||||||||||||||||||||||||
6056 | - | |||||||||||||||||||||||||||||||||||||
6057 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6058 | - | |||||||||||||||||||||||||||||||||||||
6059 | case never executed: QEvent::DynamicPropertyChange:case QEvent::DynamicPropertyChange: never executed: {case QEvent::DynamicPropertyChange: | 0 | ||||||||||||||||||||||||||||||||||||
6060 | const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName(); | - | ||||||||||||||||||||||||||||||||||||
6061 | if (propName.length() == 13
| 0 | ||||||||||||||||||||||||||||||||||||
6062 | uint value = property(propName.constData()).toUInt(); | - | ||||||||||||||||||||||||||||||||||||
6063 | if (!d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
6064 | d->createExtra(); never executed: d->createExtra(); | 0 | ||||||||||||||||||||||||||||||||||||
6065 | const char axis = propName.at(12); | - | ||||||||||||||||||||||||||||||||||||
6066 | if (axis == 'X'
| 0 | ||||||||||||||||||||||||||||||||||||
6067 | d->extra->customDpiX = value; never executed: d->extra->customDpiX = value; | 0 | ||||||||||||||||||||||||||||||||||||
6068 | else if (axis == 'Y'
| 0 | ||||||||||||||||||||||||||||||||||||
6069 | d->extra->customDpiY = value; never executed: d->extra->customDpiY = value; | 0 | ||||||||||||||||||||||||||||||||||||
6070 | d->updateFont(d->data.fnt); | - | ||||||||||||||||||||||||||||||||||||
6071 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6072 | if (windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
6073 | windowHandle()->setProperty(propName, property(propName)); never executed: windowHandle()->setProperty(propName, property(propName)); | 0 | ||||||||||||||||||||||||||||||||||||
6074 | - | |||||||||||||||||||||||||||||||||||||
6075 | } | - | ||||||||||||||||||||||||||||||||||||
6076 | - | |||||||||||||||||||||||||||||||||||||
6077 | default never executed: :default: never executed: default: code before this statement never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
6078 | return never executed: QObject::event(event);return QObject::event(event); never executed: return QObject::event(event); | 0 | ||||||||||||||||||||||||||||||||||||
6079 | } | - | ||||||||||||||||||||||||||||||||||||
6080 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||
6081 | } | - | ||||||||||||||||||||||||||||||||||||
6082 | void QWidget::changeEvent(QEvent * event) | - | ||||||||||||||||||||||||||||||||||||
6083 | { | - | ||||||||||||||||||||||||||||||||||||
6084 | switch(event->type()) { | - | ||||||||||||||||||||||||||||||||||||
6085 | case never executed: QEvent::EnabledChange:case QEvent::EnabledChange: never executed: {case QEvent::EnabledChange: | 0 | ||||||||||||||||||||||||||||||||||||
6086 | update(); | - | ||||||||||||||||||||||||||||||||||||
6087 | - | |||||||||||||||||||||||||||||||||||||
6088 | QAccessible::State s; | - | ||||||||||||||||||||||||||||||||||||
6089 | s.disabled = true; | - | ||||||||||||||||||||||||||||||||||||
6090 | QAccessibleStateChangeEvent event(this, s); | - | ||||||||||||||||||||||||||||||||||||
6091 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
6092 | - | |||||||||||||||||||||||||||||||||||||
6093 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6094 | } | - | ||||||||||||||||||||||||||||||||||||
6095 | - | |||||||||||||||||||||||||||||||||||||
6096 | case never executed: QEvent::FontChange:case QEvent::FontChange: never executed: case QEvent::FontChange: | 0 | ||||||||||||||||||||||||||||||||||||
6097 | case never executed: QEvent::StyleChange:case QEvent::StyleChange: never executed: {case QEvent::StyleChange: | 0 | ||||||||||||||||||||||||||||||||||||
6098 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6099 | update(); | - | ||||||||||||||||||||||||||||||||||||
6100 | updateGeometry(); | - | ||||||||||||||||||||||||||||||||||||
6101 | if (d->layout
| 0 | ||||||||||||||||||||||||||||||||||||
6102 | d->layout->invalidate(); never executed: d->layout->invalidate(); | 0 | ||||||||||||||||||||||||||||||||||||
6103 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6104 | } | - | ||||||||||||||||||||||||||||||||||||
6105 | - | |||||||||||||||||||||||||||||||||||||
6106 | case never executed: QEvent::PaletteChange:case QEvent::PaletteChange: never executed: case QEvent::PaletteChange: | 0 | ||||||||||||||||||||||||||||||||||||
6107 | update(); | - | ||||||||||||||||||||||||||||||||||||
6108 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6109 | - | |||||||||||||||||||||||||||||||||||||
6110 | case never executed: QEvent::ThemeChange:case QEvent::ThemeChange: never executed: case QEvent::ThemeChange: | 0 | ||||||||||||||||||||||||||||||||||||
6111 | if (QApplication::desktopSettingsAware()
| 0 | ||||||||||||||||||||||||||||||||||||
6112 | && (static_cast<
| 0 | ||||||||||||||||||||||||||||||||||||
6113 | if (testAttribute(Qt::WA_WState_Polished)
| 0 | ||||||||||||||||||||||||||||||||||||
6114 | QApplication::style()->unpolish(this); never executed: QApplication::style()->unpolish(this); | 0 | ||||||||||||||||||||||||||||||||||||
6115 | if (testAttribute(Qt::WA_WState_Polished)
| 0 | ||||||||||||||||||||||||||||||||||||
6116 | QApplication::style()->polish(this); never executed: QApplication::style()->polish(this); | 0 | ||||||||||||||||||||||||||||||||||||
6117 | QEvent styleChangedEvent(QEvent::StyleChange); | - | ||||||||||||||||||||||||||||||||||||
6118 | QCoreApplication::sendEvent(this, &styleChangedEvent); | - | ||||||||||||||||||||||||||||||||||||
6119 | if (isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
6120 | update(); never executed: update(); | 0 | ||||||||||||||||||||||||||||||||||||
6121 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6122 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6123 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
6124 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
6125 | } | - | ||||||||||||||||||||||||||||||||||||
6126 | } | - | ||||||||||||||||||||||||||||||||||||
6127 | void QWidget::mouseMoveEvent(QMouseEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6128 | { | - | ||||||||||||||||||||||||||||||||||||
6129 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6130 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6131 | void QWidget::mousePressEvent(QMouseEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6132 | { | - | ||||||||||||||||||||||||||||||||||||
6133 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6134 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
6135 | event->accept(); | - | ||||||||||||||||||||||||||||||||||||
6136 | QWidget* w; | - | ||||||||||||||||||||||||||||||||||||
6137 | while ((
| 0 | ||||||||||||||||||||||||||||||||||||
6138 | w->close(); | - | ||||||||||||||||||||||||||||||||||||
6139 | if (QApplication::activePopupWidget() == w
| 0 | ||||||||||||||||||||||||||||||||||||
6140 | w->hide(); never executed: w->hide(); | 0 | ||||||||||||||||||||||||||||||||||||
6141 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6142 | if (!rect().contains(event->pos())
| 0 | ||||||||||||||||||||||||||||||||||||
6143 | close(); | - | ||||||||||||||||||||||||||||||||||||
6144 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6145 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6146 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6147 | void QWidget::mouseReleaseEvent(QMouseEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6148 | { | - | ||||||||||||||||||||||||||||||||||||
6149 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6150 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6151 | void QWidget::mouseDoubleClickEvent(QMouseEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6152 | { | - | ||||||||||||||||||||||||||||||||||||
6153 | mousePressEvent(event); | - | ||||||||||||||||||||||||||||||||||||
6154 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6155 | void QWidget::wheelEvent(QWheelEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6156 | { | - | ||||||||||||||||||||||||||||||||||||
6157 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6158 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6159 | void QWidget::tabletEvent(QTabletEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6160 | { | - | ||||||||||||||||||||||||||||||||||||
6161 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6162 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6163 | void QWidget::keyPressEvent(QKeyEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6164 | { | - | ||||||||||||||||||||||||||||||||||||
6165 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
6166 | event->accept(); | - | ||||||||||||||||||||||||||||||||||||
6167 | close(); | - | ||||||||||||||||||||||||||||||||||||
6168 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6169 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6170 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6171 | } | - | ||||||||||||||||||||||||||||||||||||
6172 | void QWidget::keyReleaseEvent(QKeyEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6173 | { | - | ||||||||||||||||||||||||||||||||||||
6174 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6175 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6176 | void QWidget::focusInEvent(QFocusEvent *) | - | ||||||||||||||||||||||||||||||||||||
6177 | { | - | ||||||||||||||||||||||||||||||||||||
6178 | if (focusPolicy() != Qt::NoFocus
| 0 | ||||||||||||||||||||||||||||||||||||
6179 | update(); | - | ||||||||||||||||||||||||||||||||||||
6180 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6181 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6182 | void QWidget::focusOutEvent(QFocusEvent *) | - | ||||||||||||||||||||||||||||||||||||
6183 | { | - | ||||||||||||||||||||||||||||||||||||
6184 | if (focusPolicy() != Qt::NoFocus
| 0 | ||||||||||||||||||||||||||||||||||||
6185 | update(); never executed: update(); | 0 | ||||||||||||||||||||||||||||||||||||
6186 | - | |||||||||||||||||||||||||||||||||||||
6187 | - | |||||||||||||||||||||||||||||||||||||
6188 | - | |||||||||||||||||||||||||||||||||||||
6189 | if ((static_cast<
| 0 | ||||||||||||||||||||||||||||||||||||
6190 | QGuiApplication::inputMethod()->hide(); never executed: QGuiApplication::inputMethod()->hide(); | 0 | ||||||||||||||||||||||||||||||||||||
6191 | - | |||||||||||||||||||||||||||||||||||||
6192 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6193 | void QWidget::enterEvent(QEvent *) | - | ||||||||||||||||||||||||||||||||||||
6194 | { | - | ||||||||||||||||||||||||||||||||||||
6195 | } | - | ||||||||||||||||||||||||||||||||||||
6196 | void QWidget::leaveEvent(QEvent *) | - | ||||||||||||||||||||||||||||||||||||
6197 | { | - | ||||||||||||||||||||||||||||||||||||
6198 | } | - | ||||||||||||||||||||||||||||||||||||
6199 | void QWidget::paintEvent(QPaintEvent *) | - | ||||||||||||||||||||||||||||||||||||
6200 | { | - | ||||||||||||||||||||||||||||||||||||
6201 | } | - | ||||||||||||||||||||||||||||||||||||
6202 | void QWidget::moveEvent(QMoveEvent *) | - | ||||||||||||||||||||||||||||||||||||
6203 | { | - | ||||||||||||||||||||||||||||||||||||
6204 | } | - | ||||||||||||||||||||||||||||||||||||
6205 | void QWidget::resizeEvent(QResizeEvent * ) | - | ||||||||||||||||||||||||||||||||||||
6206 | { | - | ||||||||||||||||||||||||||||||||||||
6207 | } | - | ||||||||||||||||||||||||||||||||||||
6208 | void QWidget::actionEvent(QActionEvent *) | - | ||||||||||||||||||||||||||||||||||||
6209 | { | - | ||||||||||||||||||||||||||||||||||||
6210 | - | |||||||||||||||||||||||||||||||||||||
6211 | } | - | ||||||||||||||||||||||||||||||||||||
6212 | void QWidget::closeEvent(QCloseEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6213 | { | - | ||||||||||||||||||||||||||||||||||||
6214 | event->accept(); | - | ||||||||||||||||||||||||||||||||||||
6215 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6216 | void QWidget::contextMenuEvent(QContextMenuEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6217 | { | - | ||||||||||||||||||||||||||||||||||||
6218 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6219 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6220 | void QWidget::inputMethodEvent(QInputMethodEvent *event) | - | ||||||||||||||||||||||||||||||||||||
6221 | { | - | ||||||||||||||||||||||||||||||||||||
6222 | event->ignore(); | - | ||||||||||||||||||||||||||||||||||||
6223 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6224 | QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const | - | ||||||||||||||||||||||||||||||||||||
6225 | { | - | ||||||||||||||||||||||||||||||||||||
6226 | switch(query) { | - | ||||||||||||||||||||||||||||||||||||
6227 | case never executed: Qt::ImCursorRectangle:case Qt::ImCursorRectangle: never executed: case Qt::ImCursorRectangle: | 0 | ||||||||||||||||||||||||||||||||||||
6228 | return never executed: QRect(width()/2, 0, 1, height());return QRect(width()/2, 0, 1, height()); never executed: return QRect(width()/2, 0, 1, height()); | 0 | ||||||||||||||||||||||||||||||||||||
6229 | case never executed: Qt::ImFont:case Qt::ImFont: never executed: case Qt::ImFont: | 0 | ||||||||||||||||||||||||||||||||||||
6230 | return never executed: font();return font(); never executed: return font(); | 0 | ||||||||||||||||||||||||||||||||||||
6231 | case never executed: Qt::ImAnchorPosition:case Qt::ImAnchorPosition: never executed: case Qt::ImAnchorPosition: | 0 | ||||||||||||||||||||||||||||||||||||
6232 | - | |||||||||||||||||||||||||||||||||||||
6233 | return never executed: inputMethodQuery(Qt::ImCursorPosition);return inputMethodQuery(Qt::ImCursorPosition); never executed: return inputMethodQuery(Qt::ImCursorPosition); | 0 | ||||||||||||||||||||||||||||||||||||
6234 | case never executed: Qt::ImHints:case Qt::ImHints: never executed: case Qt::ImHints: | 0 | ||||||||||||||||||||||||||||||||||||
6235 | return never executed: (int)inputMethodHints();return (int)inputMethodHints(); never executed: return (int)inputMethodHints(); | 0 | ||||||||||||||||||||||||||||||||||||
6236 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
6237 | return never executed: QVariant();return QVariant(); never executed: return QVariant(); | 0 | ||||||||||||||||||||||||||||||||||||
6238 | } | - | ||||||||||||||||||||||||||||||||||||
6239 | } | - | ||||||||||||||||||||||||||||||||||||
6240 | Qt::InputMethodHints QWidget::inputMethodHints() const | - | ||||||||||||||||||||||||||||||||||||
6241 | { | - | ||||||||||||||||||||||||||||||||||||
6242 | - | |||||||||||||||||||||||||||||||||||||
6243 | const QWidgetPrivate *priv = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6244 | while (priv->inheritsInputMethodHints
| 0 | ||||||||||||||||||||||||||||||||||||
6245 | priv = priv->q_func()->parentWidget()->d_func(); | - | ||||||||||||||||||||||||||||||||||||
6246 | ((!(priv)) ? qt_assert("priv",__FILE__,9800) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
6247 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6248 | return never executed: priv->imHints;return priv->imHints; never executed: return priv->imHints; | 0 | ||||||||||||||||||||||||||||||||||||
6249 | - | |||||||||||||||||||||||||||||||||||||
6250 | - | |||||||||||||||||||||||||||||||||||||
6251 | - | |||||||||||||||||||||||||||||||||||||
6252 | } | - | ||||||||||||||||||||||||||||||||||||
6253 | - | |||||||||||||||||||||||||||||||||||||
6254 | void QWidget::setInputMethodHints(Qt::InputMethodHints hints) | - | ||||||||||||||||||||||||||||||||||||
6255 | { | - | ||||||||||||||||||||||||||||||||||||
6256 | - | |||||||||||||||||||||||||||||||||||||
6257 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6258 | if (d->imHints == hints
| 0 | ||||||||||||||||||||||||||||||||||||
6259 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6260 | d->imHints = hints; | - | ||||||||||||||||||||||||||||||||||||
6261 | if (this == QGuiApplication::focusObject()
| 0 | ||||||||||||||||||||||||||||||||||||
6262 | QGuiApplication::inputMethod()->update(Qt::ImHints); never executed: QGuiApplication::inputMethod()->update(Qt::ImHints); | 0 | ||||||||||||||||||||||||||||||||||||
6263 | - | |||||||||||||||||||||||||||||||||||||
6264 | - | |||||||||||||||||||||||||||||||||||||
6265 | - | |||||||||||||||||||||||||||||||||||||
6266 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6267 | void QWidget::dragEnterEvent(QDragEnterEvent *) | - | ||||||||||||||||||||||||||||||||||||
6268 | { | - | ||||||||||||||||||||||||||||||||||||
6269 | } | - | ||||||||||||||||||||||||||||||||||||
6270 | void QWidget::dragMoveEvent(QDragMoveEvent *) | - | ||||||||||||||||||||||||||||||||||||
6271 | { | - | ||||||||||||||||||||||||||||||||||||
6272 | } | - | ||||||||||||||||||||||||||||||||||||
6273 | void QWidget::dragLeaveEvent(QDragLeaveEvent *) | - | ||||||||||||||||||||||||||||||||||||
6274 | { | - | ||||||||||||||||||||||||||||||||||||
6275 | } | - | ||||||||||||||||||||||||||||||||||||
6276 | void QWidget::dropEvent(QDropEvent *) | - | ||||||||||||||||||||||||||||||||||||
6277 | { | - | ||||||||||||||||||||||||||||||||||||
6278 | } | - | ||||||||||||||||||||||||||||||||||||
6279 | void QWidget::showEvent(QShowEvent *) | - | ||||||||||||||||||||||||||||||||||||
6280 | { | - | ||||||||||||||||||||||||||||||||||||
6281 | } | - | ||||||||||||||||||||||||||||||||||||
6282 | void QWidget::hideEvent(QHideEvent *) | - | ||||||||||||||||||||||||||||||||||||
6283 | { | - | ||||||||||||||||||||||||||||||||||||
6284 | } | - | ||||||||||||||||||||||||||||||||||||
6285 | bool QWidget::nativeEvent(const QByteArray &eventType, void *message, long *result) | - | ||||||||||||||||||||||||||||||||||||
6286 | { | - | ||||||||||||||||||||||||||||||||||||
6287 | (void)eventType;; | - | ||||||||||||||||||||||||||||||||||||
6288 | (void)message;; | - | ||||||||||||||||||||||||||||||||||||
6289 | (void)result;; | - | ||||||||||||||||||||||||||||||||||||
6290 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||
6291 | } | - | ||||||||||||||||||||||||||||||||||||
6292 | void QWidget::ensurePolished() const | - | ||||||||||||||||||||||||||||||||||||
6293 | { | - | ||||||||||||||||||||||||||||||||||||
6294 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6295 | - | |||||||||||||||||||||||||||||||||||||
6296 | const QMetaObject *m = metaObject(); | - | ||||||||||||||||||||||||||||||||||||
6297 | if (m == d->polished
| 0 | ||||||||||||||||||||||||||||||||||||
6298 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6299 | d->polished = m; | - | ||||||||||||||||||||||||||||||||||||
6300 | - | |||||||||||||||||||||||||||||||||||||
6301 | QEvent e(QEvent::Polish); | - | ||||||||||||||||||||||||||||||||||||
6302 | QCoreApplication::sendEvent(const_cast<QWidget *>(this), &e); | - | ||||||||||||||||||||||||||||||||||||
6303 | - | |||||||||||||||||||||||||||||||||||||
6304 | - | |||||||||||||||||||||||||||||||||||||
6305 | QList<QObject*> children = d->children; | - | ||||||||||||||||||||||||||||||||||||
6306 | for (int i = 0; i < children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
6307 | QObject *o = children.at(i); | - | ||||||||||||||||||||||||||||||||||||
6308 | if(!o->isWidgetType()
| 0 | ||||||||||||||||||||||||||||||||||||
6309 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
6310 | if (QWidget *w = qobject_cast<QWidget *>(o)
| 0 | ||||||||||||||||||||||||||||||||||||
6311 | w->ensurePolished(); never executed: w->ensurePolished(); | 0 | ||||||||||||||||||||||||||||||||||||
6312 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6313 | - | |||||||||||||||||||||||||||||||||||||
6314 | if (d->parent
| 0 | ||||||||||||||||||||||||||||||||||||
6315 | QChildEvent e(QEvent::ChildPolished, const_cast<QWidget *>(this)); | - | ||||||||||||||||||||||||||||||||||||
6316 | QCoreApplication::sendEvent(d->parent, &e); | - | ||||||||||||||||||||||||||||||||||||
6317 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6318 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6319 | - | |||||||||||||||||||||||||||||||||||||
6320 | - | |||||||||||||||||||||||||||||||||||||
6321 | - | |||||||||||||||||||||||||||||||||||||
6322 | - | |||||||||||||||||||||||||||||||||||||
6323 | - | |||||||||||||||||||||||||||||||||||||
6324 | - | |||||||||||||||||||||||||||||||||||||
6325 | - | |||||||||||||||||||||||||||||||||||||
6326 | QRegion QWidget::mask() const | - | ||||||||||||||||||||||||||||||||||||
6327 | { | - | ||||||||||||||||||||||||||||||||||||
6328 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6329 | return never executed: d->extrareturn d->extra ? d->extra->mask : QRegion();
never executed: return d->extra ? d->extra->mask : QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||
6330 | } | - | ||||||||||||||||||||||||||||||||||||
6331 | QLayout *QWidget::layout() const | - | ||||||||||||||||||||||||||||||||||||
6332 | { | - | ||||||||||||||||||||||||||||||||||||
6333 | return never executed: d_func()->layout;return d_func()->layout; never executed: return d_func()->layout; | 0 | ||||||||||||||||||||||||||||||||||||
6334 | } | - | ||||||||||||||||||||||||||||||||||||
6335 | void QWidget::setLayout(QLayout *l) | - | ||||||||||||||||||||||||||||||||||||
6336 | { | - | ||||||||||||||||||||||||||||||||||||
6337 | if (!l
| 0 | ||||||||||||||||||||||||||||||||||||
6338 | QMessageLogger(__FILE__, 10075, __PRETTY_FUNCTION__).warning("QWidget::setLayout: Cannot set layout to 0"); | - | ||||||||||||||||||||||||||||||||||||
6339 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6340 | } | - | ||||||||||||||||||||||||||||||||||||
6341 | if (layout()
| 0 | ||||||||||||||||||||||||||||||||||||
6342 | if (layout() != l
| 0 | ||||||||||||||||||||||||||||||||||||
6343 | QMessageLogger(__FILE__, 10080, __PRETTY_FUNCTION__).warning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a" never executed: QMessageLogger(__FILE__, 10080, __PRETTY_FUNCTION__).warning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a" " layout", l->objectName().toLocal8Bit().data(), metaObject()->className(), objectName().toLocal8Bit().data()); | 0 | ||||||||||||||||||||||||||||||||||||
6344 | " layout", l->objectName().toLocal8Bit().data(), metaObject()->className(), never executed: QMessageLogger(__FILE__, 10080, __PRETTY_FUNCTION__).warning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a" " layout", l->objectName().toLocal8Bit().data(), metaObject()->className(), objectName().toLocal8Bit().data()); | 0 | ||||||||||||||||||||||||||||||||||||
6345 | objectName().toLocal8Bit().data()); never executed: QMessageLogger(__FILE__, 10080, __PRETTY_FUNCTION__).warning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a" " layout", l->objectName().toLocal8Bit().data(), metaObject()->className(), objectName().toLocal8Bit().data()); | 0 | ||||||||||||||||||||||||||||||||||||
6346 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6347 | } | - | ||||||||||||||||||||||||||||||||||||
6348 | - | |||||||||||||||||||||||||||||||||||||
6349 | QObject *oldParent = l->parent(); | - | ||||||||||||||||||||||||||||||||||||
6350 | if (oldParent
| 0 | ||||||||||||||||||||||||||||||||||||
6351 | if (oldParent->isWidgetType()
| 0 | ||||||||||||||||||||||||||||||||||||
6352 | - | |||||||||||||||||||||||||||||||||||||
6353 | - | |||||||||||||||||||||||||||||||||||||
6354 | QWidget *oldParentWidget = static_cast<QWidget *>(oldParent); | - | ||||||||||||||||||||||||||||||||||||
6355 | oldParentWidget->takeLayout(); | - | ||||||||||||||||||||||||||||||||||||
6356 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6357 | QMessageLogger(__FILE__, 10094, __PRETTY_FUNCTION__).warning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", when the QLayout already has a parent", | - | ||||||||||||||||||||||||||||||||||||
6358 | l->objectName().toLocal8Bit().data(), metaObject()->className(), | - | ||||||||||||||||||||||||||||||||||||
6359 | objectName().toLocal8Bit().data()); | - | ||||||||||||||||||||||||||||||||||||
6360 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6361 | } | - | ||||||||||||||||||||||||||||||||||||
6362 | } | - | ||||||||||||||||||||||||||||||||||||
6363 | - | |||||||||||||||||||||||||||||||||||||
6364 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6365 | l->d_func()->topLevel = true; | - | ||||||||||||||||||||||||||||||||||||
6366 | d->layout = l; | - | ||||||||||||||||||||||||||||||||||||
6367 | if (oldParent != this
| 0 | ||||||||||||||||||||||||||||||||||||
6368 | l->setParent(this); | - | ||||||||||||||||||||||||||||||||||||
6369 | l->d_func()->reparentChildWidgets(this); | - | ||||||||||||||||||||||||||||||||||||
6370 | l->invalidate(); | - | ||||||||||||||||||||||||||||||||||||
6371 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6372 | - | |||||||||||||||||||||||||||||||||||||
6373 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6374 | d->topData()->sizeAdjusted = false; never executed: d->topData()->sizeAdjusted = false; | 0 | ||||||||||||||||||||||||||||||||||||
6375 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6376 | QLayout *QWidget::takeLayout() | - | ||||||||||||||||||||||||||||||||||||
6377 | { | - | ||||||||||||||||||||||||||||||||||||
6378 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6379 | QLayout *l = layout(); | - | ||||||||||||||||||||||||||||||||||||
6380 | if (!l
| 0 | ||||||||||||||||||||||||||||||||||||
6381 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
6382 | d->layout = 0; | - | ||||||||||||||||||||||||||||||||||||
6383 | l->setParent(0); | - | ||||||||||||||||||||||||||||||||||||
6384 | return never executed: l;return l; never executed: return l; | 0 | ||||||||||||||||||||||||||||||||||||
6385 | } | - | ||||||||||||||||||||||||||||||||||||
6386 | QSizePolicy QWidget::sizePolicy() const | - | ||||||||||||||||||||||||||||||||||||
6387 | { | - | ||||||||||||||||||||||||||||||||||||
6388 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6389 | return never executed: d->size_policy;return d->size_policy; never executed: return d->size_policy; | 0 | ||||||||||||||||||||||||||||||||||||
6390 | } | - | ||||||||||||||||||||||||||||||||||||
6391 | - | |||||||||||||||||||||||||||||||||||||
6392 | void QWidget::setSizePolicy(QSizePolicy policy) | - | ||||||||||||||||||||||||||||||||||||
6393 | { | - | ||||||||||||||||||||||||||||||||||||
6394 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6395 | setAttribute(Qt::WA_WState_OwnSizePolicy); | - | ||||||||||||||||||||||||||||||||||||
6396 | if (policy == d->size_policy
| 0 | ||||||||||||||||||||||||||||||||||||
6397 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6398 | - | |||||||||||||||||||||||||||||||||||||
6399 | if (d->size_policy.retainSizeWhenHidden() != policy.retainSizeWhenHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
6400 | d->retainSizeWhenHiddenChanged = 1; never executed: d->retainSizeWhenHiddenChanged = 1; | 0 | ||||||||||||||||||||||||||||||||||||
6401 | - | |||||||||||||||||||||||||||||||||||||
6402 | d->size_policy = policy; | - | ||||||||||||||||||||||||||||||||||||
6403 | - | |||||||||||||||||||||||||||||||||||||
6404 | - | |||||||||||||||||||||||||||||||||||||
6405 | if (QWExtra *extra = d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
6406 | if (extra->proxyWidget
| 0 | ||||||||||||||||||||||||||||||||||||
6407 | extra->proxyWidget->setSizePolicy(policy); never executed: extra->proxyWidget->setSizePolicy(policy); | 0 | ||||||||||||||||||||||||||||||||||||
6408 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6409 | - | |||||||||||||||||||||||||||||||||||||
6410 | - | |||||||||||||||||||||||||||||||||||||
6411 | updateGeometry(); | - | ||||||||||||||||||||||||||||||||||||
6412 | d->retainSizeWhenHiddenChanged = 0; | - | ||||||||||||||||||||||||||||||||||||
6413 | - | |||||||||||||||||||||||||||||||||||||
6414 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6415 | d->topData()->sizeAdjusted = false; never executed: d->topData()->sizeAdjusted = false; | 0 | ||||||||||||||||||||||||||||||||||||
6416 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6417 | int QWidget::heightForWidth(int w) const | - | ||||||||||||||||||||||||||||||||||||
6418 | { | - | ||||||||||||||||||||||||||||||||||||
6419 | if (layout()
| 0 | ||||||||||||||||||||||||||||||||||||
6420 | return never executed: layout()->totalHeightForWidth(w);return layout()->totalHeightForWidth(w); never executed: return layout()->totalHeightForWidth(w); | 0 | ||||||||||||||||||||||||||||||||||||
6421 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
6422 | } | - | ||||||||||||||||||||||||||||||||||||
6423 | - | |||||||||||||||||||||||||||||||||||||
6424 | - | |||||||||||||||||||||||||||||||||||||
6425 | - | |||||||||||||||||||||||||||||||||||||
6426 | - | |||||||||||||||||||||||||||||||||||||
6427 | - | |||||||||||||||||||||||||||||||||||||
6428 | - | |||||||||||||||||||||||||||||||||||||
6429 | - | |||||||||||||||||||||||||||||||||||||
6430 | bool QWidget::hasHeightForWidth() const | - | ||||||||||||||||||||||||||||||||||||
6431 | { | - | ||||||||||||||||||||||||||||||||||||
6432 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6433 | return never executed: d->layoutreturn d->layout ? d->layout->hasHeightForWidth() : d->size_policy.hasHeightForWidth();
never executed: return d->layout ? d->layout->hasHeightForWidth() : d->size_policy.hasHeightForWidth(); | 0 | ||||||||||||||||||||||||||||||||||||
6434 | } | - | ||||||||||||||||||||||||||||||||||||
6435 | QWidget *QWidget::childAt(const QPoint &p) const | - | ||||||||||||||||||||||||||||||||||||
6436 | { | - | ||||||||||||||||||||||||||||||||||||
6437 | return never executed: d_func()->childAt_helper(p, false);return d_func()->childAt_helper(p, false); never executed: return d_func()->childAt_helper(p, false); | 0 | ||||||||||||||||||||||||||||||||||||
6438 | } | - | ||||||||||||||||||||||||||||||||||||
6439 | - | |||||||||||||||||||||||||||||||||||||
6440 | QWidget *QWidgetPrivate::childAt_helper(const QPoint &p, bool ignoreChildrenInDestructor) const | - | ||||||||||||||||||||||||||||||||||||
6441 | { | - | ||||||||||||||||||||||||||||||||||||
6442 | if (children.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
6443 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
6444 | - | |||||||||||||||||||||||||||||||||||||
6445 | if (!pointInsideRectAndMask(p)
| 0 | ||||||||||||||||||||||||||||||||||||
6446 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
6447 | return never executed: childAtRecursiveHelper(p, ignoreChildrenInDestructor);return childAtRecursiveHelper(p, ignoreChildrenInDestructor); never executed: return childAtRecursiveHelper(p, ignoreChildrenInDestructor); | 0 | ||||||||||||||||||||||||||||||||||||
6448 | } | - | ||||||||||||||||||||||||||||||||||||
6449 | - | |||||||||||||||||||||||||||||||||||||
6450 | QWidget *QWidgetPrivate::childAtRecursiveHelper(const QPoint &p, bool ignoreChildrenInDestructor) const | - | ||||||||||||||||||||||||||||||||||||
6451 | { | - | ||||||||||||||||||||||||||||||||||||
6452 | for (int i = children.size() - 1; i >= 0
| 0 | ||||||||||||||||||||||||||||||||||||
6453 | QWidget *child = qobject_cast<QWidget *>(children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
6454 | if (!child
| 0 | ||||||||||||||||||||||||||||||||||||
6455 | || (ignoreChildrenInDestructor
| 0 | ||||||||||||||||||||||||||||||||||||
6456 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
6457 | } | - | ||||||||||||||||||||||||||||||||||||
6458 | - | |||||||||||||||||||||||||||||||||||||
6459 | - | |||||||||||||||||||||||||||||||||||||
6460 | QPoint childPoint = p; | - | ||||||||||||||||||||||||||||||||||||
6461 | childPoint -= child->data->crect.topLeft(); | - | ||||||||||||||||||||||||||||||||||||
6462 | - | |||||||||||||||||||||||||||||||||||||
6463 | - | |||||||||||||||||||||||||||||||||||||
6464 | if (!child->d_func()->pointInsideRectAndMask(childPoint)
| 0 | ||||||||||||||||||||||||||||||||||||
6465 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
6466 | - | |||||||||||||||||||||||||||||||||||||
6467 | - | |||||||||||||||||||||||||||||||||||||
6468 | if (QWidget *w = child->d_func()->childAtRecursiveHelper(childPoint, ignoreChildrenInDestructor)
| 0 | ||||||||||||||||||||||||||||||||||||
6469 | return never executed: w;return w; never executed: return w; | 0 | ||||||||||||||||||||||||||||||||||||
6470 | - | |||||||||||||||||||||||||||||||||||||
6471 | - | |||||||||||||||||||||||||||||||||||||
6472 | return never executed: child;return child; never executed: return child; | 0 | ||||||||||||||||||||||||||||||||||||
6473 | } | - | ||||||||||||||||||||||||||||||||||||
6474 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
6475 | } | - | ||||||||||||||||||||||||||||||||||||
6476 | - | |||||||||||||||||||||||||||||||||||||
6477 | void QWidgetPrivate::updateGeometry_helper(bool forceUpdate) | - | ||||||||||||||||||||||||||||||||||||
6478 | { | - | ||||||||||||||||||||||||||||||||||||
6479 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
6480 | if (widgetItem
| 0 | ||||||||||||||||||||||||||||||||||||
6481 | widgetItem->invalidateSizeCache(); never executed: widgetItem->invalidateSizeCache(); | 0 | ||||||||||||||||||||||||||||||||||||
6482 | QWidget *parent; | - | ||||||||||||||||||||||||||||||||||||
6483 | if (forceUpdate
| 0 | ||||||||||||||||||||||||||||||||||||
6484 | const int isHidden = q->isHidden()
| 0 | ||||||||||||||||||||||||||||||||||||
6485 | - | |||||||||||||||||||||||||||||||||||||
6486 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6487 | if (parent->d_func()->layout
| 0 | ||||||||||||||||||||||||||||||||||||
6488 | parent->d_func()->layout->invalidate(); never executed: parent->d_func()->layout->invalidate(); | 0 | ||||||||||||||||||||||||||||||||||||
6489 | else if (parent->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
6490 | QApplication::postEvent(parent, new QEvent(QEvent::LayoutRequest)); never executed: QApplication::postEvent(parent, new QEvent(QEvent::LayoutRequest)); | 0 | ||||||||||||||||||||||||||||||||||||
6491 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6492 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6493 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6494 | void QWidget::updateGeometry() | - | ||||||||||||||||||||||||||||||||||||
6495 | { | - | ||||||||||||||||||||||||||||||||||||
6496 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6497 | d->updateGeometry_helper(false); | - | ||||||||||||||||||||||||||||||||||||
6498 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6499 | void QWidget::setWindowFlags(Qt::WindowFlags flags) | - | ||||||||||||||||||||||||||||||||||||
6500 | { | - | ||||||||||||||||||||||||||||||||||||
6501 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6502 | d->setWindowFlags(flags); | - | ||||||||||||||||||||||||||||||||||||
6503 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6504 | - | |||||||||||||||||||||||||||||||||||||
6505 | - | |||||||||||||||||||||||||||||||||||||
6506 | - | |||||||||||||||||||||||||||||||||||||
6507 | - | |||||||||||||||||||||||||||||||||||||
6508 | - | |||||||||||||||||||||||||||||||||||||
6509 | void QWidgetPrivate::setWindowFlags(Qt::WindowFlags flags) | - | ||||||||||||||||||||||||||||||||||||
6510 | { | - | ||||||||||||||||||||||||||||||||||||
6511 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
6512 | if (q->data->window_flags == flags
| 0 | ||||||||||||||||||||||||||||||||||||
6513 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6514 | - | |||||||||||||||||||||||||||||||||||||
6515 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
6516 | - | |||||||||||||||||||||||||||||||||||||
6517 | QPoint oldPos = q->pos(); | - | ||||||||||||||||||||||||||||||||||||
6518 | bool visible = q->isVisible(); | - | ||||||||||||||||||||||||||||||||||||
6519 | const bool windowFlagChanged = (q->data->window_flags ^ flags) & Qt::Window; | - | ||||||||||||||||||||||||||||||||||||
6520 | q->setParent(q->parentWidget(), flags); | - | ||||||||||||||||||||||||||||||||||||
6521 | - | |||||||||||||||||||||||||||||||||||||
6522 | - | |||||||||||||||||||||||||||||||||||||
6523 | - | |||||||||||||||||||||||||||||||||||||
6524 | if (!windowFlagChanged
| 0 | ||||||||||||||||||||||||||||||||||||
6525 | q->move(oldPos); never executed: q->move(oldPos); | 0 | ||||||||||||||||||||||||||||||||||||
6526 | - | |||||||||||||||||||||||||||||||||||||
6527 | adjustQuitOnCloseAttribute(); | - | ||||||||||||||||||||||||||||||||||||
6528 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6529 | q->data->window_flags = flags; | - | ||||||||||||||||||||||||||||||||||||
6530 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6531 | } | - | ||||||||||||||||||||||||||||||||||||
6532 | void QWidget::overrideWindowFlags(Qt::WindowFlags flags) | - | ||||||||||||||||||||||||||||||||||||
6533 | { | - | ||||||||||||||||||||||||||||||||||||
6534 | data->window_flags = flags; | - | ||||||||||||||||||||||||||||||||||||
6535 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6536 | void QWidget::setParent(QWidget *parent) | - | ||||||||||||||||||||||||||||||||||||
6537 | { | - | ||||||||||||||||||||||||||||||||||||
6538 | if (parent == parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
6539 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6540 | setParent((QWidget*)parent, windowFlags() & ~Qt::WindowType_Mask); | - | ||||||||||||||||||||||||||||||||||||
6541 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6542 | - | |||||||||||||||||||||||||||||||||||||
6543 | - | |||||||||||||||||||||||||||||||||||||
6544 | static void sendWindowChangeToTextureChildrenRecursively(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
6545 | { | - | ||||||||||||||||||||||||||||||||||||
6546 | QWidgetPrivate *d = QWidgetPrivate::get(widget); | - | ||||||||||||||||||||||||||||||||||||
6547 | if (d->renderToTexture
| 0 | ||||||||||||||||||||||||||||||||||||
6548 | QEvent e(QEvent::WindowChangeInternal); | - | ||||||||||||||||||||||||||||||||||||
6549 | QApplication::sendEvent(widget, &e); | - | ||||||||||||||||||||||||||||||||||||
6550 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6551 | - | |||||||||||||||||||||||||||||||||||||
6552 | for (int i = 0; i < d->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
6553 | QWidget *w = qobject_cast<QWidget *>(d->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
6554 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
6555 | sendWindowChangeToTextureChildrenRecursively(w); never executed: sendWindowChangeToTextureChildrenRecursively(w); | 0 | ||||||||||||||||||||||||||||||||||||
6556 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6557 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6558 | void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) | - | ||||||||||||||||||||||||||||||||||||
6559 | { | - | ||||||||||||||||||||||||||||||||||||
6560 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6561 | bool resized = testAttribute(Qt::WA_Resized); | - | ||||||||||||||||||||||||||||||||||||
6562 | bool wasCreated = testAttribute(Qt::WA_WState_Created); | - | ||||||||||||||||||||||||||||||||||||
6563 | QWidget *oldtlw = window(); | - | ||||||||||||||||||||||||||||||||||||
6564 | - | |||||||||||||||||||||||||||||||||||||
6565 | if (f & Qt::Window
| 0 | ||||||||||||||||||||||||||||||||||||
6566 | d->data.fstrut_dirty = true; never executed: d->data.fstrut_dirty = true; | 0 | ||||||||||||||||||||||||||||||||||||
6567 | - | |||||||||||||||||||||||||||||||||||||
6568 | QWidget *desktopWidget = 0; | - | ||||||||||||||||||||||||||||||||||||
6569 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
6570 | desktopWidget = parent; never executed: desktopWidget = parent; | 0 | ||||||||||||||||||||||||||||||||||||
6571 | bool newParent = (
| 0 | ||||||||||||||||||||||||||||||||||||
6572 | - | |||||||||||||||||||||||||||||||||||||
6573 | if (newParent
| 0 | ||||||||||||||||||||||||||||||||||||
6574 | if (testAttribute(Qt::WA_NativeWindow)
| 0 | ||||||||||||||||||||||||||||||||||||
6575 | parent->d_func()->enforceNativeChildren(); never executed: parent->d_func()->enforceNativeChildren(); | 0 | ||||||||||||||||||||||||||||||||||||
6576 | else if (parent->d_func()->nativeChildrenForced()
| 0 | ||||||||||||||||||||||||||||||||||||
6577 | setAttribute(Qt::WA_NativeWindow); never executed: setAttribute(Qt::WA_NativeWindow); | 0 | ||||||||||||||||||||||||||||||||||||
6578 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6579 | - | |||||||||||||||||||||||||||||||||||||
6580 | if (wasCreated
| 0 | ||||||||||||||||||||||||||||||||||||
6581 | if (!testAttribute(Qt::WA_WState_Hidden)
| 0 | ||||||||||||||||||||||||||||||||||||
6582 | hide(); | - | ||||||||||||||||||||||||||||||||||||
6583 | setAttribute(Qt::WA_WState_ExplicitShowHide, false); | - | ||||||||||||||||||||||||||||||||||||
6584 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6585 | if (newParent
| 0 | ||||||||||||||||||||||||||||||||||||
6586 | QEvent e(QEvent::ParentAboutToChange); | - | ||||||||||||||||||||||||||||||||||||
6587 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
6588 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6589 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6590 | if (newParent
| 0 | ||||||||||||||||||||||||||||||||||||
6591 | focusWidget()->clearFocus(); never executed: focusWidget()->clearFocus(); | 0 | ||||||||||||||||||||||||||||||||||||
6592 | - | |||||||||||||||||||||||||||||||||||||
6593 | QTLWExtra *oldTopExtra = window()->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
6594 | QWidgetBackingStoreTracker *oldBsTracker = oldTopExtra
| 0 | ||||||||||||||||||||||||||||||||||||
6595 | - | |||||||||||||||||||||||||||||||||||||
6596 | d->setParent_sys(parent, f); | - | ||||||||||||||||||||||||||||||||||||
6597 | - | |||||||||||||||||||||||||||||||||||||
6598 | QTLWExtra *topExtra = window()->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
6599 | QWidgetBackingStoreTracker *bsTracker = topExtra
| 0 | ||||||||||||||||||||||||||||||||||||
6600 | if (oldBsTracker
| 0 | ||||||||||||||||||||||||||||||||||||
6601 | oldBsTracker->unregisterWidgetSubtree(this); never executed: oldBsTracker->unregisterWidgetSubtree(this); | 0 | ||||||||||||||||||||||||||||||||||||
6602 | - | |||||||||||||||||||||||||||||||||||||
6603 | if (desktopWidget
| 0 | ||||||||||||||||||||||||||||||||||||
6604 | parent = 0; never executed: parent = 0; | 0 | ||||||||||||||||||||||||||||||||||||
6605 | - | |||||||||||||||||||||||||||||||||||||
6606 | - | |||||||||||||||||||||||||||||||||||||
6607 | if (d->textureChildSeen
| 0 | ||||||||||||||||||||||||||||||||||||
6608 | - | |||||||||||||||||||||||||||||||||||||
6609 | QWidgetPrivate::get(parent)->setTextureChildSeen(); | - | ||||||||||||||||||||||||||||||||||||
6610 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6611 | - | |||||||||||||||||||||||||||||||||||||
6612 | - | |||||||||||||||||||||||||||||||||||||
6613 | if (QWidgetBackingStore *oldBs = oldtlw->d_func()->maybeBackingStore()
| 0 | ||||||||||||||||||||||||||||||||||||
6614 | if (newParent
| 0 | ||||||||||||||||||||||||||||||||||||
6615 | oldBs->removeDirtyWidget(this); never executed: oldBs->removeDirtyWidget(this); | 0 | ||||||||||||||||||||||||||||||||||||
6616 | - | |||||||||||||||||||||||||||||||||||||
6617 | - | |||||||||||||||||||||||||||||||||||||
6618 | oldBs->moveStaticWidgets(this); | - | ||||||||||||||||||||||||||||||||||||
6619 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6620 | - | |||||||||||||||||||||||||||||||||||||
6621 | - | |||||||||||||||||||||||||||||||||||||
6622 | if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation)
| 0 | ||||||||||||||||||||||||||||||||||||
6623 | create(); never executed: create(); | 0 | ||||||||||||||||||||||||||||||||||||
6624 | - | |||||||||||||||||||||||||||||||||||||
6625 | d->reparentFocusWidgets(oldtlw); | - | ||||||||||||||||||||||||||||||||||||
6626 | setAttribute(Qt::WA_Resized, resized); | - | ||||||||||||||||||||||||||||||||||||
6627 | if (!testAttribute(Qt::WA_StyleSheet)
| 0 | ||||||||||||||||||||||||||||||||||||
6628 | && (!parent
| 0 | ||||||||||||||||||||||||||||||||||||
6629 | d->resolveFont(); | - | ||||||||||||||||||||||||||||||||||||
6630 | d->resolvePalette(); | - | ||||||||||||||||||||||||||||||||||||
6631 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6632 | d->resolveLayoutDirection(); | - | ||||||||||||||||||||||||||||||||||||
6633 | d->resolveLocale(); | - | ||||||||||||||||||||||||||||||||||||
6634 | - | |||||||||||||||||||||||||||||||||||||
6635 | - | |||||||||||||||||||||||||||||||||||||
6636 | - | |||||||||||||||||||||||||||||||||||||
6637 | - | |||||||||||||||||||||||||||||||||||||
6638 | - | |||||||||||||||||||||||||||||||||||||
6639 | if (newParent
| 0 | ||||||||||||||||||||||||||||||||||||
6640 | - | |||||||||||||||||||||||||||||||||||||
6641 | - | |||||||||||||||||||||||||||||||||||||
6642 | - | |||||||||||||||||||||||||||||||||||||
6643 | ) { | - | ||||||||||||||||||||||||||||||||||||
6644 | - | |||||||||||||||||||||||||||||||||||||
6645 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6646 | if (!testAttribute(Qt::WA_ForceDisabled)
| 0 | ||||||||||||||||||||||||||||||||||||
6647 | d->setEnabled_helper(parent ? parent->isEnabled() : true); never executed: d->setEnabled_helper(parent ? parent->isEnabled() : true); | 0 | ||||||||||||||||||||||||||||||||||||
6648 | if (!testAttribute(Qt::WA_ForceUpdatesDisabled)
| 0 | ||||||||||||||||||||||||||||||||||||
6649 | d->setUpdatesEnabled_helper(parent ? parent->updatesEnabled() : true); never executed: d->setUpdatesEnabled_helper(parent ? parent->updatesEnabled() : true); | 0 | ||||||||||||||||||||||||||||||||||||
6650 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6651 | d->inheritStyle(); | - | ||||||||||||||||||||||||||||||||||||
6652 | - | |||||||||||||||||||||||||||||||||||||
6653 | - | |||||||||||||||||||||||||||||||||||||
6654 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
6655 | QChildEvent e(QEvent::ChildAdded, this); | - | ||||||||||||||||||||||||||||||||||||
6656 | QApplication::sendEvent(parent, &e); | - | ||||||||||||||||||||||||||||||||||||
6657 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6658 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
6659 | QChildEvent e(QEvent::ChildPolished, this); | - | ||||||||||||||||||||||||||||||||||||
6660 | QCoreApplication::sendEvent(parent, &e); | - | ||||||||||||||||||||||||||||||||||||
6661 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6662 | - | |||||||||||||||||||||||||||||||||||||
6663 | QEvent e(QEvent::ParentChange); | - | ||||||||||||||||||||||||||||||||||||
6664 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
6665 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6666 | - | |||||||||||||||||||||||||||||||||||||
6667 | - | |||||||||||||||||||||||||||||||||||||
6668 | if (d->textureChildSeen
| 0 | ||||||||||||||||||||||||||||||||||||
6669 | sendWindowChangeToTextureChildrenRecursively(this); | - | ||||||||||||||||||||||||||||||||||||
6670 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6671 | - | |||||||||||||||||||||||||||||||||||||
6672 | - | |||||||||||||||||||||||||||||||||||||
6673 | if (!wasCreated
| 0 | ||||||||||||||||||||||||||||||||||||
6674 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6675 | setAttribute(Qt::WA_WState_Hidden, true); never executed: setAttribute(Qt::WA_WState_Hidden, true); | 0 | ||||||||||||||||||||||||||||||||||||
6676 | else if (!testAttribute(Qt::WA_WState_ExplicitShowHide)
| 0 | ||||||||||||||||||||||||||||||||||||
6677 | setAttribute(Qt::WA_WState_Hidden, false); never executed: setAttribute(Qt::WA_WState_Hidden, false); | 0 | ||||||||||||||||||||||||||||||||||||
6678 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6679 | - | |||||||||||||||||||||||||||||||||||||
6680 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
6681 | - | |||||||||||||||||||||||||||||||||||||
6682 | - | |||||||||||||||||||||||||||||||||||||
6683 | - | |||||||||||||||||||||||||||||||||||||
6684 | - | |||||||||||||||||||||||||||||||||||||
6685 | if (oldtlw->graphicsProxyWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
6686 | if (QGraphicsProxyWidget *ancestorProxy = d->nearestGraphicsProxyWidget(oldtlw)
| 0 | ||||||||||||||||||||||||||||||||||||
6687 | ancestorProxy->d_func()->unembedSubWindow(this); never executed: ancestorProxy->d_func()->unembedSubWindow(this); | 0 | ||||||||||||||||||||||||||||||||||||
6688 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6689 | if (isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6690 | if (QGraphicsProxyWidget *ancestorProxy = d->nearestGraphicsProxyWidget(parent)
| 0 | ||||||||||||||||||||||||||||||||||||
6691 | ancestorProxy->d_func()->embedSubWindow(this); never executed: ancestorProxy->d_func()->embedSubWindow(this); | 0 | ||||||||||||||||||||||||||||||||||||
6692 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6693 | - | |||||||||||||||||||||||||||||||||||||
6694 | - | |||||||||||||||||||||||||||||||||||||
6695 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
6696 | QWindowContainer::parentWasChanged(this); never executed: QWindowContainer::parentWasChanged(this); | 0 | ||||||||||||||||||||||||||||||||||||
6697 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6698 | - | |||||||||||||||||||||||||||||||||||||
6699 | void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f) | - | ||||||||||||||||||||||||||||||||||||
6700 | { | - | ||||||||||||||||||||||||||||||||||||
6701 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
6702 | - | |||||||||||||||||||||||||||||||||||||
6703 | Qt::WindowFlags oldFlags = data.window_flags; | - | ||||||||||||||||||||||||||||||||||||
6704 | bool wasCreated = q->testAttribute(Qt::WA_WState_Created); | - | ||||||||||||||||||||||||||||||||||||
6705 | - | |||||||||||||||||||||||||||||||||||||
6706 | int targetScreen = -1; | - | ||||||||||||||||||||||||||||||||||||
6707 | - | |||||||||||||||||||||||||||||||||||||
6708 | if (newparent
| 0 | ||||||||||||||||||||||||||||||||||||
6709 | - | |||||||||||||||||||||||||||||||||||||
6710 | - | |||||||||||||||||||||||||||||||||||||
6711 | const QDesktopScreenWidget *sw = qobject_cast<const QDesktopScreenWidget *>(newparent); | - | ||||||||||||||||||||||||||||||||||||
6712 | targetScreen = sw
| 0 | ||||||||||||||||||||||||||||||||||||
6713 | newparent = 0; | - | ||||||||||||||||||||||||||||||||||||
6714 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6715 | - | |||||||||||||||||||||||||||||||||||||
6716 | setWinId(0); | - | ||||||||||||||||||||||||||||||||||||
6717 | - | |||||||||||||||||||||||||||||||||||||
6718 | if (parent != newparent
| 0 | ||||||||||||||||||||||||||||||||||||
6719 | QObjectPrivate::setParent_helper(newparent); | - | ||||||||||||||||||||||||||||||||||||
6720 | if (q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
6721 | q->windowHandle()->setFlags(f); | - | ||||||||||||||||||||||||||||||||||||
6722 | QWidget *parentWithWindow = | - | ||||||||||||||||||||||||||||||||||||
6723 | newparent
| 0 | ||||||||||||||||||||||||||||||||||||
6724 | if (parentWithWindow
| 0 | ||||||||||||||||||||||||||||||||||||
6725 | QWidget *topLevel = parentWithWindow->window(); | - | ||||||||||||||||||||||||||||||||||||
6726 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
6727 | q->windowHandle()->setTransientParent(topLevel->windowHandle()); | - | ||||||||||||||||||||||||||||||||||||
6728 | q->windowHandle()->setParent(0); | - | ||||||||||||||||||||||||||||||||||||
6729 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6730 | q->windowHandle()->setTransientParent(0); | - | ||||||||||||||||||||||||||||||||||||
6731 | q->windowHandle()->setParent(parentWithWindow->windowHandle()); | - | ||||||||||||||||||||||||||||||||||||
6732 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6733 | } else { | - | ||||||||||||||||||||||||||||||||||||
6734 | q->windowHandle()->setTransientParent(0); | - | ||||||||||||||||||||||||||||||||||||
6735 | q->windowHandle()->setParent(0); | - | ||||||||||||||||||||||||||||||||||||
6736 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6737 | } | - | ||||||||||||||||||||||||||||||||||||
6738 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6739 | - | |||||||||||||||||||||||||||||||||||||
6740 | if (!newparent
| 0 | ||||||||||||||||||||||||||||||||||||
6741 | f |= Qt::Window; | - | ||||||||||||||||||||||||||||||||||||
6742 | if (targetScreen == -1
| 0 | ||||||||||||||||||||||||||||||||||||
6743 | if (parent
| 0 | ||||||||||||||||||||||||||||||||||||
6744 | targetScreen = QApplication::desktop()->screenNumber(q->parentWidget()->window()); never executed: targetScreen = QApplication::desktop()->screenNumber(q->parentWidget()->window()); | 0 | ||||||||||||||||||||||||||||||||||||
6745 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6746 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6747 | - | |||||||||||||||||||||||||||||||||||||
6748 | bool explicitlyHidden = q->testAttribute(Qt::WA_WState_Hidden)
| 0 | ||||||||||||||||||||||||||||||||||||
6749 | - | |||||||||||||||||||||||||||||||||||||
6750 | - | |||||||||||||||||||||||||||||||||||||
6751 | if (wasCreated
| 0 | ||||||||||||||||||||||||||||||||||||
6752 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
6753 | QWindowContainer::toplevelAboutToBeDestroyed(q); never executed: QWindowContainer::toplevelAboutToBeDestroyed(q); | 0 | ||||||||||||||||||||||||||||||||||||
6754 | - | |||||||||||||||||||||||||||||||||||||
6755 | QWindow *newParentWindow = newparent->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
6756 | if (!newParentWindow
| 0 | ||||||||||||||||||||||||||||||||||||
6757 | if (QWidget *npw = newparent->nativeParentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
6758 | newParentWindow = npw->windowHandle(); never executed: newParentWindow = npw->windowHandle(); | 0 | ||||||||||||||||||||||||||||||||||||
6759 | - | |||||||||||||||||||||||||||||||||||||
6760 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(q->windowHandle()->children())>::type> _container_((q->windowHandle()->children())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QObject *child = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||||||||||||||
6761 | QWindow *childWindow = qobject_cast<QWindow *>(child); | - | ||||||||||||||||||||||||||||||||||||
6762 | if (!childWindow
| 0 | ||||||||||||||||||||||||||||||||||||
6763 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
6764 | - | |||||||||||||||||||||||||||||||||||||
6765 | QWidgetWindow *childWW = qobject_cast<QWidgetWindow *>(childWindow); | - | ||||||||||||||||||||||||||||||||||||
6766 | QWidget *childWidget = childWW
| 0 | ||||||||||||||||||||||||||||||||||||
6767 | if (!childWW
| 0 | ||||||||||||||||||||||||||||||||||||
6768 | childWindow->setParent(newParentWindow); never executed: childWindow->setParent(newParentWindow); | 0 | ||||||||||||||||||||||||||||||||||||
6769 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6770 | q->destroy(); | - | ||||||||||||||||||||||||||||||||||||
6771 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6772 | - | |||||||||||||||||||||||||||||||||||||
6773 | adjustFlags(f, q); | - | ||||||||||||||||||||||||||||||||||||
6774 | data.window_flags = f; | - | ||||||||||||||||||||||||||||||||||||
6775 | q->setAttribute(Qt::WA_WState_Created, false); | - | ||||||||||||||||||||||||||||||||||||
6776 | q->setAttribute(Qt::WA_WState_Visible, false); | - | ||||||||||||||||||||||||||||||||||||
6777 | q->setAttribute(Qt::WA_WState_Hidden, false); | - | ||||||||||||||||||||||||||||||||||||
6778 | - | |||||||||||||||||||||||||||||||||||||
6779 | if (newparent
| 0 | ||||||||||||||||||||||||||||||||||||
6780 | q->createWinId(); never executed: q->createWinId(); | 0 | ||||||||||||||||||||||||||||||||||||
6781 | - | |||||||||||||||||||||||||||||||||||||
6782 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
6783 | q->setAttribute(Qt::WA_WState_Hidden); never executed: q->setAttribute(Qt::WA_WState_Hidden); | 0 | ||||||||||||||||||||||||||||||||||||
6784 | q->setAttribute(Qt::WA_WState_ExplicitShowHide, explicitlyHidden); | - | ||||||||||||||||||||||||||||||||||||
6785 | - | |||||||||||||||||||||||||||||||||||||
6786 | - | |||||||||||||||||||||||||||||||||||||
6787 | if (!newparent
| 0 | ||||||||||||||||||||||||||||||||||||
6788 | - | |||||||||||||||||||||||||||||||||||||
6789 | if (q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
6790 | q->windowHandle()->setScreen(QGuiApplication::screens().value(targetScreen, 0)); never executed: q->windowHandle()->setScreen(QGuiApplication::screens().value(targetScreen, 0)); | 0 | ||||||||||||||||||||||||||||||||||||
6791 | else | - | ||||||||||||||||||||||||||||||||||||
6792 | topData()->initialScreenIndex = targetScreen; never executed: topData()->initialScreenIndex = targetScreen; | 0 | ||||||||||||||||||||||||||||||||||||
6793 | } | - | ||||||||||||||||||||||||||||||||||||
6794 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6795 | void QWidget::scroll(int dx, int dy) | - | ||||||||||||||||||||||||||||||||||||
6796 | { | - | ||||||||||||||||||||||||||||||||||||
6797 | if ((!updatesEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
6798 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6799 | if (dx == 0
| 0 | ||||||||||||||||||||||||||||||||||||
6800 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6801 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6802 | - | |||||||||||||||||||||||||||||||||||||
6803 | if (QGraphicsProxyWidget *proxy = QWidgetPrivate::nearestGraphicsProxyWidget(this)
| 0 | ||||||||||||||||||||||||||||||||||||
6804 | - | |||||||||||||||||||||||||||||||||||||
6805 | - | |||||||||||||||||||||||||||||||||||||
6806 | - | |||||||||||||||||||||||||||||||||||||
6807 | if (!d->dirty.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
6808 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype((d->dirty.translated(dx, dy)).rects())>::type> _container_(((d->dirty.translated(dx, dy)).rects())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QRect &rect = *_container_.i; _container_.control; _container_.control = 0) | - | ||||||||||||||||||||||||||||||||||||
6809 | proxy->update(rect); never executed: proxy->update(rect); | 0 | ||||||||||||||||||||||||||||||||||||
6810 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6811 | proxy->scroll(dx, dy, proxy->subWidgetRect(this)); | - | ||||||||||||||||||||||||||||||||||||
6812 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6813 | } | - | ||||||||||||||||||||||||||||||||||||
6814 | - | |||||||||||||||||||||||||||||||||||||
6815 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
6816 | d->scroll_sys(dx, dy); | - | ||||||||||||||||||||||||||||||||||||
6817 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6818 | - | |||||||||||||||||||||||||||||||||||||
6819 | void QWidgetPrivate::scroll_sys(int dx, int dy) | - | ||||||||||||||||||||||||||||||||||||
6820 | { | - | ||||||||||||||||||||||||||||||||||||
6821 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
6822 | scrollChildren(dx, dy); | - | ||||||||||||||||||||||||||||||||||||
6823 | scrollRect(q->rect(), dx, dy); | - | ||||||||||||||||||||||||||||||||||||
6824 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6825 | void QWidget::scroll(int dx, int dy, const QRect &r) | - | ||||||||||||||||||||||||||||||||||||
6826 | { | - | ||||||||||||||||||||||||||||||||||||
6827 | - | |||||||||||||||||||||||||||||||||||||
6828 | if ((!updatesEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
6829 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6830 | if (dx == 0
| 0 | ||||||||||||||||||||||||||||||||||||
6831 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6832 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6833 | - | |||||||||||||||||||||||||||||||||||||
6834 | if (QGraphicsProxyWidget *proxy = QWidgetPrivate::nearestGraphicsProxyWidget(this)
| 0 | ||||||||||||||||||||||||||||||||||||
6835 | - | |||||||||||||||||||||||||||||||||||||
6836 | - | |||||||||||||||||||||||||||||||||||||
6837 | - | |||||||||||||||||||||||||||||||||||||
6838 | if (!d->dirty.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
6839 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype((d->dirty.translated(dx, dy) & r).rects())>::type> _container_(((d->dirty.translated(dx, dy) & r).rects())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QRect &rect = *_container_.i; _container_.control; _container_.control = 0) | - | ||||||||||||||||||||||||||||||||||||
6840 | proxy->update(rect); never executed: proxy->update(rect); | 0 | ||||||||||||||||||||||||||||||||||||
6841 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6842 | proxy->scroll(dx, dy, r.translated(proxy->subWidgetRect(this).topLeft().toPoint())); | - | ||||||||||||||||||||||||||||||||||||
6843 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6844 | } | - | ||||||||||||||||||||||||||||||||||||
6845 | - | |||||||||||||||||||||||||||||||||||||
6846 | d->scroll_sys(dx, dy, r); | - | ||||||||||||||||||||||||||||||||||||
6847 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6848 | - | |||||||||||||||||||||||||||||||||||||
6849 | void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) | - | ||||||||||||||||||||||||||||||||||||
6850 | { | - | ||||||||||||||||||||||||||||||||||||
6851 | scrollRect(r, dx, dy); | - | ||||||||||||||||||||||||||||||||||||
6852 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6853 | void QWidget::repaint() | - | ||||||||||||||||||||||||||||||||||||
6854 | { | - | ||||||||||||||||||||||||||||||||||||
6855 | repaint(rect()); | - | ||||||||||||||||||||||||||||||||||||
6856 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6857 | void QWidget::repaint(int x, int y, int w, int h) | - | ||||||||||||||||||||||||||||||||||||
6858 | { | - | ||||||||||||||||||||||||||||||||||||
6859 | if (x > data->crect.width()
| 0 | ||||||||||||||||||||||||||||||||||||
6860 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6861 | - | |||||||||||||||||||||||||||||||||||||
6862 | if (w < 0
| 0 | ||||||||||||||||||||||||||||||||||||
6863 | w = data->crect.width() - x; never executed: w = data->crect.width() - x; | 0 | ||||||||||||||||||||||||||||||||||||
6864 | if (h < 0
| 0 | ||||||||||||||||||||||||||||||||||||
6865 | h = data->crect.height() - y; never executed: h = data->crect.height() - y; | 0 | ||||||||||||||||||||||||||||||||||||
6866 | - | |||||||||||||||||||||||||||||||||||||
6867 | repaint(QRect(x, y, w, h)); | - | ||||||||||||||||||||||||||||||||||||
6868 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6869 | - | |||||||||||||||||||||||||||||||||||||
6870 | - | |||||||||||||||||||||||||||||||||||||
6871 | - | |||||||||||||||||||||||||||||||||||||
6872 | - | |||||||||||||||||||||||||||||||||||||
6873 | - | |||||||||||||||||||||||||||||||||||||
6874 | void QWidget::repaint(const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||
6875 | { | - | ||||||||||||||||||||||||||||||||||||
6876 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6877 | - | |||||||||||||||||||||||||||||||||||||
6878 | if (testAttribute(Qt::WA_WState_ConfigPending)
| 0 | ||||||||||||||||||||||||||||||||||||
6879 | update(rect); | - | ||||||||||||||||||||||||||||||||||||
6880 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6881 | } | - | ||||||||||||||||||||||||||||||||||||
6882 | - | |||||||||||||||||||||||||||||||||||||
6883 | if (!isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
6884 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6885 | - | |||||||||||||||||||||||||||||||||||||
6886 | if (hasBackingStoreSupport()
| 0 | ||||||||||||||||||||||||||||||||||||
6887 | QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
6888 | if (tlwExtra
| 0 | ||||||||||||||||||||||||||||||||||||
6889 | tlwExtra->inRepaint = true; | - | ||||||||||||||||||||||||||||||||||||
6890 | tlwExtra->backingStoreTracker->markDirty(rect, this, QWidgetBackingStore::UpdateNow); | - | ||||||||||||||||||||||||||||||||||||
6891 | tlwExtra->inRepaint = false; | - | ||||||||||||||||||||||||||||||||||||
6892 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6893 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6894 | d->repaint_sys(rect); | - | ||||||||||||||||||||||||||||||||||||
6895 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6896 | } | - | ||||||||||||||||||||||||||||||||||||
6897 | - | |||||||||||||||||||||||||||||||||||||
6898 | - | |||||||||||||||||||||||||||||||||||||
6899 | - | |||||||||||||||||||||||||||||||||||||
6900 | - | |||||||||||||||||||||||||||||||||||||
6901 | - | |||||||||||||||||||||||||||||||||||||
6902 | - | |||||||||||||||||||||||||||||||||||||
6903 | void QWidget::repaint(const QRegion &rgn) | - | ||||||||||||||||||||||||||||||||||||
6904 | { | - | ||||||||||||||||||||||||||||||||||||
6905 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
6906 | - | |||||||||||||||||||||||||||||||||||||
6907 | if (testAttribute(Qt::WA_WState_ConfigPending)
| 0 | ||||||||||||||||||||||||||||||||||||
6908 | update(rgn); | - | ||||||||||||||||||||||||||||||||||||
6909 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6910 | } | - | ||||||||||||||||||||||||||||||||||||
6911 | - | |||||||||||||||||||||||||||||||||||||
6912 | if (!isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
6913 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6914 | - | |||||||||||||||||||||||||||||||||||||
6915 | if (hasBackingStoreSupport()
| 0 | ||||||||||||||||||||||||||||||||||||
6916 | QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
6917 | if (tlwExtra
| 0 | ||||||||||||||||||||||||||||||||||||
6918 | tlwExtra->inRepaint = true; | - | ||||||||||||||||||||||||||||||||||||
6919 | tlwExtra->backingStoreTracker->markDirty(rgn, this, QWidgetBackingStore::UpdateNow); | - | ||||||||||||||||||||||||||||||||||||
6920 | tlwExtra->inRepaint = false; | - | ||||||||||||||||||||||||||||||||||||
6921 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6922 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6923 | d->repaint_sys(rgn); | - | ||||||||||||||||||||||||||||||||||||
6924 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6925 | } | - | ||||||||||||||||||||||||||||||||||||
6926 | void QWidget::update() | - | ||||||||||||||||||||||||||||||||||||
6927 | { | - | ||||||||||||||||||||||||||||||||||||
6928 | update(rect()); | - | ||||||||||||||||||||||||||||||||||||
6929 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6930 | void QWidget::update(const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||
6931 | { | - | ||||||||||||||||||||||||||||||||||||
6932 | if (!isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
6933 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6934 | - | |||||||||||||||||||||||||||||||||||||
6935 | QRect r = rect & QWidget::rect(); | - | ||||||||||||||||||||||||||||||||||||
6936 | - | |||||||||||||||||||||||||||||||||||||
6937 | if (r.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
6938 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6939 | - | |||||||||||||||||||||||||||||||||||||
6940 | if (testAttribute(Qt::WA_WState_InPaintEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
6941 | QApplication::postEvent(this, new QUpdateLaterEvent(r)); | - | ||||||||||||||||||||||||||||||||||||
6942 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6943 | } | - | ||||||||||||||||||||||||||||||||||||
6944 | - | |||||||||||||||||||||||||||||||||||||
6945 | if (hasBackingStoreSupport()
| 0 | ||||||||||||||||||||||||||||||||||||
6946 | QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
6947 | if (tlwExtra
| 0 | ||||||||||||||||||||||||||||||||||||
6948 | tlwExtra->backingStoreTracker->markDirty(r, this); never executed: tlwExtra->backingStoreTracker->markDirty(r, this); | 0 | ||||||||||||||||||||||||||||||||||||
6949 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6950 | d_func()->repaint_sys(r); | - | ||||||||||||||||||||||||||||||||||||
6951 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6952 | } | - | ||||||||||||||||||||||||||||||||||||
6953 | - | |||||||||||||||||||||||||||||||||||||
6954 | - | |||||||||||||||||||||||||||||||||||||
6955 | - | |||||||||||||||||||||||||||||||||||||
6956 | - | |||||||||||||||||||||||||||||||||||||
6957 | - | |||||||||||||||||||||||||||||||||||||
6958 | - | |||||||||||||||||||||||||||||||||||||
6959 | void QWidget::update(const QRegion &rgn) | - | ||||||||||||||||||||||||||||||||||||
6960 | { | - | ||||||||||||||||||||||||||||||||||||
6961 | if (!isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
6962 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6963 | - | |||||||||||||||||||||||||||||||||||||
6964 | QRegion r = rgn & QWidget::rect(); | - | ||||||||||||||||||||||||||||||||||||
6965 | - | |||||||||||||||||||||||||||||||||||||
6966 | if (r.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
6967 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6968 | - | |||||||||||||||||||||||||||||||||||||
6969 | if (testAttribute(Qt::WA_WState_InPaintEvent)
| 0 | ||||||||||||||||||||||||||||||||||||
6970 | QApplication::postEvent(this, new QUpdateLaterEvent(r)); | - | ||||||||||||||||||||||||||||||||||||
6971 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
6972 | } | - | ||||||||||||||||||||||||||||||||||||
6973 | - | |||||||||||||||||||||||||||||||||||||
6974 | if (hasBackingStoreSupport()
| 0 | ||||||||||||||||||||||||||||||||||||
6975 | QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
6976 | if (tlwExtra
| 0 | ||||||||||||||||||||||||||||||||||||
6977 | tlwExtra->backingStoreTracker->markDirty(r, this); never executed: tlwExtra->backingStoreTracker->markDirty(r, this); | 0 | ||||||||||||||||||||||||||||||||||||
6978 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
6979 | d_func()->repaint_sys(r); | - | ||||||||||||||||||||||||||||||||||||
6980 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
6981 | } | - | ||||||||||||||||||||||||||||||||||||
6982 | - | |||||||||||||||||||||||||||||||||||||
6983 | - | |||||||||||||||||||||||||||||||||||||
6984 | - | |||||||||||||||||||||||||||||||||||||
6985 | - | |||||||||||||||||||||||||||||||||||||
6986 | - | |||||||||||||||||||||||||||||||||||||
6987 | - | |||||||||||||||||||||||||||||||||||||
6988 | - | |||||||||||||||||||||||||||||||||||||
6989 | static void setAttribute_internal(Qt::WidgetAttribute attribute, bool on, QWidgetData *data, | - | ||||||||||||||||||||||||||||||||||||
6990 | QWidgetPrivate *d) | - | ||||||||||||||||||||||||||||||||||||
6991 | { | - | ||||||||||||||||||||||||||||||||||||
6992 | if (attribute < int(8*sizeof(uint))
| 0 | ||||||||||||||||||||||||||||||||||||
6993 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
6994 | data->widget_attributes |= (1<<attribute); never executed: data->widget_attributes |= (1<<attribute); | 0 | ||||||||||||||||||||||||||||||||||||
6995 | else | - | ||||||||||||||||||||||||||||||||||||
6996 | data->widget_attributes &= ~(1<<attribute); never executed: data->widget_attributes &= ~(1<<attribute); | 0 | ||||||||||||||||||||||||||||||||||||
6997 | } else { | - | ||||||||||||||||||||||||||||||||||||
6998 | const int x = attribute - 8*sizeof(uint); | - | ||||||||||||||||||||||||||||||||||||
6999 | const int int_off = x / (8*sizeof(uint)); | - | ||||||||||||||||||||||||||||||||||||
7000 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7001 | d->high_attributes[int_off] |= (1<<(x-(int_off*8*sizeof(uint)))); never executed: d->high_attributes[int_off] |= (1<<(x-(int_off*8*sizeof(uint)))); | 0 | ||||||||||||||||||||||||||||||||||||
7002 | else | - | ||||||||||||||||||||||||||||||||||||
7003 | d->high_attributes[int_off] &= ~(1<<(x-(int_off*8*sizeof(uint)))); never executed: d->high_attributes[int_off] &= ~(1<<(x-(int_off*8*sizeof(uint)))); | 0 | ||||||||||||||||||||||||||||||||||||
7004 | } | - | ||||||||||||||||||||||||||||||||||||
7005 | } | - | ||||||||||||||||||||||||||||||||||||
7006 | void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) | - | ||||||||||||||||||||||||||||||||||||
7007 | { | - | ||||||||||||||||||||||||||||||||||||
7008 | if (testAttribute(attribute) == on
| 0 | ||||||||||||||||||||||||||||||||||||
7009 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7010 | - | |||||||||||||||||||||||||||||||||||||
7011 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7012 | static_assert(bool(sizeof(d->high_attributes)*8 >= (Qt::WA_AttributeCount - sizeof(uint)*8)), "QWidget::setAttribute(WidgetAttribute, bool): " "QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute") | - | ||||||||||||||||||||||||||||||||||||
7013 | - | |||||||||||||||||||||||||||||||||||||
7014 | ; | - | ||||||||||||||||||||||||||||||||||||
7015 | if (attribute == Qt::WA_NativeWindow
| 0 | ||||||||||||||||||||||||||||||||||||
7016 | QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration(); | - | ||||||||||||||||||||||||||||||||||||
7017 | if (!platformIntegration->hasCapability(QPlatformIntegration::NativeWidgets)
| 0 | ||||||||||||||||||||||||||||||||||||
7018 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7019 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7020 | - | |||||||||||||||||||||||||||||||||||||
7021 | setAttribute_internal(attribute, on, data, d); | - | ||||||||||||||||||||||||||||||||||||
7022 | - | |||||||||||||||||||||||||||||||||||||
7023 | switch (attribute) { | - | ||||||||||||||||||||||||||||||||||||
7024 | - | |||||||||||||||||||||||||||||||||||||
7025 | - | |||||||||||||||||||||||||||||||||||||
7026 | case never executed: Qt::WA_AcceptDrops:case Qt::WA_AcceptDrops: never executed: {case Qt::WA_AcceptDrops: | 0 | ||||||||||||||||||||||||||||||||||||
7027 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7028 | setAttribute(Qt::WA_DropSiteRegistered, true); never executed: setAttribute(Qt::WA_DropSiteRegistered, true); | 0 | ||||||||||||||||||||||||||||||||||||
7029 | else if (!on
| 0 | ||||||||||||||||||||||||||||||||||||
7030 | setAttribute(Qt::WA_DropSiteRegistered, false); never executed: setAttribute(Qt::WA_DropSiteRegistered, false); | 0 | ||||||||||||||||||||||||||||||||||||
7031 | QEvent e(QEvent::AcceptDropsChange); | - | ||||||||||||||||||||||||||||||||||||
7032 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
7033 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7034 | } | - | ||||||||||||||||||||||||||||||||||||
7035 | case never executed: Qt::WA_DropSiteRegistered:case Qt::WA_DropSiteRegistered: never executed: {case Qt::WA_DropSiteRegistered: | 0 | ||||||||||||||||||||||||||||||||||||
7036 | d->registerDropSite(on); | - | ||||||||||||||||||||||||||||||||||||
7037 | for (int i = 0; i < d->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
7038 | QWidget *w = qobject_cast<QWidget *>(d->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
7039 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
7040 | w->setAttribute(Qt::WA_DropSiteRegistered, on); never executed: w->setAttribute(Qt::WA_DropSiteRegistered, on); | 0 | ||||||||||||||||||||||||||||||||||||
7041 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7042 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7043 | } | - | ||||||||||||||||||||||||||||||||||||
7044 | - | |||||||||||||||||||||||||||||||||||||
7045 | - | |||||||||||||||||||||||||||||||||||||
7046 | case never executed: Qt::WA_NoChildEventsForParent:case Qt::WA_NoChildEventsForParent: never executed: case Qt::WA_NoChildEventsForParent: | 0 | ||||||||||||||||||||||||||||||||||||
7047 | d->sendChildEvents = !on; | - | ||||||||||||||||||||||||||||||||||||
7048 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7049 | case never executed: Qt::WA_NoChildEventsFromChildren:case Qt::WA_NoChildEventsFromChildren: never executed: case Qt::WA_NoChildEventsFromChildren: | 0 | ||||||||||||||||||||||||||||||||||||
7050 | d->receiveChildEvents = !on; | - | ||||||||||||||||||||||||||||||||||||
7051 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7052 | case never executed: Qt::WA_MacBrushedMetal:case Qt::WA_MacBrushedMetal: never executed: case Qt::WA_MacBrushedMetal: | 0 | ||||||||||||||||||||||||||||||||||||
7053 | case never executed: Qt::WA_MacAlwaysShowToolWindow:case Qt::WA_MacAlwaysShowToolWindow: never executed: case Qt::WA_MacAlwaysShowToolWindow: | 0 | ||||||||||||||||||||||||||||||||||||
7054 | - | |||||||||||||||||||||||||||||||||||||
7055 | - | |||||||||||||||||||||||||||||||||||||
7056 | - | |||||||||||||||||||||||||||||||||||||
7057 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7058 | case never executed: Qt::WA_MacNormalSize:case Qt::WA_MacNormalSize: never executed: case Qt::WA_MacNormalSize: | 0 | ||||||||||||||||||||||||||||||||||||
7059 | case never executed: Qt::WA_MacSmallSize:case Qt::WA_MacSmallSize: never executed: case Qt::WA_MacSmallSize: | 0 | ||||||||||||||||||||||||||||||||||||
7060 | case never executed: Qt::WA_MacMiniSize:case Qt::WA_MacMiniSize: never executed: case Qt::WA_MacMiniSize: | 0 | ||||||||||||||||||||||||||||||||||||
7061 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7062 | case never executed: Qt::WA_ShowModal:case Qt::WA_ShowModal: never executed: case Qt::WA_ShowModal: | 0 | ||||||||||||||||||||||||||||||||||||
7063 | if (!on
| 0 | ||||||||||||||||||||||||||||||||||||
7064 | - | |||||||||||||||||||||||||||||||||||||
7065 | data->window_modality = Qt::NonModal; | - | ||||||||||||||||||||||||||||||||||||
7066 | } never executed: else if (data->window_modality == Qt::NonModalend of block
| 0 | ||||||||||||||||||||||||||||||||||||
7067 | - | |||||||||||||||||||||||||||||||||||||
7068 | - | |||||||||||||||||||||||||||||||||||||
7069 | - | |||||||||||||||||||||||||||||||||||||
7070 | - | |||||||||||||||||||||||||||||||||||||
7071 | QWidget *w = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
7072 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
7073 | w = w->window(); never executed: w = w->window(); | 0 | ||||||||||||||||||||||||||||||||||||
7074 | while (w
| 0 | ||||||||||||||||||||||||||||||||||||
7075 | w = w->parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
7076 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
7077 | w = w->window(); never executed: w = w->window(); | 0 | ||||||||||||||||||||||||||||||||||||
7078 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7079 | data->window_modality = (w
| 0 | ||||||||||||||||||||||||||||||||||||
7080 | ? Qt::WindowModal | - | ||||||||||||||||||||||||||||||||||||
7081 | : Qt::ApplicationModal; | - | ||||||||||||||||||||||||||||||||||||
7082 | - | |||||||||||||||||||||||||||||||||||||
7083 | - | |||||||||||||||||||||||||||||||||||||
7084 | - | |||||||||||||||||||||||||||||||||||||
7085 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7086 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7087 | - | |||||||||||||||||||||||||||||||||||||
7088 | d->setModal_sys(); | - | ||||||||||||||||||||||||||||||||||||
7089 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7090 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7091 | case never executed: Qt::WA_MouseTracking:case Qt::WA_MouseTracking: never executed: {case Qt::WA_MouseTracking: | 0 | ||||||||||||||||||||||||||||||||||||
7092 | QEvent e(QEvent::MouseTrackingChange); | - | ||||||||||||||||||||||||||||||||||||
7093 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
7094 | break; never executed: }break; | 0 | ||||||||||||||||||||||||||||||||||||
7095 | case never executed: Qt::WA_NativeWindow:case Qt::WA_NativeWindow: never executed: {case Qt::WA_NativeWindow: | 0 | ||||||||||||||||||||||||||||||||||||
7096 | d->createTLExtra(); | - | ||||||||||||||||||||||||||||||||||||
7097 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7098 | d->createTLSysExtra(); never executed: d->createTLSysExtra(); | 0 | ||||||||||||||||||||||||||||||||||||
7099 | - | |||||||||||||||||||||||||||||||||||||
7100 | QWidget *focusWidget = d->effectiveFocusWidget(); | - | ||||||||||||||||||||||||||||||||||||
7101 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7102 | && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
7103 | QGuiApplication::inputMethod()->commit(); | - | ||||||||||||||||||||||||||||||||||||
7104 | QGuiApplication::inputMethod()->update(Qt::ImEnabled); | - | ||||||||||||||||||||||||||||||||||||
7105 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7106 | if (!(static_cast<QApplication *>(QCoreApplication::instance()))->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)
| 0 | ||||||||||||||||||||||||||||||||||||
7107 | parentWidget()->d_func()->enforceNativeChildren(); never executed: parentWidget()->d_func()->enforceNativeChildren(); | 0 | ||||||||||||||||||||||||||||||||||||
7108 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7109 | d->createWinId(); never executed: d->createWinId(); | 0 | ||||||||||||||||||||||||||||||||||||
7110 | if (isEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
7111 | && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)
| 0 | ||||||||||||||||||||||||||||||||||||
7112 | QGuiApplication::inputMethod()->update(Qt::ImEnabled); | - | ||||||||||||||||||||||||||||||||||||
7113 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7114 | - | |||||||||||||||||||||||||||||||||||||
7115 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7116 | } | - | ||||||||||||||||||||||||||||||||||||
7117 | case never executed: Qt::WA_PaintOnScreen:case Qt::WA_PaintOnScreen: never executed: case Qt::WA_PaintOnScreen: | 0 | ||||||||||||||||||||||||||||||||||||
7118 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
7119 | case never executed: Qt::WA_OpaquePaintEvent:case Qt::WA_OpaquePaintEvent: never executed: case Qt::WA_OpaquePaintEvent: code before this statement never executed: case Qt::WA_OpaquePaintEvent: | 0 | ||||||||||||||||||||||||||||||||||||
7120 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
7121 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7122 | case never executed: Qt::WA_NoSystemBackground:case Qt::WA_NoSystemBackground: never executed: case Qt::WA_NoSystemBackground: | 0 | ||||||||||||||||||||||||||||||||||||
7123 | d->updateIsOpaque(); | - | ||||||||||||||||||||||||||||||||||||
7124 | - | |||||||||||||||||||||||||||||||||||||
7125 | case never executed: Qt::WA_UpdatesDisabled:case Qt::WA_UpdatesDisabled: never executed: case Qt::WA_UpdatesDisabled: code before this statement never executed: case Qt::WA_UpdatesDisabled: | 0 | ||||||||||||||||||||||||||||||||||||
7126 | d->updateSystemBackground(); | - | ||||||||||||||||||||||||||||||||||||
7127 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7128 | case never executed: Qt::WA_TransparentForMouseEvents:case Qt::WA_TransparentForMouseEvents: never executed: case Qt::WA_TransparentForMouseEvents: | 0 | ||||||||||||||||||||||||||||||||||||
7129 | - | |||||||||||||||||||||||||||||||||||||
7130 | - | |||||||||||||||||||||||||||||||||||||
7131 | - | |||||||||||||||||||||||||||||||||||||
7132 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7133 | case never executed: Qt::WA_InputMethodEnabled:case Qt::WA_InputMethodEnabled: never executed: {case Qt::WA_InputMethodEnabled: | 0 | ||||||||||||||||||||||||||||||||||||
7134 | - | |||||||||||||||||||||||||||||||||||||
7135 | if (QGuiApplication::focusObject() == this
| 0 | ||||||||||||||||||||||||||||||||||||
7136 | if (!on
| 0 | ||||||||||||||||||||||||||||||||||||
7137 | QGuiApplication::inputMethod()->commit(); never executed: QGuiApplication::inputMethod()->commit(); | 0 | ||||||||||||||||||||||||||||||||||||
7138 | QGuiApplication::inputMethod()->update(Qt::ImEnabled); | - | ||||||||||||||||||||||||||||||||||||
7139 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7140 | - | |||||||||||||||||||||||||||||||||||||
7141 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7142 | } | - | ||||||||||||||||||||||||||||||||||||
7143 | case never executed: Qt::WA_WindowPropagation:case Qt::WA_WindowPropagation: never executed: case Qt::WA_WindowPropagation: | 0 | ||||||||||||||||||||||||||||||||||||
7144 | d->resolvePalette(); | - | ||||||||||||||||||||||||||||||||||||
7145 | d->resolveFont(); | - | ||||||||||||||||||||||||||||||||||||
7146 | d->resolveLocale(); | - | ||||||||||||||||||||||||||||||||||||
7147 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7148 | case never executed: Qt::WA_DontShowOnScreen:case Qt::WA_DontShowOnScreen: never executed: {case Qt::WA_DontShowOnScreen: | 0 | ||||||||||||||||||||||||||||||||||||
7149 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7150 | - | |||||||||||||||||||||||||||||||||||||
7151 | - | |||||||||||||||||||||||||||||||||||||
7152 | - | |||||||||||||||||||||||||||||||||||||
7153 | d->hide_sys(); | - | ||||||||||||||||||||||||||||||||||||
7154 | d->show_sys(); | - | ||||||||||||||||||||||||||||||||||||
7155 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7156 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7157 | } | - | ||||||||||||||||||||||||||||||||||||
7158 | - | |||||||||||||||||||||||||||||||||||||
7159 | case never executed: Qt::WA_X11NetWmWindowTypeDesktop:case Qt::WA_X11NetWmWindowTypeDesktop: never executed: case Qt::WA_X11NetWmWindowTypeDesktop: | 0 | ||||||||||||||||||||||||||||||||||||
7160 | case never executed: Qt::WA_X11NetWmWindowTypeDock:case Qt::WA_X11NetWmWindowTypeDock: never executed: case Qt::WA_X11NetWmWindowTypeDock: | 0 | ||||||||||||||||||||||||||||||||||||
7161 | case never executed: Qt::WA_X11NetWmWindowTypeToolBar:case Qt::WA_X11NetWmWindowTypeToolBar: never executed: case Qt::WA_X11NetWmWindowTypeToolBar: | 0 | ||||||||||||||||||||||||||||||||||||
7162 | case never executed: Qt::WA_X11NetWmWindowTypeMenu:case Qt::WA_X11NetWmWindowTypeMenu: never executed: case Qt::WA_X11NetWmWindowTypeMenu: | 0 | ||||||||||||||||||||||||||||||||||||
7163 | case never executed: Qt::WA_X11NetWmWindowTypeUtility:case Qt::WA_X11NetWmWindowTypeUtility: never executed: case Qt::WA_X11NetWmWindowTypeUtility: | 0 | ||||||||||||||||||||||||||||||||||||
7164 | case never executed: Qt::WA_X11NetWmWindowTypeSplash:case Qt::WA_X11NetWmWindowTypeSplash: never executed: case Qt::WA_X11NetWmWindowTypeSplash: | 0 | ||||||||||||||||||||||||||||||||||||
7165 | case never executed: Qt::WA_X11NetWmWindowTypeDialog:case Qt::WA_X11NetWmWindowTypeDialog: never executed: case Qt::WA_X11NetWmWindowTypeDialog: | 0 | ||||||||||||||||||||||||||||||||||||
7166 | case never executed: Qt::WA_X11NetWmWindowTypeDropDownMenu:case Qt::WA_X11NetWmWindowTypeDropDownMenu: never executed: case Qt::WA_X11NetWmWindowTypeDropDownMenu: | 0 | ||||||||||||||||||||||||||||||||||||
7167 | case never executed: Qt::WA_X11NetWmWindowTypePopupMenu:case Qt::WA_X11NetWmWindowTypePopupMenu: never executed: case Qt::WA_X11NetWmWindowTypePopupMenu: | 0 | ||||||||||||||||||||||||||||||||||||
7168 | case never executed: Qt::WA_X11NetWmWindowTypeToolTip:case Qt::WA_X11NetWmWindowTypeToolTip: never executed: case Qt::WA_X11NetWmWindowTypeToolTip: | 0 | ||||||||||||||||||||||||||||||||||||
7169 | case never executed: Qt::WA_X11NetWmWindowTypeNotification:case Qt::WA_X11NetWmWindowTypeNotification: never executed: case Qt::WA_X11NetWmWindowTypeNotification: | 0 | ||||||||||||||||||||||||||||||||||||
7170 | case never executed: Qt::WA_X11NetWmWindowTypeCombo:case Qt::WA_X11NetWmWindowTypeCombo: never executed: case Qt::WA_X11NetWmWindowTypeCombo: | 0 | ||||||||||||||||||||||||||||||||||||
7171 | case never executed: Qt::WA_X11NetWmWindowTypeDND:case Qt::WA_X11NetWmWindowTypeDND: never executed: case Qt::WA_X11NetWmWindowTypeDND: | 0 | ||||||||||||||||||||||||||||||||||||
7172 | d->setNetWmWindowTypes(); | - | ||||||||||||||||||||||||||||||||||||
7173 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7174 | - | |||||||||||||||||||||||||||||||||||||
7175 | case never executed: Qt::WA_StaticContents:case Qt::WA_StaticContents: never executed: case Qt::WA_StaticContents: | 0 | ||||||||||||||||||||||||||||||||||||
7176 | if (QWidgetBackingStore *bs = d->maybeBackingStore()
| 0 | ||||||||||||||||||||||||||||||||||||
7177 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7178 | bs->addStaticWidget(this); never executed: bs->addStaticWidget(this); | 0 | ||||||||||||||||||||||||||||||||||||
7179 | else | - | ||||||||||||||||||||||||||||||||||||
7180 | bs->removeStaticWidget(this); never executed: bs->removeStaticWidget(this); | 0 | ||||||||||||||||||||||||||||||||||||
7181 | } | - | ||||||||||||||||||||||||||||||||||||
7182 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7183 | case never executed: Qt::WA_TranslucentBackground:case Qt::WA_TranslucentBackground: never executed: case Qt::WA_TranslucentBackground: | 0 | ||||||||||||||||||||||||||||||||||||
7184 | if (on
| 0 | ||||||||||||||||||||||||||||||||||||
7185 | setAttribute(Qt::WA_NoSystemBackground); | - | ||||||||||||||||||||||||||||||||||||
7186 | d->updateIsTranslucent(); | - | ||||||||||||||||||||||||||||||||||||
7187 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7188 | - | |||||||||||||||||||||||||||||||||||||
7189 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7190 | case never executed: Qt::WA_AcceptTouchEvents:case Qt::WA_AcceptTouchEvents: never executed: case Qt::WA_AcceptTouchEvents: | 0 | ||||||||||||||||||||||||||||||||||||
7191 | - | |||||||||||||||||||||||||||||||||||||
7192 | - | |||||||||||||||||||||||||||||||||||||
7193 | - | |||||||||||||||||||||||||||||||||||||
7194 | - | |||||||||||||||||||||||||||||||||||||
7195 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7196 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
7197 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7198 | } | - | ||||||||||||||||||||||||||||||||||||
7199 | } | - | ||||||||||||||||||||||||||||||||||||
7200 | bool QWidget::testAttribute_helper(Qt::WidgetAttribute attribute) const | - | ||||||||||||||||||||||||||||||||||||
7201 | { | - | ||||||||||||||||||||||||||||||||||||
7202 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7203 | const int x = attribute - 8*sizeof(uint); | - | ||||||||||||||||||||||||||||||||||||
7204 | const int int_off = x / (8*sizeof(uint)); | - | ||||||||||||||||||||||||||||||||||||
7205 | return never executed: (d->high_attributes[int_off] & (1<<(x-(int_off*8*sizeof(uint)))));return (d->high_attributes[int_off] & (1<<(x-(int_off*8*sizeof(uint))))); never executed: return (d->high_attributes[int_off] & (1<<(x-(int_off*8*sizeof(uint))))); | 0 | ||||||||||||||||||||||||||||||||||||
7206 | } | - | ||||||||||||||||||||||||||||||||||||
7207 | qreal QWidget::windowOpacity() const | - | ||||||||||||||||||||||||||||||||||||
7208 | { | - | ||||||||||||||||||||||||||||||||||||
7209 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7210 | return never executed: (isWindow()return (isWindow() && d->maybeTopData()) ? d->maybeTopData()->opacity / 255. : 1.0;
never executed: return (isWindow() && d->maybeTopData()) ? d->maybeTopData()->opacity / 255. : 1.0; | 0 | ||||||||||||||||||||||||||||||||||||
7211 | } | - | ||||||||||||||||||||||||||||||||||||
7212 | - | |||||||||||||||||||||||||||||||||||||
7213 | void QWidget::setWindowOpacity(qreal opacity) | - | ||||||||||||||||||||||||||||||||||||
7214 | { | - | ||||||||||||||||||||||||||||||||||||
7215 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7216 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7217 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7218 | - | |||||||||||||||||||||||||||||||||||||
7219 | opacity = qBound(qreal(0.0), opacity, qreal(1.0)); | - | ||||||||||||||||||||||||||||||||||||
7220 | QTLWExtra *extra = d->topData(); | - | ||||||||||||||||||||||||||||||||||||
7221 | extra->opacity = uint(opacity * 255); | - | ||||||||||||||||||||||||||||||||||||
7222 | setAttribute(Qt::WA_WState_WindowOpacitySet); | - | ||||||||||||||||||||||||||||||||||||
7223 | d->setWindowOpacity_sys(opacity); | - | ||||||||||||||||||||||||||||||||||||
7224 | - | |||||||||||||||||||||||||||||||||||||
7225 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7226 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7227 | - | |||||||||||||||||||||||||||||||||||||
7228 | - | |||||||||||||||||||||||||||||||||||||
7229 | if (QGraphicsProxyWidget *proxy = graphicsProxyWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
7230 | - | |||||||||||||||||||||||||||||||||||||
7231 | if (proxy->cacheMode() == QGraphicsItem::NoCache
| 0 | ||||||||||||||||||||||||||||||||||||
7232 | proxy->update(); never executed: proxy->update(); | 0 | ||||||||||||||||||||||||||||||||||||
7233 | else if (QGraphicsScene *scene = proxy->scene()
| 0 | ||||||||||||||||||||||||||||||||||||
7234 | scene->update(proxy->sceneBoundingRect()); never executed: scene->update(proxy->sceneBoundingRect()); | 0 | ||||||||||||||||||||||||||||||||||||
7235 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7236 | } | - | ||||||||||||||||||||||||||||||||||||
7237 | - | |||||||||||||||||||||||||||||||||||||
7238 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7239 | - | |||||||||||||||||||||||||||||||||||||
7240 | void QWidgetPrivate::setWindowOpacity_sys(qreal level) | - | ||||||||||||||||||||||||||||||||||||
7241 | { | - | ||||||||||||||||||||||||||||||||||||
7242 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7243 | if (q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
7244 | q->windowHandle()->setOpacity(level); never executed: q->windowHandle()->setOpacity(level); | 0 | ||||||||||||||||||||||||||||||||||||
7245 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7246 | bool QWidget::isWindowModified() const | - | ||||||||||||||||||||||||||||||||||||
7247 | { | - | ||||||||||||||||||||||||||||||||||||
7248 | return never executed: testAttribute(Qt::WA_WindowModified);return testAttribute(Qt::WA_WindowModified); never executed: return testAttribute(Qt::WA_WindowModified); | 0 | ||||||||||||||||||||||||||||||||||||
7249 | } | - | ||||||||||||||||||||||||||||||||||||
7250 | - | |||||||||||||||||||||||||||||||||||||
7251 | void QWidget::setWindowModified(bool mod) | - | ||||||||||||||||||||||||||||||||||||
7252 | { | - | ||||||||||||||||||||||||||||||||||||
7253 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7254 | setAttribute(Qt::WA_WindowModified, mod); | - | ||||||||||||||||||||||||||||||||||||
7255 | - | |||||||||||||||||||||||||||||||||||||
7256 | d->setWindowModified_helper(); | - | ||||||||||||||||||||||||||||||||||||
7257 | - | |||||||||||||||||||||||||||||||||||||
7258 | QEvent e(QEvent::ModifiedChange); | - | ||||||||||||||||||||||||||||||||||||
7259 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
7260 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7261 | - | |||||||||||||||||||||||||||||||||||||
7262 | void QWidgetPrivate::setWindowModified_helper() | - | ||||||||||||||||||||||||||||||||||||
7263 | { | - | ||||||||||||||||||||||||||||||||||||
7264 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7265 | QWindow *window = q->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
7266 | if (!window
| 0 | ||||||||||||||||||||||||||||||||||||
7267 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7268 | QPlatformWindow *platformWindow = window->handle(); | - | ||||||||||||||||||||||||||||||||||||
7269 | if (!platformWindow
| 0 | ||||||||||||||||||||||||||||||||||||
7270 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7271 | bool on = q->testAttribute(Qt::WA_WindowModified); | - | ||||||||||||||||||||||||||||||||||||
7272 | if (!platformWindow->setWindowModified(on)
| 0 | ||||||||||||||||||||||||||||||||||||
7273 | if (!q->windowTitle().contains(QLatin1String("[*]"))
| 0 | ||||||||||||||||||||||||||||||||||||
7274 | QMessageLogger(__FILE__, 11417, __PRETTY_FUNCTION__).warning("QWidget::setWindowModified: The window title does not contain a '[*]' placeholder"); never executed: QMessageLogger(__FILE__, 11417, __PRETTY_FUNCTION__).warning("QWidget::setWindowModified: The window title does not contain a '[*]' placeholder"); | 0 | ||||||||||||||||||||||||||||||||||||
7275 | setWindowTitle_helper(q->windowTitle()); | - | ||||||||||||||||||||||||||||||||||||
7276 | setWindowIconText_helper(q->windowIconText()); | - | ||||||||||||||||||||||||||||||||||||
7277 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7278 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7279 | void QWidget::setToolTip(const QString &s) | - | ||||||||||||||||||||||||||||||||||||
7280 | { | - | ||||||||||||||||||||||||||||||||||||
7281 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7282 | d->toolTip = s; | - | ||||||||||||||||||||||||||||||||||||
7283 | - | |||||||||||||||||||||||||||||||||||||
7284 | QEvent event(QEvent::ToolTipChange); | - | ||||||||||||||||||||||||||||||||||||
7285 | QApplication::sendEvent(this, &event); | - | ||||||||||||||||||||||||||||||||||||
7286 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7287 | - | |||||||||||||||||||||||||||||||||||||
7288 | QString QWidget::toolTip() const | - | ||||||||||||||||||||||||||||||||||||
7289 | { | - | ||||||||||||||||||||||||||||||||||||
7290 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7291 | return never executed: d->toolTip;return d->toolTip; never executed: return d->toolTip; | 0 | ||||||||||||||||||||||||||||||||||||
7292 | } | - | ||||||||||||||||||||||||||||||||||||
7293 | void QWidget::setToolTipDuration(int msec) | - | ||||||||||||||||||||||||||||||||||||
7294 | { | - | ||||||||||||||||||||||||||||||||||||
7295 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7296 | d->toolTipDuration = msec; | - | ||||||||||||||||||||||||||||||||||||
7297 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7298 | - | |||||||||||||||||||||||||||||||||||||
7299 | int QWidget::toolTipDuration() const | - | ||||||||||||||||||||||||||||||||||||
7300 | { | - | ||||||||||||||||||||||||||||||||||||
7301 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7302 | return never executed: d->toolTipDuration;return d->toolTipDuration; never executed: return d->toolTipDuration; | 0 | ||||||||||||||||||||||||||||||||||||
7303 | } | - | ||||||||||||||||||||||||||||||||||||
7304 | void QWidget::setStatusTip(const QString &s) | - | ||||||||||||||||||||||||||||||||||||
7305 | { | - | ||||||||||||||||||||||||||||||||||||
7306 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7307 | d->statusTip = s; | - | ||||||||||||||||||||||||||||||||||||
7308 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7309 | - | |||||||||||||||||||||||||||||||||||||
7310 | QString QWidget::statusTip() const | - | ||||||||||||||||||||||||||||||||||||
7311 | { | - | ||||||||||||||||||||||||||||||||||||
7312 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7313 | return never executed: d->statusTip;return d->statusTip; never executed: return d->statusTip; | 0 | ||||||||||||||||||||||||||||||||||||
7314 | } | - | ||||||||||||||||||||||||||||||||||||
7315 | void QWidget::setWhatsThis(const QString &s) | - | ||||||||||||||||||||||||||||||||||||
7316 | { | - | ||||||||||||||||||||||||||||||||||||
7317 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7318 | d->whatsThis = s; | - | ||||||||||||||||||||||||||||||||||||
7319 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7320 | - | |||||||||||||||||||||||||||||||||||||
7321 | QString QWidget::whatsThis() const | - | ||||||||||||||||||||||||||||||||||||
7322 | { | - | ||||||||||||||||||||||||||||||||||||
7323 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7324 | return never executed: d->whatsThis;return d->whatsThis; never executed: return d->whatsThis; | 0 | ||||||||||||||||||||||||||||||||||||
7325 | } | - | ||||||||||||||||||||||||||||||||||||
7326 | void QWidget::setAccessibleName(const QString &name) | - | ||||||||||||||||||||||||||||||||||||
7327 | { | - | ||||||||||||||||||||||||||||||||||||
7328 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7329 | d->accessibleName = name; | - | ||||||||||||||||||||||||||||||||||||
7330 | QAccessibleEvent event(this, QAccessible::NameChanged); | - | ||||||||||||||||||||||||||||||||||||
7331 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
7332 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7333 | - | |||||||||||||||||||||||||||||||||||||
7334 | QString QWidget::accessibleName() const | - | ||||||||||||||||||||||||||||||||||||
7335 | { | - | ||||||||||||||||||||||||||||||||||||
7336 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7337 | return never executed: d->accessibleName;return d->accessibleName; never executed: return d->accessibleName; | 0 | ||||||||||||||||||||||||||||||||||||
7338 | } | - | ||||||||||||||||||||||||||||||||||||
7339 | void QWidget::setAccessibleDescription(const QString &description) | - | ||||||||||||||||||||||||||||||||||||
7340 | { | - | ||||||||||||||||||||||||||||||||||||
7341 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7342 | d->accessibleDescription = description; | - | ||||||||||||||||||||||||||||||||||||
7343 | QAccessibleEvent event(this, QAccessible::DescriptionChanged); | - | ||||||||||||||||||||||||||||||||||||
7344 | QAccessible::updateAccessibility(&event); | - | ||||||||||||||||||||||||||||||||||||
7345 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7346 | - | |||||||||||||||||||||||||||||||||||||
7347 | QString QWidget::accessibleDescription() const | - | ||||||||||||||||||||||||||||||||||||
7348 | { | - | ||||||||||||||||||||||||||||||||||||
7349 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7350 | return never executed: d->accessibleDescription;return d->accessibleDescription; never executed: return d->accessibleDescription; | 0 | ||||||||||||||||||||||||||||||||||||
7351 | } | - | ||||||||||||||||||||||||||||||||||||
7352 | int QWidget::grabShortcut(const QKeySequence &key, Qt::ShortcutContext context) | - | ||||||||||||||||||||||||||||||||||||
7353 | { | - | ||||||||||||||||||||||||||||||||||||
7354 | ((!((static_cast<QApplication *>(QCoreApplication::instance())))) ? qt_assert("qApp",__FILE__,11621) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7355 | if (key.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
7356 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
7357 | setAttribute(Qt::WA_GrabbedShortcut); | - | ||||||||||||||||||||||||||||||||||||
7358 | return never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.addShortcut(this, key, context, qWidgetShortcutContextMatcher);return (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.addShortcut(this, key, context, qWidgetShortcutContextMatcher); never executed: return (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.addShortcut(this, key, context, qWidgetShortcutContextMatcher); | 0 | ||||||||||||||||||||||||||||||||||||
7359 | } | - | ||||||||||||||||||||||||||||||||||||
7360 | void QWidget::releaseShortcut(int id) | - | ||||||||||||||||||||||||||||||||||||
7361 | { | - | ||||||||||||||||||||||||||||||||||||
7362 | ((!((static_cast<QApplication *>(QCoreApplication::instance())))) ? qt_assert("qApp",__FILE__,11645) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7363 | if (id
| 0 | ||||||||||||||||||||||||||||||||||||
7364 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.removeShortcut(id, this, 0);(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.removeShortcut(id, this, 0); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.removeShortcut(id, this, 0); | 0 | ||||||||||||||||||||||||||||||||||||
7365 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7366 | void QWidget::setShortcutEnabled(int id, bool enable) | - | ||||||||||||||||||||||||||||||||||||
7367 | { | - | ||||||||||||||||||||||||||||||||||||
7368 | ((!((static_cast<QApplication *>(QCoreApplication::instance())))) ? qt_assert("qApp",__FILE__,11664) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7369 | if (id
| 0 | ||||||||||||||||||||||||||||||||||||
7370 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.setShortcutEnabled(enable, id, this, 0);(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.setShortcutEnabled(enable, id, this, 0); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.setShortcutEnabled(enable, id, this, 0); | 0 | ||||||||||||||||||||||||||||||||||||
7371 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7372 | void QWidget::setShortcutAutoRepeat(int id, bool enable) | - | ||||||||||||||||||||||||||||||||||||
7373 | { | - | ||||||||||||||||||||||||||||||||||||
7374 | ((!((static_cast<QApplication *>(QCoreApplication::instance())))) ? qt_assert("qApp",__FILE__,11679) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7375 | if (id
| 0 | ||||||||||||||||||||||||||||||||||||
7376 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.setShortcutAutoRepeat(enable, id, this, 0);(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.setShortcutAutoRepeat(enable, id, this, 0); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->shortcutMap.setShortcutAutoRepeat(enable, id, this, 0); | 0 | ||||||||||||||||||||||||||||||||||||
7377 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7378 | - | |||||||||||||||||||||||||||||||||||||
7379 | - | |||||||||||||||||||||||||||||||||||||
7380 | - | |||||||||||||||||||||||||||||||||||||
7381 | - | |||||||||||||||||||||||||||||||||||||
7382 | - | |||||||||||||||||||||||||||||||||||||
7383 | void QWidget::updateMicroFocus() | - | ||||||||||||||||||||||||||||||||||||
7384 | { | - | ||||||||||||||||||||||||||||||||||||
7385 | - | |||||||||||||||||||||||||||||||||||||
7386 | if (this == QGuiApplication::focusObject()
| 0 | ||||||||||||||||||||||||||||||||||||
7387 | QGuiApplication::inputMethod()->update(Qt::ImQueryAll); never executed: QGuiApplication::inputMethod()->update(Qt::ImQueryAll); | 0 | ||||||||||||||||||||||||||||||||||||
7388 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7389 | void QWidget::raise() | - | ||||||||||||||||||||||||||||||||||||
7390 | { | - | ||||||||||||||||||||||||||||||||||||
7391 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7392 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7393 | QWidget *p = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
7394 | const int parentChildCount = p->d_func()->children.size(); | - | ||||||||||||||||||||||||||||||||||||
7395 | if (parentChildCount < 2
| 0 | ||||||||||||||||||||||||||||||||||||
7396 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7397 | const int from = p->d_func()->children.indexOf(this); | - | ||||||||||||||||||||||||||||||||||||
7398 | ((!(from >= 0)) ? qt_assert("from >= 0",__FILE__,11716) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7399 | - | |||||||||||||||||||||||||||||||||||||
7400 | if (from != parentChildCount -1
| 0 | ||||||||||||||||||||||||||||||||||||
7401 | p->d_func()->children.move(from, parentChildCount - 1); never executed: p->d_func()->children.move(from, parentChildCount - 1); | 0 | ||||||||||||||||||||||||||||||||||||
7402 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7403 | create(); never executed: create(); | 0 | ||||||||||||||||||||||||||||||||||||
7404 | else if (from == parentChildCount - 1
| 0 | ||||||||||||||||||||||||||||||||||||
7405 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7406 | - | |||||||||||||||||||||||||||||||||||||
7407 | QRegion region(rect()); | - | ||||||||||||||||||||||||||||||||||||
7408 | d->subtractOpaqueSiblings(region); | - | ||||||||||||||||||||||||||||||||||||
7409 | d->invalidateBuffer(region); | - | ||||||||||||||||||||||||||||||||||||
7410 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7411 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7412 | d->raise_sys(); never executed: d->raise_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
7413 | - | |||||||||||||||||||||||||||||||||||||
7414 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
7415 | QWindowContainer::parentWasRaised(this); never executed: QWindowContainer::parentWasRaised(this); | 0 | ||||||||||||||||||||||||||||||||||||
7416 | - | |||||||||||||||||||||||||||||||||||||
7417 | QEvent e(QEvent::ZOrderChange); | - | ||||||||||||||||||||||||||||||||||||
7418 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
7419 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7420 | - | |||||||||||||||||||||||||||||||||||||
7421 | void QWidgetPrivate::raise_sys() | - | ||||||||||||||||||||||||||||||||||||
7422 | { | - | ||||||||||||||||||||||||||||||||||||
7423 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7424 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7425 | q->windowHandle()->raise(); | - | ||||||||||||||||||||||||||||||||||||
7426 | } never executed: else if (renderToTextureend of block
| 0 | ||||||||||||||||||||||||||||||||||||
7427 | if (QWidget *p = q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
7428 | setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
7429 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - | ||||||||||||||||||||||||||||||||||||
7430 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7431 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7432 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7433 | void QWidget::lower() | - | ||||||||||||||||||||||||||||||||||||
7434 | { | - | ||||||||||||||||||||||||||||||||||||
7435 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7436 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7437 | QWidget *p = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
7438 | const int parentChildCount = p->d_func()->children.size(); | - | ||||||||||||||||||||||||||||||||||||
7439 | if (parentChildCount < 2
| 0 | ||||||||||||||||||||||||||||||||||||
7440 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7441 | const int from = p->d_func()->children.indexOf(this); | - | ||||||||||||||||||||||||||||||||||||
7442 | ((!(from >= 0)) ? qt_assert("from >= 0",__FILE__,11770) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7443 | - | |||||||||||||||||||||||||||||||||||||
7444 | if (from != 0
| 0 | ||||||||||||||||||||||||||||||||||||
7445 | p->d_func()->children.move(from, 0); never executed: p->d_func()->children.move(from, 0); | 0 | ||||||||||||||||||||||||||||||||||||
7446 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7447 | create(); never executed: create(); | 0 | ||||||||||||||||||||||||||||||||||||
7448 | else if (from == 0
| 0 | ||||||||||||||||||||||||||||||||||||
7449 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7450 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7451 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7452 | d->lower_sys(); never executed: d->lower_sys(); | 0 | ||||||||||||||||||||||||||||||||||||
7453 | - | |||||||||||||||||||||||||||||||||||||
7454 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
7455 | QWindowContainer::parentWasLowered(this); never executed: QWindowContainer::parentWasLowered(this); | 0 | ||||||||||||||||||||||||||||||||||||
7456 | - | |||||||||||||||||||||||||||||||||||||
7457 | QEvent e(QEvent::ZOrderChange); | - | ||||||||||||||||||||||||||||||||||||
7458 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
7459 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7460 | - | |||||||||||||||||||||||||||||||||||||
7461 | void QWidgetPrivate::lower_sys() | - | ||||||||||||||||||||||||||||||||||||
7462 | { | - | ||||||||||||||||||||||||||||||||||||
7463 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7464 | if (q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7465 | ((!(q->testAttribute(Qt::WA_WState_Created))) ? qt_assert("q->testAttribute(Qt::WA_WState_Created)",__FILE__,11793) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7466 | q->windowHandle()->lower(); | - | ||||||||||||||||||||||||||||||||||||
7467 | } never executed: else if (QWidget *p = q->parentWidget()end of block
| 0 | ||||||||||||||||||||||||||||||||||||
7468 | setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
7469 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - | ||||||||||||||||||||||||||||||||||||
7470 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7471 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7472 | void QWidget::stackUnder(QWidget* w) | - | ||||||||||||||||||||||||||||||||||||
7473 | { | - | ||||||||||||||||||||||||||||||||||||
7474 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7475 | QWidget *p = parentWidget(); | - | ||||||||||||||||||||||||||||||||||||
7476 | if (!w
| 0 | ||||||||||||||||||||||||||||||||||||
7477 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7478 | if (p
| 0 | ||||||||||||||||||||||||||||||||||||
7479 | int from = p->d_func()->children.indexOf(this); | - | ||||||||||||||||||||||||||||||||||||
7480 | int to = p->d_func()->children.indexOf(w); | - | ||||||||||||||||||||||||||||||||||||
7481 | ((!(from >= 0)) ? qt_assert("from >= 0",__FILE__,11817) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7482 | ((!(to >= 0)) ? qt_assert("to >= 0",__FILE__,11818) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
7483 | if (from < to
| 0 | ||||||||||||||||||||||||||||||||||||
7484 | -- never executed: to;--to; never executed: --to; | 0 | ||||||||||||||||||||||||||||||||||||
7485 | - | |||||||||||||||||||||||||||||||||||||
7486 | if (from != to
| 0 | ||||||||||||||||||||||||||||||||||||
7487 | p->d_func()->children.move(from, to); never executed: p->d_func()->children.move(from, to); | 0 | ||||||||||||||||||||||||||||||||||||
7488 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7489 | create(); never executed: create(); | 0 | ||||||||||||||||||||||||||||||||||||
7490 | else if (from == to
| 0 | ||||||||||||||||||||||||||||||||||||
7491 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7492 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7493 | if (testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7494 | d->stackUnder_sys(w); never executed: d->stackUnder_sys(w); | 0 | ||||||||||||||||||||||||||||||||||||
7495 | - | |||||||||||||||||||||||||||||||||||||
7496 | QEvent e(QEvent::ZOrderChange); | - | ||||||||||||||||||||||||||||||||||||
7497 | QApplication::sendEvent(this, &e); | - | ||||||||||||||||||||||||||||||||||||
7498 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7499 | - | |||||||||||||||||||||||||||||||||||||
7500 | void QWidgetPrivate::stackUnder_sys(QWidget*) | - | ||||||||||||||||||||||||||||||||||||
7501 | { | - | ||||||||||||||||||||||||||||||||||||
7502 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7503 | if (QWidget *p = q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
7504 | setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
7505 | p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry())); | - | ||||||||||||||||||||||||||||||||||||
7506 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7507 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7508 | QRect QWidgetPrivate::frameStrut() const | - | ||||||||||||||||||||||||||||||||||||
7509 | { | - | ||||||||||||||||||||||||||||||||||||
7510 | const QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7511 | if (!q->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7512 | - | |||||||||||||||||||||||||||||||||||||
7513 | return never executed: QRect(0, 0, 1, 1);return QRect(0, 0, 1, 1); never executed: return QRect(0, 0, 1, 1); | 0 | ||||||||||||||||||||||||||||||||||||
7514 | } | - | ||||||||||||||||||||||||||||||||||||
7515 | - | |||||||||||||||||||||||||||||||||||||
7516 | if (data.fstrut_dirty
| 0 | ||||||||||||||||||||||||||||||||||||
7517 | - | |||||||||||||||||||||||||||||||||||||
7518 | - | |||||||||||||||||||||||||||||||||||||
7519 | && q->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
7520 | - | |||||||||||||||||||||||||||||||||||||
7521 | && q->testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
7522 | const_cast< never executed: QWidgetPrivate *>(this)->updateFrameStrut();const_cast<QWidgetPrivate *>(this)->updateFrameStrut(); never executed: const_cast<QWidgetPrivate *>(this)->updateFrameStrut(); | 0 | ||||||||||||||||||||||||||||||||||||
7523 | - | |||||||||||||||||||||||||||||||||||||
7524 | return never executed: maybeTopData()return maybeTopData() ? maybeTopData()->frameStrut : QRect();
never executed: return maybeTopData() ? maybeTopData()->frameStrut : QRect(); | 0 | ||||||||||||||||||||||||||||||||||||
7525 | } | - | ||||||||||||||||||||||||||||||||||||
7526 | - | |||||||||||||||||||||||||||||||||||||
7527 | void QWidgetPrivate::updateFrameStrut() | - | ||||||||||||||||||||||||||||||||||||
7528 | { | - | ||||||||||||||||||||||||||||||||||||
7529 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7530 | if (q->data->fstrut_dirty
| 0 | ||||||||||||||||||||||||||||||||||||
7531 | if (QTLWExtra *te = maybeTopData()
| 0 | ||||||||||||||||||||||||||||||||||||
7532 | if (te->window
| 0 | ||||||||||||||||||||||||||||||||||||
7533 | const QMargins margins = te->window->frameMargins(); | - | ||||||||||||||||||||||||||||||||||||
7534 | if (!margins.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||
7535 | te->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom()); | - | ||||||||||||||||||||||||||||||||||||
7536 | q->data->fstrut_dirty = false; | - | ||||||||||||||||||||||||||||||||||||
7537 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7538 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7539 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7540 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7541 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7542 | void QWidget::setBackingStore(QBackingStore *store) | - | ||||||||||||||||||||||||||||||||||||
7543 | { | - | ||||||||||||||||||||||||||||||||||||
7544 | - | |||||||||||||||||||||||||||||||||||||
7545 | - | |||||||||||||||||||||||||||||||||||||
7546 | if (!isTopLevel()
| 0 | ||||||||||||||||||||||||||||||||||||
7547 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7548 | - | |||||||||||||||||||||||||||||||||||||
7549 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7550 | - | |||||||||||||||||||||||||||||||||||||
7551 | QTLWExtra *topData = d->topData(); | - | ||||||||||||||||||||||||||||||||||||
7552 | if (topData->backingStore == store
| 0 | ||||||||||||||||||||||||||||||||||||
7553 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7554 | - | |||||||||||||||||||||||||||||||||||||
7555 | QBackingStore *oldStore = topData->backingStore; | - | ||||||||||||||||||||||||||||||||||||
7556 | deleteBackingStore(d); | - | ||||||||||||||||||||||||||||||||||||
7557 | topData->backingStore = store; | - | ||||||||||||||||||||||||||||||||||||
7558 | - | |||||||||||||||||||||||||||||||||||||
7559 | QWidgetBackingStore *bs = d->maybeBackingStore(); | - | ||||||||||||||||||||||||||||||||||||
7560 | if (!bs
| 0 | ||||||||||||||||||||||||||||||||||||
7561 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7562 | - | |||||||||||||||||||||||||||||||||||||
7563 | if (isTopLevel()
| 0 | ||||||||||||||||||||||||||||||||||||
7564 | if (bs->store != oldStore
| 0 | ||||||||||||||||||||||||||||||||||||
7565 | delete bs->store; never executed: delete bs->store; | 0 | ||||||||||||||||||||||||||||||||||||
7566 | bs->store = store; | - | ||||||||||||||||||||||||||||||||||||
7567 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7568 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7569 | - | |||||||||||||||||||||||||||||||||||||
7570 | - | |||||||||||||||||||||||||||||||||||||
7571 | - | |||||||||||||||||||||||||||||||||||||
7572 | - | |||||||||||||||||||||||||||||||||||||
7573 | - | |||||||||||||||||||||||||||||||||||||
7574 | - | |||||||||||||||||||||||||||||||||||||
7575 | QBackingStore *QWidget::backingStore() const | - | ||||||||||||||||||||||||||||||||||||
7576 | { | - | ||||||||||||||||||||||||||||||||||||
7577 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7578 | QTLWExtra *extra = d->maybeTopData(); | - | ||||||||||||||||||||||||||||||||||||
7579 | if (extra
| 0 | ||||||||||||||||||||||||||||||||||||
7580 | return never executed: extra->backingStore;return extra->backingStore; never executed: return extra->backingStore; | 0 | ||||||||||||||||||||||||||||||||||||
7581 | - | |||||||||||||||||||||||||||||||||||||
7582 | QWidgetBackingStore *bs = d->maybeBackingStore(); | - | ||||||||||||||||||||||||||||||||||||
7583 | - | |||||||||||||||||||||||||||||||||||||
7584 | return never executed: bsreturn bs ? bs->store : 0;
never executed: return bs ? bs->store : 0; | 0 | ||||||||||||||||||||||||||||||||||||
7585 | } | - | ||||||||||||||||||||||||||||||||||||
7586 | - | |||||||||||||||||||||||||||||||||||||
7587 | void QWidgetPrivate::getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const | - | ||||||||||||||||||||||||||||||||||||
7588 | { | - | ||||||||||||||||||||||||||||||||||||
7589 | if (left
| 0 | ||||||||||||||||||||||||||||||||||||
7590 | * never executed: left = (int)leftLayoutItemMargin;*left = (int)leftLayoutItemMargin; never executed: *left = (int)leftLayoutItemMargin; | 0 | ||||||||||||||||||||||||||||||||||||
7591 | if (top
| 0 | ||||||||||||||||||||||||||||||||||||
7592 | * never executed: top = (int)topLayoutItemMargin;*top = (int)topLayoutItemMargin; never executed: *top = (int)topLayoutItemMargin; | 0 | ||||||||||||||||||||||||||||||||||||
7593 | if (right
| 0 | ||||||||||||||||||||||||||||||||||||
7594 | * never executed: right = (int)rightLayoutItemMargin;*right = (int)rightLayoutItemMargin; never executed: *right = (int)rightLayoutItemMargin; | 0 | ||||||||||||||||||||||||||||||||||||
7595 | if (bottom
| 0 | ||||||||||||||||||||||||||||||||||||
7596 | * never executed: bottom = (int)bottomLayoutItemMargin;*bottom = (int)bottomLayoutItemMargin; never executed: *bottom = (int)bottomLayoutItemMargin; | 0 | ||||||||||||||||||||||||||||||||||||
7597 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7598 | - | |||||||||||||||||||||||||||||||||||||
7599 | void QWidgetPrivate::setLayoutItemMargins(int left, int top, int right, int bottom) | - | ||||||||||||||||||||||||||||||||||||
7600 | { | - | ||||||||||||||||||||||||||||||||||||
7601 | if (leftLayoutItemMargin == left
| 0 | ||||||||||||||||||||||||||||||||||||
7602 | && topLayoutItemMargin == top
| 0 | ||||||||||||||||||||||||||||||||||||
7603 | && rightLayoutItemMargin == right
| 0 | ||||||||||||||||||||||||||||||||||||
7604 | && bottomLayoutItemMargin == bottom
| 0 | ||||||||||||||||||||||||||||||||||||
7605 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7606 | - | |||||||||||||||||||||||||||||||||||||
7607 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7608 | leftLayoutItemMargin = (signed char)left; | - | ||||||||||||||||||||||||||||||||||||
7609 | topLayoutItemMargin = (signed char)top; | - | ||||||||||||||||||||||||||||||||||||
7610 | rightLayoutItemMargin = (signed char)right; | - | ||||||||||||||||||||||||||||||||||||
7611 | bottomLayoutItemMargin = (signed char)bottom; | - | ||||||||||||||||||||||||||||||||||||
7612 | q->updateGeometry(); | - | ||||||||||||||||||||||||||||||||||||
7613 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7614 | - | |||||||||||||||||||||||||||||||||||||
7615 | void QWidgetPrivate::setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt) | - | ||||||||||||||||||||||||||||||||||||
7616 | { | - | ||||||||||||||||||||||||||||||||||||
7617 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7618 | QStyleOption myOpt; | - | ||||||||||||||||||||||||||||||||||||
7619 | if (!opt
| 0 | ||||||||||||||||||||||||||||||||||||
7620 | myOpt.initFrom(q); | - | ||||||||||||||||||||||||||||||||||||
7621 | myOpt.rect.setRect(0, 0, 32768, 32768); | - | ||||||||||||||||||||||||||||||||||||
7622 | opt = &myOpt; | - | ||||||||||||||||||||||||||||||||||||
7623 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7624 | - | |||||||||||||||||||||||||||||||||||||
7625 | QRect liRect = q->style()->subElementRect(element, opt, q); | - | ||||||||||||||||||||||||||||||||||||
7626 | if (liRect.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||
7627 | leftLayoutItemMargin = (signed char)(opt->rect.left() - liRect.left()); | - | ||||||||||||||||||||||||||||||||||||
7628 | topLayoutItemMargin = (signed char)(opt->rect.top() - liRect.top()); | - | ||||||||||||||||||||||||||||||||||||
7629 | rightLayoutItemMargin = (signed char)(liRect.right() - opt->rect.right()); | - | ||||||||||||||||||||||||||||||||||||
7630 | bottomLayoutItemMargin = (signed char)(liRect.bottom() - opt->rect.bottom()); | - | ||||||||||||||||||||||||||||||||||||
7631 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
7632 | leftLayoutItemMargin = 0; | - | ||||||||||||||||||||||||||||||||||||
7633 | topLayoutItemMargin = 0; | - | ||||||||||||||||||||||||||||||||||||
7634 | rightLayoutItemMargin = 0; | - | ||||||||||||||||||||||||||||||||||||
7635 | bottomLayoutItemMargin = 0; | - | ||||||||||||||||||||||||||||||||||||
7636 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7637 | } | - | ||||||||||||||||||||||||||||||||||||
7638 | - | |||||||||||||||||||||||||||||||||||||
7639 | void QWidgetPrivate::adjustQuitOnCloseAttribute() | - | ||||||||||||||||||||||||||||||||||||
7640 | { | - | ||||||||||||||||||||||||||||||||||||
7641 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7642 | - | |||||||||||||||||||||||||||||||||||||
7643 | if (!q->parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
7644 | Qt::WindowType type = q->windowType(); | - | ||||||||||||||||||||||||||||||||||||
7645 | if (type == Qt::Widget
| 0 | ||||||||||||||||||||||||||||||||||||
7646 | type = Qt::Window; never executed: type = Qt::Window; | 0 | ||||||||||||||||||||||||||||||||||||
7647 | if (type != Qt::Widget
| 0 | ||||||||||||||||||||||||||||||||||||
7648 | q->setAttribute(Qt::WA_QuitOnClose, false); never executed: q->setAttribute(Qt::WA_QuitOnClose, false); | 0 | ||||||||||||||||||||||||||||||||||||
7649 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7650 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7651 | - | |||||||||||||||||||||||||||||||||||||
7652 | QOpenGLContext *QWidgetPrivate::shareContext() const | - | ||||||||||||||||||||||||||||||||||||
7653 | { | - | ||||||||||||||||||||||||||||||||||||
7654 | - | |||||||||||||||||||||||||||||||||||||
7655 | - | |||||||||||||||||||||||||||||||||||||
7656 | - | |||||||||||||||||||||||||||||||||||||
7657 | if (!extra
| 0 | ||||||||||||||||||||||||||||||||||||
7658 | QMessageLogger(__FILE__, 12167, __PRETTY_FUNCTION__).warning("Asking for share context for widget that does not have a window handle"); | - | ||||||||||||||||||||||||||||||||||||
7659 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
7660 | } | - | ||||||||||||||||||||||||||||||||||||
7661 | QWidgetPrivate *that = const_cast<QWidgetPrivate *>(this); | - | ||||||||||||||||||||||||||||||||||||
7662 | if (!extra->topextra->shareContext
| 0 | ||||||||||||||||||||||||||||||||||||
7663 | QOpenGLContext *ctx = new QOpenGLContext; | - | ||||||||||||||||||||||||||||||||||||
7664 | ctx->setShareContext(qt_gl_global_share_context()); | - | ||||||||||||||||||||||||||||||||||||
7665 | ctx->setFormat(extra->topextra->window->format()); | - | ||||||||||||||||||||||||||||||||||||
7666 | ctx->setScreen(extra->topextra->window->screen()); | - | ||||||||||||||||||||||||||||||||||||
7667 | ctx->create(); | - | ||||||||||||||||||||||||||||||||||||
7668 | that->extra->topextra->shareContext = ctx; | - | ||||||||||||||||||||||||||||||||||||
7669 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7670 | return never executed: that->extra->topextra->shareContext;return that->extra->topextra->shareContext; never executed: return that->extra->topextra->shareContext; | 0 | ||||||||||||||||||||||||||||||||||||
7671 | - | |||||||||||||||||||||||||||||||||||||
7672 | } | - | ||||||||||||||||||||||||||||||||||||
7673 | - | |||||||||||||||||||||||||||||||||||||
7674 | - | |||||||||||||||||||||||||||||||||||||
7675 | void QWidgetPrivate::sendComposeStatus(QWidget *w, bool end) | - | ||||||||||||||||||||||||||||||||||||
7676 | { | - | ||||||||||||||||||||||||||||||||||||
7677 | QWidgetPrivate *wd = QWidgetPrivate::get(w); | - | ||||||||||||||||||||||||||||||||||||
7678 | if (!wd->textureChildSeen
| 0 | ||||||||||||||||||||||||||||||||||||
7679 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
7680 | if (end
| 0 | ||||||||||||||||||||||||||||||||||||
7681 | wd->endCompose(); never executed: wd->endCompose(); | 0 | ||||||||||||||||||||||||||||||||||||
7682 | else | - | ||||||||||||||||||||||||||||||||||||
7683 | wd->beginCompose(); never executed: wd->beginCompose(); | 0 | ||||||||||||||||||||||||||||||||||||
7684 | for (int i = 0; i < wd->children.size()
| 0 | ||||||||||||||||||||||||||||||||||||
7685 | w = qobject_cast<QWidget *>(wd->children.at(i)); | - | ||||||||||||||||||||||||||||||||||||
7686 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||
7687 | sendComposeStatus(w, end); never executed: sendComposeStatus(w, end); | 0 | ||||||||||||||||||||||||||||||||||||
7688 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7689 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7690 | - | |||||||||||||||||||||||||||||||||||||
7691 | - | |||||||||||||||||||||||||||||||||||||
7692 | __attribute__((visibility("default"))) QWidgetData *qt_qwidget_data(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
7693 | { | - | ||||||||||||||||||||||||||||||||||||
7694 | return never executed: widget->data;return widget->data; never executed: return widget->data; | 0 | ||||||||||||||||||||||||||||||||||||
7695 | } | - | ||||||||||||||||||||||||||||||||||||
7696 | - | |||||||||||||||||||||||||||||||||||||
7697 | __attribute__((visibility("default"))) QWidgetPrivate *qt_widget_private(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
7698 | { | - | ||||||||||||||||||||||||||||||||||||
7699 | return never executed: widget->d_func();return widget->d_func(); never executed: return widget->d_func(); | 0 | ||||||||||||||||||||||||||||||||||||
7700 | } | - | ||||||||||||||||||||||||||||||||||||
7701 | QGraphicsProxyWidget *QWidget::graphicsProxyWidget() const | - | ||||||||||||||||||||||||||||||||||||
7702 | { | - | ||||||||||||||||||||||||||||||||||||
7703 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7704 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
7705 | return never executed: d->extra->proxyWidget;return d->extra->proxyWidget; never executed: return d->extra->proxyWidget; | 0 | ||||||||||||||||||||||||||||||||||||
7706 | } | - | ||||||||||||||||||||||||||||||||||||
7707 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
7708 | } | - | ||||||||||||||||||||||||||||||||||||
7709 | void QWidget::grabGesture(Qt::GestureType gesture, Qt::GestureFlags flags) | - | ||||||||||||||||||||||||||||||||||||
7710 | { | - | ||||||||||||||||||||||||||||||||||||
7711 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7712 | d->gestureContext.insert(gesture, flags); | - | ||||||||||||||||||||||||||||||||||||
7713 | (void)QGestureManager::instance(); | - | ||||||||||||||||||||||||||||||||||||
7714 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7715 | - | |||||||||||||||||||||||||||||||||||||
7716 | - | |||||||||||||||||||||||||||||||||||||
7717 | - | |||||||||||||||||||||||||||||||||||||
7718 | - | |||||||||||||||||||||||||||||||||||||
7719 | - | |||||||||||||||||||||||||||||||||||||
7720 | - | |||||||||||||||||||||||||||||||||||||
7721 | - | |||||||||||||||||||||||||||||||||||||
7722 | void QWidget::ungrabGesture(Qt::GestureType gesture) | - | ||||||||||||||||||||||||||||||||||||
7723 | { | - | ||||||||||||||||||||||||||||||||||||
7724 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7725 | if (d->gestureContext.remove(gesture)
| 0 | ||||||||||||||||||||||||||||||||||||
7726 | if (QGestureManager *manager = QGestureManager::instance()
| 0 | ||||||||||||||||||||||||||||||||||||
7727 | manager->cleanupCachedGestures(this, gesture); never executed: manager->cleanupCachedGestures(this, gesture); | 0 | ||||||||||||||||||||||||||||||||||||
7728 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7729 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7730 | void QWidget::destroy(bool destroyWindow, bool destroySubWindows) | - | ||||||||||||||||||||||||||||||||||||
7731 | { | - | ||||||||||||||||||||||||||||||||||||
7732 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7733 | - | |||||||||||||||||||||||||||||||||||||
7734 | d->aboutToDestroy(); | - | ||||||||||||||||||||||||||||||||||||
7735 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7736 | parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); never executed: parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); | 0 | ||||||||||||||||||||||||||||||||||||
7737 | d->deactivateWidgetCleanup(); | - | ||||||||||||||||||||||||||||||||||||
7738 | - | |||||||||||||||||||||||||||||||||||||
7739 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
7740 | (static_cast< never executed: QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(this);(static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(this); never executed: (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->closePopup(this); | 0 | ||||||||||||||||||||||||||||||||||||
7741 | - | |||||||||||||||||||||||||||||||||||||
7742 | if (this == QApplicationPrivate::active_window
| 0 | ||||||||||||||||||||||||||||||||||||
7743 | QApplication::setActiveWindow(0); never executed: QApplication::setActiveWindow(0); | 0 | ||||||||||||||||||||||||||||||||||||
7744 | if (QWidget::mouseGrabber() == this
| 0 | ||||||||||||||||||||||||||||||||||||
7745 | releaseMouse(); never executed: releaseMouse(); | 0 | ||||||||||||||||||||||||||||||||||||
7746 | if (QWidget::keyboardGrabber() == this
| 0 | ||||||||||||||||||||||||||||||||||||
7747 | releaseKeyboard(); never executed: releaseKeyboard(); | 0 | ||||||||||||||||||||||||||||||||||||
7748 | - | |||||||||||||||||||||||||||||||||||||
7749 | setAttribute(Qt::WA_WState_Created, false); | - | ||||||||||||||||||||||||||||||||||||
7750 | - | |||||||||||||||||||||||||||||||||||||
7751 | if (windowType() != Qt::Desktop
| 0 | ||||||||||||||||||||||||||||||||||||
7752 | if (destroySubWindows
| 0 | ||||||||||||||||||||||||||||||||||||
7753 | QObjectList childList(children()); | - | ||||||||||||||||||||||||||||||||||||
7754 | for (int i = 0; i < childList.size()
| 0 | ||||||||||||||||||||||||||||||||||||
7755 | QWidget *widget = qobject_cast<QWidget *>(childList.at(i)); | - | ||||||||||||||||||||||||||||||||||||
7756 | if (widget
| 0 | ||||||||||||||||||||||||||||||||||||
7757 | if (widget->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
7758 | widget->destroy(); | - | ||||||||||||||||||||||||||||||||||||
7759 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7760 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7761 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7762 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7763 | if (destroyWindow
| 0 | ||||||||||||||||||||||||||||||||||||
7764 | d->deleteTLSysExtra(); | - | ||||||||||||||||||||||||||||||||||||
7765 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
7766 | if (parentWidget()
| 0 | ||||||||||||||||||||||||||||||||||||
7767 | d->hide_sys(); | - | ||||||||||||||||||||||||||||||||||||
7768 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7769 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7770 | - | |||||||||||||||||||||||||||||||||||||
7771 | d->setWinId(0); | - | ||||||||||||||||||||||||||||||||||||
7772 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7773 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7774 | QPaintEngine *QWidget::paintEngine() const | - | ||||||||||||||||||||||||||||||||||||
7775 | { | - | ||||||||||||||||||||||||||||||||||||
7776 | QMessageLogger(__FILE__, 12332, __PRETTY_FUNCTION__).warning("QWidget::paintEngine: Should no longer be called"); | - | ||||||||||||||||||||||||||||||||||||
7777 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
7778 | } | - | ||||||||||||||||||||||||||||||||||||
7779 | - | |||||||||||||||||||||||||||||||||||||
7780 | - | |||||||||||||||||||||||||||||||||||||
7781 | static inline bool canMapPosition(QWindow *window) | - | ||||||||||||||||||||||||||||||||||||
7782 | { | - | ||||||||||||||||||||||||||||||||||||
7783 | return never executed: window->handle()return window->handle() && !qt_window_private(window)->resizeEventPending;
never executed: return window->handle() && !qt_window_private(window)->resizeEventPending; | 0 | ||||||||||||||||||||||||||||||||||||
7784 | } | - | ||||||||||||||||||||||||||||||||||||
7785 | - | |||||||||||||||||||||||||||||||||||||
7786 | - | |||||||||||||||||||||||||||||||||||||
7787 | static inline QGraphicsProxyWidget *graphicsProxyWidget(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
7788 | { | - | ||||||||||||||||||||||||||||||||||||
7789 | QGraphicsProxyWidget *result = nullptr; | - | ||||||||||||||||||||||||||||||||||||
7790 | const QWidgetPrivate *d = qt_widget_private(const_cast<QWidget *>(w)); | - | ||||||||||||||||||||||||||||||||||||
7791 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
7792 | result = d->extra->proxyWidget; never executed: result = d->extra->proxyWidget; | 0 | ||||||||||||||||||||||||||||||||||||
7793 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||||||||||||||||||||||||||
7794 | } | - | ||||||||||||||||||||||||||||||||||||
7795 | - | |||||||||||||||||||||||||||||||||||||
7796 | - | |||||||||||||||||||||||||||||||||||||
7797 | struct MapToGlobalTransformResult { | - | ||||||||||||||||||||||||||||||||||||
7798 | QTransform transform; | - | ||||||||||||||||||||||||||||||||||||
7799 | QWindow *window; | - | ||||||||||||||||||||||||||||||||||||
7800 | }; | - | ||||||||||||||||||||||||||||||||||||
7801 | - | |||||||||||||||||||||||||||||||||||||
7802 | static MapToGlobalTransformResult mapToGlobalTransform(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
7803 | { | - | ||||||||||||||||||||||||||||||||||||
7804 | MapToGlobalTransformResult result; | - | ||||||||||||||||||||||||||||||||||||
7805 | result.window = nullptr; | - | ||||||||||||||||||||||||||||||||||||
7806 | for ( ; w
| 0 | ||||||||||||||||||||||||||||||||||||
7807 | - | |||||||||||||||||||||||||||||||||||||
7808 | if (QGraphicsProxyWidget *qgpw = graphicsProxyWidget(w)
| 0 | ||||||||||||||||||||||||||||||||||||
7809 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
7810 | const QList <QGraphicsView *> views = scene->views(); | - | ||||||||||||||||||||||||||||||||||||
7811 | if (!views.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
7812 | result.transform *= qgpw->sceneTransform(); | - | ||||||||||||||||||||||||||||||||||||
7813 | result.transform *= views.first()->viewportTransform(); | - | ||||||||||||||||||||||||||||||||||||
7814 | w = views.first()->viewport(); | - | ||||||||||||||||||||||||||||||||||||
7815 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7816 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7817 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7818 | - | |||||||||||||||||||||||||||||||||||||
7819 | QWindow *window = w->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
7820 | if (window
| 0 | ||||||||||||||||||||||||||||||||||||
7821 | result.window = window; | - | ||||||||||||||||||||||||||||||||||||
7822 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7823 | } | - | ||||||||||||||||||||||||||||||||||||
7824 | - | |||||||||||||||||||||||||||||||||||||
7825 | const QPoint topLeft = w->geometry().topLeft(); | - | ||||||||||||||||||||||||||||||||||||
7826 | result.transform.translate(topLeft.x(), topLeft.y()); | - | ||||||||||||||||||||||||||||||||||||
7827 | if (w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
7828 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
7829 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7830 | return never executed: result;return result; never executed: return result; | 0 | ||||||||||||||||||||||||||||||||||||
7831 | } | - | ||||||||||||||||||||||||||||||||||||
7832 | QPoint QWidget::mapToGlobal(const QPoint &pos) const | - | ||||||||||||||||||||||||||||||||||||
7833 | { | - | ||||||||||||||||||||||||||||||||||||
7834 | const MapToGlobalTransformResult t = mapToGlobalTransform(this); | - | ||||||||||||||||||||||||||||||||||||
7835 | const QPoint g = t.transform.map(pos); | - | ||||||||||||||||||||||||||||||||||||
7836 | return never executed: t.windowreturn t.window ? t.window->mapToGlobal(g) : g;
never executed: return t.window ? t.window->mapToGlobal(g) : g; | 0 | ||||||||||||||||||||||||||||||||||||
7837 | } | - | ||||||||||||||||||||||||||||||||||||
7838 | QPoint QWidget::mapFromGlobal(const QPoint &pos) const | - | ||||||||||||||||||||||||||||||||||||
7839 | { | - | ||||||||||||||||||||||||||||||||||||
7840 | const MapToGlobalTransformResult t = mapToGlobalTransform(this); | - | ||||||||||||||||||||||||||||||||||||
7841 | const QPoint windowLocal = t.window
| 0 | ||||||||||||||||||||||||||||||||||||
7842 | return never executed: t.transform.inverted().map(windowLocal);return t.transform.inverted().map(windowLocal); never executed: return t.transform.inverted().map(windowLocal); | 0 | ||||||||||||||||||||||||||||||||||||
7843 | } | - | ||||||||||||||||||||||||||||||||||||
7844 | - | |||||||||||||||||||||||||||||||||||||
7845 | QWidget *qt_pressGrab = 0; | - | ||||||||||||||||||||||||||||||||||||
7846 | QWidget *qt_mouseGrb = 0; | - | ||||||||||||||||||||||||||||||||||||
7847 | static bool mouseGrabWithCursor = false; | - | ||||||||||||||||||||||||||||||||||||
7848 | static QWidget *keyboardGrb = 0; | - | ||||||||||||||||||||||||||||||||||||
7849 | - | |||||||||||||||||||||||||||||||||||||
7850 | static inline QWindow *grabberWindow(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||
7851 | { | - | ||||||||||||||||||||||||||||||||||||
7852 | QWindow *window = w->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
7853 | if (!window
| 0 | ||||||||||||||||||||||||||||||||||||
7854 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
7855 | window = nativeParent->windowHandle(); never executed: window = nativeParent->windowHandle(); | 0 | ||||||||||||||||||||||||||||||||||||
7856 | return never executed: window;return window; never executed: return window; | 0 | ||||||||||||||||||||||||||||||||||||
7857 | } | - | ||||||||||||||||||||||||||||||||||||
7858 | - | |||||||||||||||||||||||||||||||||||||
7859 | - | |||||||||||||||||||||||||||||||||||||
7860 | static void grabMouseForWidget(QWidget *widget, const QCursor *cursor = 0) | - | ||||||||||||||||||||||||||||||||||||
7861 | - | |||||||||||||||||||||||||||||||||||||
7862 | - | |||||||||||||||||||||||||||||||||||||
7863 | - | |||||||||||||||||||||||||||||||||||||
7864 | { | - | ||||||||||||||||||||||||||||||||||||
7865 | if (qt_mouseGrb
| 0 | ||||||||||||||||||||||||||||||||||||
7866 | qt_mouseGrb->releaseMouse(); never executed: qt_mouseGrb->releaseMouse(); | 0 | ||||||||||||||||||||||||||||||||||||
7867 | - | |||||||||||||||||||||||||||||||||||||
7868 | mouseGrabWithCursor = false; | - | ||||||||||||||||||||||||||||||||||||
7869 | if (QWindow *window = grabberWindow(widget)
| 0 | ||||||||||||||||||||||||||||||||||||
7870 | - | |||||||||||||||||||||||||||||||||||||
7871 | if (cursor
| 0 | ||||||||||||||||||||||||||||||||||||
7872 | mouseGrabWithCursor = true; | - | ||||||||||||||||||||||||||||||||||||
7873 | QGuiApplication::setOverrideCursor(*cursor); | - | ||||||||||||||||||||||||||||||||||||
7874 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7875 | - | |||||||||||||||||||||||||||||||||||||
7876 | window->setMouseGrabEnabled(true); | - | ||||||||||||||||||||||||||||||||||||
7877 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7878 | - | |||||||||||||||||||||||||||||||||||||
7879 | qt_mouseGrb = widget; | - | ||||||||||||||||||||||||||||||||||||
7880 | qt_pressGrab = 0; | - | ||||||||||||||||||||||||||||||||||||
7881 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7882 | - | |||||||||||||||||||||||||||||||||||||
7883 | static void releaseMouseGrabOfWidget(QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
7884 | { | - | ||||||||||||||||||||||||||||||||||||
7885 | if (qt_mouseGrb == widget
| 0 | ||||||||||||||||||||||||||||||||||||
7886 | if (QWindow *window = grabberWindow(widget)
| 0 | ||||||||||||||||||||||||||||||||||||
7887 | - | |||||||||||||||||||||||||||||||||||||
7888 | if (mouseGrabWithCursor
| 0 | ||||||||||||||||||||||||||||||||||||
7889 | QGuiApplication::restoreOverrideCursor(); | - | ||||||||||||||||||||||||||||||||||||
7890 | mouseGrabWithCursor = false; | - | ||||||||||||||||||||||||||||||||||||
7891 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7892 | - | |||||||||||||||||||||||||||||||||||||
7893 | window->setMouseGrabEnabled(false); | - | ||||||||||||||||||||||||||||||||||||
7894 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7895 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7896 | qt_mouseGrb = 0; | - | ||||||||||||||||||||||||||||||||||||
7897 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7898 | void QWidget::grabMouse() | - | ||||||||||||||||||||||||||||||||||||
7899 | { | - | ||||||||||||||||||||||||||||||||||||
7900 | grabMouseForWidget(this); | - | ||||||||||||||||||||||||||||||||||||
7901 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7902 | void QWidget::grabMouse(const QCursor &cursor) | - | ||||||||||||||||||||||||||||||||||||
7903 | { | - | ||||||||||||||||||||||||||||||||||||
7904 | grabMouseForWidget(this, &cursor); | - | ||||||||||||||||||||||||||||||||||||
7905 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7906 | - | |||||||||||||||||||||||||||||||||||||
7907 | - | |||||||||||||||||||||||||||||||||||||
7908 | bool QWidgetPrivate::stealMouseGrab(bool grab) | - | ||||||||||||||||||||||||||||||||||||
7909 | { | - | ||||||||||||||||||||||||||||||||||||
7910 | - | |||||||||||||||||||||||||||||||||||||
7911 | - | |||||||||||||||||||||||||||||||||||||
7912 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7913 | QWindow *window = grabberWindow(q); | - | ||||||||||||||||||||||||||||||||||||
7914 | return never executed: windowreturn window ? window->setMouseGrabEnabled(grab) : false;
never executed: return window ? window->setMouseGrabEnabled(grab) : false; | 0 | ||||||||||||||||||||||||||||||||||||
7915 | } | - | ||||||||||||||||||||||||||||||||||||
7916 | void QWidget::releaseMouse() | - | ||||||||||||||||||||||||||||||||||||
7917 | { | - | ||||||||||||||||||||||||||||||||||||
7918 | releaseMouseGrabOfWidget(this); | - | ||||||||||||||||||||||||||||||||||||
7919 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7920 | void QWidget::grabKeyboard() | - | ||||||||||||||||||||||||||||||||||||
7921 | { | - | ||||||||||||||||||||||||||||||||||||
7922 | if (keyboardGrb
| 0 | ||||||||||||||||||||||||||||||||||||
7923 | keyboardGrb->releaseKeyboard(); never executed: keyboardGrb->releaseKeyboard(); | 0 | ||||||||||||||||||||||||||||||||||||
7924 | if (QWindow *window = grabberWindow(this)
| 0 | ||||||||||||||||||||||||||||||||||||
7925 | window->setKeyboardGrabEnabled(true); never executed: window->setKeyboardGrabEnabled(true); | 0 | ||||||||||||||||||||||||||||||||||||
7926 | keyboardGrb = this; | - | ||||||||||||||||||||||||||||||||||||
7927 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7928 | - | |||||||||||||||||||||||||||||||||||||
7929 | bool QWidgetPrivate::stealKeyboardGrab(bool grab) | - | ||||||||||||||||||||||||||||||||||||
7930 | { | - | ||||||||||||||||||||||||||||||||||||
7931 | - | |||||||||||||||||||||||||||||||||||||
7932 | - | |||||||||||||||||||||||||||||||||||||
7933 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
7934 | QWindow *window = grabberWindow(q); | - | ||||||||||||||||||||||||||||||||||||
7935 | return never executed: windowreturn window ? window->setKeyboardGrabEnabled(grab) : false;
never executed: return window ? window->setKeyboardGrabEnabled(grab) : false; | 0 | ||||||||||||||||||||||||||||||||||||
7936 | } | - | ||||||||||||||||||||||||||||||||||||
7937 | void QWidget::releaseKeyboard() | - | ||||||||||||||||||||||||||||||||||||
7938 | { | - | ||||||||||||||||||||||||||||||||||||
7939 | if (keyboardGrb == this
| 0 | ||||||||||||||||||||||||||||||||||||
7940 | if (QWindow *window = grabberWindow(this)
| 0 | ||||||||||||||||||||||||||||||||||||
7941 | window->setKeyboardGrabEnabled(false); never executed: window->setKeyboardGrabEnabled(false); | 0 | ||||||||||||||||||||||||||||||||||||
7942 | keyboardGrb = 0; | - | ||||||||||||||||||||||||||||||||||||
7943 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7944 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7945 | QWidget *QWidget::mouseGrabber() | - | ||||||||||||||||||||||||||||||||||||
7946 | { | - | ||||||||||||||||||||||||||||||||||||
7947 | if (qt_mouseGrb
| 0 | ||||||||||||||||||||||||||||||||||||
7948 | return never executed: qt_mouseGrb;return qt_mouseGrb; never executed: return qt_mouseGrb; | 0 | ||||||||||||||||||||||||||||||||||||
7949 | return never executed: qt_pressGrab;return qt_pressGrab; never executed: return qt_pressGrab; | 0 | ||||||||||||||||||||||||||||||||||||
7950 | } | - | ||||||||||||||||||||||||||||||||||||
7951 | QWidget *QWidget::keyboardGrabber() | - | ||||||||||||||||||||||||||||||||||||
7952 | { | - | ||||||||||||||||||||||||||||||||||||
7953 | return never executed: keyboardGrb;return keyboardGrb; never executed: return keyboardGrb; | 0 | ||||||||||||||||||||||||||||||||||||
7954 | } | - | ||||||||||||||||||||||||||||||||||||
7955 | void QWidget::activateWindow() | - | ||||||||||||||||||||||||||||||||||||
7956 | { | - | ||||||||||||||||||||||||||||||||||||
7957 | QWindow *const wnd = window()->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
7958 | - | |||||||||||||||||||||||||||||||||||||
7959 | if (wnd
| 0 | ||||||||||||||||||||||||||||||||||||
7960 | wnd->requestActivate(); never executed: wnd->requestActivate(); | 0 | ||||||||||||||||||||||||||||||||||||
7961 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7962 | int QWidget::metric(PaintDeviceMetric m) const | - | ||||||||||||||||||||||||||||||||||||
7963 | { | - | ||||||||||||||||||||||||||||||||||||
7964 | const QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
7965 | - | |||||||||||||||||||||||||||||||||||||
7966 | QWindow *topLevelWindow = 0; | - | ||||||||||||||||||||||||||||||||||||
7967 | QScreen *screen = 0; | - | ||||||||||||||||||||||||||||||||||||
7968 | if (QWidget *topLevel = window()
| 0 | ||||||||||||||||||||||||||||||||||||
7969 | topLevelWindow = topLevel->windowHandle(); | - | ||||||||||||||||||||||||||||||||||||
7970 | if (topLevelWindow
| 0 | ||||||||||||||||||||||||||||||||||||
7971 | screen = topLevelWindow->screen(); never executed: screen = topLevelWindow->screen(); | 0 | ||||||||||||||||||||||||||||||||||||
7972 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
7973 | if (!screen
| 0 | ||||||||||||||||||||||||||||||||||||
7974 | screen = QGuiApplication::primaryScreen(); never executed: screen = QGuiApplication::primaryScreen(); | 0 | ||||||||||||||||||||||||||||||||||||
7975 | - | |||||||||||||||||||||||||||||||||||||
7976 | if (!screen
| 0 | ||||||||||||||||||||||||||||||||||||
7977 | if (m == PdmDpiX
| 0 | ||||||||||||||||||||||||||||||||||||
7978 | return never executed: 72;return 72; never executed: return 72; | 0 | ||||||||||||||||||||||||||||||||||||
7979 | return never executed: QPaintDevice::metric(m);return QPaintDevice::metric(m); never executed: return QPaintDevice::metric(m); | 0 | ||||||||||||||||||||||||||||||||||||
7980 | } | - | ||||||||||||||||||||||||||||||||||||
7981 | int val; | - | ||||||||||||||||||||||||||||||||||||
7982 | if (m == PdmWidth
| 0 | ||||||||||||||||||||||||||||||||||||
7983 | val = data->crect.width(); | - | ||||||||||||||||||||||||||||||||||||
7984 | } never executed: else if (m == PdmWidthMMend of block
| 0 | ||||||||||||||||||||||||||||||||||||
7985 | val = data->crect.width() * screen->physicalSize().width() / screen->geometry().width(); | - | ||||||||||||||||||||||||||||||||||||
7986 | } never executed: else if (m == PdmHeightend of block
| 0 | ||||||||||||||||||||||||||||||||||||
7987 | val = data->crect.height(); | - | ||||||||||||||||||||||||||||||||||||
7988 | } never executed: else if (m == PdmHeightMMend of block
| 0 | ||||||||||||||||||||||||||||||||||||
7989 | val = data->crect.height() * screen->physicalSize().height() / screen->geometry().height(); | - | ||||||||||||||||||||||||||||||||||||
7990 | } never executed: else if (m == PdmDepthend of block
| 0 | ||||||||||||||||||||||||||||||||||||
7991 | return never executed: screen->depth();return screen->depth(); never executed: return screen->depth(); | 0 | ||||||||||||||||||||||||||||||||||||
7992 | } else if (m == PdmDpiX
| 0 | ||||||||||||||||||||||||||||||||||||
7993 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
7994 | return never executed: d->extra->customDpiX;return d->extra->customDpiX; never executed: return d->extra->customDpiX; | 0 | ||||||||||||||||||||||||||||||||||||
7995 | else if (d->parent
| 0 | ||||||||||||||||||||||||||||||||||||
7996 | return never executed: static_cast<QWidget *>(d->parent)->metric(m);return static_cast<QWidget *>(d->parent)->metric(m); never executed: return static_cast<QWidget *>(d->parent)->metric(m); | 0 | ||||||||||||||||||||||||||||||||||||
7997 | return never executed: qRound(screen->logicalDotsPerInchX());return qRound(screen->logicalDotsPerInchX()); never executed: return qRound(screen->logicalDotsPerInchX()); | 0 | ||||||||||||||||||||||||||||||||||||
7998 | } else if (m == PdmDpiY
| 0 | ||||||||||||||||||||||||||||||||||||
7999 | if (d->extra
| 0 | ||||||||||||||||||||||||||||||||||||
8000 | return never executed: d->extra->customDpiY;return d->extra->customDpiY; never executed: return d->extra->customDpiY; | 0 | ||||||||||||||||||||||||||||||||||||
8001 | else if (d->parent
| 0 | ||||||||||||||||||||||||||||||||||||
8002 | return never executed: static_cast<QWidget *>(d->parent)->metric(m);return static_cast<QWidget *>(d->parent)->metric(m); never executed: return static_cast<QWidget *>(d->parent)->metric(m); | 0 | ||||||||||||||||||||||||||||||||||||
8003 | return never executed: qRound(screen->logicalDotsPerInchY());return qRound(screen->logicalDotsPerInchY()); never executed: return qRound(screen->logicalDotsPerInchY()); | 0 | ||||||||||||||||||||||||||||||||||||
8004 | } else if (m == PdmPhysicalDpiX
| 0 | ||||||||||||||||||||||||||||||||||||
8005 | return never executed: qRound(screen->physicalDotsPerInchX());return qRound(screen->physicalDotsPerInchX()); never executed: return qRound(screen->physicalDotsPerInchX()); | 0 | ||||||||||||||||||||||||||||||||||||
8006 | } else if (m == PdmPhysicalDpiY
| 0 | ||||||||||||||||||||||||||||||||||||
8007 | return never executed: qRound(screen->physicalDotsPerInchY());return qRound(screen->physicalDotsPerInchY()); never executed: return qRound(screen->physicalDotsPerInchY()); | 0 | ||||||||||||||||||||||||||||||||||||
8008 | } else if (m == PdmDevicePixelRatio
| 0 | ||||||||||||||||||||||||||||||||||||
8009 | return never executed: topLevelWindowreturn topLevelWindow ? topLevelWindow->devicePixelRatio() : (static_cast<QApplication *>(QCoreApplication::instance()))->devicePixelRatio();
never executed: return topLevelWindow ? topLevelWindow->devicePixelRatio() : (static_cast<QApplication *>(QCoreApplication::instance()))->devicePixelRatio(); | 0 | ||||||||||||||||||||||||||||||||||||
8010 | } else if (m == PdmDevicePixelRatioScaled
| 0 | ||||||||||||||||||||||||||||||||||||
8011 | return never executed: (QPaintDevice::devicePixelRatioFScale() *return (QPaintDevice::devicePixelRatioFScale() * (topLevelWindow ? topLevelWindow->devicePixelRatio() : (static_cast<QApplication *>(QCoreApplication::instance()))->devicePixelRatio())); never executed: return (QPaintDevice::devicePixelRatioFScale() * (topLevelWindow ? topLevelWindow->devicePixelRatio() : (static_cast<QApplication *>(QCoreApplication::instance()))->devicePixelRatio())); | 0 | ||||||||||||||||||||||||||||||||||||
8012 | (topLevelWindow ? topLevelWindow->devicePixelRatio() : (static_cast<QApplication *>(QCoreApplication::instance()))->devicePixelRatio())); never executed: return (QPaintDevice::devicePixelRatioFScale() * (topLevelWindow ? topLevelWindow->devicePixelRatio() : (static_cast<QApplication *>(QCoreApplication::instance()))->devicePixelRatio())); | 0 | ||||||||||||||||||||||||||||||||||||
8013 | } else { | - | ||||||||||||||||||||||||||||||||||||
8014 | val = QPaintDevice::metric(m); | - | ||||||||||||||||||||||||||||||||||||
8015 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8016 | return never executed: val;return val; never executed: return val; | 0 | ||||||||||||||||||||||||||||||||||||
8017 | } | - | ||||||||||||||||||||||||||||||||||||
8018 | - | |||||||||||||||||||||||||||||||||||||
8019 | - | |||||||||||||||||||||||||||||||||||||
8020 | - | |||||||||||||||||||||||||||||||||||||
8021 | - | |||||||||||||||||||||||||||||||||||||
8022 | - | |||||||||||||||||||||||||||||||||||||
8023 | - | |||||||||||||||||||||||||||||||||||||
8024 | void QWidget::initPainter(QPainter *painter) const | - | ||||||||||||||||||||||||||||||||||||
8025 | { | - | ||||||||||||||||||||||||||||||||||||
8026 | const QPalette &pal = palette(); | - | ||||||||||||||||||||||||||||||||||||
8027 | painter->d_func()->state->pen = QPen(pal.brush(foregroundRole()), 1); | - | ||||||||||||||||||||||||||||||||||||
8028 | painter->d_func()->state->bgBrush = pal.brush(backgroundRole()); | - | ||||||||||||||||||||||||||||||||||||
8029 | QFont f(font(), const_cast<QWidget *>(this)); | - | ||||||||||||||||||||||||||||||||||||
8030 | painter->d_func()->state->deviceFont = f; | - | ||||||||||||||||||||||||||||||||||||
8031 | painter->d_func()->state->font = f; | - | ||||||||||||||||||||||||||||||||||||
8032 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8033 | - | |||||||||||||||||||||||||||||||||||||
8034 | - | |||||||||||||||||||||||||||||||||||||
8035 | - | |||||||||||||||||||||||||||||||||||||
8036 | - | |||||||||||||||||||||||||||||||||||||
8037 | - | |||||||||||||||||||||||||||||||||||||
8038 | - | |||||||||||||||||||||||||||||||||||||
8039 | QPaintDevice *QWidget::redirected(QPoint *offset) const | - | ||||||||||||||||||||||||||||||||||||
8040 | { | - | ||||||||||||||||||||||||||||||||||||
8041 | return never executed: d_func()->redirected(offset);return d_func()->redirected(offset); never executed: return d_func()->redirected(offset); | 0 | ||||||||||||||||||||||||||||||||||||
8042 | } | - | ||||||||||||||||||||||||||||||||||||
8043 | - | |||||||||||||||||||||||||||||||||||||
8044 | - | |||||||||||||||||||||||||||||||||||||
8045 | - | |||||||||||||||||||||||||||||||||||||
8046 | - | |||||||||||||||||||||||||||||||||||||
8047 | - | |||||||||||||||||||||||||||||||||||||
8048 | - | |||||||||||||||||||||||||||||||||||||
8049 | QPainter *QWidget::sharedPainter() const | - | ||||||||||||||||||||||||||||||||||||
8050 | { | - | ||||||||||||||||||||||||||||||||||||
8051 | - | |||||||||||||||||||||||||||||||||||||
8052 | if (!d_func()->redirectDev
| 0 | ||||||||||||||||||||||||||||||||||||
8053 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
8054 | - | |||||||||||||||||||||||||||||||||||||
8055 | QPainter *sp = d_func()->sharedPainter(); | - | ||||||||||||||||||||||||||||||||||||
8056 | if (!sp
| 0 | ||||||||||||||||||||||||||||||||||||
8057 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
8058 | - | |||||||||||||||||||||||||||||||||||||
8059 | if (sp->paintEngine()->paintDevice() != d_func()->redirectDev
| 0 | ||||||||||||||||||||||||||||||||||||
8060 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
8061 | - | |||||||||||||||||||||||||||||||||||||
8062 | return never executed: sp;return sp; never executed: return sp; | 0 | ||||||||||||||||||||||||||||||||||||
8063 | } | - | ||||||||||||||||||||||||||||||||||||
8064 | void QWidget::setMask(const QRegion &newMask) | - | ||||||||||||||||||||||||||||||||||||
8065 | { | - | ||||||||||||||||||||||||||||||||||||
8066 | QWidgetPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||
8067 | - | |||||||||||||||||||||||||||||||||||||
8068 | d->createExtra(); | - | ||||||||||||||||||||||||||||||||||||
8069 | if (newMask == d->extra->mask
| 0 | ||||||||||||||||||||||||||||||||||||
8070 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
8071 | - | |||||||||||||||||||||||||||||||||||||
8072 | - | |||||||||||||||||||||||||||||||||||||
8073 | const QRegion oldMask(d->extra->mask); | - | ||||||||||||||||||||||||||||||||||||
8074 | - | |||||||||||||||||||||||||||||||||||||
8075 | - | |||||||||||||||||||||||||||||||||||||
8076 | d->extra->mask = newMask; | - | ||||||||||||||||||||||||||||||||||||
8077 | d->extra->hasMask = !newMask.isEmpty(); | - | ||||||||||||||||||||||||||||||||||||
8078 | - | |||||||||||||||||||||||||||||||||||||
8079 | - | |||||||||||||||||||||||||||||||||||||
8080 | if (!testAttribute(Qt::WA_WState_Created)
| 0 | ||||||||||||||||||||||||||||||||||||
8081 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
8082 | - | |||||||||||||||||||||||||||||||||||||
8083 | - | |||||||||||||||||||||||||||||||||||||
8084 | d->setMask_sys(newMask); | - | ||||||||||||||||||||||||||||||||||||
8085 | - | |||||||||||||||||||||||||||||||||||||
8086 | - | |||||||||||||||||||||||||||||||||||||
8087 | if (!isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
8088 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
8089 | - | |||||||||||||||||||||||||||||||||||||
8090 | if (!d->extra->hasMask
| 0 | ||||||||||||||||||||||||||||||||||||
8091 | - | |||||||||||||||||||||||||||||||||||||
8092 | QRegion expose(rect()); | - | ||||||||||||||||||||||||||||||||||||
8093 | expose -= oldMask; | - | ||||||||||||||||||||||||||||||||||||
8094 | if (!expose.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
8095 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
8096 | update(expose); | - | ||||||||||||||||||||||||||||||||||||
8097 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8098 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
8099 | } | - | ||||||||||||||||||||||||||||||||||||
8100 | - | |||||||||||||||||||||||||||||||||||||
8101 | if (!isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
8102 | - | |||||||||||||||||||||||||||||||||||||
8103 | QRegion parentExpose(rect()); | - | ||||||||||||||||||||||||||||||||||||
8104 | parentExpose -= newMask; | - | ||||||||||||||||||||||||||||||||||||
8105 | if (!parentExpose.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
8106 | d->setDirtyOpaqueRegion(); | - | ||||||||||||||||||||||||||||||||||||
8107 | parentExpose.translate(data->crect.topLeft()); | - | ||||||||||||||||||||||||||||||||||||
8108 | parentWidget()->update(parentExpose); | - | ||||||||||||||||||||||||||||||||||||
8109 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8110 | - | |||||||||||||||||||||||||||||||||||||
8111 | - | |||||||||||||||||||||||||||||||||||||
8112 | if (!oldMask.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
8113 | update(newMask - oldMask); never executed: update(newMask - oldMask); | 0 | ||||||||||||||||||||||||||||||||||||
8114 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8115 | - | |||||||||||||||||||||||||||||||||||||
8116 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8117 | - | |||||||||||||||||||||||||||||||||||||
8118 | void QWidgetPrivate::setMask_sys(const QRegion ®ion) | - | ||||||||||||||||||||||||||||||||||||
8119 | { | - | ||||||||||||||||||||||||||||||||||||
8120 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
8121 | if (QWindow *window = q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
8122 | window->setMask(region); never executed: window->setMask(region); | 0 | ||||||||||||||||||||||||||||||||||||
8123 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8124 | void QWidget::setMask(const QBitmap &bitmap) | - | ||||||||||||||||||||||||||||||||||||
8125 | { | - | ||||||||||||||||||||||||||||||||||||
8126 | setMask(QRegion(bitmap)); | - | ||||||||||||||||||||||||||||||||||||
8127 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8128 | void QWidget::clearMask() | - | ||||||||||||||||||||||||||||||||||||
8129 | { | - | ||||||||||||||||||||||||||||||||||||
8130 | setMask(QRegion()); | - | ||||||||||||||||||||||||||||||||||||
8131 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8132 | - | |||||||||||||||||||||||||||||||||||||
8133 | void QWidgetPrivate::setWidgetParentHelper(QObject *widgetAsObject, QObject *newParent) | - | ||||||||||||||||||||||||||||||||||||
8134 | { | - | ||||||||||||||||||||||||||||||||||||
8135 | ((!(widgetAsObject->isWidgetType())) ? qt_assert("widgetAsObject->isWidgetType()",__FILE__,12917) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
8136 | ((!(!newParent || newParent->isWidgetType())) ? qt_assert("!newParent || newParent->isWidgetType()",__FILE__,12918) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||
8137 | QWidget *widget = static_cast<QWidget*>(widgetAsObject); | - | ||||||||||||||||||||||||||||||||||||
8138 | widget->setParent(static_cast<QWidget*>(newParent)); | - | ||||||||||||||||||||||||||||||||||||
8139 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8140 | - | |||||||||||||||||||||||||||||||||||||
8141 | void QWidgetPrivate::setNetWmWindowTypes(bool skipIfMissing) | - | ||||||||||||||||||||||||||||||||||||
8142 | { | - | ||||||||||||||||||||||||||||||||||||
8143 | QWidget * const q = q_func(); | - | ||||||||||||||||||||||||||||||||||||
8144 | - | |||||||||||||||||||||||||||||||||||||
8145 | if (!q->windowHandle()
| 0 | ||||||||||||||||||||||||||||||||||||
8146 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
8147 | - | |||||||||||||||||||||||||||||||||||||
8148 | int wmWindowType = 0; | - | ||||||||||||||||||||||||||||||||||||
8149 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDesktop)
| 0 | ||||||||||||||||||||||||||||||||||||
8150 | wmWindowType |= QXcbWindowFunctions::Desktop; never executed: wmWindowType |= QXcbWindowFunctions::Desktop; | 0 | ||||||||||||||||||||||||||||||||||||
8151 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDock)
| 0 | ||||||||||||||||||||||||||||||||||||
8152 | wmWindowType |= QXcbWindowFunctions::Dock; never executed: wmWindowType |= QXcbWindowFunctions::Dock; | 0 | ||||||||||||||||||||||||||||||||||||
8153 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeToolBar)
| 0 | ||||||||||||||||||||||||||||||||||||
8154 | wmWindowType |= QXcbWindowFunctions::Toolbar; never executed: wmWindowType |= QXcbWindowFunctions::Toolbar; | 0 | ||||||||||||||||||||||||||||||||||||
8155 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeMenu)
| 0 | ||||||||||||||||||||||||||||||||||||
8156 | wmWindowType |= QXcbWindowFunctions::Menu; never executed: wmWindowType |= QXcbWindowFunctions::Menu; | 0 | ||||||||||||||||||||||||||||||||||||
8157 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeUtility)
| 0 | ||||||||||||||||||||||||||||||||||||
8158 | wmWindowType |= QXcbWindowFunctions::Utility; never executed: wmWindowType |= QXcbWindowFunctions::Utility; | 0 | ||||||||||||||||||||||||||||||||||||
8159 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeSplash)
| 0 | ||||||||||||||||||||||||||||||||||||
8160 | wmWindowType |= QXcbWindowFunctions::Splash; never executed: wmWindowType |= QXcbWindowFunctions::Splash; | 0 | ||||||||||||||||||||||||||||||||||||
8161 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDialog)
| 0 | ||||||||||||||||||||||||||||||||||||
8162 | wmWindowType |= QXcbWindowFunctions::Dialog; never executed: wmWindowType |= QXcbWindowFunctions::Dialog; | 0 | ||||||||||||||||||||||||||||||||||||
8163 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu)
| 0 | ||||||||||||||||||||||||||||||||||||
8164 | wmWindowType |= QXcbWindowFunctions::DropDownMenu; never executed: wmWindowType |= QXcbWindowFunctions::DropDownMenu; | 0 | ||||||||||||||||||||||||||||||||||||
8165 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypePopupMenu)
| 0 | ||||||||||||||||||||||||||||||||||||
8166 | wmWindowType |= QXcbWindowFunctions::PopupMenu; never executed: wmWindowType |= QXcbWindowFunctions::PopupMenu; | 0 | ||||||||||||||||||||||||||||||||||||
8167 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeToolTip)
| 0 | ||||||||||||||||||||||||||||||||||||
8168 | wmWindowType |= QXcbWindowFunctions::Tooltip; never executed: wmWindowType |= QXcbWindowFunctions::Tooltip; | 0 | ||||||||||||||||||||||||||||||||||||
8169 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeNotification)
| 0 | ||||||||||||||||||||||||||||||||||||
8170 | wmWindowType |= QXcbWindowFunctions::Notification; never executed: wmWindowType |= QXcbWindowFunctions::Notification; | 0 | ||||||||||||||||||||||||||||||||||||
8171 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeCombo)
| 0 | ||||||||||||||||||||||||||||||||||||
8172 | wmWindowType |= QXcbWindowFunctions::Combo; never executed: wmWindowType |= QXcbWindowFunctions::Combo; | 0 | ||||||||||||||||||||||||||||||||||||
8173 | if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDND)
| 0 | ||||||||||||||||||||||||||||||||||||
8174 | wmWindowType |= QXcbWindowFunctions::Dnd; never executed: wmWindowType |= QXcbWindowFunctions::Dnd; | 0 | ||||||||||||||||||||||||||||||||||||
8175 | - | |||||||||||||||||||||||||||||||||||||
8176 | if (wmWindowType == 0
| 0 | ||||||||||||||||||||||||||||||||||||
8177 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
8178 | - | |||||||||||||||||||||||||||||||||||||
8179 | QXcbWindowFunctions::setWmWindowType(q->windowHandle(), static_cast<QXcbWindowFunctions::WmWindowType>(wmWindowType)); | - | ||||||||||||||||||||||||||||||||||||
8180 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8181 | - | |||||||||||||||||||||||||||||||||||||
8182 | - | |||||||||||||||||||||||||||||||||||||
8183 | - | |||||||||||||||||||||||||||||||||||||
8184 | static inline void formatWidgetAttributes(QDebug debug, const QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
8185 | { | - | ||||||||||||||||||||||||||||||||||||
8186 | const QMetaObject *qtMo = qt_getEnumMetaObject(Qt::WA_AttributeCount); | - | ||||||||||||||||||||||||||||||||||||
8187 | const QMetaEnum me = qtMo->enumerator(qtMo->indexOfEnumerator("WidgetAttribute")); | - | ||||||||||||||||||||||||||||||||||||
8188 | debug << ", attributes=["; | - | ||||||||||||||||||||||||||||||||||||
8189 | int count = 0; | - | ||||||||||||||||||||||||||||||||||||
8190 | for (int a = 0; a < Qt::WA_AttributeCount
| 0 | ||||||||||||||||||||||||||||||||||||
8191 | if (widget->testAttribute(static_cast<Qt::WidgetAttribute>(a))
| 0 | ||||||||||||||||||||||||||||||||||||
8192 | if (count++
| 0 | ||||||||||||||||||||||||||||||||||||
8193 | debug << ','; never executed: debug << ','; | 0 | ||||||||||||||||||||||||||||||||||||
8194 | debug << me.valueToKey(a); | - | ||||||||||||||||||||||||||||||||||||
8195 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8196 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8197 | debug << ']'; | - | ||||||||||||||||||||||||||||||||||||
8198 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8199 | - | |||||||||||||||||||||||||||||||||||||
8200 | QDebug operator<<(QDebug debug, const QWidget *widget) | - | ||||||||||||||||||||||||||||||||||||
8201 | { | - | ||||||||||||||||||||||||||||||||||||
8202 | const QDebugStateSaver saver(debug); | - | ||||||||||||||||||||||||||||||||||||
8203 | debug.nospace(); | - | ||||||||||||||||||||||||||||||||||||
8204 | if (widget
| 0 | ||||||||||||||||||||||||||||||||||||
8205 | debug << widget->metaObject()->className() << '(' << (const void *)widget; | - | ||||||||||||||||||||||||||||||||||||
8206 | if (!widget->objectName().isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||
8207 | debug << ", name=" << widget->objectName(); never executed: debug << ", name=" << widget->objectName(); | 0 | ||||||||||||||||||||||||||||||||||||
8208 | if (debug.verbosity() > 2
| 0 | ||||||||||||||||||||||||||||||||||||
8209 | const QRect geometry = widget->geometry(); | - | ||||||||||||||||||||||||||||||||||||
8210 | const QRect frameGeometry = widget->frameGeometry(); | - | ||||||||||||||||||||||||||||||||||||
8211 | if (widget->isVisible()
| 0 | ||||||||||||||||||||||||||||||||||||
8212 | debug << ", visible"; never executed: debug << ", visible"; | 0 | ||||||||||||||||||||||||||||||||||||
8213 | if (!widget->isEnabled()
| 0 | ||||||||||||||||||||||||||||||||||||
8214 | debug << ", disabled"; never executed: debug << ", disabled"; | 0 | ||||||||||||||||||||||||||||||||||||
8215 | debug << ", states=" << widget->windowState() | - | ||||||||||||||||||||||||||||||||||||
8216 | << ", type=" << widget->windowType() << ", flags=" << widget->windowFlags(); | - | ||||||||||||||||||||||||||||||||||||
8217 | formatWidgetAttributes(debug, widget); | - | ||||||||||||||||||||||||||||||||||||
8218 | if (widget->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||
8219 | debug << ", window"; never executed: debug << ", window"; | 0 | ||||||||||||||||||||||||||||||||||||
8220 | debug << ", " << geometry.width() << 'x' << geometry.height() | - | ||||||||||||||||||||||||||||||||||||
8221 | << forcesign << geometry.x() << geometry.y() << noforcesign; | - | ||||||||||||||||||||||||||||||||||||
8222 | if (frameGeometry != geometry
| 0 | ||||||||||||||||||||||||||||||||||||
8223 | const QMargins margins(geometry.x() - frameGeometry.x(), | - | ||||||||||||||||||||||||||||||||||||
8224 | geometry.y() - frameGeometry.y(), | - | ||||||||||||||||||||||||||||||||||||
8225 | frameGeometry.right() - geometry.right(), | - | ||||||||||||||||||||||||||||||||||||
8226 | frameGeometry.bottom() - geometry.bottom()); | - | ||||||||||||||||||||||||||||||||||||
8227 | debug << ", margins=" << margins; | - | ||||||||||||||||||||||||||||||||||||
8228 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8229 | debug << ", devicePixelRatio=" << widget->devicePixelRatioF(); | - | ||||||||||||||||||||||||||||||||||||
8230 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||
8231 | debug << ", winId=0x" << hex << wid << dec; never executed: debug << ", winId=0x" << hex << wid << dec; | 0 | ||||||||||||||||||||||||||||||||||||
8232 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8233 | debug << ')'; | - | ||||||||||||||||||||||||||||||||||||
8234 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
8235 | debug << "QWidget(0x0)"; | - | ||||||||||||||||||||||||||||||||||||
8236 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
8237 | return never executed: debug;return debug; never executed: return debug; | 0 | ||||||||||||||||||||||||||||||||||||
8238 | } | - | ||||||||||||||||||||||||||||||||||||
8239 | - | |||||||||||||||||||||||||||||||||||||
8240 | - | |||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |