qapplication.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/kernel/qapplication.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
18-
19-
20-
21-
22-
23-
24-
25static void initResources()-
26{-
27-
28-
29-
30 do { extern int qInitResources_qstyle (); qInitResources_qstyle (); } while (0);-
31-
32 do { extern int qInitResources_qmessagebox (); qInitResources_qmessagebox (); } while (0);-
33-
34}
never executed: end of block
0
35-
36-
37__attribute__((visibility("default"))) void qt_call_post_routines();-
38-
39QApplicationPrivate *QApplicationPrivate::self = 0;-
40-
41static void initSystemPalette()-
42{-
43 if (!QApplicationPrivate::sys_pal
!QApplicationPrivate::sys_palDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
44 QPalette defaultPlatte;-
45 if (QApplicationPrivate::app_style
QApplicationPrivate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
46 defaultPlatte = QApplicationPrivate::app_style->standardPalette();
never executed: defaultPlatte = QApplicationPrivate::app_style->standardPalette();
0
47 if (const
const QPalette...e()->palette()Description
TRUEnever evaluated
FALSEnever evaluated
QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette()
const QPalette...e()->palette()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
48 QApplicationPrivate::setSystemPalette(themePalette->resolve(defaultPlatte));-
49 QApplicationPrivate::initializeWidgetPaletteHash();-
50 }
never executed: end of block
else {
0
51 QApplicationPrivate::setSystemPalette(defaultPlatte);-
52 }
never executed: end of block
0
53 }-
54}
never executed: end of block
0
55-
56static void clearSystemPalette()-
57{-
58 delete QApplicationPrivate::sys_pal;-
59 QApplicationPrivate::sys_pal = 0;-
60}
never executed: end of block
0
61-
62static QByteArray get_style_class_name()-
63{-
64 QScopedPointer<QStyle> s(QStyleFactory::create(QApplicationPrivate::desktopStyleKey()));-
65 if (!s.isNull()
!s.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
66 return
never executed: return s->metaObject()->className();
s->metaObject()->className();
never executed: return s->metaObject()->className();
0
67 return
never executed: return QByteArray();
QByteArray();
never executed: return QByteArray();
0
68}-
69-
70static QByteArray nativeStyleClassName()-
71{-
72 static QByteArray name = get_style_class_name();-
73 return
never executed: return name;
name;
never executed: return name;
0
74}-
75-
76-
77-
78-
79-
80bool QApplicationPrivate::autoSipEnabled = true;-
81-
82-
83QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, int flags)-
84 : QGuiApplicationPrivate(argc, argv, flags)-
85{-
86 application_type = QApplicationPrivate::Gui;-
87-
88-
89 gestureManager = 0;-
90 gestureWidget = 0;-
91-
92-
93 if (!self
!selfDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
94 self = this;
never executed: self = this;
0
95}
never executed: end of block
0
96-
97QApplicationPrivate::~QApplicationPrivate()-
98{-
99 if (self == this
self == thisDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
100 self = 0;
never executed: self = 0;
0
101}
never executed: end of block
0
102-
103void QApplicationPrivate::createEventDispatcher()-
104{-
105 QGuiApplicationPrivate::createEventDispatcher();-
106}
never executed: end of block
0
107QWidget *QApplication::topLevelAt(const QPoint &pos)-
108{-
109 if (const
const QWindow ...opLevelAt(pos)Description
TRUEnever evaluated
FALSEnever evaluated
QWindow *window = QGuiApplication::topLevelAt(pos)
const QWindow ...opLevelAt(pos)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
110 if (const
const QWidgetW...dow *>(window)Description
TRUEnever evaluated
FALSEnever evaluated
QWidgetWindow *widgetWindow = qobject_cast<const QWidgetWindow *>(window)
const QWidgetW...dow *>(window)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
111 return
never executed: return widgetWindow->widget();
widgetWindow->widget();
never executed: return widgetWindow->widget();
0
112 }
never executed: end of block
0
113 return
never executed: return 0;
0;
never executed: return 0;
0
114}-
115void qt_init(QApplicationPrivate *priv, int type-
116 );-
117void qt_init_tooltip_palette();-
118void qt_cleanup();-
119-
120QStyle *QApplicationPrivate::app_style = 0;-
121bool QApplicationPrivate::overrides_native_style = false;-
122-
123-
124QString QApplicationPrivate::styleSheet;-
125-
126QPointer<QWidget> QApplicationPrivate::leaveAfterRelease = 0;-
127-
128int QApplicationPrivate::app_cspec = QApplication::NormalColor;-
129-
130QPalette *QApplicationPrivate::sys_pal = 0;-
131QPalette *QApplicationPrivate::set_pal = 0;-
132-
133QFont *QApplicationPrivate::sys_font = 0;-
134QFont *QApplicationPrivate::set_font = 0;-
135-
136QWidget *QApplicationPrivate::main_widget = 0;-
137QWidget *QApplicationPrivate::focus_widget = 0;-
138QWidget *QApplicationPrivate::hidden_focus_widget = 0;-
139QWidget *QApplicationPrivate::active_window = 0;-
140-
141int QApplicationPrivate::wheel_scroll_lines;-
142QPointer<QWidget> QApplicationPrivate::wheel_widget;-
143-
144bool qt_in_tab_key_event = false;-
145int qt_antialiasing_threshold = -1;-
146QSize QApplicationPrivate::app_strut = QSize(0,0);-
147int QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;-
148bool QApplicationPrivate::widgetCount = false;-
149-
150-
151-
152-
153-
154inline bool QApplicationPrivate::isAlien(QWidget *widget)-
155{-
156 return
never executed: return widget && !widget->isWindow();
widget && !widget->isWindow();
never executed: return widget && !widget->isWindow();
0
157}-
158-
159bool __attribute__((visibility("default"))) qt_tab_all_widgets()-
160{-
161 return
never executed: return QGuiApplication::styleHints()->tabFocusBehavior() == Qt::TabFocusAllControls;
QGuiApplication::styleHints()->tabFocusBehavior() == Qt::TabFocusAllControls;
never executed: return QGuiApplication::styleHints()->tabFocusBehavior() == Qt::TabFocusAllControls;
0
162}-
163-
164-
165-
166namespace { namespace Q_QGS_app_palettes { typedef PaletteHash Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<PaletteHash, Q_QGS_app_palettes::innerFunction, Q_QGS_app_palettes::guard> app_palettes;
0
167PaletteHash *qt_app_palettes_hash()-
168{-
169 return
never executed: return app_palettes();
app_palettes();
never executed: return app_palettes();
0
170}-
171-
172namespace { namespace Q_QGS_app_fonts { typedef FontHash Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<FontHash, Q_QGS_app_fonts::innerFunction, Q_QGS_app_fonts::guard> app_fonts;
0
173FontHash *qt_app_fonts_hash()-
174{-
175 return
never executed: return app_fonts();
app_fonts();
never executed: return app_fonts();
0
176}-
177-
178QWidgetList *QApplicationPrivate::popupWidgets = 0;-
179-
180QDesktopWidget *qt_desktopWidget = 0;-
181-
182-
183-
184-
185void QApplicationPrivate::process_cmdline()-
186{-
187 if (styleOverride.isEmpty()
styleOverride.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& qEnvironmentVariableIsSet("QT_STYLE_OVERRIDE")
qEnvironmentVa...YLE_OVERRIDE")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
188 styleOverride = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
never executed: styleOverride = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
0
189-
190 if (!styleOverride.isEmpty()
!styleOverride.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
191 if (app_style
app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
192 delete app_style;-
193 app_style = 0;-
194 }
never executed: end of block
0
195 }
never executed: end of block
0
196-
197-
198 if (!qt_is_gui_used
!qt_is_gui_usedDescription
TRUEnever evaluated
FALSEnever evaluated
|| !argc
!argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
199 return;
never executed: return;
0
200-
201 int i, j;-
202-
203 j = 1;-
204 for (i=1; i<argc
i<argcDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
205 if (!argv[i]
!argv[i]Description
TRUEnever evaluated
FALSEnever evaluated
)
0
206 continue;
never executed: continue;
0
207 if (*
*argv[i] != '-'Description
TRUEnever evaluated
FALSEnever evaluated
argv[i] != '-'
*argv[i] != '-'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
208 argv[j++] = argv[i];-
209 continue;
never executed: continue;
0
210 }-
211 const char *arg = argv[i];-
212 if (arg[1] == '-'
arg[1] == '-'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
213 ++
never executed: ++arg;
arg;
never executed: ++arg;
0
214 if (strcmp(arg, "-qdevel") == 0
strcmp(arg, "-qdevel") == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| strcmp(arg, "-qdebug") == 0
strcmp(arg, "-qdebug") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
215-
216-
217 }
never executed: end of block
else if (strcmp(arg, "-stylesheet") == 0
strcmp(arg, "-...lesheet") == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& i < argc -1
i < argc -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
218 styleSheet = QLatin1String("file:///");-
219 styleSheet.append(QString::fromLocal8Bit(argv[++i]));-
220 }
never executed: end of block
else if (strncmp(arg, "-stylesheet=", 12) == 0
strncmp(arg, "...et=", 12) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
221 styleSheet = QLatin1String("file:///");-
222 styleSheet.append(QString::fromLocal8Bit(arg + 12));-
223-
224 }
never executed: end of block
else if (qstrcmp(arg, "-widgetcount") == 0
qstrcmp(arg, "...etcount") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
225 widgetCount = true;-
226 }
never executed: end of block
else {
0
227 argv[j++] = argv[i];-
228 }
never executed: end of block
0
229 }-
230-
231 if(j < argc
j < argcDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
232 argv[j] = 0;-
233 argc = j;-
234 }
never executed: end of block
0
235}
never executed: end of block
0
236QApplication::QApplication(int &argc, char **argv, int _internal)-
237-
238 : QGuiApplication(*new QApplicationPrivate(argc, argv, _internal))-
239{-
240 QApplicationPrivate * const d = d_func();-
241 d->init();-
242}
never executed: end of block
0
243-
244-
245-
246-
247void QApplicationPrivate::init()-
248{-
249 QGuiApplicationPrivate::init();-
250-
251 initResources();-
252-
253 qt_is_gui_used = (application_type != QApplicationPrivate::Tty);-
254 process_cmdline();-
255-
256-
257 qt_init(this, application_type);-
258 initialize();-
259 eventDispatcher->startingUp();-
260-
261-
262-
263-
264-
265-
266-
267 QAccessible::installFactory(&qAccessibleFactory);-
268-
269-
270}
never executed: end of block
0
271-
272void qt_init(QApplicationPrivate *priv, int type)-
273{-
274 (void)priv;;-
275 (void)type;;-
276-
277 QColormap::initialize();-
278-
279 qt_init_tooltip_palette();-
280-
281 QApplicationPrivate::initializeWidgetFontHash();-
282}
never executed: end of block
0
283-
284void qt_init_tooltip_palette()-
285{-
286-
287 if (const
const QPalette...oolTipPalette)Description
TRUEnever evaluated
FALSEnever evaluated
QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette)
const QPalette...oolTipPalette)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
288 QToolTip::setPalette(*toolTipPalette);
never executed: QToolTip::setPalette(*toolTipPalette);
0
289-
290}
never executed: end of block
0
291-
292-
293void qRegisterGuiStateMachine();-
294void qUnregisterGuiStateMachine();-
295-
296extern void qRegisterWidgetsVariant();-
297-
298-
299-
300-
301-
302-
303void QApplicationPrivate::initialize()-
304{-
305 is_app_running = false;-
306-
307 QWidgetPrivate::mapper = new QWidgetMapper;-
308 QWidgetPrivate::allWidgets = new QWidgetSet;-
309-
310-
311 qRegisterWidgetsVariant();-
312-
313-
314 QAbstractDeclarativeData::setWidgetParent = QWidgetPrivate::setWidgetParentHelper;-
315-
316 if (application_type != QApplicationPrivate::Tty
application_ty...onPrivate::TtyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
317 (
never executed: (void) QApplication::style();
void) QApplication::style();
never executed: (void) QApplication::style();
0
318-
319-
320 qRegisterGuiStateMachine();-
321-
322-
323 if (qEnvironmentVariableIntValue("QT_USE_NATIVE_WINDOWS") > 0
qEnvironmentVa..._WINDOWS") > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
324 QCoreApplication::setAttribute(Qt::AA_NativeWindows);
never executed: QCoreApplication::setAttribute(Qt::AA_NativeWindows);
0
325 QApplicationPrivate::wheel_scroll_lines = 3;-
326-
327-
328 if (qt_is_gui_used
qt_is_gui_usedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
329 initializeMultitouch();
never executed: initializeMultitouch();
0
330-
331 if (QApplication::desktopSettingsAware()
QApplication::...ettingsAware()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
332 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
333 QApplicationPrivate::enabledAnimations = theme->themeHint(QPlatformTheme::UiEffects).toInt();-
334-
335 QApplicationPrivate::wheel_scroll_lines = theme->themeHint(QPlatformTheme::WheelScrollLines).toInt();-
336-
337 }
never executed: end of block
0
338-
339 is_app_running = true;-
340}
never executed: end of block
0
341-
342static void setPossiblePalette(const QPalette *palette, const char *className)-
343{-
344 if (palette == 0
palette == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
345 return;
never executed: return;
0
346 QApplicationPrivate::setPalette_helper(*palette, className, false);-
347}
never executed: end of block
0
348-
349void QApplicationPrivate::initializeWidgetPaletteHash()-
350{-
351 QPlatformTheme *platformTheme = QGuiApplicationPrivate::platformTheme();-
352 if (!platformTheme
!platformThemeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
353 return;
never executed: return;
0
354 qt_app_palettes_hash()->clear();-
355-
356 setPossiblePalette(platformTheme->palette(QPlatformTheme::ToolButtonPalette), "QToolButton");-
357 setPossiblePalette(platformTheme->palette(QPlatformTheme::ButtonPalette), "QAbstractButton");-
358 setPossiblePalette(platformTheme->palette(QPlatformTheme::CheckBoxPalette), "QCheckBox");-
359 setPossiblePalette(platformTheme->palette(QPlatformTheme::RadioButtonPalette), "QRadioButton");-
360 setPossiblePalette(platformTheme->palette(QPlatformTheme::HeaderPalette), "QHeaderView");-
361 setPossiblePalette(platformTheme->palette(QPlatformTheme::ItemViewPalette), "QAbstractItemView");-
362 setPossiblePalette(platformTheme->palette(QPlatformTheme::MessageBoxLabelPalette), "QMessageBoxLabel");-
363 setPossiblePalette(platformTheme->palette(QPlatformTheme::TabBarPalette), "QTabBar");-
364 setPossiblePalette(platformTheme->palette(QPlatformTheme::LabelPalette), "QLabel");-
365 setPossiblePalette(platformTheme->palette(QPlatformTheme::GroupBoxPalette), "QGroupBox");-
366 setPossiblePalette(platformTheme->palette(QPlatformTheme::MenuPalette), "QMenu");-
367 setPossiblePalette(platformTheme->palette(QPlatformTheme::MenuBarPalette), "QMenuBar");-
368 setPossiblePalette(platformTheme->palette(QPlatformTheme::TextEditPalette), "QTextEdit");-
369 setPossiblePalette(platformTheme->palette(QPlatformTheme::TextEditPalette), "QTextControl");-
370 setPossiblePalette(platformTheme->palette(QPlatformTheme::TextLineEditPalette), "QLineEdit");-
371}
never executed: end of block
0
372-
373void QApplicationPrivate::initializeWidgetFontHash()-
374{-
375 const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme();-
376 if (!theme
!themeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
377 return;
never executed: return;
0
378 FontHash *fontHash = qt_app_fonts_hash();-
379 fontHash->clear();-
380-
381 if (const
const QFont *f...eme::MenuFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::MenuFont)
const QFont *f...eme::MenuFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
382 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMenu") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMenu" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMenu") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMenu" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
383 if (const
const QFont *f...::MenuBarFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::MenuBarFont)
const QFont *f...::MenuBarFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
384 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMenuBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMenuBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMenuBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMenuBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
385 if (const
const QFont *f...:MenuItemFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::MenuItemFont)
const QFont *f...:MenuItemFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
386 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMenuItem") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMenuItem" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMenuItem") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMenuItem" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
387 if (const
const QFont *f...essageBoxFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::MessageBoxFont)
const QFont *f...essageBoxFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
388 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMessageBox") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMessageBox" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMessageBox") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMessageBox" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
389 if (const
const QFont *f...me::LabelFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::LabelFont)
const QFont *f...me::LabelFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
390 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QLabel") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QLabel" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QLabel") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QLabel" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
391 if (const
const QFont *f...:TipLabelFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::TipLabelFont)
const QFont *f...:TipLabelFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
392 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QTipLabel") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QTipLabel" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QTipLabel") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QTipLabel" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
393 if (const
const QFont *f...:TitleBarFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::TitleBarFont)
const QFont *f...:TitleBarFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
394 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QTitleBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QTitleBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QTitleBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QTitleBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
395 if (const
const QFont *f...StatusBarFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::StatusBarFont)
const QFont *f...StatusBarFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
396 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QStatusBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QStatusBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QStatusBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QStatusBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
397 if (const
const QFont *f...ndowTitleFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::MdiSubWindowTitleFont)
const QFont *f...ndowTitleFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
398 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMdiSubWindowTitleBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMdiSubWindowTitleBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMdiSubWindowTitleBar") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMdiSubWindowTitleBar" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
399 if (const
const QFont *f...dgetTitleFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::DockWidgetTitleFont)
const QFont *f...dgetTitleFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
400 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QDockWidgetTitle") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QDockWidgetTitle" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QDockWidgetTitle") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QDockWidgetTitle" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
401 if (const
const QFont *f...ushButtonFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::PushButtonFont)
const QFont *f...ushButtonFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
402 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QPushButton") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QPushButton" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QPushButton") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QPushButton" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
403 if (const
const QFont *f...:CheckBoxFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::CheckBoxFont)
const QFont *f...:CheckBoxFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
404 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QCheckBox") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QCheckBox" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QCheckBox") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QCheckBox" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
405 if (const
const QFont *f...dioButtonFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::RadioButtonFont)
const QFont *f...dioButtonFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
406 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QRadioButton") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QRadioButton" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QRadioButton") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QRadioButton" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
407 if (const
const QFont *f...oolButtonFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::ToolButtonFont)
const QFont *f...oolButtonFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
408 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QToolButton") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QToolButton" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QToolButton") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QToolButton" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
409 if (const
const QFont *f...:ItemViewFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::ItemViewFont)
const QFont *f...:ItemViewFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
410 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QAbstractItemView") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QAbstractItemView" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QAbstractItemView") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QAbstractItemView" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
411 if (const
const QFont *f...:ListViewFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::ListViewFont)
const QFont *f...:ListViewFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
412 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QListView") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QListView" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QListView") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QListView" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
413 if (const
const QFont *f...eaderViewFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::HeaderViewFont)
const QFont *f...eaderViewFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
414 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QHeaderView") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QHeaderView" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QHeaderView") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QHeaderView" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
415 if (const
const QFont *f...::ListBoxFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::ListBoxFont)
const QFont *f...::ListBoxFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
416 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QListBox") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QListBox" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QListBox") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QListBox" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
417 if (const
const QFont *f...oMenuItemFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::ComboMenuItemFont)
const QFont *f...oMenuItemFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
418 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QComboMenuItem") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QComboMenuItem" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QComboMenuItem") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QComboMenuItem" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
419 if (const
const QFont *f...oLineEditFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::ComboLineEditFont)
const QFont *f...oLineEditFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
420 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QComboLineEdit") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QComboLineEdit" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QComboLineEdit") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QComboLineEdit" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
421 if (const
const QFont *f...me::SmallFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::SmallFont)
const QFont *f...me::SmallFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
422 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QSmallFont") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QSmallFont" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QSmallFont") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QSmallFont" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
423 if (const
const QFont *f...eme::MiniFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::MiniFont)
const QFont *f...eme::MiniFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
424 fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMiniFont") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMiniFont" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()), *font);
never executed: fontHash->insert(([]() -> QByteArray { enum { Size = sizeof("QMiniFont") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QMiniFont" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()), *font);
0
425}
never executed: end of block
0
426QWidget *QApplication::activePopupWidget()-
427{-
428 return
never executed: return QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty() ? QApplicationPrivate::popupWidgets->constLast() : nullptr;
QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty() ?
never executed: return QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty() ? QApplicationPrivate::popupWidgets->constLast() : nullptr;
0
429 QApplicationPrivate::popupWidgets->constLast() : nullptr;
never executed: return QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty() ? QApplicationPrivate::popupWidgets->constLast() : nullptr;
0
430}-
431QWidget *QApplication::activeModalWidget()-
432{-
433 QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(modalWindow());-
434 return
never executed: return widgetWindow ? widgetWindow->widget() : 0;
widgetWindow ? widgetWindow->widget() : 0;
never executed: return widgetWindow ? widgetWindow->widget() : 0;
0
435}-
436-
437-
438-
439-
440-
441-
442QApplication::~QApplication()-
443{-
444 QApplicationPrivate * const d = d_func();-
445-
446-
447 qt_call_post_routines();-
448-
449-
450 d->toolTipWakeUp.stop();-
451 d->toolTipFallAsleep.stop();-
452-
453 QApplicationPrivate::is_app_closing = true;-
454 QApplicationPrivate::is_app_running = false;-
455-
456 delete QWidgetPrivate::mapper;-
457 QWidgetPrivate::mapper = 0;-
458-
459-
460 if (QWidgetPrivate::allWidgets
QWidgetPrivate::allWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
461 QWidgetSet *mySet = QWidgetPrivate::allWidgets;-
462 QWidgetPrivate::allWidgets = 0;-
463 for (QWidgetSet::ConstIterator it = mySet->constBegin(), cend = mySet->constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
464 QWidget *w = *it;-
465 if (!w->parent()
!w->parent()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
466 w->destroy(true, true);
never executed: w->destroy(true, true);
0
467 }
never executed: end of block
0
468 delete mySet;-
469 }
never executed: end of block
0
470-
471 delete qt_desktopWidget;-
472 qt_desktopWidget = 0;-
473-
474 delete QApplicationPrivate::app_pal;-
475 QApplicationPrivate::app_pal = 0;-
476 clearSystemPalette();-
477 delete QApplicationPrivate::set_pal;-
478 QApplicationPrivate::set_pal = 0;-
479 app_palettes()->clear();-
480-
481 delete QApplicationPrivate::sys_font;-
482 QApplicationPrivate::sys_font = 0;-
483 delete QApplicationPrivate::set_font;-
484 QApplicationPrivate::set_font = 0;-
485 app_fonts()->clear();-
486-
487 delete QApplicationPrivate::app_style;-
488 QApplicationPrivate::app_style = 0;-
489-
490-
491 if (qt_is_gui_used
qt_is_gui_usedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
492 delete QDragManager::self();
never executed: delete QDragManager::self();
0
493-
494-
495 d->cleanupMultitouch();-
496-
497 qt_cleanup();-
498-
499 if (QApplicationPrivate::widgetCount
QApplicationPr...e::widgetCountDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
500 QMessageLogger(__FILE__, 883, __PRETTY_FUNCTION__).debug("Widgets left: %i Max widgets: %i \n", QWidgetPrivate::instanceCounter, QWidgetPrivate::maxInstances);
never executed: QMessageLogger(__FILE__, 883, __PRETTY_FUNCTION__).debug("Widgets left: %i Max widgets: %i \n", QWidgetPrivate::instanceCounter, QWidgetPrivate::maxInstances);
0
501-
502 QApplicationPrivate::obey_desktop_settings = true;-
503-
504 QApplicationPrivate::app_strut = QSize(0, 0);-
505 QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;-
506 QApplicationPrivate::widgetCount = false;-
507-
508-
509-
510 qUnregisterGuiStateMachine();-
511-
512}
never executed: end of block
0
513void qt_cleanup()-
514{-
515 QPixmapCache::clear();-
516 QColormap::cleanup();-
517-
518 QApplicationPrivate::active_window = 0;-
519-
520-
521-
522-
523-
524-
525}
never executed: end of block
0
526QWidget *QApplication::widgetAt(const QPoint &p)-
527{-
528 QWidget *window = QApplication::topLevelAt(p);-
529 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
530 return
never executed: return 0;
0;
never executed: return 0;
0
531-
532 QWidget *child = 0;-
533-
534 if (!window->testAttribute(Qt::WA_TransparentForMouseEvents)
!window->testA...orMouseEvents)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
535 child = window->childAt(window->mapFromGlobal(p));
never executed: child = window->childAt(window->mapFromGlobal(p));
0
536-
537 if (child
childDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
538 return
never executed: return child;
child;
never executed: return child;
0
539-
540 if (window->testAttribute(Qt::WA_TransparentForMouseEvents)
window->testAt...orMouseEvents)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
541-
542-
543-
544 int x = p.x();-
545 int y = p.y();-
546 QRegion oldmask = window->mask();-
547 QPoint wpoint = window->mapFromGlobal(QPoint(x, y));-
548 QRegion newmask = (oldmask.isEmpty()
oldmask.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
? QRegion(window->rect()) : oldmask)
0
549 - QRegion(wpoint.x(), wpoint.y(), 1, 1);-
550 window->setMask(newmask);-
551 QWidget *recurse = 0;-
552 if (QApplication::topLevelAt(p) != window
QApplication::...t(p) != windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
553 recurse = widgetAt(x, y);
never executed: recurse = widgetAt(x, y);
0
554 if (oldmask.isEmpty()
oldmask.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
555 window->clearMask();
never executed: window->clearMask();
0
556 else-
557 window->setMask(oldmask);
never executed: window->setMask(oldmask);
0
558 return
never executed: return recurse;
recurse;
never executed: return recurse;
0
559 }-
560 return
never executed: return window;
window;
never executed: return window;
0
561}-
562bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventList *postedEvents)-
563{-
564 if ((event->type() == QEvent::UpdateRequest
event->type() ...:UpdateRequestDescription
TRUEnever evaluated
FALSEnever evaluated
0
565 || event->type() == QEvent::LayoutRequest
event->type() ...:LayoutRequestDescription
TRUEnever evaluated
FALSEnever evaluated
0
566 || event->type() == QEvent::Resize
event->type() ...QEvent::ResizeDescription
TRUEnever evaluated
FALSEnever evaluated
0
567 || event->type() == QEvent::Move
event->type() == QEvent::MoveDescription
TRUEnever evaluated
FALSEnever evaluated
0
568 || event->type() == QEvent::LanguageChange
event->type() ...LanguageChangeDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
569 for (QPostEventList::const_iterator it = postedEvents->constBegin(); it != postedEvents->constEnd()
it != postedEvents->constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
570 const QPostEvent &cur = *it;-
571 if (cur.receiver != receiver
cur.receiver != receiverDescription
TRUEnever evaluated
FALSEnever evaluated
|| cur.event == 0
cur.event == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| cur.event->type() != event->type()
cur.event->typ... event->type()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
572 continue;
never executed: continue;
0
573 if (cur.event->type() == QEvent::LayoutRequest
cur.event->typ...:LayoutRequestDescription
TRUEnever evaluated
FALSEnever evaluated
0
574 || cur.event->type() == QEvent::UpdateRequest
cur.event->typ...:UpdateRequestDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
575 ;-
576 }
never executed: end of block
else if (cur.event->type() == QEvent::Resize
cur.event->typ...QEvent::ResizeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
577 ((QResizeEvent *)(cur.event))->s = ((QResizeEvent *)event)->s;-
578 }
never executed: end of block
else if (cur.event->type() == QEvent::Move
cur.event->typ...= QEvent::MoveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
579 ((QMoveEvent *)(cur.event))->p = ((QMoveEvent *)event)->p;-
580 }
never executed: end of block
else if (cur.event->type() == QEvent::LanguageChange
cur.event->typ...LanguageChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
581 ;-
582 }
never executed: end of block
else {
0
583 continue;
never executed: continue;
0
584 }-
585 delete event;-
586 return
never executed: return true;
true;
never executed: return true;
0
587 }-
588 return
never executed: return false;
false;
never executed: return false;
0
589 }-
590 return
never executed: return QGuiApplication::compressEvent(event, receiver, postedEvents);
QGuiApplication::compressEvent(event, receiver, postedEvents);
never executed: return QGuiApplication::compressEvent(event, receiver, postedEvents);
0
591}-
592void QApplication::setAutoSipEnabled(const bool enabled)-
593{-
594 QApplicationPrivate::autoSipEnabled = enabled;-
595}
never executed: end of block
0
596-
597bool QApplication::autoSipEnabled() const-
598{-
599 return
never executed: return QApplicationPrivate::autoSipEnabled;
QApplicationPrivate::autoSipEnabled;
never executed: return QApplicationPrivate::autoSipEnabled;
0
600}-
601-
602-
603-
604QString QApplication::styleSheet() const-
605{-
606 return
never executed: return QApplicationPrivate::styleSheet;
QApplicationPrivate::styleSheet;
never executed: return QApplicationPrivate::styleSheet;
0
607}-
608-
609void QApplication::setStyleSheet(const QString& styleSheet)-
610{-
611 QApplicationPrivate::styleSheet = styleSheet;-
612 QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle*>(QApplicationPrivate::app_style);-
613 if (styleSheet.isEmpty()
styleSheet.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
614 if (!proxy
!proxyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
615 return;
never executed: return;
0
616 setStyle(proxy->base);-
617 }
never executed: end of block
else if (proxy
proxyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
618 proxy->repolish((static_cast<QApplication *>(QCoreApplication::instance())));-
619 }
never executed: end of block
else {
0
620 QStyleSheetStyle *newProxy = new QStyleSheetStyle(QApplicationPrivate::app_style);-
621 QApplicationPrivate::app_style->setParent(newProxy);-
622 setStyle(newProxy);-
623 }
never executed: end of block
0
624}-
625QStyle *QApplication::style()-
626{-
627 if (QApplicationPrivate::app_style
QApplicationPrivate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
628 return
never executed: return QApplicationPrivate::app_style;
QApplicationPrivate::app_style;
never executed: return QApplicationPrivate::app_style;
0
629 if (!qobject_cast<QApplication *>(QCoreApplication::instance())
!qobject_cast<...n::instance())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
630 ((!(!"No style available without QApplication!")) ? qt_assert("!\"No style available without QApplication!\"",__FILE__,1123) : qt_noop());-
631 return
never executed: return 0;
0;
never executed: return 0;
0
632 }-
633-
634 if (!QApplicationPrivate::app_style
!QApplicationP...ate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
635-
636-
637 QString style;-
638 if (!QApplicationPrivate::styleOverride.isEmpty()
!QApplicationP...ride.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
639 style = QApplicationPrivate::styleOverride.toLower();-
640 }
never executed: end of block
else {
0
641 style = QApplicationPrivate::desktopStyleKey();-
642 }
never executed: end of block
0
643-
644 QStyle *&app_style = QApplicationPrivate::app_style;-
645 app_style = QStyleFactory::create(style);-
646 if (!app_style
!app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
647 const QStringList styles = QStyleFactory::keys();-
648 for (const auto &style : styles) {-
649 if ((
(app_style = Q...create(style))Description
TRUEnever evaluated
FALSEnever evaluated
app_style = QStyleFactory::create(style))
(app_style = Q...create(style))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
650 break;
never executed: break;
0
651 }
never executed: end of block
0
652 }
never executed: end of block
0
653 if (!app_style
!app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
654 ((!(!"No styles available!")) ? qt_assert("!\"No styles available!\"",__FILE__,1147) : qt_noop());-
655 return
never executed: return 0;
0;
never executed: return 0;
0
656 }-
657 QApplicationPrivate::overrides_native_style =-
658 app_style->objectName() != QApplicationPrivate::desktopStyleKey();-
659 }
never executed: end of block
0
660-
661 QApplicationPrivate::app_style->setParent((static_cast<QApplication *>(QCoreApplication::instance())));-
662-
663 initSystemPalette();-
664-
665 if (QApplicationPrivate::set_pal
QApplicationPrivate::set_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
666 QApplication::setPalette(*QApplicationPrivate::set_pal);
never executed: QApplication::setPalette(*QApplicationPrivate::set_pal);
0
667-
668-
669 if (!QApplicationPrivate::styleSheet.isEmpty()
!QApplicationP...heet.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
670 (static_cast<QApplication *>(QCoreApplication::instance()))->setStyleSheet(QApplicationPrivate::styleSheet);-
671 }
never executed: end of block
else
0
672-
673 QApplicationPrivate::app_style->polish((static_cast<QApplication *>(QCoreApplication::instance())));
never executed: QApplicationPrivate::app_style->polish((static_cast<QApplication *>(QCoreApplication::instance())));
0
674-
675 return
never executed: return QApplicationPrivate::app_style;
QApplicationPrivate::app_style;
never executed: return QApplicationPrivate::app_style;
0
676}-
677void QApplication::setStyle(QStyle *style)-
678{-
679 if (!style
!styleDescription
TRUEnever evaluated
FALSEnever evaluated
|| style == QApplicationPrivate::app_style
style == QAppl...ate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
680 return;
never executed: return;
0
681-
682 QWidgetList all = allWidgets();-
683-
684-
685 if (QApplicationPrivate::app_style
QApplicationPrivate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
686 if (QApplicationPrivate::is_app_running
QApplicationPr...is_app_runningDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QApplicationPrivate::is_app_closing
!QApplicationP...is_app_closingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
687 for (QWidgetList::ConstIterator it = all.constBegin(), cend = all.constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
688 QWidget *w = *it;-
689 if (!(w->windowType() == Qt::Desktop)
!(w->windowTyp...= Qt::Desktop)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
690 w->testAttribute(Qt::WA_WState_Polished)
w->testAttribu...tate_Polished)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
691 QApplicationPrivate::app_style->unpolish(w);-
692 }
never executed: end of block
0
693 }
never executed: end of block
0
694 }
never executed: end of block
0
695 QApplicationPrivate::app_style->unpolish((static_cast<QApplication *>(QCoreApplication::instance())));-
696 }
never executed: end of block
0
697-
698 QStyle *old = QApplicationPrivate::app_style;-
699-
700 QApplicationPrivate::overrides_native_style =-
701 nativeStyleClassName() == QByteArray(style->metaObject()->className());-
702-
703-
704 if (!QApplicationPrivate::styleSheet.isEmpty()
!QApplicationP...heet.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& !qobject_cast<QStyleSheetStyle *>(style)
!qobject_cast<...tyle *>(style)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
705-
706 QStyleSheetStyle *newProxy = new QStyleSheetStyle(style);-
707 style->setParent(newProxy);-
708 QApplicationPrivate::app_style = newProxy;-
709 }
never executed: end of block
else
0
710-
711 QApplicationPrivate::app_style = style;
never executed: QApplicationPrivate::app_style = style;
0
712 QApplicationPrivate::app_style->setParent((static_cast<QApplication *>(QCoreApplication::instance())));-
713-
714-
715-
716-
717 if (QApplicationPrivate::set_pal
QApplicationPrivate::set_palDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
718 QApplication::setPalette(*QApplicationPrivate::set_pal);-
719 }
never executed: end of block
else if (QApplicationPrivate::sys_pal
QApplicationPrivate::sys_palDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
720 clearSystemPalette();-
721 initSystemPalette();-
722 QApplicationPrivate::initializeWidgetPaletteHash();-
723 QApplicationPrivate::initializeWidgetFontHash();-
724 QApplicationPrivate::setPalette_helper(*QApplicationPrivate::sys_pal, 0, false);-
725 }
never executed: end of block
else if (!QApplicationPrivate::sys_pal
!QApplicationPrivate::sys_palDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
726-
727 QApplicationPrivate::setSystemPalette(QApplicationPrivate::app_style->standardPalette());-
728 }
never executed: end of block
0
729-
730-
731 QApplicationPrivate::app_style->polish((static_cast<QApplication *>(QCoreApplication::instance())));-
732-
733-
734 if (QApplicationPrivate::is_app_running
QApplicationPr...is_app_runningDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QApplicationPrivate::is_app_closing
!QApplicationP...is_app_closingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
735 for (QWidgetList::ConstIterator it = all.constBegin(), cend = all.constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
736 QWidget *w = *it;-
737 if (w->windowType() != Qt::Desktop
w->windowType() != Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
&& w->testAttribute(Qt::WA_WState_Polished)
w->testAttribu...tate_Polished)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
738 if (w->style() == QApplicationPrivate::app_style
w->style() == ...ate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
739 QApplicationPrivate::app_style->polish(w);
never executed: QApplicationPrivate::app_style->polish(w);
0
740-
741 else-
742 w->setStyleSheet(w->styleSheet());
never executed: w->setStyleSheet(w->styleSheet());
0
743-
744 }-
745 }
never executed: end of block
0
746-
747 for (QWidgetList::ConstIterator it = all.constBegin(), cend = all.constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
748 QWidget *w = *it;-
749 if (w->windowType() != Qt::Desktop
w->windowType() != Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
&& !w->testAttribute(Qt::WA_SetStyle)
!w->testAttrib...::WA_SetStyle)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
750 QEvent e(QEvent::StyleChange);-
751 QApplication::sendEvent(w, &e);-
752 w->update();-
753 }
never executed: end of block
0
754 }
never executed: end of block
0
755 }
never executed: end of block
0
756-
757-
758 if (QStyleSheetStyle *oldProxy = qobject_cast<QStyleSheetStyle *>(old)
QStyleSheetSty...tStyle *>(old)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
759 oldProxy->deref();-
760 }
never executed: end of block
else
0
761-
762 if (old
oldDescription
TRUEnever evaluated
FALSEnever evaluated
&& old->parent() == (static_cast<QApplication *>(QCoreApplication::instance()))
old->parent() ...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
763 delete old;-
764 }
never executed: end of block
0
765-
766 if (QApplicationPrivate::focus_widget
QApplicationPr...::focus_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
767 QFocusEvent in(QEvent::FocusIn, Qt::OtherFocusReason);-
768 QApplication::sendEvent(QApplicationPrivate::focus_widget->style(), &in);-
769 QApplicationPrivate::focus_widget->update();-
770 }
never executed: end of block
0
771}
never executed: end of block
0
772QStyle* QApplication::setStyle(const QString& style)-
773{-
774 QStyle *s = QStyleFactory::create(style);-
775 if (!s
!sDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
776 return
never executed: return 0;
0;
never executed: return 0;
0
777-
778 setStyle(s);-
779 return
never executed: return s;
s;
never executed: return s;
0
780}-
781-
782-
783-
784-
785-
786-
787-
788int QApplication::colorSpec()-
789{-
790 return
never executed: return QApplicationPrivate::app_cspec;
QApplicationPrivate::app_cspec;
never executed: return QApplicationPrivate::app_cspec;
0
791}-
792void QApplication::setColorSpec(int spec)-
793{-
794 if (__builtin_expect(!!((static_cast<QApplication *>(QCoreApplication::instance()))), false)
__builtin_expe...e()))), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
795 QMessageLogger(__FILE__, 1384, __PRETTY_FUNCTION__).warning("QApplication::setColorSpec: This function must be "
never executed: QMessageLogger(__FILE__, 1384, __PRETTY_FUNCTION__).warning("QApplication::setColorSpec: This function must be " "called before the QApplication object is created");
0
796 "called before the QApplication object is created");
never executed: QMessageLogger(__FILE__, 1384, __PRETTY_FUNCTION__).warning("QApplication::setColorSpec: This function must be " "called before the QApplication object is created");
0
797 QApplicationPrivate::app_cspec = spec;-
798}
never executed: end of block
0
799QSize QApplication::globalStrut()-
800{-
801 return
never executed: return QApplicationPrivate::app_strut;
QApplicationPrivate::app_strut;
never executed: return QApplicationPrivate::app_strut;
0
802}-
803-
804void QApplication::setGlobalStrut(const QSize& strut)-
805{-
806 QApplicationPrivate::app_strut = strut;-
807}
never executed: end of block
0
808QPalette QApplication::palette(const QWidget* w)-
809{-
810 typedef PaletteHash::const_iterator PaletteHashConstIt;-
811-
812 PaletteHash *hash = app_palettes();-
813 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash->size()
hash->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
814 PaletteHashConstIt it = hash->constFind(w->metaObject()->className());-
815 const PaletteHashConstIt cend = hash->constEnd();-
816 if (it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
817 return
never executed: return *it;
*it;
never executed: return *it;
0
818 for (it = hash->constBegin(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
819 if (w->inherits(it.key())
w->inherits(it.key())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
820 return
never executed: return it.value();
it.value();
never executed: return it.value();
0
821 }
never executed: end of block
0
822 }
never executed: end of block
0
823 return
never executed: return palette();
palette();
never executed: return palette();
0
824}-
825QPalette QApplication::palette(const char *className)-
826{-
827 if (!QApplicationPrivate::app_pal
!QApplicationPrivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
828 palette();
never executed: palette();
0
829 PaletteHash *hash = app_palettes();-
830 if (className
classNameDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash->size()
hash->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
831 QHash<QByteArray, QPalette>::ConstIterator it = hash->constFind(className);-
832 if (it != hash->constEnd()
it != hash->constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
833 return
never executed: return *it;
*it;
never executed: return *it;
0
834 }
never executed: end of block
0
835 return
never executed: return *QApplicationPrivate::app_pal;
*QApplicationPrivate::app_pal;
never executed: return *QApplicationPrivate::app_pal;
0
836}-
837-
838void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash)-
839{-
840 QPalette pal = palette;-
841-
842 if (QApplicationPrivate::app_style
QApplicationPrivate::app_styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
843 QApplicationPrivate::app_style->polish(pal);
never executed: QApplicationPrivate::app_style->polish(pal);
0
844-
845 bool all = false;-
846 PaletteHash *hash = app_palettes();-
847 if (!className
!classNameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
848 if (QApplicationPrivate::app_pal
QApplicationPrivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
&& pal.isCopyOf(*QApplicationPrivate::app_pal)
pal.isCopyOf(*...vate::app_pal)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
849 return;
never executed: return;
0
850 if (!QApplicationPrivate::app_pal
!QApplicationPrivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
851 QApplicationPrivate::app_pal = new QPalette(pal);
never executed: QApplicationPrivate::app_pal = new QPalette(pal);
0
852 else-
853 *
never executed: *QApplicationPrivate::app_pal = pal;
QApplicationPrivate::app_pal = pal;
never executed: *QApplicationPrivate::app_pal = pal;
0
854 if (hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash->size()
hash->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
855 all = true;-
856 if (clearWidgetPaletteHash
clearWidgetPaletteHashDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
857 hash->clear();
never executed: hash->clear();
0
858 }
never executed: end of block
0
859 }
never executed: end of block
else if (hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
860 hash->insert(className, pal);-
861 }
never executed: end of block
0
862-
863 if (QApplicationPrivate::is_app_running
QApplicationPr...is_app_runningDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QApplicationPrivate::is_app_closing
!QApplicationP...is_app_closingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
864-
865 QEvent e(QEvent::ApplicationPaletteChange);-
866 QApplication::sendEvent(QApplication::instance(), &e);-
867-
868 QWidgetList wids = QApplication::allWidgets();-
869 for (QWidgetList::ConstIterator it = wids.constBegin(), cend = wids.constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
870 QWidget *w = *it;-
871 if (all
allDescription
TRUEnever evaluated
FALSEnever evaluated
|| (!className
!classNameDescription
TRUEnever evaluated
FALSEnever evaluated
&& w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) || w->inherits(className)
w->inherits(className)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
872 QApplication::sendEvent(w, &e);
never executed: QApplication::sendEvent(w, &e);
0
873 }
never executed: end of block
0
874-
875-
876-
877 QList<QGraphicsScene *> &scenes = (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->scene_list;-
878 for (QList<QGraphicsScene *>::ConstIterator it = scenes.constBegin();-
879 it != scenes.constEnd()
it != scenes.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
880 QApplication::sendEvent(*it, &e);-
881 }
never executed: end of block
0
882-
883 }
never executed: end of block
0
884 if (!className
!classNameDescription
TRUEnever evaluated
FALSEnever evaluated
&& (!QApplicationPrivate::sys_pal
!QApplicationPrivate::sys_palDescription
TRUEnever evaluated
FALSEnever evaluated
|| !palette.isCopyOf(*QApplicationPrivate::sys_pal)
!palette.isCop...vate::sys_pal)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
885 if (!QApplicationPrivate::set_pal
!QApplicationPrivate::set_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
886 QApplicationPrivate::set_pal = new QPalette(palette);
never executed: QApplicationPrivate::set_pal = new QPalette(palette);
0
887 else-
888 *
never executed: *QApplicationPrivate::set_pal = palette;
QApplicationPrivate::set_pal = palette;
never executed: *QApplicationPrivate::set_pal = palette;
0
889 QCoreApplication::setAttribute(Qt::AA_SetPalette);-
890 }
never executed: end of block
0
891}
never executed: end of block
0
892void QApplication::setPalette(const QPalette &palette, const char* className)-
893{-
894 QApplicationPrivate::setPalette_helper(palette, className, true);-
895}
never executed: end of block
0
896-
897-
898-
899void QApplicationPrivate::setSystemPalette(const QPalette &pal)-
900{-
901 QPalette adjusted;-
902 adjusted = pal;-
903-
904-
905 if (!sys_pal
!sys_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
906 sys_pal = new QPalette(adjusted);
never executed: sys_pal = new QPalette(adjusted);
0
907 else-
908 *
never executed: *sys_pal = adjusted;
sys_pal = adjusted;
never executed: *sys_pal = adjusted;
0
909-
910-
911 if (!QApplicationPrivate::set_pal
!QApplicationPrivate::set_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
912 QApplication::setPalette(*sys_pal);
never executed: QApplication::setPalette(*sys_pal);
0
913}
never executed: end of block
0
914-
915-
916-
917-
918-
919-
920QFont QApplication::font()-
921{-
922 return
never executed: return QGuiApplication::font();
QGuiApplication::font();
never executed: return QGuiApplication::font();
0
923}-
924QFont QApplication::font(const QWidget *widget)-
925{-
926 typedef FontHash::const_iterator FontHashConstIt;-
927-
928 FontHash *hash = app_fonts();-
929-
930 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash->size()
hash->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
931 FontHashConstIt it = hash->constFind(widget->metaObject()->className());-
932 const FontHashConstIt cend = hash->constEnd();-
933 if (it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
934 return
never executed: return it.value();
it.value();
never executed: return it.value();
0
935 for (it = hash->constBegin(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
936 if (widget->inherits(it.key())
widget->inherits(it.key())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
937 return
never executed: return it.value();
it.value();
never executed: return it.value();
0
938 }
never executed: end of block
0
939 }
never executed: end of block
0
940 return
never executed: return font();
font();
never executed: return font();
0
941}-
942QFont QApplication::font(const char *className)-
943{-
944 FontHash *hash = app_fonts();-
945 if (className
classNameDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash->size()
hash->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
946 QHash<QByteArray, QFont>::ConstIterator it = hash->constFind(className);-
947 if (it != hash->constEnd()
it != hash->constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
948 return
never executed: return *it;
*it;
never executed: return *it;
0
949 }
never executed: end of block
0
950 return
never executed: return font();
font();
never executed: return font();
0
951}-
952void QApplication::setFont(const QFont &font, const char *className)-
953{-
954 bool all = false;-
955 FontHash *hash = app_fonts();-
956 if (!className
!classNameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
957 QGuiApplication::setFont(font);-
958 if (hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
&& hash->size()
hash->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
959 all = true;-
960 hash->clear();-
961 }
never executed: end of block
0
962 }
never executed: end of block
else if (hash
hashDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
963 hash->insert(className, font);-
964 }
never executed: end of block
0
965 if (QApplicationPrivate::is_app_running
QApplicationPr...is_app_runningDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QApplicationPrivate::is_app_closing
!QApplicationP...is_app_closingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
966-
967 QEvent e(QEvent::ApplicationFontChange);-
968 QApplication::sendEvent(QApplication::instance(), &e);-
969-
970 QWidgetList wids = QApplication::allWidgets();-
971 for (QWidgetList::ConstIterator it = wids.constBegin(), cend = wids.constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
972 QWidget *w = *it;-
973 if (all
allDescription
TRUEnever evaluated
FALSEnever evaluated
|| (!className
!classNameDescription
TRUEnever evaluated
FALSEnever evaluated
&& w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) || w->inherits(className)
w->inherits(className)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
974 sendEvent(w, &e);
never executed: sendEvent(w, &e);
0
975 }
never executed: end of block
0
976-
977-
978-
979 QList<QGraphicsScene *> &scenes = (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->scene_list;-
980 for (QList<QGraphicsScene *>::ConstIterator it = scenes.constBegin();-
981 it != scenes.constEnd()
it != scenes.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
982 QApplication::sendEvent(*it, &e);-
983 }
never executed: end of block
0
984-
985 }
never executed: end of block
0
986 if (!className
!classNameDescription
TRUEnever evaluated
FALSEnever evaluated
&& (!QApplicationPrivate::sys_font
!QApplicationPrivate::sys_fontDescription
TRUEnever evaluated
FALSEnever evaluated
|| !font.isCopyOf(*QApplicationPrivate::sys_font)
!font.isCopyOf...ate::sys_font)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
987 if (!QApplicationPrivate::set_font
!QApplicationPrivate::set_fontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
988 QApplicationPrivate::set_font = new QFont(font);
never executed: QApplicationPrivate::set_font = new QFont(font);
0
989 else-
990 *
never executed: *QApplicationPrivate::set_font = font;
QApplicationPrivate::set_font = font;
never executed: *QApplicationPrivate::set_font = font;
0
991 }-
992}
never executed: end of block
0
993-
994-
995-
996void QApplicationPrivate::setSystemFont(const QFont &font)-
997{-
998 if (!sys_font
!sys_fontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
999 sys_font = new QFont(font);
never executed: sys_font = new QFont(font);
0
1000 else-
1001 *
never executed: *sys_font = font;
sys_font = font;
never executed: *sys_font = font;
0
1002-
1003 if (!QApplicationPrivate::set_font
!QApplicationPrivate::set_fontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1004 QApplication::setFont(*sys_font);
never executed: QApplication::setFont(*sys_font);
0
1005}
never executed: end of block
0
1006-
1007-
1008-
1009QString QApplicationPrivate::desktopStyleKey()-
1010{-
1011-
1012-
1013 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1014 const QStringList availableKeys = QStyleFactory::keys();-
1015 const auto styles = theme->themeHint(QPlatformTheme::StyleNames).toStringList();-
1016 for (const QString &style : styles) {-
1017 if (availableKeys.contains(style, Qt::CaseInsensitive)
availableKeys....seInsensitive)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1018 return
never executed: return style;
style;
never executed: return style;
0
1019 }
never executed: end of block
0
1020 }
never executed: end of block
0
1021 return
never executed: return QString();
QString();
never executed: return QString();
0
1022}-
1023QIcon QApplication::windowIcon()-
1024{-
1025 return
never executed: return QGuiApplication::windowIcon();
QGuiApplication::windowIcon();
never executed: return QGuiApplication::windowIcon();
0
1026}-
1027-
1028void QApplication::setWindowIcon(const QIcon &icon)-
1029{-
1030 QGuiApplication::setWindowIcon(icon);-
1031}
never executed: end of block
0
1032-
1033-
1034void QApplicationPrivate::notifyWindowIconChanged()-
1035{-
1036 QEvent ev(QEvent::ApplicationWindowIconChange);-
1037 const QWidgetList list = QApplication::topLevelWidgets();-
1038 QWindowList windowList = QGuiApplication::topLevelWindows();-
1039-
1040-
1041 for (auto *w : list) {-
1042 windowList.removeOne(w->windowHandle());-
1043 QCoreApplication::sendEvent(w, &ev);-
1044 }
never executed: end of block
0
1045-
1046-
1047-
1048 for (int i = 0; i < windowList.size()
i < windowList.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1049 QCoreApplication::sendEvent(windowList.at(i), &ev);
never executed: QCoreApplication::sendEvent(windowList.at(i), &ev);
0
1050}
never executed: end of block
0
1051QWidgetList QApplication::topLevelWidgets()-
1052{-
1053 QWidgetList list;-
1054 QWidgetList all = allWidgets();-
1055-
1056 for (QWidgetList::ConstIterator it = all.constBegin(), cend = all.constEnd(); it != cend
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
1057 QWidget *w = *it;-
1058 if (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->windowType() != Qt::Desktop
w->windowType() != Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1059 list.append(w);
never executed: list.append(w);
0
1060 }
never executed: end of block
0
1061 return
never executed: return list;
list;
never executed: return list;
0
1062}-
1063QWidgetList QApplication::allWidgets()-
1064{-
1065 if (QWidgetPrivate::allWidgets
QWidgetPrivate::allWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1066 return
never executed: return QWidgetPrivate::allWidgets->toList();
QWidgetPrivate::allWidgets->toList();
never executed: return QWidgetPrivate::allWidgets->toList();
0
1067 return
never executed: return QWidgetList();
QWidgetList();
never executed: return QWidgetList();
0
1068}-
1069QWidget *QApplication::focusWidget()-
1070{-
1071 return
never executed: return QApplicationPrivate::focus_widget;
QApplicationPrivate::focus_widget;
never executed: return QApplicationPrivate::focus_widget;
0
1072}-
1073-
1074void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)-
1075{-
1076-
1077 if (focus
focusDescription
TRUEnever evaluated
FALSEnever evaluated
&& focus->window()->graphicsProxyWidget()
focus->window(...sProxyWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1078 return;
never executed: return;
0
1079-
1080-
1081 hidden_focus_widget = 0;-
1082-
1083 if (focus != focus_widget
focus != focus_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1084 if (focus
focusDescription
TRUEnever evaluated
FALSEnever evaluated
&& focus->isHidden()
focus->isHidden()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1085 hidden_focus_widget = focus;-
1086 return;
never executed: return;
0
1087 }-
1088-
1089 if (focus
focusDescription
TRUEnever evaluated
FALSEnever evaluated
&& (reason == Qt::BacktabFocusReason
reason == Qt::...tabFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
|| reason == Qt::TabFocusReason
reason == Qt::TabFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1090 && qt_in_tab_key_event
qt_in_tab_key_eventDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1091 focus->window()->setAttribute(Qt::WA_KeyboardFocusChange);
never executed: focus->window()->setAttribute(Qt::WA_KeyboardFocusChange);
0
1092 else if (focus
focusDescription
TRUEnever evaluated
FALSEnever evaluated
&& reason == Qt::ShortcutFocusReason
reason == Qt::...cutFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1093 focus->window()->setAttribute(Qt::WA_KeyboardFocusChange);-
1094 }
never executed: end of block
0
1095 QWidget *prev = focus_widget;-
1096 focus_widget = focus;-
1097-
1098 if(focus_widget
focus_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1099 focus_widget->d_func()->setFocus_sys();
never executed: focus_widget->d_func()->setFocus_sys();
0
1100-
1101 if (reason != Qt::NoFocusReason
reason != Qt::NoFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1102-
1103-
1104 if (prev
prevDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1105-
1106-
1107-
1108-
1109-
1110-
1111 QFocusEvent out(QEvent::FocusOut, reason);-
1112 QPointer<QWidget> that = prev;-
1113 QApplication::sendEvent(prev, &out);-
1114 if (that
thatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1115 QApplication::sendEvent(that->style(), &out);
never executed: QApplication::sendEvent(that->style(), &out);
0
1116 }
never executed: end of block
0
1117 if(focus
focusDescription
TRUEnever evaluated
FALSEnever evaluated
&& QApplicationPrivate::focus_widget == focus
QApplicationPr...idget == focusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1118 QFocusEvent in(QEvent::FocusIn, reason);-
1119 QPointer<QWidget> that = focus;-
1120 QApplication::sendEvent(focus, &in);-
1121 if (that
thatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1122 QApplication::sendEvent(that->style(), &in);
never executed: QApplication::sendEvent(that->style(), &in);
0
1123 }
never executed: end of block
0
1124 (static_cast<QApplication *>(QCoreApplication::instance()))->focusChanged(prev, focus_widget);-
1125 }
never executed: end of block
0
1126 }
never executed: end of block
0
1127}
never executed: end of block
0
1128QWidget *QApplication::activeWindow()-
1129{-
1130 return
never executed: return QApplicationPrivate::active_window;
QApplicationPrivate::active_window;
never executed: return QApplicationPrivate::active_window;
0
1131}-
1132-
1133-
1134-
1135-
1136-
1137-
1138-
1139QFontMetrics QApplication::fontMetrics()-
1140{-
1141 return
never executed: return desktop()->fontMetrics();
desktop()->fontMetrics();
never executed: return desktop()->fontMetrics();
0
1142}-
1143-
1144bool QApplicationPrivate::tryCloseAllWidgetWindows(QWindowList *processedWindows)-
1145{-
1146 ((!(processedWindows)) ? qt_assert("processedWindows",__FILE__,1910) : qt_noop());-
1147 while (QWidget *w = QApplication::activeModalWidget()
QWidget *w = Q...eModalWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1148 if (!w->isVisible()
!w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->data->is_closing
w->data->is_closingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1149 break;
never executed: break;
0
1150 QWindow *window = w->windowHandle();-
1151 if (!window->close()
!window->close()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1152 return
never executed: return false;
false;
never executed: return false;
0
1153 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1154 processedWindows->append(window);
never executed: processedWindows->append(window);
0
1155 }
never executed: end of block
0
1156-
1157retry:
code before this statement never executed: retry:
0
1158 const QWidgetList list = QApplication::topLevelWidgets();-
1159 for (auto *w : list) {-
1160 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->windowType() != Qt::Desktop
w->windowType() != Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
1161 !w->testAttribute(Qt::WA_DontShowOnScreen)
!w->testAttrib...tShowOnScreen)Description
TRUEnever evaluated
FALSEnever evaluated
&& !w->data->is_closing
!w->data->is_closingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1162 QWindow *window = w->windowHandle();-
1163 if (!window->close()
!window->close()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1164 return
never executed: return false;
false;
never executed: return false;
0
1165 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1166 processedWindows->append(window);
never executed: processedWindows->append(window);
0
1167 goto
never executed: goto retry;
retry;
never executed: goto retry;
0
1168 }-
1169 }
never executed: end of block
0
1170 return
never executed: return true;
true;
never executed: return true;
0
1171}-
1172-
1173bool QApplicationPrivate::tryCloseAllWindows()-
1174{-
1175 QWindowList processedWindows;-
1176 return
never executed: return QApplicationPrivate::tryCloseAllWidgetWindows(&processedWindows) && QGuiApplicationPrivate::tryCloseRemainingWindows(processedWindows);
QApplicationPrivate::tryCloseAllWidgetWindows(&processedWindows)
never executed: return QApplicationPrivate::tryCloseAllWidgetWindows(&processedWindows) && QGuiApplicationPrivate::tryCloseRemainingWindows(processedWindows);
0
1177 && QGuiApplicationPrivate::tryCloseRemainingWindows(processedWindows);
never executed: return QApplicationPrivate::tryCloseAllWidgetWindows(&processedWindows) && QGuiApplicationPrivate::tryCloseRemainingWindows(processedWindows);
0
1178}-
1179void QApplication::closeAllWindows()-
1180{-
1181 QWindowList processedWindows;-
1182 QApplicationPrivate::tryCloseAllWidgetWindows(&processedWindows);-
1183}
never executed: end of block
0
1184void QApplication::aboutQt()-
1185{-
1186-
1187 QMessageBox::aboutQt(activeWindow());-
1188-
1189}
never executed: end of block
0
1190bool QApplication::event(QEvent *e)-
1191{-
1192 QApplicationPrivate * const d = d_func();-
1193 if(e->type() == QEvent::Close
e->type() == QEvent::CloseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1194 QCloseEvent *ce = static_cast<QCloseEvent*>(e);-
1195 ce->accept();-
1196 closeAllWindows();-
1197-
1198 const QWidgetList list = topLevelWidgets();-
1199 for (auto *w : list) {-
1200 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& !(w->windowType() == Qt::Desktop)
!(w->windowTyp...= Qt::Desktop)Description
TRUEnever evaluated
FALSEnever evaluated
&& !(w->windowType() == Qt::Popup)
!(w->windowTyp... == Qt::Popup)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1201 (!(w->windowType() == Qt::Dialog)
!(w->windowTyp...== Qt::Dialog)Description
TRUEnever evaluated
FALSEnever evaluated
|| !w->parentWidget()
!w->parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1202 ce->ignore();-
1203 break;
never executed: break;
0
1204 }-
1205 }
never executed: end of block
0
1206 if (ce->isAccepted()
ce->isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1207 return
never executed: return true;
true;
never executed: return true;
0
1208 }-
1209-
1210 }
never executed: end of block
else if (e->type() == QEvent::LocaleChange
e->type() == Q...::LocaleChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1211-
1212-
1213 const QWidgetList list = topLevelWidgets();-
1214 for (auto *w : list) {-
1215 if (!(w->windowType() == Qt::Desktop)
!(w->windowTyp...= Qt::Desktop)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1216 if (!w->testAttribute(Qt::WA_SetLocale)
!w->testAttrib...:WA_SetLocale)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1217 w->d_func()->setLocale_helper(QLocale(), true);
never executed: w->d_func()->setLocale_helper(QLocale(), true);
0
1218 }
never executed: end of block
0
1219 }
never executed: end of block
0
1220-
1221 }
never executed: end of block
else if (e->type() == QEvent::Timer
e->type() == QEvent::TimerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1222 QTimerEvent *te = static_cast<QTimerEvent*>(e);-
1223 ((!(te != 0)) ? qt_assert("te != 0",__FILE__,2035) : qt_noop());-
1224 if (te->timerId() == d->toolTipWakeUp.timerId()
te->timerId() ...keUp.timerId()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1225 d->toolTipWakeUp.stop();-
1226 if (d->toolTipWidget
d->toolTipWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1227 QWidget *w = d->toolTipWidget->window();-
1228-
1229-
1230-
1231 bool showToolTip = w->testAttribute(Qt::WA_AlwaysShowToolTips);-
1232 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& !showToolTip
!showToolTipDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1233 showToolTip = w->isActiveWindow();-
1234 w = w->parentWidget();-
1235 w = w
wDescription
TRUEnever evaluated
FALSEnever evaluated
? w->window() : 0;
0
1236 }
never executed: end of block
0
1237 if (showToolTip
showToolTipDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1238 QHelpEvent e(QEvent::ToolTip, d->toolTipPos, d->toolTipGlobalPos);-
1239 QApplication::sendEvent(d->toolTipWidget, &e);-
1240 if (e.isAccepted()
e.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1241 QStyle *s = d->toolTipWidget->style();-
1242 int sleepDelay = s->styleHint(QStyle::SH_ToolTip_FallAsleepDelay, 0, d->toolTipWidget, 0);-
1243 d->toolTipFallAsleep.start(sleepDelay, this);-
1244 }
never executed: end of block
0
1245 }
never executed: end of block
0
1246 }
never executed: end of block
0
1247 }
never executed: end of block
else if (te->timerId() == d->toolTipFallAsleep.timerId()
te->timerId() ...leep.timerId()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1248 d->toolTipFallAsleep.stop();-
1249 }
never executed: end of block
0
1250-
1251 }
never executed: end of block
else if (e->type() == QEvent::EnterWhatsThisMode
e->type() == Q...rWhatsThisModeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1252 QWhatsThis::enterWhatsThisMode();-
1253 return
never executed: return true;
true;
never executed: return true;
0
1254-
1255 }-
1256-
1257 if(e->type() == QEvent::LanguageChange
e->type() == Q...LanguageChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1258 const QWidgetList list = topLevelWidgets();-
1259 for (auto *w : list) {-
1260 if (!(w->windowType() == Qt::Desktop)
!(w->windowTyp...= Qt::Desktop)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1261 postEvent(w, new QEvent(QEvent::LanguageChange));
never executed: postEvent(w, new QEvent(QEvent::LanguageChange));
0
1262 }
never executed: end of block
0
1263 }
never executed: end of block
0
1264-
1265 return
never executed: return QGuiApplication::event(e);
QGuiApplication::event(e);
never executed: return QGuiApplication::event(e);
0
1266}-
1267void QApplicationPrivate::notifyLayoutDirectionChange()-
1268{-
1269 const QWidgetList list = QApplication::topLevelWidgets();-
1270 QWindowList windowList = QGuiApplication::topLevelWindows();-
1271-
1272-
1273 for (auto *w : list) {-
1274 windowList.removeAll(w->windowHandle());-
1275 QEvent ev(QEvent::ApplicationLayoutDirectionChange);-
1276 QCoreApplication::sendEvent(w, &ev);-
1277 }
never executed: end of block
0
1278-
1279-
1280-
1281 for (int i = 0; i < windowList.size()
i < windowList.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1282 QEvent ev(QEvent::ApplicationLayoutDirectionChange);-
1283 QCoreApplication::sendEvent(windowList.at(i), &ev);-
1284 }
never executed: end of block
0
1285}
never executed: end of block
0
1286void QApplication::setActiveWindow(QWidget* act)-
1287{-
1288 QWidget* window = act
actDescription
TRUEnever evaluated
FALSEnever evaluated
?act->window():0;
0
1289-
1290 if (QApplicationPrivate::active_window == window
QApplicationPr...ndow == windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1291 return;
never executed: return;
0
1292-
1293-
1294 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
&& window->graphicsProxyWidget()
window->graphicsProxyWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1295-
1296 return;
never executed: return;
0
1297 }-
1298-
1299-
1300 QWidgetList toBeActivated;-
1301 QWidgetList toBeDeactivated;-
1302-
1303 if (QApplicationPrivate::active_window
QApplicationPr...:active_windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1304 if (style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, QApplicationPrivate::active_window)
style()->style...active_window)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1305 const QWidgetList list = topLevelWidgets();-
1306 for (auto *w : list) {-
1307 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->isActiveWindow()
w->isActiveWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1308 toBeDeactivated.append(w);
never executed: toBeDeactivated.append(w);
0
1309 }
never executed: end of block
0
1310 }
never executed: end of block
else {
0
1311 toBeDeactivated.append(QApplicationPrivate::active_window);-
1312 }
never executed: end of block
0
1313 }-
1314-
1315 if (QApplicationPrivate::focus_widget
QApplicationPr...::focus_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1316 if (QApplicationPrivate::focus_widget->testAttribute(Qt::WA_InputMethodEnabled)
QApplicationPr...MethodEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1317 QGuiApplication::inputMethod()->commit();
never executed: QGuiApplication::inputMethod()->commit();
0
1318-
1319 QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange, Qt::ActiveWindowFocusReason);-
1320 QApplication::sendEvent(QApplicationPrivate::focus_widget, &focusAboutToChange);-
1321 }
never executed: end of block
0
1322-
1323 QApplicationPrivate::active_window = window;-
1324-
1325 if (QApplicationPrivate::active_window
QApplicationPr...:active_windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1326 if (style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, QApplicationPrivate::active_window)
style()->style...active_window)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1327 const QWidgetList list = topLevelWidgets();-
1328 for (auto *w : list) {-
1329 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->isActiveWindow()
w->isActiveWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1330 toBeActivated.append(w);
never executed: toBeActivated.append(w);
0
1331 }
never executed: end of block
0
1332 }
never executed: end of block
else {
0
1333 toBeActivated.append(QApplicationPrivate::active_window);-
1334 }
never executed: end of block
0
1335-
1336 }-
1337-
1338-
1339 QEvent activationChange(QEvent::ActivationChange);-
1340 QEvent windowActivate(QEvent::WindowActivate);-
1341 QEvent windowDeactivate(QEvent::WindowDeactivate);-
1342-
1343 for (int i = 0; i < toBeActivated.size()
i < toBeActivated.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1344 QWidget *w = toBeActivated.at(i);-
1345 sendSpontaneousEvent(w, &windowActivate);-
1346 sendSpontaneousEvent(w, &activationChange);-
1347 }
never executed: end of block
0
1348-
1349 for(int i = 0; i < toBeDeactivated.size()
i < toBeDeactivated.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1350 QWidget *w = toBeDeactivated.at(i);-
1351 sendSpontaneousEvent(w, &windowDeactivate);-
1352 sendSpontaneousEvent(w, &activationChange);-
1353 }
never executed: end of block
0
1354-
1355 if (QApplicationPrivate::popupWidgets == 0
QApplicationPr...upWidgets == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1356-
1357 if (!QApplicationPrivate::active_window
!QApplicationP...:active_windowDescription
TRUEnever evaluated
FALSEnever evaluated
&& QApplicationPrivate::focus_widget
QApplicationPr...::focus_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1358 QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);-
1359 }
never executed: end of block
else if (QApplicationPrivate::active_window
QApplicationPr...:active_windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1360 QWidget *w = QApplicationPrivate::active_window->focusWidget();-
1361 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1362 w->setFocus(Qt::ActiveWindowFocusReason);
never executed: w->setFocus(Qt::ActiveWindowFocusReason);
0
1363 else {-
1364 w = QApplicationPrivate::focusNextPrevChild_helper(QApplicationPrivate::active_window, true);-
1365 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1366 w->setFocus(Qt::ActiveWindowFocusReason);-
1367 }
never executed: end of block
else {
0
1368-
1369 w = QApplicationPrivate::focus_widget;-
1370 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
&& QApplicationPrivate::active_window->focusPolicy() != Qt::NoFocus
QApplicationPr...!= Qt::NoFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1371 QApplicationPrivate::setFocusWidget(QApplicationPrivate::active_window, Qt::ActiveWindowFocusReason);
never executed: QApplicationPrivate::setFocusWidget(QApplicationPrivate::active_window, Qt::ActiveWindowFocusReason);
0
1372 else if (!QApplicationPrivate::active_window->isAncestorOf(w)
!QApplicationP...sAncestorOf(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1373 QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
never executed: QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
0
1374 }
never executed: end of block
0
1375 }-
1376 }-
1377 }
never executed: end of block
0
1378}
never executed: end of block
0
1379-
1380QWidget *qt_tlw_for_window(QWindow *wnd)-
1381{-
1382-
1383 while (wnd
wndDescription
TRUEnever evaluated
FALSEnever evaluated
&& !wnd->isTopLevel()
!wnd->isTopLevel()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1384 QWindow *parent = wnd->parent();-
1385-
1386 if (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& parent->type() != Qt::ForeignWindow
parent->type()...:ForeignWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1387 wnd = wnd->parent();
never executed: wnd = wnd->parent();
0
1388 else-
1389 break;
never executed: break;
0
1390 }-
1391 if (wnd
wndDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1392 const auto tlws = (static_cast<QApplication *>(QCoreApplication::instance()))->topLevelWidgets();-
1393 for (QWidget *tlw : tlws) {-
1394 if (tlw->windowHandle() == wnd
tlw->windowHandle() == wndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1395 return
never executed: return tlw;
tlw;
never executed: return tlw;
0
1396 }
never executed: end of block
0
1397 }
never executed: end of block
0
1398 return
never executed: return 0;
0;
never executed: return 0;
0
1399}-
1400-
1401void QApplicationPrivate::notifyActiveWindowChange(QWindow *previous)-
1402{-
1403 (void)previous;;-
1404 QWindow *wnd = QGuiApplicationPrivate::focus_window;-
1405 if (inPopupMode()
inPopupMode()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1406 return;
never executed: return;
0
1407 QWidget *tlw = qt_tlw_for_window(wnd);-
1408 QApplication::setActiveWindow(tlw);-
1409-
1410 if (wnd
wndDescription
TRUEnever evaluated
FALSEnever evaluated
&& tlw
tlwDescription
TRUEnever evaluated
FALSEnever evaluated
&& wnd != tlw->windowHandle()
wnd != tlw->windowHandle()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1411 if (QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(wnd)
QWidgetWindow ...Window *>(wnd)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1412 if (QWidget *widget = widgetWindow->widget()
QWidget *widge...ndow->widget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1413 if (widget->inherits("QAxHostWidget")
widget->inheri...AxHostWidget")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1414 widget->setFocus(Qt::ActiveWindowFocusReason);
never executed: widget->setFocus(Qt::ActiveWindowFocusReason);
0
1415 }
never executed: end of block
0
1416}
never executed: end of block
0
1417-
1418-
1419-
1420-
1421-
1422-
1423QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool next,-
1424 bool *wrappingOccurred)-
1425{-
1426 uint focus_flag = qt_tab_all_widgets()
qt_tab_all_widgets()Description
TRUEnever evaluated
FALSEnever evaluated
? Qt::TabFocus : Qt::StrongFocus;
0
1427-
1428 QWidget *f = toplevel->focusWidget();-
1429 if (!f
!fDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1430 f = toplevel;
never executed: f = toplevel;
0
1431-
1432 QWidget *w = f;-
1433 QWidget *test = f->d_func()->focus_next;-
1434 bool seenWindow = false;-
1435 bool focusWidgetAfterWindow = false;-
1436 while (test
testDescription
TRUEnever evaluated
FALSEnever evaluated
&& test != f
test != fDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1437 if (test->isWindow()
test->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1438 seenWindow = true;
never executed: seenWindow = true;
0
1439-
1440 if ((
(test->focusPo... == focus_flagDescription
TRUEnever evaluated
FALSEnever evaluated
test->focusPolicy() & focus_flag) == focus_flag
(test->focusPo... == focus_flagDescription
TRUEnever evaluated
FALSEnever evaluated
0
1441 && !(test->d_func()->extra
test->d_func()->extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& test->d_func()->extra->focus_proxy
test->d_func()...a->focus_proxyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1442 && test->isVisibleTo(toplevel)
test->isVisibleTo(toplevel)Description
TRUEnever evaluated
FALSEnever evaluated
&& test->isEnabled()
test->isEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
0
1443 && !(w->windowType() == Qt::SubWindow
w->windowType(... Qt::SubWindowDescription
TRUEnever evaluated
FALSEnever evaluated
&& !w->isAncestorOf(test)
!w->isAncestorOf(test)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1444 && (toplevel->windowType() != Qt::SubWindow
toplevel->wind... Qt::SubWindowDescription
TRUEnever evaluated
FALSEnever evaluated
|| toplevel->isAncestorOf(test)
toplevel->isAncestorOf(test)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1445 w = test;-
1446 if (seenWindow
seenWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1447 focusWidgetAfterWindow = true;
never executed: focusWidgetAfterWindow = true;
0
1448 if (next
nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1449 break;
never executed: break;
0
1450 }
never executed: end of block
0
1451 test = test->d_func()->focus_next;-
1452 }
never executed: end of block
0
1453-
1454 if (wrappingOccurred != 0
wrappingOccurred != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1455 *
never executed: *wrappingOccurred = next ? focusWidgetAfterWindow : !focusWidgetAfterWindow;
wrappingOccurred = next
nextDescription
TRUEnever evaluated
FALSEnever evaluated
? focusWidgetAfterWindow : !focusWidgetAfterWindow;
never executed: *wrappingOccurred = next ? focusWidgetAfterWindow : !focusWidgetAfterWindow;
0
1456-
1457 if (w == f
w == fDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1458 if (qt_in_tab_key_event
qt_in_tab_key_eventDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1459 w->window()->setAttribute(Qt::WA_KeyboardFocusChange);-
1460 w->update();-
1461 }
never executed: end of block
0
1462 return
never executed: return 0;
0;
never executed: return 0;
0
1463 }-
1464 return
never executed: return w;
w;
never executed: return w;
0
1465}-
1466void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, const QPointF &globalPosF)-
1467{-
1468 if ((!enter
!enterDescription
TRUEnever evaluated
FALSEnever evaluated
&& !leave
!leaveDescription
TRUEnever evaluated
FALSEnever evaluated
) || (
(enter == leave)Description
TRUEnever evaluated
FALSEnever evaluated
enter == leave)
(enter == leave)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1469 return;
never executed: return;
0
1470-
1471-
1472-
1473 QWidgetList leaveList;-
1474 QWidgetList enterList;-
1475-
1476 bool sameWindow = leave
leaveDescription
TRUEnever evaluated
FALSEnever evaluated
&& enter
enterDescription
TRUEnever evaluated
FALSEnever evaluated
&& leave->window() == enter->window()
leave->window(...nter->window()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
1477 if (leave
leaveDescription
TRUEnever evaluated
FALSEnever evaluated
&& !sameWindow
!sameWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1478 auto *w = leave;-
1479 do {-
1480 leaveList.append(w);-
1481 }
never executed: end of block
while (!w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(w = w->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
w = w->parentWidget())
(w = w->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1482 }
never executed: end of block
0
1483 if (enter
enterDescription
TRUEnever evaluated
FALSEnever evaluated
&& !sameWindow
!sameWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1484 auto *w = enter;-
1485 do {-
1486 enterList.append(w);-
1487 }
never executed: end of block
while (!w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(w = w->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
w = w->parentWidget())
(w = w->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1488 }
never executed: end of block
0
1489 if (sameWindow
sameWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1490 int enterDepth = 0;-
1491 int leaveDepth = 0;-
1492 auto *e = enter;-
1493 while (!e->isWindow()
!e->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(e = e->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
e = e->parentWidget())
(e = e->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1494 enterDepth++;
never executed: enterDepth++;
0
1495 auto *l = leave;-
1496 while (!l->isWindow()
!l->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(l = l->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
l = l->parentWidget())
(l = l->parentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1497 leaveDepth++;
never executed: leaveDepth++;
0
1498 QWidget* wenter = enter;-
1499 QWidget* wleave = leave;-
1500 while (enterDepth > leaveDepth
enterDepth > leaveDepthDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1501 wenter = wenter->parentWidget();-
1502 enterDepth--;-
1503 }
never executed: end of block
0
1504 while (leaveDepth > enterDepth
leaveDepth > enterDepthDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1505 wleave = wleave->parentWidget();-
1506 leaveDepth--;-
1507 }
never executed: end of block
0
1508 while (!wenter->isWindow()
!wenter->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& wenter != wleave
wenter != wleaveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1509 wenter = wenter->parentWidget();-
1510 wleave = wleave->parentWidget();-
1511 }
never executed: end of block
0
1512-
1513 for (auto *w = leave; w != wleave
w != wleaveDescription
TRUEnever evaluated
FALSEnever evaluated
; w = w->parentWidget())
0
1514 leaveList.append(w);
never executed: leaveList.append(w);
0
1515-
1516 for (auto *w = enter; w != wenter
w != wenterDescription
TRUEnever evaluated
FALSEnever evaluated
; w = w->parentWidget())
0
1517 enterList.append(w);
never executed: enterList.append(w);
0
1518 }
never executed: end of block
0
1519-
1520 QEvent leaveEvent(QEvent::Leave);-
1521 for (int i = 0; i < leaveList.size()
i < leaveList.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1522 auto *w = leaveList.at(i);-
1523 if (!QApplication::activeModalWidget()
!QApplication:...eModalWidget()Description
TRUEnever evaluated
FALSEnever evaluated
|| QApplicationPrivate::tryModalHelper(w, 0)
QApplicationPr...alHelper(w, 0)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1524 QApplication::sendEvent(w, &leaveEvent);-
1525 if (w->testAttribute(Qt::WA_Hover)
w->testAttribute(Qt::WA_Hover)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1526 (!QApplication::activePopupWidget()
!QApplication:...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
|| QApplication::activePopupWidget() == w->window()
QApplication::...== w->window()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1527 ((!(instance())) ? qt_assert("instance()",__FILE__,2391) : qt_noop());-
1528 QHoverEvent he(QEvent::HoverLeave, QPoint(-1, -1), w->mapFromGlobal(QApplicationPrivate::instance()->hoverGlobalPos),-
1529 QApplication::keyboardModifiers());-
1530 (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->notify_helper(w, &he);-
1531 }
never executed: end of block
0
1532 }
never executed: end of block
0
1533 }
never executed: end of block
0
1534 if (!enterList.isEmpty()
!enterList.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1535-
1536 const QPoint globalPos = qIsInf(globalPosF.x())
qIsInf(globalPosF.x())Description
TRUEnever evaluated
FALSEnever evaluated
0
1537 ? QPoint(((1<<24)-1), ((1<<24)-1))-
1538 : globalPosF.toPoint();-
1539 const QPoint windowPos = qAsConst(enterList).back()->window()->mapFromGlobal(globalPos);-
1540 for (auto it = enterList.crbegin(), end = enterList.crend(); it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
1541 auto *w = *it;-
1542 if (!QApplication::activeModalWidget()
!QApplication:...eModalWidget()Description
TRUEnever evaluated
FALSEnever evaluated
|| QApplicationPrivate::tryModalHelper(w, 0)
QApplicationPr...alHelper(w, 0)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1543 const QPointF localPos = w->mapFromGlobal(globalPos);-
1544 QEnterEvent enterEvent(localPos, windowPos, globalPosF);-
1545 QApplication::sendEvent(w, &enterEvent);-
1546 if (w->testAttribute(Qt::WA_Hover)
w->testAttribute(Qt::WA_Hover)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1547 (!QApplication::activePopupWidget()
!QApplication:...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
|| QApplication::activePopupWidget() == w->window()
QApplication::...== w->window()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1548 QHoverEvent he(QEvent::HoverEnter, localPos, QPoint(-1, -1),-
1549 QApplication::keyboardModifiers());-
1550 (static_cast<QApplication *>(QCoreApplication::instance()))->d_func()->notify_helper(w, &he);-
1551 }
never executed: end of block
0
1552 }
never executed: end of block
0
1553 }
never executed: end of block
0
1554 }
never executed: end of block
0
1555-
1556-
1557-
1558-
1559 const bool enterOnAlien = (enter
enterDescription
TRUEnever evaluated
FALSEnever evaluated
&& (isAlien(enter)
isAlien(enter)Description
TRUEnever evaluated
FALSEnever evaluated
|| enter->testAttribute(Qt::WA_DontShowOnScreen)
enter->testAtt...tShowOnScreen)Description
TRUEnever evaluated
FALSEnever evaluated
));
0
1560-
1561-
1562 QWidget *parentOfLeavingCursor = 0;-
1563 for (int i = 0; i < leaveList.size()
i < leaveList.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1564 auto *w = leaveList.at(i);-
1565 if (!isAlien(w)
!isAlien(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1566 break;
never executed: break;
0
1567 if (w->testAttribute(Qt::WA_SetCursor)
w->testAttribu...:WA_SetCursor)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1568 QWidget *parent = w->parentWidget();-
1569 while (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& parent->d_func()->data.in_destructor
parent->d_func....in_destructorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1570 parent = parent->parentWidget();
never executed: parent = parent->parentWidget();
0
1571 parentOfLeavingCursor = parent;-
1572-
1573-
1574 }
never executed: end of block
0
1575 }
never executed: end of block
0
1576-
1577 if (parentOfLeavingCursor
parentOfLeavingCursorDescription
TRUEnever evaluated
FALSEnever evaluated
&& (!enterOnAlien
!enterOnAlienDescription
TRUEnever evaluated
FALSEnever evaluated
0
1578 || parentOfLeavingCursor->effectiveWinId() != enter->effectiveWinId()
parentOfLeavin...fectiveWinId()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1579-
1580 if (!parentOfLeavingCursor->window()->graphicsProxyWidget()
!parentOfLeavi...sProxyWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1581-
1582 {-
1583 if (enter == QApplication::desktop()
enter == QAppl...ion::desktop()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1584 qt_qpa_set_cursor(enter, true);-
1585 }
never executed: end of block
else {
0
1586 qt_qpa_set_cursor(parentOfLeavingCursor, true);-
1587 }
never executed: end of block
0
1588 }-
1589 }
never executed: end of block
0
1590 if (enterOnAlien
enterOnAlienDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1591 QWidget *cursorWidget = enter;-
1592 while (!cursorWidget->isWindow()
!cursorWidget->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& !cursorWidget->isEnabled()
!cursorWidget->isEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1593 cursorWidget = cursorWidget->parentWidget();
never executed: cursorWidget = cursorWidget->parentWidget();
0
1594-
1595 if (!cursorWidget
!cursorWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1596 return;
never executed: return;
0
1597-
1598-
1599 if (cursorWidget->window()->graphicsProxyWidget()
cursorWidget->...sProxyWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1600 QWidgetPrivate::nearestGraphicsProxyWidget(cursorWidget)->setCursor(cursorWidget->cursor());-
1601 }
never executed: end of block
else
0
1602-
1603 {-
1604 qt_qpa_set_cursor(cursorWidget, true);-
1605 }
never executed: end of block
0
1606 }-
1607-
1608}
never executed: end of block
0
1609-
1610-
1611__attribute__((visibility("default"))) bool qt_tryModalHelper(QWidget *widget, QWidget **rettop)-
1612{-
1613 return
never executed: return QApplicationPrivate::tryModalHelper(widget, rettop);
QApplicationPrivate::tryModalHelper(widget, rettop);
never executed: return QApplicationPrivate::tryModalHelper(widget, rettop);
0
1614}-
1615-
1616-
1617-
1618-
1619bool QApplicationPrivate::isBlockedByModal(QWidget *widget)-
1620{-
1621 widget = widget->window();-
1622 QWindow *window = widget->windowHandle();-
1623 return
never executed: return window && self->isWindowBlocked(window);
window && self->isWindowBlocked(window);
never executed: return window && self->isWindowBlocked(window);
0
1624}-
1625-
1626bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const-
1627{-
1628 QWindow *unused = 0;-
1629 if (__builtin_expect(!!(!window), false)
__builtin_expe...indow), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1630 QMessageLogger(__FILE__, 2494, __PRETTY_FUNCTION__).warning().nospace() << "window == 0 passed.";-
1631 return
never executed: return false;
false;
never executed: return false;
0
1632 }-
1633 if (!blockingWindow
!blockingWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1634 blockingWindow = &unused;
never executed: blockingWindow = &unused;
0
1635-
1636 if (modalWindowList.isEmpty()
modalWindowList.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1637 *blockingWindow = 0;-
1638 return
never executed: return false;
false;
never executed: return false;
0
1639 }-
1640 QWidget *popupWidget = QApplication::activePopupWidget();-
1641 QWindow *popupWindow = popupWidget
popupWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
? popupWidget->windowHandle() : 0;
0
1642 if (popupWindow == window
popupWindow == windowDescription
TRUEnever evaluated
FALSEnever evaluated
|| (!popupWindow
!popupWindowDescription
TRUEnever evaluated
FALSEnever evaluated
&& QWindowPrivate::get(window)->isPopup()
QWindowPrivate...ow)->isPopup()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1643 *blockingWindow = 0;-
1644 return
never executed: return false;
false;
never executed: return false;
0
1645 }-
1646-
1647 for (int i = 0; i < modalWindowList.count()
i < modalWindowList.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1648 QWindow *modalWindow = modalWindowList.at(i);-
1649-
1650 {-
1651-
1652 QWindow *w = window;-
1653 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1654 if (w == modalWindow
w == modalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1655 *blockingWindow = 0;-
1656 return
never executed: return false;
false;
never executed: return false;
0
1657 }-
1658 QWindow *p = w->parent();-
1659 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1660 p = w->transientParent();
never executed: p = w->transientParent();
0
1661 w = p;-
1662 }
never executed: end of block
0
1663-
1664-
1665-
1666 const QPlatformWindow *platWin = window->handle();-
1667 const QPlatformWindow *modalPlatWin = modalWindow->handle();-
1668 if (platWin
platWinDescription
TRUEnever evaluated
FALSEnever evaluated
&& modalPlatWin
modalPlatWinDescription
TRUEnever evaluated
FALSEnever evaluated
&& platWin->isEmbedded(modalPlatWin)
platWin->isEmb...(modalPlatWin)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1669 return
never executed: return false;
false;
never executed: return false;
0
1670 }-
1671-
1672 Qt::WindowModality windowModality = modalWindow->modality();-
1673 QWidgetWindow *modalWidgetWindow = qobject_cast<QWidgetWindow *>(modalWindow);-
1674 if (windowModality == Qt::NonModal
windowModality == Qt::NonModalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1675-
1676-
1677-
1678-
1679 QWidget *m = modalWidgetWindow
modalWidgetWindowDescription
TRUEnever evaluated
FALSEnever evaluated
? modalWidgetWindow->widget() : 0;
0
1680 while (m
mDescription
TRUEnever evaluated
FALSEnever evaluated
&& !m->testAttribute(Qt::WA_GroupLeader)
!m->testAttrib...A_GroupLeader)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1681 m = m->parentWidget();-
1682 if (m
mDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1683 m = m->window();
never executed: m = m->window();
0
1684 }
never executed: end of block
0
1685 windowModality = (m
mDescription
TRUEnever evaluated
FALSEnever evaluated
&& m->testAttribute(Qt::WA_GroupLeader)
m->testAttribu...A_GroupLeader)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1686 ? Qt::WindowModal-
1687 : Qt::ApplicationModal;-
1688 }
never executed: end of block
0
1689-
1690 switch (windowModality) {-
1691 case
never executed: case Qt::ApplicationModal:
Qt::ApplicationModal:
never executed: case Qt::ApplicationModal:
0
1692 {-
1693 QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(window);-
1694 QWidget *groupLeaderForWidget = widgetWindow
widgetWindowDescription
TRUEnever evaluated
FALSEnever evaluated
? widgetWindow->widget() : 0;
0
1695 while (groupLeaderForWidget
groupLeaderForWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !groupLeaderForWidget->testAttribute(Qt::WA_GroupLeader)
!groupLeaderFo...A_GroupLeader)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1696 groupLeaderForWidget = groupLeaderForWidget->parentWidget();
never executed: groupLeaderForWidget = groupLeaderForWidget->parentWidget();
0
1697-
1698 if (groupLeaderForWidget
groupLeaderForWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1699-
1700 QWidget *m = modalWidgetWindow
modalWidgetWindowDescription
TRUEnever evaluated
FALSEnever evaluated
? modalWidgetWindow->widget() : 0;
0
1701 while (m
mDescription
TRUEnever evaluated
FALSEnever evaluated
&& m != groupLeaderForWidget
m != groupLeaderForWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !m->testAttribute(Qt::WA_GroupLeader)
!m->testAttrib...A_GroupLeader)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1702 m = m->parentWidget();
never executed: m = m->parentWidget();
0
1703 if (m == groupLeaderForWidget
m == groupLeaderForWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1704 *blockingWindow = m->windowHandle();-
1705 return
never executed: return true;
true;
never executed: return true;
0
1706 }-
1707 }
never executed: end of block
else if (modalWindow != window
modalWindow != windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1708 *blockingWindow = modalWindow;-
1709 return
never executed: return true;
true;
never executed: return true;
0
1710 }-
1711 break;
never executed: break;
0
1712 }-
1713 case
never executed: case Qt::WindowModal:
Qt::WindowModal:
never executed: case Qt::WindowModal:
0
1714 {-
1715 QWindow *w = window;-
1716 do {-
1717 QWindow *m = modalWindow;-
1718 do {-
1719 if (m == w
m == wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1720 *blockingWindow = m;-
1721 return
never executed: return true;
true;
never executed: return true;
0
1722 }-
1723 QWindow *p = m->parent();-
1724 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1725 p = m->transientParent();
never executed: p = m->transientParent();
0
1726 m = p;-
1727 }
never executed: end of block
while (m
mDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1728 QWindow *p = w->parent();-
1729 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1730 p = w->transientParent();
never executed: p = w->transientParent();
0
1731 w = p;-
1732 }
never executed: end of block
while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1733 break;
never executed: break;
0
1734 }-
1735 default
never executed: default:
:
never executed: default:
0
1736 ((!(false)) ? qt_assert_x("QApplication", "internal error, a modal window cannot be modeless",__FILE__,2600) : qt_noop());-
1737 break;
never executed: break;
0
1738 }-
1739 }-
1740 *blockingWindow = 0;-
1741 return
never executed: return false;
false;
never executed: return false;
0
1742}-
1743-
1744-
1745-
1746-
1747-
1748-
1749bool QApplicationPrivate::tryModalHelper(QWidget *widget, QWidget **rettop)-
1750{-
1751 QWidget *top = QApplication::activeModalWidget();-
1752 if (rettop
rettopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1753 *
never executed: *rettop = top;
rettop = top;
never executed: *rettop = top;
0
1754-
1755-
1756 if (QApplication::activePopupWidget()
QApplication::...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1757 return
never executed: return true;
true;
never executed: return true;
0
1758-
1759 return
never executed: return !isBlockedByModal(widget->window());
!isBlockedByModal(widget->window());
never executed: return !isBlockedByModal(widget->window());
0
1760}-
1761-
1762bool qt_try_modal(QWidget *widget, QEvent::Type type)-
1763{-
1764 QWidget * top = 0;-
1765-
1766 if (QApplicationPrivate::tryModalHelper(widget, &top)
QApplicationPr...(widget, &top)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1767 return
never executed: return true;
true;
never executed: return true;
0
1768-
1769 bool block_event = false;-
1770-
1771 switch (type) {-
1772-
1773-
1774-
1775-
1776-
1777-
1778 case
never executed: case QEvent::MouseButtonPress:
QEvent::MouseButtonPress:
never executed: case QEvent::MouseButtonPress:
0
1779 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
0
1780 case
never executed: case QEvent::MouseMove:
QEvent::MouseMove:
never executed: case QEvent::MouseMove:
0
1781 case
never executed: case QEvent::KeyPress:
QEvent::KeyPress:
never executed: case QEvent::KeyPress:
0
1782 case
never executed: case QEvent::KeyRelease:
QEvent::KeyRelease:
never executed: case QEvent::KeyRelease:
0
1783 block_event = true;-
1784 break;
never executed: break;
0
1785 default
never executed: default:
:
never executed: default:
0
1786 break;
never executed: break;
0
1787 }-
1788-
1789 if (block_event
block_eventDescription
TRUEnever evaluated
FALSEnever evaluated
&& top
topDescription
TRUEnever evaluated
FALSEnever evaluated
&& top->parentWidget() == 0
top->parentWidget() == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1790 top->raise();
never executed: top->raise();
0
1791-
1792 return
never executed: return !block_event;
!block_event;
never executed: return !block_event;
0
1793}-
1794-
1795bool QApplicationPrivate::modalState()-
1796{-
1797 return
never executed: return !self->modalWindowList.isEmpty();
!self->modalWindowList.isEmpty();
never executed: return !self->modalWindowList.isEmpty();
0
1798}-
1799-
1800-
1801-
1802-
1803QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint &windowPos,-
1804 QPoint *pos, QEvent::Type type,-
1805 Qt::MouseButtons buttons, QWidget *buttonDown,-
1806 QWidget *alienWidget)-
1807{-
1808 ((!(candidate)) ? qt_assert("candidate",__FILE__,2672) : qt_noop());-
1809-
1810 QWidget *mouseGrabber = QWidget::mouseGrabber();-
1811 if (((type == QEvent::MouseMove
type == QEvent::MouseMoveDescription
TRUEnever evaluated
FALSEnever evaluated
&& buttons
buttonsDescription
TRUEnever evaluated
FALSEnever evaluated
) || (
(type == QEven...ButtonRelease)Description
TRUEnever evaluated
FALSEnever evaluated
type == QEvent::MouseButtonRelease)
(type == QEven...ButtonRelease)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1812 && !buttonDown
!buttonDownDescription
TRUEnever evaluated
FALSEnever evaluated
&& !mouseGrabber
!mouseGrabberDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1813 return
never executed: return 0;
0;
never executed: return 0;
0
1814 }-
1815-
1816 if (alienWidget
alienWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& alienWidget->internalWinId()
alienWidget->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1817 alienWidget = 0;
never executed: alienWidget = 0;
0
1818-
1819 QWidget *receiver = candidate;-
1820-
1821 if (!mouseGrabber
!mouseGrabberDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1822 mouseGrabber = (buttonDown
buttonDownDescription
TRUEnever evaluated
FALSEnever evaluated
&& !isBlockedByModal(buttonDown)
!isBlockedByModal(buttonDown)Description
TRUEnever evaluated
FALSEnever evaluated
) ? buttonDown : alienWidget;
never executed: mouseGrabber = (buttonDown && !isBlockedByModal(buttonDown)) ? buttonDown : alienWidget;
0
1823-
1824 if (mouseGrabber
mouseGrabberDescription
TRUEnever evaluated
FALSEnever evaluated
&& mouseGrabber != candidate
mouseGrabber != candidateDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1825 receiver = mouseGrabber;-
1826 *pos = receiver->mapFromGlobal(candidate->mapToGlobal(windowPos));-
1827-
1828-
1829-
1830 }
never executed: end of block
0
1831-
1832 return
never executed: return receiver;
receiver;
never executed: return receiver;
0
1833-
1834}-
1835-
1836-
1837-
1838-
1839bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,-
1840 QWidget *alienWidget, QWidget *nativeWidget,-
1841 QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,-
1842 bool spontaneous)-
1843{-
1844 ((!(receiver)) ? qt_assert("receiver",__FILE__,2708) : qt_noop());-
1845 ((!(event)) ? qt_assert("event",__FILE__,2709) : qt_noop());-
1846 ((!(nativeWidget)) ? qt_assert("nativeWidget",__FILE__,2710) : qt_noop());-
1847 ((!(buttonDown)) ? qt_assert("buttonDown",__FILE__,2711) : qt_noop());-
1848-
1849 if (alienWidget
alienWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !isAlien(alienWidget)
!isAlien(alienWidget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1850 alienWidget = 0;
never executed: alienWidget = 0;
0
1851-
1852 QPointer<QWidget> receiverGuard = receiver;-
1853 QPointer<QWidget> nativeGuard = nativeWidget;-
1854 QPointer<QWidget> alienGuard = alienWidget;-
1855 QPointer<QWidget> activePopupWidget = QApplication::activePopupWidget();-
1856-
1857 const bool graphicsWidget = nativeWidget->testAttribute(Qt::WA_DontShowOnScreen);-
1858-
1859 bool widgetUnderMouse = QRectF(receiver->rect()).contains(event->localPos());-
1860-
1861-
1862-
1863-
1864 if (leaveAfterRelease
leaveAfterReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
&& !*buttonDown
!*buttonDownDescription
TRUEnever evaluated
FALSEnever evaluated
&& !event->buttons()
!event->buttons()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1865 leaveAfterRelease = 0;
never executed: leaveAfterRelease = 0;
0
1866-
1867 if (*
*buttonDownDescription
TRUEnever evaluated
FALSEnever evaluated
buttonDown
*buttonDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1868 if (!graphicsWidget
!graphicsWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1869-
1870-
1871 if ((alienWidget
alienWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
|| !receiver->internalWinId()
!receiver->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
) && !leaveAfterRelease
!leaveAfterReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QWidget::mouseGrabber()
!QWidget::mouseGrabber()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1872 leaveAfterRelease = *buttonDown;
never executed: leaveAfterRelease = *buttonDown;
0
1873 if (event->type() == QEvent::MouseButtonRelease
event->type() ...eButtonReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
&& !event->buttons()
!event->buttons()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1874 *
never executed: *buttonDown = 0;
buttonDown = 0;
never executed: *buttonDown = 0;
0
1875 }
never executed: end of block
0
1876 }
never executed: end of block
else if (lastMouseReceiver
lastMouseReceiverDescription
TRUEnever evaluated
FALSEnever evaluated
&& widgetUnderMouse
widgetUnderMouseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1877-
1878-
1879-
1880-
1881 if ((alienWidget
alienWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& alienWidget != lastMouseReceiver
alienWidget !=...tMouseReceiverDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1882 || (isAlien(lastMouseReceiver)
isAlien(lastMouseReceiver)Description
TRUEnever evaluated
FALSEnever evaluated
&& !alienWidget
!alienWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1883 if (activePopupWidget
activePopupWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1884 if (!QWidget::mouseGrabber()
!QWidget::mouseGrabber()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1885 dispatchEnterLeave(alienWidget ? alienWidget : nativeWidget, lastMouseReceiver, event->screenPos());
never executed: dispatchEnterLeave(alienWidget ? alienWidget : nativeWidget, lastMouseReceiver, event->screenPos());
0
1886 }
never executed: end of block
else {
0
1887 dispatchEnterLeave(receiver, lastMouseReceiver, event->screenPos());-
1888 }
never executed: end of block
0
1889-
1890 }-
1891 }
never executed: end of block
0
1892 const bool wasLeaveAfterRelease = leaveAfterRelease != 0;-
1893 bool result;-
1894 if (spontaneous
spontaneousDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1895 result = QApplication::sendSpontaneousEvent(receiver, event);
never executed: result = QApplication::sendSpontaneousEvent(receiver, event);
0
1896 else-
1897 result = QApplication::sendEvent(receiver, event);
never executed: result = QApplication::sendEvent(receiver, event);
0
1898-
1899 if (!graphicsWidget
!graphicsWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& leaveAfterRelease
leaveAfterReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
&& event->type() == QEvent::MouseButtonRelease
event->type() ...eButtonReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
0
1900 && !event->buttons()
!event->buttons()Description
TRUEnever evaluated
FALSEnever evaluated
&& QWidget::mouseGrabber() != leaveAfterRelease
QWidget::mouse...veAfterReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1901-
1902-
1903-
1904 QWidget *enter = 0;-
1905 if (nativeGuard
nativeGuardDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1906 enter = alienGuard
alienGuardDescription
TRUEnever evaluated
FALSEnever evaluated
? alienWidget : nativeWidget;
never executed: enter = alienGuard ? alienWidget : nativeWidget;
0
1907 else-
1908 enter = QApplication::widgetAt(event->globalPos());
never executed: enter = QApplication::widgetAt(event->globalPos());
0
1909 dispatchEnterLeave(enter, leaveAfterRelease, event->screenPos());-
1910 leaveAfterRelease = 0;-
1911 lastMouseReceiver = enter;-
1912 }
never executed: end of block
else if (!wasLeaveAfterRelease
!wasLeaveAfterReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1913 if (activePopupWidget
activePopupWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1914 if (!QWidget::mouseGrabber()
!QWidget::mouseGrabber()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1915 lastMouseReceiver = alienGuard
alienGuardDescription
TRUEnever evaluated
FALSEnever evaluated
? alienWidget : (nativeGuard
nativeGuardDescription
TRUEnever evaluated
FALSEnever evaluated
? nativeWidget : 0);
never executed: lastMouseReceiver = alienGuard ? alienWidget : (nativeGuard ? nativeWidget : 0);
0
1916 }
never executed: end of block
else {
0
1917 lastMouseReceiver = receiverGuard
receiverGuardDescription
TRUEnever evaluated
FALSEnever evaluated
? receiver : QApplication::widgetAt(event->globalPos());
0
1918 }
never executed: end of block
0
1919 }-
1920-
1921 return
never executed: return result;
result;
never executed: return result;
0
1922}-
1923-
1924-
1925-
1926-
1927-
1928-
1929-
1930extern QPointer<QWidget> qt_last_mouse_receiver;-
1931extern QWidget *qt_button_down;-
1932void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)-
1933{-
1934-
1935 if (!widget
!widgetDescription
TRUEnever evaluated
FALSEnever evaluated
|| widget->isWindow()
widget->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1936 return;
never executed: return;
0
1937 const bool widgetInShow = widget->isVisible()
widget->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& !widget->data->in_destructor
!widget->data->in_destructorDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
1938 if (!widgetInShow
!widgetInShowDescription
TRUEnever evaluated
FALSEnever evaluated
&& widget != qt_last_mouse_receiver
widget != qt_l...mouse_receiverDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1939 return;
never executed: return;
0
1940-
1941 if (widgetInShow
widgetInShowDescription
TRUEnever evaluated
FALSEnever evaluated
&& widget->parentWidget()->data->in_show
widget->parent...>data->in_showDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1942 return;
never executed: return;
0
1943-
1944 QWidget *mouseGrabber = QWidget::mouseGrabber();-
1945 if (mouseGrabber
mouseGrabberDescription
TRUEnever evaluated
FALSEnever evaluated
&& mouseGrabber != widget
mouseGrabber != widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1946 return;
never executed: return;
0
1947-
1948 QWidget *tlw = widget->window();-
1949 if (tlw->data->in_destructor
tlw->data->in_destructorDescription
TRUEnever evaluated
FALSEnever evaluated
|| tlw->data->is_closing
tlw->data->is_closingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1950 return;
never executed: return;
0
1951-
1952 if (widgetInShow
widgetInShowDescription
TRUEnever evaluated
FALSEnever evaluated
&& (!qt_last_mouse_receiver
!qt_last_mouse_receiverDescription
TRUEnever evaluated
FALSEnever evaluated
|| qt_last_mouse_receiver->window() != tlw
qt_last_mouse_...indow() != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
1953 return;
never executed: return;
0
1954-
1955 const QPoint globalPos(QCursor::pos());-
1956 QPoint windowPos = tlw->mapFromGlobal(globalPos);-
1957-
1958-
1959-
1960-
1961 QWidget *widgetUnderCursor = tlw->d_func()->childAt_helper(windowPos, widget->data->in_destructor);-
1962 if (!widgetUnderCursor
!widgetUnderCursorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1963 widgetUnderCursor = tlw;
never executed: widgetUnderCursor = tlw;
0
1964 QPoint pos = widgetUnderCursor->mapFrom(tlw, windowPos);-
1965-
1966 if (widgetInShow
widgetInShowDescription
TRUEnever evaluated
FALSEnever evaluated
&& widgetUnderCursor != widget
widgetUnderCursor != widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !widget->isAncestorOf(widgetUnderCursor)
!widget->isAnc...etUnderCursor)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1967 return;
never executed: return;
0
1968-
1969 if (widget->data->in_destructor
widget->data->in_destructorDescription
TRUEnever evaluated
FALSEnever evaluated
&& qt_button_down == widget
qt_button_down == widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1970 qt_button_down = 0;
never executed: qt_button_down = 0;
0
1971-
1972-
1973 QMouseEvent e(QEvent::MouseMove, pos, windowPos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);-
1974 sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);-
1975-
1976}
never executed: end of block
0
1977QDesktopWidget *QApplication::desktop()-
1978{-
1979 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 2865, __PRETTY_FUNCTION__).warning("Must construct a QApplication first."); return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
}
0
1980 if (!qt_desktopWidget
!qt_desktopWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
1981 !(qt_desktopWidget->windowType() == Qt::Desktop)
!(qt_desktopWi...= Qt::Desktop)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1982 qt_desktopWidget = new QDesktopWidget();-
1983 }
never executed: end of block
0
1984 return
never executed: return qt_desktopWidget;
qt_desktopWidget;
never executed: return qt_desktopWidget;
0
1985}-
1986-
1987-
1988-
1989-
1990-
1991-
1992-
1993void QApplication::setStartDragTime(int ms)-
1994{-
1995 QGuiApplication::styleHints()->setStartDragTime(ms);-
1996}
never executed: end of block
0
1997int QApplication::startDragTime()-
1998{-
1999 return
never executed: return QGuiApplication::styleHints()->startDragTime();
QGuiApplication::styleHints()->startDragTime();
never executed: return QGuiApplication::styleHints()->startDragTime();
0
2000}-
2001-
2002-
2003-
2004-
2005-
2006-
2007-
2008void QApplication::setStartDragDistance(int l)-
2009{-
2010 QGuiApplication::styleHints()->setStartDragDistance(l);-
2011}
never executed: end of block
0
2012int QApplication::startDragDistance()-
2013{-
2014 return
never executed: return QGuiApplication::styleHints()->startDragDistance();
QGuiApplication::styleHints()->startDragDistance();
never executed: return QGuiApplication::styleHints()->startDragDistance();
0
2015}-
2016int QApplication::exec()-
2017{-
2018 return
never executed: return QGuiApplication::exec();
QGuiApplication::exec();
never executed: return QGuiApplication::exec();
0
2019}-
2020-
2021bool QApplicationPrivate::shouldQuit()-
2022{-
2023-
2024-
2025-
2026 QWidgetList list = QApplication::topLevelWidgets();-
2027 QWindowList processedWindows;-
2028 for (int i = 0; i < list.size()
i < list.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2029 QWidget *w = list.at(i);-
2030 if (QWindow *window = w->windowHandle()
QWindow *windo...windowHandle()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2031 processedWindows.push_back(window);-
2032 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& !w->parentWidget()
!w->parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->testAttribute(Qt::WA_QuitOnClose)
w->testAttribu...A_QuitOnClose)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2033 return
never executed: return false;
false;
never executed: return false;
0
2034 }
never executed: end of block
0
2035 }
never executed: end of block
0
2036 return
never executed: return QGuiApplicationPrivate::shouldQuitInternal(processedWindows);
QGuiApplicationPrivate::shouldQuitInternal(processedWindows);
never executed: return QGuiApplicationPrivate::shouldQuitInternal(processedWindows);
0
2037}-
2038-
2039static inline void closeAllPopups()-
2040{-
2041-
2042-
2043 int maxiter = 1024;-
2044 QWidget *popup;-
2045 while ((
(popup = QAppl...PopupWidget())Description
TRUEnever evaluated
FALSEnever evaluated
popup = QApplication::activePopupWidget())
(popup = QAppl...PopupWidget())Description
TRUEnever evaluated
FALSEnever evaluated
&& maxiter--
maxiter--Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2046 popup->close();
never executed: popup->close();
0
2047}
never executed: end of block
0
2048-
2049-
2050-
2051bool QApplication::notify(QObject *receiver, QEvent *e)-
2052{-
2053 QApplicationPrivate * const d = d_func();-
2054-
2055 if (QApplicationPrivate::is_app_closing
QApplicationPr...is_app_closingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2056 return
never executed: return true;
true;
never executed: return true;
0
2057-
2058 if (__builtin_expect(!!(!receiver), false)
__builtin_expe...eiver), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2059 QMessageLogger(__FILE__, 3016, __PRETTY_FUNCTION__).warning("QApplication::notify: Unexpected null receiver");-
2060 return
never executed: return true;
true;
never executed: return true;
0
2061 }-
2062-
2063-
2064 d->checkReceiverThread(receiver);-
2065-
2066-
2067 if (receiver->isWindowType()
receiver->isWindowType()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2068 QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(receiver), e);
never executed: QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(receiver), e);
0
2069-
2070 if(e->spontaneous()
e->spontaneous()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2071-
2072-
2073-
2074-
2075 switch (e->type()) {-
2076 case
never executed: case QEvent::MouseButtonPress:
QEvent::MouseButtonPress:
never executed: case QEvent::MouseButtonPress:
0
2077 {-
2078 QMouseEvent *me = static_cast<QMouseEvent*>(e);-
2079 QApplicationPrivate::modifier_buttons = me->modifiers();-
2080 QApplicationPrivate::mouse_buttons |= me->button();-
2081 break;
never executed: break;
0
2082 }-
2083 case
never executed: case QEvent::MouseButtonDblClick:
QEvent::MouseButtonDblClick:
never executed: case QEvent::MouseButtonDblClick:
0
2084 {-
2085 QMouseEvent *me = static_cast<QMouseEvent*>(e);-
2086 QApplicationPrivate::modifier_buttons = me->modifiers();-
2087 QApplicationPrivate::mouse_buttons |= me->button();-
2088 break;
never executed: break;
0
2089 }-
2090 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
0
2091 {-
2092 QMouseEvent *me = static_cast<QMouseEvent*>(e);-
2093 QApplicationPrivate::modifier_buttons = me->modifiers();-
2094 QApplicationPrivate::mouse_buttons &= ~me->button();-
2095 break;
never executed: break;
0
2096 }-
2097 case
never executed: case QEvent::KeyPress:
QEvent::KeyPress:
never executed: case QEvent::KeyPress:
0
2098 case
never executed: case QEvent::KeyRelease:
QEvent::KeyRelease:
never executed: case QEvent::KeyRelease:
0
2099 case
never executed: case QEvent::MouseMove:
QEvent::MouseMove:
never executed: case QEvent::MouseMove:
0
2100-
2101 case
never executed: case QEvent::Wheel:
QEvent::Wheel:
never executed: case QEvent::Wheel:
0
2102-
2103 case
never executed: case QEvent::TouchBegin:
QEvent::TouchBegin:
never executed: case QEvent::TouchBegin:
0
2104 case
never executed: case QEvent::TouchUpdate:
QEvent::TouchUpdate:
never executed: case QEvent::TouchUpdate:
0
2105 case
never executed: case QEvent::TouchEnd:
QEvent::TouchEnd:
never executed: case QEvent::TouchEnd:
0
2106-
2107 case
never executed: case QEvent::TabletMove:
QEvent::TabletMove:
never executed: case QEvent::TabletMove:
0
2108 case
never executed: case QEvent::TabletPress:
QEvent::TabletPress:
never executed: case QEvent::TabletPress:
0
2109 case
never executed: case QEvent::TabletRelease:
QEvent::TabletRelease:
never executed: case QEvent::TabletRelease:
0
2110-
2111 {-
2112 QInputEvent *ie = static_cast<QInputEvent*>(e);-
2113 QApplicationPrivate::modifier_buttons = ie->modifiers();-
2114 break;
never executed: break;
0
2115 }-
2116 default
never executed: default:
:
never executed: default:
0
2117 break;
never executed: break;
0
2118 }-
2119 }-
2120-
2121-
2122-
2123 if (d->gestureManager
d->gestureManagerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2124 switch (e->type()) {-
2125 case
never executed: case QEvent::Paint:
QEvent::Paint:
never executed: case QEvent::Paint:
0
2126 case
never executed: case QEvent::MetaCall:
QEvent::MetaCall:
never executed: case QEvent::MetaCall:
0
2127 case
never executed: case QEvent::DeferredDelete:
QEvent::DeferredDelete:
never executed: case QEvent::DeferredDelete:
0
2128 case
never executed: case QEvent::DragEnter:
QEvent::DragEnter:
never executed: case QEvent::DragEnter:
case
never executed: case QEvent::DragMove:
QEvent::DragMove:
never executed: case QEvent::DragMove:
case
never executed: case QEvent::DragLeave:
QEvent::DragLeave:
never executed: case QEvent::DragLeave:
0
2129 case
never executed: case QEvent::Drop:
QEvent::Drop:
never executed: case QEvent::Drop:
case
never executed: case QEvent::DragResponse:
QEvent::DragResponse:
never executed: case QEvent::DragResponse:
0
2130 case
never executed: case QEvent::ChildAdded:
QEvent::ChildAdded:
never executed: case QEvent::ChildAdded:
case
never executed: case QEvent::ChildPolished:
QEvent::ChildPolished:
never executed: case QEvent::ChildPolished:
0
2131 case
never executed: case QEvent::ChildRemoved:
QEvent::ChildRemoved:
never executed: case QEvent::ChildRemoved:
0
2132 case
never executed: case QEvent::UpdateRequest:
QEvent::UpdateRequest:
never executed: case QEvent::UpdateRequest:
0
2133 case
never executed: case QEvent::UpdateLater:
QEvent::UpdateLater:
never executed: case QEvent::UpdateLater:
0
2134 case
never executed: case QEvent::LocaleChange:
QEvent::LocaleChange:
never executed: case QEvent::LocaleChange:
0
2135 case
never executed: case QEvent::Style:
QEvent::Style:
never executed: case QEvent::Style:
0
2136 case
never executed: case QEvent::IconDrag:
QEvent::IconDrag:
never executed: case QEvent::IconDrag:
0
2137 case
never executed: case QEvent::StyleChange:
QEvent::StyleChange:
never executed: case QEvent::StyleChange:
0
2138 case
never executed: case QEvent::GraphicsSceneDragEnter:
QEvent::GraphicsSceneDragEnter:
never executed: case QEvent::GraphicsSceneDragEnter:
0
2139 case
never executed: case QEvent::GraphicsSceneDragMove:
QEvent::GraphicsSceneDragMove:
never executed: case QEvent::GraphicsSceneDragMove:
0
2140 case
never executed: case QEvent::GraphicsSceneDragLeave:
QEvent::GraphicsSceneDragLeave:
never executed: case QEvent::GraphicsSceneDragLeave:
0
2141 case
never executed: case QEvent::GraphicsSceneDrop:
QEvent::GraphicsSceneDrop:
never executed: case QEvent::GraphicsSceneDrop:
0
2142 case
never executed: case QEvent::DynamicPropertyChange:
QEvent::DynamicPropertyChange:
never executed: case QEvent::DynamicPropertyChange:
0
2143 case
never executed: case QEvent::NetworkReplyUpdated:
QEvent::NetworkReplyUpdated:
never executed: case QEvent::NetworkReplyUpdated:
0
2144 break;
never executed: break;
0
2145 default
never executed: default:
:
never executed: default:
0
2146 if (d->gestureManager->thread() == QThread::currentThread()
d->gestureMana...urrentThread()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2147 if (receiver->isWidgetType()
receiver->isWidgetType()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2148 if (d->gestureManager->filterEvent(static_cast<QWidget *>(receiver), e)
d->gestureMana...(receiver), e)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2149 return
never executed: return true;
true;
never executed: return true;
0
2150 }
never executed: end of block
else {
0
2151-
2152-
2153-
2154 if (d->gestureManager->filterEvent(receiver, e)
d->gestureMana...t(receiver, e)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2155 return
never executed: return true;
true;
never executed: return true;
0
2156 }
never executed: end of block
0
2157 }-
2158 break;
never executed: break;
0
2159 }-
2160 }-
2161-
2162-
2163 switch (e->type()) {-
2164 case
never executed: case QEvent::ApplicationDeactivate:
QEvent::ApplicationDeactivate:
never executed: case QEvent::ApplicationDeactivate:
0
2165-
2166-
2167 closeAllPopups();-
2168 break;
never executed: break;
0
2169 case
never executed: case QEvent::Wheel:
QEvent::Wheel:
never executed: case QEvent::Wheel:
0
2170 case
never executed: case QEvent::ActivationChange:
QEvent::ActivationChange:
never executed: case QEvent::ActivationChange:
0
2171 case
never executed: case QEvent::KeyPress:
QEvent::KeyPress:
never executed: case QEvent::KeyPress:
0
2172 case
never executed: case QEvent::KeyRelease:
QEvent::KeyRelease:
never executed: case QEvent::KeyRelease:
0
2173 case
never executed: case QEvent::FocusOut:
QEvent::FocusOut:
never executed: case QEvent::FocusOut:
0
2174 case
never executed: case QEvent::FocusIn:
QEvent::FocusIn:
never executed: case QEvent::FocusIn:
0
2175 case
never executed: case QEvent::MouseButtonPress:
QEvent::MouseButtonPress:
never executed: case QEvent::MouseButtonPress:
0
2176 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
0
2177 case
never executed: case QEvent::MouseButtonDblClick:
QEvent::MouseButtonDblClick:
never executed: case QEvent::MouseButtonDblClick:
0
2178 d->toolTipFallAsleep.stop();-
2179-
2180 case
never executed: case QEvent::Leave:
QEvent::Leave:
never executed: case QEvent::Leave:
code before this statement never executed: case QEvent::Leave:
0
2181 d->toolTipWakeUp.stop();-
2182 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
2183 break;
never executed: break;
0
2184 }-
2185-
2186 switch (e->type()) {-
2187 case
never executed: case QEvent::KeyPress:
QEvent::KeyPress:
never executed: case QEvent::KeyPress:
{
0
2188 int key = static_cast<QKeyEvent*>(e)->key();-
2189 qt_in_tab_key_event = (key == Qt::Key_Backtab
key == Qt::Key_BacktabDescription
TRUEnever evaluated
FALSEnever evaluated
0
2190 || key == Qt::Key_Tab
key == Qt::Key_TabDescription
TRUEnever evaluated
FALSEnever evaluated
0
2191 || key == Qt::Key_Left
key == Qt::Key_LeftDescription
TRUEnever evaluated
FALSEnever evaluated
0
2192 || key == Qt::Key_Up
key == Qt::Key_UpDescription
TRUEnever evaluated
FALSEnever evaluated
0
2193 || key == Qt::Key_Right
key == Qt::Key_RightDescription
TRUEnever evaluated
FALSEnever evaluated
0
2194 || key == Qt::Key_Down
key == Qt::Key_DownDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
2195 }-
2196 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
2197 break;
never executed: break;
0
2198 }-
2199-
2200 bool res = false;-
2201 if (!receiver->isWidgetType()
!receiver->isWidgetType()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2202 res = d->notify_helper(receiver, e);-
2203 }
never executed: end of block
else switch (e->type()) {
0
2204 case
never executed: case QEvent::ShortcutOverride:
QEvent::ShortcutOverride:
never executed: case QEvent::ShortcutOverride:
0
2205 case
never executed: case QEvent::KeyPress:
QEvent::KeyPress:
never executed: case QEvent::KeyPress:
0
2206 case
never executed: case QEvent::KeyRelease:
QEvent::KeyRelease:
never executed: case QEvent::KeyRelease:
0
2207 {-
2208 bool isWidget = receiver->isWidgetType();-
2209-
2210 const bool isGraphicsWidget = !isWidget
!isWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& qobject_cast<QGraphicsWidget *>(receiver)
qobject_cast<Q...t *>(receiver)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2211-
2212 QKeyEvent* key = static_cast<QKeyEvent*>(e);-
2213 bool def = key->isAccepted();-
2214 QPointer<QObject> pr = receiver;-
2215 while (receiver
receiverDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2216 if (def
defDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2217 key->accept();
never executed: key->accept();
0
2218 else-
2219 key->ignore();
never executed: key->ignore();
0
2220 QWidget *w = isWidget
isWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
? static_cast<QWidget *>(receiver) : 0;
0
2221-
2222 QGraphicsWidget *gw = isGraphicsWidget
isGraphicsWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
? static_cast<QGraphicsWidget *>(receiver) : 0;
0
2223-
2224 res = d->notify_helper(receiver, e);-
2225-
2226 if ((res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& key->isAccepted()
key->isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2227 || !pr
!prDescription
TRUEnever evaluated
FALSEnever evaluated
0
2228 || (isWidget
isWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| !w->parentWidget()
!w->parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
2229-
2230 || (isGraphicsWidget
isGraphicsWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& (gw->isWindow()
gw->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| !gw->parentWidget()
!gw->parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
2231-
2232 ) {-
2233 break;
never executed: break;
0
2234 }-
2235-
2236-
2237 receiver = w
wDescription
TRUEnever evaluated
FALSEnever evaluated
? (QObject *)w->parentWidget() : (QObject *)gw->parentWidget();
0
2238-
2239-
2240-
2241 }
never executed: end of block
0
2242 qt_in_tab_key_event = false;-
2243 }-
2244 break;
never executed: break;
0
2245 case
never executed: case QEvent::MouseButtonPress:
QEvent::MouseButtonPress:
never executed: case QEvent::MouseButtonPress:
0
2246 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
0
2247 case
never executed: case QEvent::MouseButtonDblClick:
QEvent::MouseButtonDblClick:
never executed: case QEvent::MouseButtonDblClick:
0
2248 case
never executed: case QEvent::MouseMove:
QEvent::MouseMove:
never executed: case QEvent::MouseMove:
0
2249 {-
2250 QWidget* w = static_cast<QWidget *>(receiver);-
2251-
2252 QMouseEvent* mouse = static_cast<QMouseEvent*>(e);-
2253 QPoint relpos = mouse->pos();-
2254-
2255 if (e->spontaneous()
e->spontaneous()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2256 if (e->type() != QEvent::MouseMove
e->type() != QEvent::MouseMoveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2257 QApplicationPrivate::giveFocusAccordingToFocusPolicy(w, e, relpos);
never executed: QApplicationPrivate::giveFocusAccordingToFocusPolicy(w, e, relpos);
0
2258 if (e->type() == QEvent::MouseMove
e->type() == QEvent::MouseMoveDescription
TRUEnever evaluated
FALSEnever evaluated
&& mouse->buttons() == 0
mouse->buttons() == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
2259 && w->rect().contains(relpos)
w->rect().contains(relpos)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2260 d->toolTipWidget = w;-
2261 d->toolTipPos = relpos;-
2262 d->toolTipGlobalPos = mouse->globalPos();-
2263 QStyle *s = d->toolTipWidget->style();-
2264 int wakeDelay = s->styleHint(QStyle::SH_ToolTip_WakeUpDelay, 0, d->toolTipWidget, 0);-
2265 d->toolTipWakeUp.start(d->toolTipFallAsleep.isActive() ? 20 : wakeDelay, this);-
2266 }
never executed: end of block
0
2267 }
never executed: end of block
0
2268-
2269 bool eventAccepted = mouse->isAccepted();-
2270-
2271 QPointer<QWidget> pw = w;-
2272 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2273 QMouseEvent me(mouse->type(), relpos, mouse->windowPos(), mouse->globalPos(),-
2274 mouse->button(), mouse->buttons(), mouse->modifiers(), mouse->source());-
2275 me.spont = mouse->spontaneous();-
2276 me.setTimestamp(mouse->timestamp());-
2277 QGuiApplicationPrivate::setMouseEventFlags(&me, mouse->flags());-
2278-
2279 if (!w->hasMouseTracking()
!w->hasMouseTracking()Description
TRUEnever evaluated
FALSEnever evaluated
0
2280 && mouse->type() == QEvent::MouseMove
mouse->type() ...ent::MouseMoveDescription
TRUEnever evaluated
FALSEnever evaluated
&& mouse->buttons() == 0
mouse->buttons() == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2281-
2282 for (int i = 0; d->extraData
d->extraDataDescription
TRUEnever evaluated
FALSEnever evaluated
&& i < d->extraData->eventFilters.size()
i < d->extraDa...Filters.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2283 QObject *obj = d->extraData->eventFilters.at(i);-
2284 if (!obj
!objDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2285 continue;
never executed: continue;
0
2286 if (__builtin_expect(!!(obj->d_func()->threadData != w->d_func()->threadData), false)
__builtin_expe...dData), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2287 QMessageLogger(__FILE__, 3264, __PRETTY_FUNCTION__).warning("QApplication: Object event filter cannot be in a different thread.");-
2288 continue;
never executed: continue;
0
2289 }-
2290 if (obj->eventFilter(w, w == receiver ? mouse : &me)
obj->eventFilt...? mouse : &me)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2291 break;
never executed: break;
0
2292 }
never executed: end of block
0
2293 res = true;-
2294 }
never executed: end of block
else {
0
2295 w->setAttribute(Qt::WA_NoMouseReplay, false);-
2296 res = d->notify_helper(w, w == receiver ? mouse : &me);-
2297 e->spont = false;-
2298 }
never executed: end of block
0
2299 eventAccepted = (w == receiver
w == receiverDescription
TRUEnever evaluated
FALSEnever evaluated
? mouse : &me)->isAccepted();
0
2300 if (res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2301 break;
never executed: break;
0
2302 if (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_NoMousePropagation)
w->testAttribu...sePropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2303 break;
never executed: break;
0
2304 relpos += w->pos();-
2305 w = w->parentWidget();-
2306 }
never executed: end of block
0
2307-
2308 mouse->setAccepted(eventAccepted);-
2309-
2310 if (e->type() == QEvent::MouseMove
e->type() == QEvent::MouseMoveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2311 if (!pw
!pwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2312 break;
never executed: break;
0
2313-
2314 w = static_cast<QWidget *>(receiver);-
2315 relpos = mouse->pos();-
2316 QPoint diff = relpos - w->mapFromGlobal(d->hoverGlobalPos);-
2317 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2318 if (w->testAttribute(Qt::WA_Hover)
w->testAttribute(Qt::WA_Hover)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
2319 (!QApplication::activePopupWidget()
!QApplication:...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
|| QApplication::activePopupWidget() == w->window()
QApplication::...== w->window()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
2320 QHoverEvent he(QEvent::HoverMove, relpos, relpos - diff, mouse->modifiers());-
2321 d->notify_helper(w, &he);-
2322 }
never executed: end of block
0
2323 if (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_NoMousePropagation)
w->testAttribu...sePropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2324 break;
never executed: break;
0
2325 relpos += w->pos();-
2326 w = w->parentWidget();-
2327 }
never executed: end of block
0
2328 }
never executed: end of block
0
2329-
2330 d->hoverGlobalPos = mouse->globalPos();-
2331 }-
2332 break;
never executed: break;
0
2333-
2334 case
never executed: case QEvent::Wheel:
QEvent::Wheel:
never executed: case QEvent::Wheel:
0
2335 {-
2336 QWidget* w = static_cast<QWidget *>(receiver);-
2337-
2338-
2339 if (const
const QWidget ...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
QWidget *popup = QApplication::activePopupWidget()
const QWidget ...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2340 if (w->window() != popup
w->window() != popupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2341 return
never executed: return true;
true;
never executed: return true;
0
2342 }
never executed: end of block
0
2343-
2344 QWheelEvent* wheel = static_cast<QWheelEvent*>(e);-
2345 const bool spontaneous = wheel->spontaneous();-
2346 const Qt::ScrollPhase phase = wheel->phase();-
2347 if (phase == Qt::NoScrollPhase
phase == Qt::NoScrollPhaseDescription
TRUEnever evaluated
FALSEnever evaluated
|| phase == Qt::ScrollBegin
phase == Qt::ScrollBeginDescription
TRUEnever evaluated
FALSEnever evaluated
|| !QApplicationPrivate::wheel_widget
!QApplicationP...::wheel_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2348-
2349-
2350-
2351-
2352 if (spontaneous
spontaneousDescription
TRUEnever evaluated
FALSEnever evaluated
&& phase == Qt::ScrollBegin
phase == Qt::ScrollBeginDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2353 QApplicationPrivate::wheel_widget = nullptr;
never executed: QApplicationPrivate::wheel_widget = nullptr;
0
2354-
2355 const QPoint &relpos = wheel->pos();-
2356-
2357 if (spontaneous
spontaneousDescription
TRUEnever evaluated
FALSEnever evaluated
&& (phase == Qt::NoScrollPhase
phase == Qt::NoScrollPhaseDescription
TRUEnever evaluated
FALSEnever evaluated
|| phase == Qt::ScrollUpdate
phase == Qt::ScrollUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
2358 QApplicationPrivate::giveFocusAccordingToFocusPolicy(w, e, relpos);
never executed: QApplicationPrivate::giveFocusAccordingToFocusPolicy(w, e, relpos);
0
2359-
2360 QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),-
2361 wheel->modifiers(), phase, wheel->source(), wheel->inverted());-
2362 bool eventAccepted;-
2363 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2364 we.spont = spontaneous
spontaneousDescription
TRUEnever evaluated
FALSEnever evaluated
&& w == receiver
w == receiverDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
2365 we.ignore();-
2366 res = d->notify_helper(w, &we);-
2367 eventAccepted = we.isAccepted();-
2368 if (res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2369-
2370-
2371-
2372 if (spontaneous
spontaneousDescription
TRUEnever evaluated
FALSEnever evaluated
&& (phase == Qt::ScrollBegin
phase == Qt::ScrollBeginDescription
TRUEnever evaluated
FALSEnever evaluated
|| phase == Qt::ScrollUpdate
phase == Qt::ScrollUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
2373 QApplicationPrivate::wheel_widget = w;
never executed: QApplicationPrivate::wheel_widget = w;
0
2374 break;
never executed: break;
0
2375 }-
2376 if (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_NoMousePropagation)
w->testAttribu...sePropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2377 break;
never executed: break;
0
2378-
2379 we.p += w->pos();-
2380 w = w->parentWidget();-
2381 }
never executed: end of block
0
2382 wheel->setAccepted(eventAccepted);-
2383 }
never executed: end of block
else if (!spontaneous
!spontaneousDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2384-
2385-
2386-
2387-
2388-
2389 d->notify_helper(w, wheel);-
2390 }
never executed: end of block
else {
0
2391-
2392-
2393-
2394-
2395 const QPoint &relpos = QApplicationPrivate::wheel_widget->mapFromGlobal(wheel->globalPos());-
2396 QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),-
2397 wheel->modifiers(), wheel->phase(), wheel->source());-
2398 we.spont = true;-
2399 we.ignore();-
2400 d->notify_helper(QApplicationPrivate::wheel_widget, &we);-
2401 wheel->setAccepted(we.isAccepted());-
2402 if (phase == Qt::ScrollEnd
phase == Qt::ScrollEndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2403 QApplicationPrivate::wheel_widget = nullptr;
never executed: QApplicationPrivate::wheel_widget = nullptr;
0
2404 }
never executed: end of block
0
2405 }-
2406 break;
never executed: break;
0
2407-
2408-
2409 case
never executed: case QEvent::ContextMenu:
QEvent::ContextMenu:
never executed: case QEvent::ContextMenu:
0
2410 {-
2411 QWidget* w = static_cast<QWidget *>(receiver);-
2412 QContextMenuEvent *context = static_cast<QContextMenuEvent*>(e);-
2413 QPoint relpos = context->pos();-
2414 bool eventAccepted = context->isAccepted();-
2415 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2416 QContextMenuEvent ce(context->reason(), relpos, context->globalPos(), context->modifiers());-
2417 ce.spont = e->spontaneous();-
2418 res = d->notify_helper(w, w == receiver ? context : &ce);-
2419 eventAccepted = ((
(w == receiver)Description
TRUEnever evaluated
FALSEnever evaluated
w == receiver)
(w == receiver)Description
TRUEnever evaluated
FALSEnever evaluated
? context : &ce)->isAccepted();
0
2420 e->spont = false;-
2421-
2422 if ((res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2423 || w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_NoMousePropagation)
w->testAttribu...sePropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2424 break;
never executed: break;
0
2425-
2426 relpos += w->pos();-
2427 w = w->parentWidget();-
2428 }
never executed: end of block
0
2429 context->setAccepted(eventAccepted);-
2430 }-
2431 break;
never executed: break;
0
2432-
2433-
2434 case
never executed: case QEvent::TabletMove:
QEvent::TabletMove:
never executed: case QEvent::TabletMove:
0
2435 case
never executed: case QEvent::TabletPress:
QEvent::TabletPress:
never executed: case QEvent::TabletPress:
0
2436 case
never executed: case QEvent::TabletRelease:
QEvent::TabletRelease:
never executed: case QEvent::TabletRelease:
0
2437 {-
2438 QWidget *w = static_cast<QWidget *>(receiver);-
2439 QTabletEvent *tablet = static_cast<QTabletEvent*>(e);-
2440 QPointF relpos = tablet->posF();-
2441 bool eventAccepted = tablet->isAccepted();-
2442 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2443 QTabletEvent te(tablet->type(), relpos, tablet->globalPosF(),-
2444 tablet->device(), tablet->pointerType(),-
2445 tablet->pressure(), tablet->xTilt(), tablet->yTilt(),-
2446 tablet->tangentialPressure(), tablet->rotation(), tablet->z(),-
2447 tablet->modifiers(), tablet->uniqueId(), tablet->button(), tablet->buttons());-
2448 te.spont = e->spontaneous();-
2449 res = d->notify_helper(w, w == receiver ? tablet : &te);-
2450 eventAccepted = ((
(w == receiver)Description
TRUEnever evaluated
FALSEnever evaluated
w == receiver)
(w == receiver)Description
TRUEnever evaluated
FALSEnever evaluated
? tablet : &te)->isAccepted();
0
2451 e->spont = false;-
2452 if ((res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2453 || w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
0
2454 || w->testAttribute(Qt::WA_NoMousePropagation)
w->testAttribu...sePropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2455 break;
never executed: break;
0
2456-
2457 relpos += w->pos();-
2458 w = w->parentWidget();-
2459 }
never executed: end of block
0
2460 tablet->setAccepted(eventAccepted);-
2461 }-
2462 break;
never executed: break;
0
2463-
2464-
2465-
2466 case
never executed: case QEvent::ToolTip:
QEvent::ToolTip:
never executed: case QEvent::ToolTip:
0
2467 case
never executed: case QEvent::WhatsThis:
QEvent::WhatsThis:
never executed: case QEvent::WhatsThis:
0
2468 case
never executed: case QEvent::QueryWhatsThis:
QEvent::QueryWhatsThis:
never executed: case QEvent::QueryWhatsThis:
0
2469 {-
2470 QWidget* w = static_cast<QWidget *>(receiver);-
2471 QHelpEvent *help = static_cast<QHelpEvent*>(e);-
2472 QPoint relpos = help->pos();-
2473 bool eventAccepted = help->isAccepted();-
2474 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2475 QHelpEvent he(help->type(), relpos, help->globalPos());-
2476 he.spont = e->spontaneous();-
2477 res = d->notify_helper(w, w == receiver ? help : &he);-
2478 e->spont = false;-
2479 eventAccepted = (w == receiver
w == receiverDescription
TRUEnever evaluated
FALSEnever evaluated
? help : &he)->isAccepted();
0
2480 if ((res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
) || w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2481 break;
never executed: break;
0
2482-
2483 relpos += w->pos();-
2484 w = w->parentWidget();-
2485 }
never executed: end of block
0
2486 help->setAccepted(eventAccepted);-
2487 }-
2488 break;
never executed: break;
0
2489-
2490-
2491 case
never executed: case QEvent::StatusTip:
QEvent::StatusTip:
never executed: case QEvent::StatusTip:
0
2492 case
never executed: case QEvent::WhatsThisClicked:
QEvent::WhatsThisClicked:
never executed: case QEvent::WhatsThisClicked:
0
2493 {-
2494 QWidget *w = static_cast<QWidget *>(receiver);-
2495 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2496 res = d->notify_helper(w, e);-
2497 if ((res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& e->isAccepted()
e->isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
) || w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2498 break;
never executed: break;
0
2499 w = w->parentWidget();-
2500 }
never executed: end of block
0
2501 }-
2502 break;
never executed: break;
0
2503-
2504-
2505-
2506 case
never executed: case QEvent::DragEnter:
QEvent::DragEnter:
never executed: case QEvent::DragEnter:
{
0
2507 QWidget* w = static_cast<QWidget *>(receiver);-
2508 QDragEnterEvent *dragEvent = static_cast<QDragEnterEvent *>(e);-
2509-
2510-
2511-
2512 QWExtra *extra = w->window()->d_func()->extra;-
2513 if (extra
extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra->proxyWidget
extra->proxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2514 res = d->notify_helper(w, dragEvent);-
2515 break;
never executed: break;
0
2516 }-
2517-
2518 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2519 if (w->isEnabled()
w->isEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->acceptDrops()
w->acceptDrops()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2520 res = d->notify_helper(w, dragEvent);-
2521 if (res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& dragEvent->isAccepted()
dragEvent->isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2522 QDragManager::self()->setCurrentTarget(w);-
2523 break;
never executed: break;
0
2524 }-
2525 }
never executed: end of block
0
2526 if (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2527 break;
never executed: break;
0
2528 dragEvent->p = w->mapToParent(dragEvent->p.toPoint());-
2529 w = w->parentWidget();-
2530 }
never executed: end of block
0
2531 }-
2532 break;
never executed: break;
0
2533 case
never executed: case QEvent::DragMove:
QEvent::DragMove:
never executed: case QEvent::DragMove:
0
2534 case
never executed: case QEvent::Drop:
QEvent::Drop:
never executed: case QEvent::Drop:
0
2535 case
never executed: case QEvent::DragLeave:
QEvent::DragLeave:
never executed: case QEvent::DragLeave:
{
0
2536 QWidget* w = static_cast<QWidget *>(receiver);-
2537-
2538-
2539-
2540 QWExtra *extra = w->window()->d_func()->extra;-
2541 bool isProxyWidget = extra
extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra->proxyWidget
extra->proxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
2542 if (!isProxyWidget
!isProxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2543-
2544 w = qobject_cast<QWidget *>(QDragManager::self()->currentTarget());
never executed: w = qobject_cast<QWidget *>(QDragManager::self()->currentTarget());
0
2545-
2546 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2547 break;
never executed: break;
0
2548 }-
2549 if (e->type() == QEvent::DragMove
e->type() == QEvent::DragMoveDescription
TRUEnever evaluated
FALSEnever evaluated
|| e->type() == QEvent::Drop
e->type() == QEvent::DropDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2550 QDropEvent *dragEvent = static_cast<QDropEvent *>(e);-
2551 QWidget *origReciver = static_cast<QWidget *>(receiver);-
2552 while (origReciver
origReciverDescription
TRUEnever evaluated
FALSEnever evaluated
&& w != origReciver
w != origReciverDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2553 dragEvent->p = origReciver->mapToParent(dragEvent->p.toPoint());-
2554 origReciver = origReciver->parentWidget();-
2555 }
never executed: end of block
0
2556 }
never executed: end of block
0
2557 res = d->notify_helper(w, e);-
2558 if (e->type() != QEvent::DragMove
e->type() != QEvent::DragMoveDescription
TRUEnever evaluated
FALSEnever evaluated
0
2559-
2560 && !isProxyWidget
!isProxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
0
2561-
2562 )-
2563 QDragManager::self()->setCurrentTarget(0, e->type() == QEvent::Drop);
never executed: QDragManager::self()->setCurrentTarget(0, e->type() == QEvent::Drop);
0
2564 }-
2565 break;
never executed: break;
0
2566-
2567 case
never executed: case QEvent::TouchBegin:
QEvent::TouchBegin:
never executed: case QEvent::TouchBegin:
0
2568-
2569 {-
2570 QWidget *widget = static_cast<QWidget *>(receiver);-
2571 QTouchEvent *touchEvent = static_cast<QTouchEvent *>(e);-
2572 bool eventAccepted = touchEvent->isAccepted();-
2573 bool acceptTouchEvents = widget->testAttribute(Qt::WA_AcceptTouchEvents);-
2574-
2575 if (acceptTouchEvents
acceptTouchEventsDescription
TRUEnever evaluated
FALSEnever evaluated
&& e->spontaneous()
e->spontaneous()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2576 const QPoint localPos = touchEvent->touchPoints()[0].pos().toPoint();-
2577 QApplicationPrivate::giveFocusAccordingToFocusPolicy(widget, e, localPos);-
2578 }
never executed: end of block
0
2579-
2580-
2581 QPointer<QWidget> gesturePendingWidget;-
2582-
2583-
2584 while (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2585-
2586 acceptTouchEvents = widget->testAttribute(Qt::WA_AcceptTouchEvents);-
2587 touchEvent->setTarget(widget);-
2588 touchEvent->setAccepted(acceptTouchEvents);-
2589 QPointer<QWidget> p = widget;-
2590 res = acceptTouchEvents
acceptTouchEventsDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->notify_helper(widget, touchEvent)
d->notify_help...t, touchEvent)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2591 eventAccepted = touchEvent->isAccepted();-
2592 if (p.isNull()
p.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2593-
2594 widget = 0;-
2595 }
never executed: end of block
else {
0
2596 widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, res && eventAccepted);-
2597 }
never executed: end of block
0
2598 touchEvent->spont = false;-
2599 if (res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2600-
2601 d->activateImplicitTouchGrab(widget, touchEvent);-
2602 break;
never executed: break;
0
2603 }-
2604-
2605 if (gesturePendingWidget.isNull()
gesturePendingWidget.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& QGestureManager::gesturePending(widget)
QGestureManage...ending(widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2606 gesturePendingWidget = widget;
never executed: gesturePendingWidget = widget;
0
2607-
2608 if (p.isNull()
p.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
|| widget->isWindow()
widget->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| widget->testAttribute(Qt::WA_NoMousePropagation)
widget->testAt...sePropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2609 break;
never executed: break;
0
2610-
2611 QPoint offset = widget->pos();-
2612 widget = widget->parentWidget();-
2613 touchEvent->setTarget(widget);-
2614 for (int i = 0; i < touchEvent->_touchPoints.size()
i < touchEvent...hPoints.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2615 QTouchEvent::TouchPoint &pt = touchEvent->_touchPoints[i];-
2616 QRectF rect = pt.rect();-
2617 rect.translate(offset);-
2618 pt.d->rect = rect;-
2619 pt.d->startPos = pt.startPos() + offset;-
2620 pt.d->lastPos = pt.lastPos() + offset;-
2621 }
never executed: end of block
0
2622 }
never executed: end of block
0
2623-
2624-
2625 if (!eventAccepted
!eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
&& !gesturePendingWidget.isNull()
!gesturePendingWidget.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2626-
2627 d->activateImplicitTouchGrab(gesturePendingWidget, touchEvent);-
2628 }
never executed: end of block
0
2629-
2630-
2631 touchEvent->setAccepted(eventAccepted);-
2632 break;
never executed: break;
0
2633 }-
2634 case
never executed: case QEvent::TouchUpdate:
QEvent::TouchUpdate:
never executed: case QEvent::TouchUpdate:
0
2635 case
never executed: case QEvent::TouchEnd:
QEvent::TouchEnd:
never executed: case QEvent::TouchEnd:
0
2636 {-
2637 QWidget *widget = static_cast<QWidget *>(receiver);-
2638-
2639-
2640-
2641 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)
widget->testAt...uchBeginEvent)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2642 res = d->notify_helper(widget, e);
never executed: res = d->notify_helper(widget, e);
0
2643 break;
never executed: break;
0
2644 }-
2645 case
never executed: case QEvent::RequestSoftwareInputPanel:
QEvent::RequestSoftwareInputPanel:
never executed: case QEvent::RequestSoftwareInputPanel:
0
2646 inputMethod()->show();-
2647 break;
never executed: break;
0
2648 case
never executed: case QEvent::CloseSoftwareInputPanel:
QEvent::CloseSoftwareInputPanel:
never executed: case QEvent::CloseSoftwareInputPanel:
0
2649 inputMethod()->hide();-
2650 break;
never executed: break;
0
2651-
2652-
2653 case
never executed: case QEvent::NativeGesture:
QEvent::NativeGesture:
never executed: case QEvent::NativeGesture:
0
2654 {-
2655-
2656 QWidget *w = static_cast<QWidget *>(receiver);-
2657 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2658 e->ignore();-
2659 res = d->notify_helper(w, e);-
2660 if ((res
resDescription
TRUEnever evaluated
FALSEnever evaluated
&& e->isAccepted()
e->isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
) || w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2661 break;
never executed: break;
0
2662 w = w->parentWidget();-
2663 }
never executed: end of block
0
2664 break;
never executed: break;
0
2665 }-
2666 case
never executed: case QEvent::Gesture:
QEvent::Gesture:
never executed: case QEvent::Gesture:
0
2667 case
never executed: case QEvent::GestureOverride:
QEvent::GestureOverride:
never executed: case QEvent::GestureOverride:
0
2668 {-
2669 if (receiver->isWidgetType()
receiver->isWidgetType()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2670 QWidget *w = static_cast<QWidget *>(receiver);-
2671 QGestureEvent *gestureEvent = static_cast<QGestureEvent *>(e);-
2672 QList<QGesture *> allGestures = gestureEvent->gestures();-
2673-
2674 bool eventAccepted = gestureEvent->isAccepted();-
2675 bool wasAccepted = eventAccepted;-
2676 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2677-
2678 QList<QGesture *> gestures;-
2679 QWidgetPrivate *wd = w->d_func();-
2680 for (int i = 0; i < allGestures.size()
i < allGestures.size()Description
TRUEnever evaluated
FALSEnever evaluated
;) {
0
2681 QGesture *g = allGestures.at(i);-
2682 Qt::GestureType type = g->gestureType();-
2683 QMap<Qt::GestureType, Qt::GestureFlags>::iterator contextit =-
2684 wd->gestureContext.find(type);-
2685 bool deliver = contextit != wd->gestureContext.end()
contextit != w...eContext.end()Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
2686 (g->state() == Qt::GestureStarted
g->state() == ...GestureStartedDescription
TRUEnever evaluated
FALSEnever evaluated
|| w == receiver
w == receiverDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
2687 (
(contextit.val...rtialGestures)Description
TRUEnever evaluated
FALSEnever evaluated
contextit.value() & Qt::ReceivePartialGestures)
(contextit.val...rtialGestures)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
2688 if (deliver
deliverDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2689 allGestures.removeAt(i);-
2690 gestures.append(g);-
2691 }
never executed: end of block
else {
0
2692 ++i;-
2693 }
never executed: end of block
0
2694 }-
2695 if (!gestures.isEmpty()
!gestures.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2696 QGestureEvent ge(gestures);-
2697 ge.t = gestureEvent->t;-
2698 ge.spont = gestureEvent->spont;-
2699 ge.m_accept = wasAccepted;-
2700 ge.m_accepted = gestureEvent->m_accepted;-
2701 res = d->notify_helper(w, &ge);-
2702 gestureEvent->spont = false;-
2703 eventAccepted = ge.isAccepted();-
2704 for (int i = 0; i < gestures.size()
i < gestures.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2705 QGesture *g = gestures.at(i);-
2706-
2707-
2708 if (eventAccepted
eventAcceptedDescription
TRUEnever evaluated
FALSEnever evaluated
|| ge.isAccepted(g)
ge.isAccepted(g)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2709-
2710 gestureEvent->m_targetWidgets[g->gestureType()] = w;-
2711 gestureEvent->setAccepted(g, true);-
2712 }
never executed: end of block
else {
0
2713-
2714-
2715 allGestures.append(g);-
2716 }
never executed: end of block
0
2717 }-
2718 }
never executed: end of block
0
2719 if (allGestures.isEmpty()
allGestures.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2720 break;
never executed: break;
0
2721 if (w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2722 break;
never executed: break;
0
2723 w = w->parentWidget();-
2724 }
never executed: end of block
0
2725 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(allGestures)>::type> _container_((allGestures)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QGesture *g = *_container_.i; _container_.control; _container_.control = 0)-
2726 gestureEvent->setAccepted(g, false);
never executed: gestureEvent->setAccepted(g, false);
0
2727 gestureEvent->m_accept = false;-
2728 }
never executed: end of block
else {
0
2729 res = d->notify_helper(receiver, e);-
2730 }
never executed: end of block
0
2731 break;
never executed: break;
0
2732 }-
2733 default
never executed: default:
:
never executed: default:
0
2734 res = d->notify_helper(receiver, e);-
2735 break;
never executed: break;
0
2736 }-
2737-
2738 return
never executed: return res;
res;
never executed: return res;
0
2739}-
2740-
2741bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)-
2742{-
2743-
2744 if (threadRequiresCoreApplication()
threadRequires...eApplication()Description
TRUEnever evaluated
FALSEnever evaluated
0
2745 && receiver->d_func()->threadData->thread == mainThread()
receiver->d_fu...= mainThread()Description
TRUEnever evaluated
FALSEnever evaluated
0
2746 && sendThroughApplicationEventFilters(receiver, e)
sendThroughApp...s(receiver, e)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2747 return
never executed: return true;
true;
never executed: return true;
0
2748-
2749 if (receiver->isWidgetType()
receiver->isWidgetType()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2750 QWidget *widget = static_cast<QWidget *>(receiver);-
2751-
2752-
2753-
2754 if ((e->type() == QEvent::Enter
e->type() == QEvent::EnterDescription
TRUEnever evaluated
FALSEnever evaluated
|| e->type() == QEvent::DragEnter
e->type() == QEvent::DragEnterDescription
TRUEnever evaluated
FALSEnever evaluated
) &&
0
2755 (!QApplication::activePopupWidget()
!QApplication:...ePopupWidget()Description
TRUEnever evaluated
FALSEnever evaluated
|| QApplication::activePopupWidget() == widget->window()
QApplication::...dget->window()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
2756 widget->setAttribute(Qt::WA_UnderMouse, true);
never executed: widget->setAttribute(Qt::WA_UnderMouse, true);
0
2757 else if (e->type() == QEvent::Leave
e->type() == QEvent::LeaveDescription
TRUEnever evaluated
FALSEnever evaluated
|| e->type() == QEvent::DragLeave
e->type() == QEvent::DragLeaveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2758 widget->setAttribute(Qt::WA_UnderMouse, false);
never executed: widget->setAttribute(Qt::WA_UnderMouse, false);
0
2759-
2760-
2761 if (QLayout *layout=widget->d_func()->layout
QLayout *layou...func()->layoutDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2762 layout->widgetEvent(e);-
2763 }
never executed: end of block
0
2764 }
never executed: end of block
0
2765-
2766-
2767 if (sendThroughObjectEventFilters(receiver, e)
sendThroughObj...s(receiver, e)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2768 return
never executed: return true;
true;
never executed: return true;
0
2769-
2770-
2771 bool consumed = receiver->event(e);-
2772 QCoreApplicationPrivate::setEventSpontaneous(e, false);-
2773 return
never executed: return consumed;
consumed;
never executed: return consumed;
0
2774}-
2775-
2776bool QApplicationPrivate::inPopupMode()-
2777{-
2778 return
never executed: return QApplicationPrivate::popupWidgets != 0;
QApplicationPrivate::popupWidgets != 0;
never executed: return QApplicationPrivate::popupWidgets != 0;
0
2779}-
2780-
2781static void ungrabKeyboardForPopup(QWidget *popup)-
2782{-
2783 if (QWidget::keyboardGrabber()
QWidget::keyboardGrabber()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2784 qt_widget_private(QWidget::keyboardGrabber())->stealKeyboardGrab(true);
never executed: qt_widget_private(QWidget::keyboardGrabber())->stealKeyboardGrab(true);
0
2785 else-
2786 qt_widget_private(popup)->stealKeyboardGrab(false);
never executed: qt_widget_private(popup)->stealKeyboardGrab(false);
0
2787}-
2788-
2789static void ungrabMouseForPopup(QWidget *popup)-
2790{-
2791 if (QWidget::mouseGrabber()
QWidget::mouseGrabber()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2792 qt_widget_private(QWidget::mouseGrabber())->stealMouseGrab(true);
never executed: qt_widget_private(QWidget::mouseGrabber())->stealMouseGrab(true);
0
2793 else-
2794 qt_widget_private(popup)->stealMouseGrab(false);
never executed: qt_widget_private(popup)->stealMouseGrab(false);
0
2795}-
2796-
2797static bool popupGrabOk;-
2798-
2799static void grabForPopup(QWidget *popup)-
2800{-
2801 ((!(popup->testAttribute(Qt::WA_WState_Created))) ? qt_assert("popup->testAttribute(Qt::WA_WState_Created)",__FILE__,3829) : qt_noop());-
2802 popupGrabOk = qt_widget_private(popup)->stealKeyboardGrab(true);-
2803 if (popupGrabOk
popupGrabOkDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2804 popupGrabOk = qt_widget_private(popup)->stealMouseGrab(true);-
2805 if (!popupGrabOk
!popupGrabOkDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2806-
2807 ungrabKeyboardForPopup(popup);-
2808 }
never executed: end of block
0
2809 }
never executed: end of block
0
2810}
never executed: end of block
0
2811-
2812extern QWidget *qt_button_down;-
2813extern QWidget *qt_popup_down;-
2814extern bool qt_replay_popup_mouse_event;-
2815-
2816void QApplicationPrivate::closePopup(QWidget *popup)-
2817{-
2818 if (!popupWidgets
!popupWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2819 return;
never executed: return;
0
2820 popupWidgets->removeAll(popup);-
2821-
2822 if (popup == qt_popup_down
popup == qt_popup_downDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2823 qt_button_down = 0;-
2824 qt_popup_down = 0;-
2825 }
never executed: end of block
0
2826-
2827 if (QApplicationPrivate::popupWidgets->count() == 0
QApplicationPr...->count() == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2828 delete QApplicationPrivate::popupWidgets;-
2829 QApplicationPrivate::popupWidgets = 0;-
2830-
2831 if (popupGrabOk
popupGrabOkDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2832 popupGrabOk = false;-
2833-
2834 if (popup->geometry().contains(QPoint(QGuiApplicationPrivate::mousePressX,
popup->geometr...:mousePressY))Description
TRUEnever evaluated
FALSEnever evaluated
0
2835 QGuiApplicationPrivate::mousePressY))
popup->geometr...:mousePressY))Description
TRUEnever evaluated
FALSEnever evaluated
0
2836 || popup->testAttribute(Qt::WA_NoMouseReplay)
popup->testAtt...NoMouseReplay)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2837-
2838 qt_replay_popup_mouse_event = false;-
2839 }
never executed: end of block
else {
0
2840 qt_replay_popup_mouse_event = true;-
2841 }
never executed: end of block
0
2842-
2843-
2844 ungrabMouseForPopup(popup);-
2845-
2846-
2847 ungrabKeyboardForPopup(popup);-
2848 }
never executed: end of block
0
2849-
2850 if (active_window
active_windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2851 if (QWidget *fw = active_window->focusWidget()
QWidget *fw = ...>focusWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2852 if (fw != QApplication::focusWidget()
fw != QApplica...:focusWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2853 fw->setFocus(Qt::PopupFocusReason);-
2854 }
never executed: end of block
else {
0
2855 QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason);-
2856 QCoreApplication::sendEvent(fw, &e);-
2857 }
never executed: end of block
0
2858 }-
2859 }
never executed: end of block
0
2860-
2861 }
never executed: end of block
else {
0
2862-
2863 QWidget* aw = QApplicationPrivate::popupWidgets->constLast();-
2864 if (QWidget *fw = aw->focusWidget()
QWidget *fw = ...>focusWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2865 fw->setFocus(Qt::PopupFocusReason);
never executed: fw->setFocus(Qt::PopupFocusReason);
0
2866-
2867 if (QApplicationPrivate::popupWidgets->count() == 1
QApplicationPr...->count() == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2868 grabForPopup(aw);
never executed: grabForPopup(aw);
0
2869 }
never executed: end of block
0
2870-
2871}-
2872-
2873int openPopupCount = 0;-
2874-
2875void QApplicationPrivate::openPopup(QWidget *popup)-
2876{-
2877 openPopupCount++;-
2878 if (!popupWidgets
!popupWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2879 popupWidgets = new QWidgetList;
never executed: popupWidgets = new QWidgetList;
0
2880 popupWidgets->append(popup);-
2881-
2882 if (QApplicationPrivate::popupWidgets->count() == 1
QApplicationPr...->count() == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2883 grabForPopup(popup);
never executed: grabForPopup(popup);
0
2884-
2885-
2886-
2887-
2888 if (popup->focusWidget()
popup->focusWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2889 popup->focusWidget()->setFocus(Qt::PopupFocusReason);-
2890 }
never executed: end of block
else if (popupWidgets->count() == 1
popupWidgets->count() == 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2891 if (QWidget *fw = QApplication::focusWidget()
QWidget *fw = ...:focusWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2892 QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason);-
2893 QApplication::sendEvent(fw, &e);-
2894 }
never executed: end of block
0
2895 }
never executed: end of block
0
2896}
never executed: end of block
0
2897void QApplication::alert(QWidget *widget, int duration)-
2898{-
2899 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2900 if (widget->window()->isActiveWindow()
widget->window...ActiveWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& !(widget->window()->windowState() & Qt::WindowMinimized)
!(widget->wind...ndowMinimized)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2901 return;
never executed: return;
0
2902 if (QWindow *window= QApplicationPrivate::windowForWidget(widget)
QWindow *windo...Widget(widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2903 window->alert(duration);
never executed: window->alert(duration);
0
2904 }
never executed: end of block
else {
0
2905 const auto topLevels = topLevelWidgets();-
2906 for (QWidget *topLevel : topLevels)-
2907 QApplication::alert(topLevel, duration);
never executed: QApplication::alert(topLevel, duration);
0
2908 }
never executed: end of block
0
2909}-
2910void QApplication::setCursorFlashTime(int msecs)-
2911{-
2912 QGuiApplication::styleHints()->setCursorFlashTime(msecs);-
2913}
never executed: end of block
0
2914-
2915int QApplication::cursorFlashTime()-
2916{-
2917 return
never executed: return QGuiApplication::styleHints()->cursorFlashTime();
QGuiApplication::styleHints()->cursorFlashTime();
never executed: return QGuiApplication::styleHints()->cursorFlashTime();
0
2918}-
2919void QApplication::setDoubleClickInterval(int ms)-
2920{-
2921 QGuiApplication::styleHints()->setMouseDoubleClickInterval(ms);-
2922}
never executed: end of block
0
2923-
2924int QApplication::doubleClickInterval()-
2925{-
2926 return
never executed: return QGuiApplication::styleHints()->mouseDoubleClickInterval();
QGuiApplication::styleHints()->mouseDoubleClickInterval();
never executed: return QGuiApplication::styleHints()->mouseDoubleClickInterval();
0
2927}-
2928void QApplication::setKeyboardInputInterval(int ms)-
2929{-
2930 QGuiApplication::styleHints()->setKeyboardInputInterval(ms);-
2931}
never executed: end of block
0
2932-
2933int QApplication::keyboardInputInterval()-
2934{-
2935 return
never executed: return QGuiApplication::styleHints()->keyboardInputInterval();
QGuiApplication::styleHints()->keyboardInputInterval();
never executed: return QGuiApplication::styleHints()->keyboardInputInterval();
0
2936}-
2937int QApplication::wheelScrollLines()-
2938{-
2939 return
never executed: return QApplicationPrivate::wheel_scroll_lines;
QApplicationPrivate::wheel_scroll_lines;
never executed: return QApplicationPrivate::wheel_scroll_lines;
0
2940}-
2941-
2942void QApplication::setWheelScrollLines(int lines)-
2943{-
2944 QApplicationPrivate::wheel_scroll_lines = lines;-
2945}
never executed: end of block
0
2946-
2947-
2948static inline int uiEffectToFlag(Qt::UIEffect effect)-
2949{-
2950 switch (effect) {-
2951 case
never executed: case Qt::UI_General:
Qt::UI_General:
never executed: case Qt::UI_General:
0
2952 return
never executed: return QPlatformTheme::GeneralUiEffect;
QPlatformTheme::GeneralUiEffect;
never executed: return QPlatformTheme::GeneralUiEffect;
0
2953 case
never executed: case Qt::UI_AnimateMenu:
Qt::UI_AnimateMenu:
never executed: case Qt::UI_AnimateMenu:
0
2954 return
never executed: return QPlatformTheme::AnimateMenuUiEffect;
QPlatformTheme::AnimateMenuUiEffect;
never executed: return QPlatformTheme::AnimateMenuUiEffect;
0
2955 case
never executed: case Qt::UI_FadeMenu:
Qt::UI_FadeMenu:
never executed: case Qt::UI_FadeMenu:
0
2956 return
never executed: return QPlatformTheme::FadeMenuUiEffect;
QPlatformTheme::FadeMenuUiEffect;
never executed: return QPlatformTheme::FadeMenuUiEffect;
0
2957 case
never executed: case Qt::UI_AnimateCombo:
Qt::UI_AnimateCombo:
never executed: case Qt::UI_AnimateCombo:
0
2958 return
never executed: return QPlatformTheme::AnimateComboUiEffect;
QPlatformTheme::AnimateComboUiEffect;
never executed: return QPlatformTheme::AnimateComboUiEffect;
0
2959 case
never executed: case Qt::UI_AnimateTooltip:
Qt::UI_AnimateTooltip:
never executed: case Qt::UI_AnimateTooltip:
0
2960 return
never executed: return QPlatformTheme::AnimateTooltipUiEffect;
QPlatformTheme::AnimateTooltipUiEffect;
never executed: return QPlatformTheme::AnimateTooltipUiEffect;
0
2961 case
never executed: case Qt::UI_FadeTooltip:
Qt::UI_FadeTooltip:
never executed: case Qt::UI_FadeTooltip:
0
2962 return
never executed: return QPlatformTheme::FadeTooltipUiEffect;
QPlatformTheme::FadeTooltipUiEffect;
never executed: return QPlatformTheme::FadeTooltipUiEffect;
0
2963 case
never executed: case Qt::UI_AnimateToolBox:
Qt::UI_AnimateToolBox:
never executed: case Qt::UI_AnimateToolBox:
0
2964 return
never executed: return QPlatformTheme::AnimateToolBoxUiEffect;
QPlatformTheme::AnimateToolBoxUiEffect;
never executed: return QPlatformTheme::AnimateToolBoxUiEffect;
0
2965 }-
2966 return
never executed: return 0;
0;
never executed: return 0;
0
2967}-
2968void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)-
2969{-
2970 int effectFlags = uiEffectToFlag(effect);-
2971 if (enable
enableDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2972 if (effectFlags & QPlatformTheme::FadeMenuUiEffect
effectFlags & ...deMenuUiEffectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2973 effectFlags |= QPlatformTheme::AnimateMenuUiEffect;
never executed: effectFlags |= QPlatformTheme::AnimateMenuUiEffect;
0
2974 if (effectFlags & QPlatformTheme::FadeTooltipUiEffect
effectFlags & ...ooltipUiEffectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2975 effectFlags |= QPlatformTheme::AnimateTooltipUiEffect;
never executed: effectFlags |= QPlatformTheme::AnimateTooltipUiEffect;
0
2976 QApplicationPrivate::enabledAnimations |= effectFlags;-
2977 }
never executed: end of block
else {
0
2978 QApplicationPrivate::enabledAnimations &= ~effectFlags;-
2979 }
never executed: end of block
0
2980}-
2981bool QApplication::isEffectEnabled(Qt::UIEffect effect)-
2982{-
2983 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 4197, __PRETTY_FUNCTION__).warning("Must construct a QApplication first."); return
never executed: return false;
false;
never executed: return false;
}
0
2984 return
never executed: return QColormap::instance().depth() >= 16 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect) && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
QColormap::instance().depth() >= 16
never executed: return QColormap::instance().depth() >= 16 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect) && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
0
2985 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect)
never executed: return QColormap::instance().depth() >= 16 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect) && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
0
2986 && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
never executed: return QColormap::instance().depth() >= 16 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect) && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
0
2987}-
2988-
2989-
2990-
2991-
2992-
2993-
2994-
2995void QApplication::beep()-
2996{-
2997 QGuiApplicationPrivate::platformIntegration()->beep();-
2998}
never executed: end of block
0
2999bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)-
3000{-
3001 return
never executed: return QGuiApplication::sendSpontaneousEvent(receiver, event);
QGuiApplication::sendSpontaneousEvent(receiver, event);
never executed: return QGuiApplication::sendSpontaneousEvent(receiver, event);
0
3002}-
3003-
3004void QApplicationPrivate::giveFocusAccordingToFocusPolicy(QWidget *widget, QEvent *event, QPoint localPos)-
3005{-
3006 const bool setFocusOnRelease = QGuiApplication::styleHints()->setFocusOnTouchRelease();-
3007 Qt::FocusPolicy focusPolicy = Qt::ClickFocus;-
3008 static QPointer<QWidget> focusedWidgetOnTouchBegin = 0;-
3009-
3010 switch (event->type()) {-
3011 case
never executed: case QEvent::MouseButtonPress:
QEvent::MouseButtonPress:
never executed: case QEvent::MouseButtonPress:
0
3012 case
never executed: case QEvent::MouseButtonDblClick:
QEvent::MouseButtonDblClick:
never executed: case QEvent::MouseButtonDblClick:
0
3013 case
never executed: case QEvent::TouchBegin:
QEvent::TouchBegin:
never executed: case QEvent::TouchBegin:
0
3014 focusedWidgetOnTouchBegin = QApplication::focusWidget();-
3015 if (setFocusOnRelease
setFocusOnReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3016 return;
never executed: return;
0
3017 break;
never executed: break;
0
3018 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
0
3019 case
never executed: case QEvent::TouchEnd:
QEvent::TouchEnd:
never executed: case QEvent::TouchEnd:
0
3020 if (!setFocusOnRelease
!setFocusOnReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3021 return;
never executed: return;
0
3022 if (focusedWidgetOnTouchBegin != QApplication::focusWidget()
focusedWidgetO...:focusWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3023-
3024-
3025 return;
never executed: return;
0
3026 }-
3027 break;
never executed: break;
0
3028 case
never executed: case QEvent::Wheel:
QEvent::Wheel:
never executed: case QEvent::Wheel:
0
3029 focusPolicy = Qt::WheelFocus;-
3030 break;
never executed: break;
0
3031 default
never executed: default:
:
never executed: default:
0
3032 return;
never executed: return;
0
3033 }-
3034-
3035 QWidget *focusWidget = widget;-
3036 while (focusWidget
focusWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3037 if (focusWidget->isEnabled()
focusWidget->isEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
0
3038 && focusWidget->rect().contains(localPos)
focusWidget->r...ains(localPos)Description
TRUEnever evaluated
FALSEnever evaluated
0
3039 && QApplicationPrivate::shouldSetFocus(focusWidget, focusPolicy)
QApplicationPr..., focusPolicy)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3040 focusWidget->setFocus(Qt::MouseFocusReason);-
3041 break;
never executed: break;
0
3042 }-
3043 if (focusWidget->isWindow()
focusWidget->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3044 break;
never executed: break;
0
3045-
3046-
3047 QWidget *f = focusWidget;-
3048 if (focusWidget->d_func()->extra
focusWidget->d_func()->extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& focusWidget->d_func()->extra->focus_proxy
focusWidget->d...a->focus_proxyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3049 f = focusWidget->d_func()->extra->focus_proxy;
never executed: f = focusWidget->d_func()->extra->focus_proxy;
0
3050-
3051-
3052 if (f->hasFocus()
f->hasFocus()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3053 break;
never executed: break;
0
3054-
3055 localPos += focusWidget->pos();-
3056 focusWidget = focusWidget->parentWidget();-
3057 }
never executed: end of block
0
3058}
never executed: end of block
0
3059-
3060bool QApplicationPrivate::shouldSetFocus(QWidget *w, Qt::FocusPolicy policy)-
3061{-
3062 QWidget *f = w;-
3063 while (f->d_func()->extra
f->d_func()->extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& f->d_func()->extra->focus_proxy
f->d_func()->e...a->focus_proxyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3064 f = f->d_func()->extra->focus_proxy;
never executed: f = f->d_func()->extra->focus_proxy;
0
3065-
3066 if ((
(w->focusPolic...icy) != policyDescription
TRUEnever evaluated
FALSEnever evaluated
w->focusPolicy() & policy) != policy
(w->focusPolic...icy) != policyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3067 return
never executed: return false;
false;
never executed: return false;
0
3068 if (w != f
w != fDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(f->focusPolic...icy) != policyDescription
TRUEnever evaluated
FALSEnever evaluated
f->focusPolicy() & policy) != policy
(f->focusPolic...icy) != policyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3069 return
never executed: return false;
false;
never executed: return false;
0
3070 return
never executed: return true;
true;
never executed: return true;
0
3071}-
3072-
3073bool QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent)-
3074{-
3075 bool containsPress = false;-
3076 for (int i = 0; i < touchEvent->touchPoints().count()
i < touchEvent...ints().count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
3077 QTouchEvent::TouchPoint &touchPoint = touchEvent->_touchPoints[i];-
3078-
3079-
3080 QRectF rect = touchPoint.screenRect();-
3081 const QPointF screenPos = rect.center();-
3082 const QPointF delta = screenPos - screenPos.toPoint();-
3083-
3084 rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta);-
3085 touchPoint.d->rect = rect;-
3086 touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;-
3087 touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;-
3088-
3089 if (touchPoint.state() == Qt::TouchPointPressed
touchPoint.sta...chPointPressedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3090 containsPress = true;
never executed: containsPress = true;
0
3091 }
never executed: end of block
0
3092 return
never executed: return containsPress;
containsPress;
never executed: return containsPress;
0
3093}-
3094-
3095void QApplicationPrivate::initializeMultitouch()-
3096{-
3097 initializeMultitouch_sys();-
3098}
never executed: end of block
0
3099-
3100void QApplicationPrivate::initializeMultitouch_sys()-
3101{-
3102}-
3103-
3104void QApplicationPrivate::cleanupMultitouch()-
3105{-
3106 cleanupMultitouch_sys();-
3107}
never executed: end of block
0
3108-
3109void QApplicationPrivate::cleanupMultitouch_sys()-
3110{-
3111}-
3112-
3113QWidget *QApplicationPrivate::findClosestTouchPointTarget(QTouchDevice *device, const QTouchEvent::TouchPoint &touchPoint)-
3114{-
3115 const QPointF screenPos = touchPoint.screenPos();-
3116 int closestTouchPointId = -1;-
3117 QObject *closestTarget = 0;-
3118 qreal closestDistance = qreal(0.);-
3119 QHash<ActiveTouchPointsKey, ActiveTouchPointsValue>::const_iterator it = activeTouchPoints.constBegin(),-
3120 ite = activeTouchPoints.constEnd();-
3121 while (it != ite
it != iteDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3122 if (it.key().device == device
it.key().device == deviceDescription
TRUEnever evaluated
FALSEnever evaluated
&& it.key().touchPointId != touchPoint.id()
it.key().touch...ouchPoint.id()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3123 const QTouchEvent::TouchPoint &touchPoint = it->touchPoint;-
3124 qreal dx = screenPos.x() - touchPoint.screenPos().x();-
3125 qreal dy = screenPos.y() - touchPoint.screenPos().y();-
3126 qreal distance = dx * dx + dy * dy;-
3127 if (closestTouchPointId == -1
closestTouchPointId == -1Description
TRUEnever evaluated
FALSEnever evaluated
|| distance < closestDistance
distance < closestDistanceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3128 closestTouchPointId = touchPoint.id();-
3129 closestDistance = distance;-
3130 closestTarget = it.value().target.data();-
3131 }
never executed: end of block
0
3132 }
never executed: end of block
0
3133 ++it;-
3134 }
never executed: end of block
0
3135 return
never executed: return static_cast<QWidget *>(closestTarget);
static_cast<QWidget *>(closestTarget);
never executed: return static_cast<QWidget *>(closestTarget);
0
3136}-
3137-
3138void QApplicationPrivate::activateImplicitTouchGrab(QWidget *widget, QTouchEvent *touchEvent)-
3139{-
3140 if (touchEvent->type() != QEvent::TouchBegin
touchEvent->ty...nt::TouchBeginDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3141 return;
never executed: return;
0
3142-
3143 for (int i = 0, tc = touchEvent->touchPoints().count(); i < tc
i < tcDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
3144 const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().at(i);-
3145 activeTouchPoints[QGuiApplicationPrivate::ActiveTouchPointsKey(touchEvent->device(), touchPoint.id())].target = widget;-
3146 }
never executed: end of block
0
3147}
never executed: end of block
0
3148-
3149bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,-
3150 QTouchDevice *device,-
3151 const QList<QTouchEvent::TouchPoint> &touchPoints,-
3152 ulong timestamp)-
3153{-
3154 QApplicationPrivate *d = self;-
3155 typedef QPair<Qt::TouchPointStates, QList<QTouchEvent::TouchPoint> > StatesAndTouchPoints;-
3156 QHash<QWidget *, StatesAndTouchPoints> widgetsNeedingEvents;-
3157-
3158 for (int i = 0; i < touchPoints.count()
i < touchPoints.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
3159 QTouchEvent::TouchPoint touchPoint = touchPoints.at(i);-
3160-
3161-
3162-
3163 touchPoint.d = touchPoint.d->detach();-
3164-
3165-
3166 QPointer<QObject> target;-
3167 ActiveTouchPointsKey touchInfoKey(device, touchPoint.id());-
3168 ActiveTouchPointsValue &touchInfo = d->activeTouchPoints[touchInfoKey];-
3169 if (touchPoint.state() == Qt::TouchPointPressed
touchPoint.sta...chPointPressedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3170 if (device->type() == QTouchDevice::TouchPad
device->type()...vice::TouchPadDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3171-
3172 target = d->activeTouchPoints.isEmpty()
d->activeTouchPoints.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
3173 ? QPointer<QObject>()-
3174 : d->activeTouchPoints.constBegin().value().target;-
3175 }
never executed: end of block
0
3176-
3177 if (!target
!targetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3178-
3179 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3180 window = QApplication::topLevelAt(touchPoint.screenPos().toPoint());
never executed: window = QApplication::topLevelAt(touchPoint.screenPos().toPoint());
0
3181 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3182 continue;
never executed: continue;
0
3183 target = window->childAt(window->mapFromGlobal(touchPoint.screenPos().toPoint()));-
3184 if (!target
!targetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3185 target = window;
never executed: target = window;
0
3186 }
never executed: end of block
0
3187-
3188 if (device->type() == QTouchDevice::TouchScreen
device->type()...e::TouchScreenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3189 QWidget *closestWidget = d->findClosestTouchPointTarget(device, touchPoint);-
3190 QWidget *widget = static_cast<QWidget *>(target.data());-
3191 if (closestWidget
closestWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
0
3192 && (widget->isAncestorOf(closestWidget)
widget->isAnce...closestWidget)Description
TRUEnever evaluated
FALSEnever evaluated
|| closestWidget->isAncestorOf(widget)
closestWidget-...storOf(widget)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
3193 target = closestWidget;-
3194 }
never executed: end of block
0
3195 }
never executed: end of block
0
3196-
3197 touchInfo.target = target;-
3198 }
never executed: end of block
else {
0
3199 target = touchInfo.target;-
3200 if (!target
!targetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3201 continue;
never executed: continue;
0
3202 }
never executed: end of block
0
3203 ((!(target.data() != 0)) ? qt_assert("target.data() != 0",__FILE__,4437) : qt_noop());-
3204-
3205 QWidget *targetWidget = static_cast<QWidget *>(target.data());-
3206 StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[targetWidget];-
3207 maskAndPoints.first |= touchPoint.state();-
3208 maskAndPoints.second.append(touchPoint);-
3209 }
never executed: end of block
0
3210-
3211 if (widgetsNeedingEvents.isEmpty()
widgetsNeedingEvents.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3212 return
never executed: return false;
false;
never executed: return false;
0
3213-
3214 bool accepted = false;-
3215 QHash<QWidget *, StatesAndTouchPoints>::ConstIterator it = widgetsNeedingEvents.constBegin();-
3216 const QHash<QWidget *, StatesAndTouchPoints>::ConstIterator end = widgetsNeedingEvents.constEnd();-
3217 for (; it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
3218 const QPointer<QWidget> widget = it.key();-
3219 if (!QApplicationPrivate::tryModalHelper(widget, 0)
!QApplicationP...per(widget, 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3220 continue;
never executed: continue;
0
3221-
3222 QEvent::Type eventType;-
3223 switch (it.value().first) {-
3224 case
never executed: case Qt::TouchPointPressed:
Qt::TouchPointPressed:
never executed: case Qt::TouchPointPressed:
0
3225 eventType = QEvent::TouchBegin;-
3226 break;
never executed: break;
0
3227 case
never executed: case Qt::TouchPointReleased:
Qt::TouchPointReleased:
never executed: case Qt::TouchPointReleased:
0
3228 eventType = QEvent::TouchEnd;-
3229 break;
never executed: break;
0
3230 case
never executed: case Qt::TouchPointStationary:
Qt::TouchPointStationary:
never executed: case Qt::TouchPointStationary:
0
3231-
3232 continue;
never executed: continue;
0
3233 default
never executed: default:
:
never executed: default:
0
3234 eventType = QEvent::TouchUpdate;-
3235 break;
never executed: break;
0
3236 }-
3237-
3238 QTouchEvent touchEvent(eventType,-
3239 device,-
3240 QApplication::keyboardModifiers(),-
3241 it.value().first,-
3242 it.value().second);-
3243 bool containsPress = updateTouchPointsForWidget(widget, &touchEvent);-
3244 touchEvent.setTimestamp(timestamp);-
3245 touchEvent.setWindow(window->windowHandle());-
3246 touchEvent.setTarget(widget);-
3247-
3248 if (containsPress
containsPressDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3249 widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
never executed: widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
0
3250-
3251 switch (touchEvent.type()) {-
3252 case
never executed: case QEvent::TouchBegin:
QEvent::TouchBegin:
never executed: case QEvent::TouchBegin:
0
3253 {-
3254-
3255-
3256 if (QApplication::sendSpontaneousEvent(widget, &touchEvent)
QApplication::..., &touchEvent)Description
TRUEnever evaluated
FALSEnever evaluated
&& touchEvent.isAccepted()
touchEvent.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3257 accepted = true;-
3258 if (!widget.isNull()
!widget.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3259 widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
never executed: widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
0
3260 }
never executed: end of block
0
3261 break;
never executed: break;
0
3262 }-
3263 default
never executed: default:
:
never executed: default:
0
3264 if (widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)
widget->testAt...uchBeginEvent)Description
TRUEnever evaluated
FALSEnever evaluated
0
3265-
3266 || QGestureManager::gesturePending(widget)
QGestureManage...ending(widget)Description
TRUEnever evaluated
FALSEnever evaluated
0
3267-
3268 ) {-
3269 if (QApplication::sendSpontaneousEvent(widget, &touchEvent)
QApplication::..., &touchEvent)Description
TRUEnever evaluated
FALSEnever evaluated
&& touchEvent.isAccepted()
touchEvent.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3270 accepted = true;
never executed: accepted = true;
0
3271-
3272 if (touchEvent.type() == QEvent::TouchEnd
touchEvent.typ...vent::TouchEndDescription
TRUEnever evaluated
FALSEnever evaluated
&& !widget.isNull()
!widget.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3273 widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, false);
never executed: widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, false);
0
3274 }
never executed: end of block
0
3275 break;
never executed: break;
0
3276 }-
3277 }-
3278 return
never executed: return accepted;
accepted;
never executed: return accepted;
0
3279}-
3280-
3281void QApplicationPrivate::translateTouchCancel(QTouchDevice *device, ulong timestamp)-
3282{-
3283 QTouchEvent touchEvent(QEvent::TouchCancel, device, QApplication::keyboardModifiers());-
3284 touchEvent.setTimestamp(timestamp);-
3285 QHash<ActiveTouchPointsKey, ActiveTouchPointsValue>::const_iterator it-
3286 = self->activeTouchPoints.constBegin(), ite = self->activeTouchPoints.constEnd();-
3287 QSet<QWidget *> widgetsNeedingCancel;-
3288 while (it != ite
it != iteDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3289 QWidget *widget = static_cast<QWidget *>(it->target.data());-
3290 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3291 widgetsNeedingCancel.insert(widget);
never executed: widgetsNeedingCancel.insert(widget);
0
3292 ++it;-
3293 }
never executed: end of block
0
3294 for (QSet<QWidget *>::const_iterator widIt = widgetsNeedingCancel.constBegin(),-
3295 widItEnd = widgetsNeedingCancel.constEnd(); widIt != widItEnd
widIt != widItEndDescription
TRUEnever evaluated
FALSEnever evaluated
; ++widIt) {
0
3296 QWidget *widget = *widIt;-
3297 touchEvent.setWindow(widget->windowHandle());-
3298 touchEvent.setTarget(widget);-
3299 QApplication::sendSpontaneousEvent(widget, &touchEvent);-
3300 }
never executed: end of block
0
3301}
never executed: end of block
0
3302-
3303void QApplicationPrivate::notifyThemeChanged()-
3304{-
3305 QGuiApplicationPrivate::notifyThemeChanged();-
3306 clearSystemPalette();-
3307 initSystemPalette();-
3308 qt_init_tooltip_palette();-
3309}
never executed: end of block
0
3310-
3311-
3312void QApplicationPrivate::notifyDragStarted(const QDrag *drag)-
3313{-
3314-
3315 QGuiApplicationPrivate::notifyDragStarted(drag);-
3316 qt_button_down = 0;-
3317}
never executed: end of block
0
3318-
3319-
3320-
3321QGestureManager* QGestureManager::instance()-
3322{-
3323 QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();-
3324 if (!qAppPriv
!qAppPrivDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3325 return
never executed: return 0;
0;
never executed: return 0;
0
3326 if (!qAppPriv->gestureManager
!qAppPriv->gestureManagerDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3327 qAppPriv->gestureManager = new QGestureManager((static_cast<QApplication *>(QCoreApplication::instance())));
never executed: qAppPriv->gestureManager = new QGestureManager((static_cast<QApplication *>(QCoreApplication::instance())));
0
3328 return
never executed: return qAppPriv->gestureManager;
qAppPriv->gestureManager;
never executed: return qAppPriv->gestureManager;
0
3329}-
3330-
3331-
3332QPixmap QApplicationPrivate::applyQIconStyleHelper(QIcon::Mode mode, const QPixmap& base) const-
3333{-
3334 QStyleOption opt(0);-
3335 opt.palette = QGuiApplication::palette();-
3336 return
never executed: return QApplication::style()->generatedIconPixmap(mode, base, &opt);
QApplication::style()->generatedIconPixmap(mode, base, &opt);
never executed: return QApplication::style()->generatedIconPixmap(mode, base, &opt);
0
3337}-
3338-
3339-
3340-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9