qguiapplication.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qguiapplication.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__attribute__((visibility("default"))) bool qt_is_gui_used = true;-
19-
20Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;-
21Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;-
22-
23QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());-
24-
25Qt::MouseButtons QGuiApplicationPrivate::tabletState = Qt::NoButton;-
26QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;-
27QWindow *QGuiApplicationPrivate::currentMouseWindow = 0;-
28-
29QString QGuiApplicationPrivate::styleOverride;-
30-
31Qt::ApplicationState QGuiApplicationPrivate::applicationState = Qt::ApplicationInactive;-
32-
33bool QGuiApplicationPrivate::highDpiScalingUpdated = false;-
34-
35QPlatformIntegration *QGuiApplicationPrivate::platform_integration = 0;-
36QPlatformTheme *QGuiApplicationPrivate::platform_theme = 0;-
37-
38QList<QObject *> QGuiApplicationPrivate::generic_plugin_list;-
39-
40-
41bool QGuiApplicationPrivate::is_fallback_session_management_enabled = true;-
42-
43-
44enum ApplicationResourceFlags-
45{-
46 ApplicationPaletteExplicitlySet = 0x1,-
47 ApplicationFontExplicitlySet = 0x2-
48};-
49-
50static unsigned applicationResourceFlags = 0;-
51-
52QIcon *QGuiApplicationPrivate::app_icon = 0;-
53-
54QString *QGuiApplicationPrivate::platform_name = 0;-
55QString *QGuiApplicationPrivate::displayName = 0;-
56-
57QPalette *QGuiApplicationPrivate::app_pal = 0;-
58-
59Qt::MouseButtons QGuiApplicationPrivate::buttons = Qt::NoButton;-
60-
61ulong QGuiApplicationPrivate::mousePressTime = 0;-
62Qt::MouseButton QGuiApplicationPrivate::mousePressButton = Qt::NoButton;-
63int QGuiApplicationPrivate::mousePressX = 0;-
64int QGuiApplicationPrivate::mousePressY = 0;-
65int QGuiApplicationPrivate::mouse_double_click_distance = -1;-
66-
67QWindow *QGuiApplicationPrivate::currentMousePressWindow = 0;-
68-
69static Qt::LayoutDirection layout_direction = Qt::LayoutDirectionAuto;-
70static bool force_reverse = false;-
71-
72QGuiApplicationPrivate *QGuiApplicationPrivate::self = 0;-
73QTouchDevice *QGuiApplicationPrivate::m_fakeTouchDevice = 0;-
74int QGuiApplicationPrivate::m_fakeMouseSourcePointId = 0;-
75-
76-
77QClipboard *QGuiApplicationPrivate::qt_clipboard = 0;-
78-
79-
80QList<QScreen *> QGuiApplicationPrivate::screen_list;-
81-
82QWindowList QGuiApplicationPrivate::window_list;-
83QWindow *QGuiApplicationPrivate::focus_window = 0;-
84-
85static QBasicMutex applicationFontMutex;-
86QFont *QGuiApplicationPrivate::app_font = 0;-
87QStyleHints *QGuiApplicationPrivate::styleHints = nullptr;-
88bool QGuiApplicationPrivate::obey_desktop_settings = true;-
89-
90QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0;-
91-
92-
93bool QGuiApplicationPrivate::scrollNoPhaseAllowed = false;-
94-
95static qreal fontSmoothingGamma = 1.7;-
96-
97extern void qRegisterGuiVariant();-
98-
99extern void qRegisterGuiGetInterpolator();-
100-
101-
102static bool qt_detectRTLLanguage()-
103{-
104 return
never executed: return force_reverse ^ (QGuiApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
force_reverse ^
never executed: return force_reverse ^ (QGuiApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
0
105 (QGuiApplication::tr("QT_LAYOUT_DIRECTION",
never executed: return force_reverse ^ (QGuiApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
0
106 "Translate this string to the string 'LTR' in left-to-right"
never executed: return force_reverse ^ (QGuiApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
0
107 " languages or to 'RTL' in right-to-left languages (such as Hebrew"
never executed: return force_reverse ^ (QGuiApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
0
108 " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
never executed: return force_reverse ^ (QGuiApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
0
109}-
110-
111static void initPalette()-
112{-
113 if (!QGuiApplicationPrivate::app_pal
!QGuiApplicati...ivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
114 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
115 QGuiApplicationPrivate::app_pal = new QPalette(*themePalette);
never executed: QGuiApplicationPrivate::app_pal = new QPalette(*themePalette);
0
116 if (!QGuiApplicationPrivate::app_pal
!QGuiApplicati...ivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
117 QGuiApplicationPrivate::app_pal = new QPalette(Qt::gray);
never executed: QGuiApplicationPrivate::app_pal = new QPalette(Qt::gray);
0
118}
never executed: end of block
0
119-
120static inline void clearPalette()-
121{-
122 delete QGuiApplicationPrivate::app_pal;-
123 QGuiApplicationPrivate::app_pal = 0;-
124}
never executed: end of block
0
125-
126static void initFontUnlocked()-
127{-
128 if (!QGuiApplicationPrivate::app_font
!QGuiApplicati...vate::app_fontDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
129 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
130 if (const
const QFont *f...e::SystemFont)Description
TRUEnever evaluated
FALSEnever evaluated
QFont *font = theme->font(QPlatformTheme::SystemFont)
const QFont *f...e::SystemFont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
131 QGuiApplicationPrivate::app_font = new QFont(*font);
never executed: QGuiApplicationPrivate::app_font = new QFont(*font);
0
132 }
never executed: end of block
0
133 if (!QGuiApplicationPrivate::app_font
!QGuiApplicati...vate::app_fontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
134 QGuiApplicationPrivate::app_font =
never executed: QGuiApplicationPrivate::app_font = new QFont(QGuiApplicationPrivate::platformIntegration()->fontDatabase()->defaultFont());
0
135 new QFont(QGuiApplicationPrivate::platformIntegration()->fontDatabase()->defaultFont());
never executed: QGuiApplicationPrivate::app_font = new QFont(QGuiApplicationPrivate::platformIntegration()->fontDatabase()->defaultFont());
0
136}
never executed: end of block
0
137-
138static inline void clearFontUnlocked()-
139{-
140 delete QGuiApplicationPrivate::app_font;-
141 QGuiApplicationPrivate::app_font = 0;-
142}
never executed: end of block
0
143-
144-
145-
146-
147-
148-
149struct QWindowGeometrySpecification-
150{-
151 static QWindowGeometrySpecification fromArgument(const QByteArray &a);-
152 void applyTo(QWindow *window) const;-
153-
154 Qt::Corner corner;-
155 int xOffset;-
156 int yOffset;-
157 int width;-
158 int height;-
159};-
160-
161-
162static inline int nextGeometryToken(const QByteArray &a, int &pos, char *op)-
163{-
164 *op = 0;-
165 const int size = a.size();-
166 if (pos >= size
pos >= sizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
167 return
never executed: return -1;
-1;
never executed: return -1;
0
168-
169 *op = a.at(pos);-
170 if (*
*op == '+'Description
TRUEnever evaluated
FALSEnever evaluated
op == '+'
*op == '+'Description
TRUEnever evaluated
FALSEnever evaluated
|| *
*op == '-'Description
TRUEnever evaluated
FALSEnever evaluated
op == '-'
*op == '-'Description
TRUEnever evaluated
FALSEnever evaluated
|| *
*op == 'x'Description
TRUEnever evaluated
FALSEnever evaluated
op == 'x'
*op == 'x'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
171 pos++;
never executed: pos++;
0
172 else if (isdigit(*op)
isdigit(*op)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
173 *
never executed: *op = 'x';
op = 'x';
never executed: *op = 'x';
0
174 else-
175 return
never executed: return -1;
-1;
never executed: return -1;
0
176-
177 const int numberPos = pos;-
178 for ( ; pos < size
pos < sizeDescription
TRUEnever evaluated
FALSEnever evaluated
&& isdigit(a.at(pos))
isdigit(a.at(pos))Description
TRUEnever evaluated
FALSEnever evaluated
; ++pos) ;
never executed: ;
0
179-
180 bool ok;-
181 const int result = a.mid(numberPos, pos - numberPos).toInt(&ok);-
182 return
never executed: return ok ? result : -1;
ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
? result : -1;
never executed: return ok ? result : -1;
0
183}-
184-
185QWindowGeometrySpecification QWindowGeometrySpecification::fromArgument(const QByteArray &a)-
186{-
187 QWindowGeometrySpecification result = { Qt::TopLeftCorner, -1, -1, -1, -1 };-
188 int pos = 0;-
189 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
190 char op;-
191 const int value = nextGeometryToken(a, pos, &op);-
192 if (value < 0
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
193 break;
never executed: break;
0
194 switch (op) {-
195 case
never executed: case 'x':
'x':
never executed: case 'x':
0
196 (result.width >= 0 ? result.height : result.width) = value;-
197 break;
never executed: break;
0
198 case
never executed: case '+':
'+':
never executed: case '+':
0
199 case
never executed: case '-':
'-':
never executed: case '-':
0
200 if (result.xOffset >= 0
result.xOffset >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
201 result.yOffset = value;-
202 if (op == '-'
op == '-'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
203 result.corner = result.corner == Qt::TopRightCorner
result.corner ...TopRightCornerDescription
TRUEnever evaluated
FALSEnever evaluated
? Qt::BottomRightCorner : Qt::BottomLeftCorner;
never executed: result.corner = result.corner == Qt::TopRightCorner ? Qt::BottomRightCorner : Qt::BottomLeftCorner;
0
204 }
never executed: end of block
else {
0
205 result.xOffset = value;-
206 if (op == '-'
op == '-'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
207 result.corner = Qt::TopRightCorner;
never executed: result.corner = Qt::TopRightCorner;
0
208 }
never executed: end of block
0
209 }-
210 }
never executed: end of block
0
211 return
never executed: return result;
result;
never executed: return result;
0
212}-
213-
214void QWindowGeometrySpecification::applyTo(QWindow *window) const-
215{-
216 QRect windowGeometry = window->frameGeometry();-
217 QSize size = windowGeometry.size();-
218 if (width >= 0
width >= 0Description
TRUEnever evaluated
FALSEnever evaluated
|| height >= 0
height >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
219 const QSize windowMinimumSize = window->minimumSize();-
220 const QSize windowMaximumSize = window->maximumSize();-
221 if (width >= 0
width >= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
222 size.setWidth(qBound(windowMinimumSize.width(), width, windowMaximumSize.width()));
never executed: size.setWidth(qBound(windowMinimumSize.width(), width, windowMaximumSize.width()));
0
223 if (height >= 0
height >= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
224 size.setHeight(qBound(windowMinimumSize.height(), height, windowMaximumSize.height()));
never executed: size.setHeight(qBound(windowMinimumSize.height(), height, windowMaximumSize.height()));
0
225 window->resize(size);-
226 }
never executed: end of block
0
227 if (xOffset >= 0
xOffset >= 0Description
TRUEnever evaluated
FALSEnever evaluated
|| yOffset >= 0
yOffset >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
228 const QRect availableGeometry = window->screen()->virtualGeometry();-
229 QPoint topLeft = windowGeometry.topLeft();-
230 if (xOffset >= 0
xOffset >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
231 topLeft.setX(corner == Qt::TopLeftCorner || corner == Qt::BottomLeftCorner ?-
232 xOffset :-
233 qMax(availableGeometry.right() - size.width() - xOffset, availableGeometry.left()));-
234 }
never executed: end of block
0
235 if (yOffset >= 0
yOffset >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
236 topLeft.setY(corner == Qt::TopLeftCorner || corner == Qt::TopRightCorner ?-
237 yOffset :-
238 qMax(availableGeometry.bottom() - size.height() - yOffset, availableGeometry.top()));-
239 }
never executed: end of block
0
240 window->setFramePosition(topLeft);-
241 }
never executed: end of block
0
242}
never executed: end of block
0
243-
244static QWindowGeometrySpecification windowGeometrySpecification = { Qt::TopLeftCorner, -1, -1, -1, -1 };-
245QGuiApplication::QGuiApplication(int &argc, char **argv, int flags)-
246-
247 : QCoreApplication(*new QGuiApplicationPrivate(argc, argv, flags))-
248{-
249 d_func()->init();-
250-
251 QCoreApplicationPrivate::eventDispatcher->startingUp();-
252}
never executed: end of block
0
253-
254-
255-
256-
257QGuiApplication::QGuiApplication(QGuiApplicationPrivate &p)-
258 : QCoreApplication(p)-
259{-
260}
never executed: end of block
0
261-
262-
263-
264-
265QGuiApplication::~QGuiApplication()-
266{-
267 QGuiApplicationPrivate * const d = d_func();-
268-
269 d->eventDispatcher->closingDown();-
270 d->eventDispatcher = 0;-
271-
272-
273 delete QGuiApplicationPrivate::qt_clipboard;-
274 QGuiApplicationPrivate::qt_clipboard = 0;-
275-
276-
277-
278 delete d->session_manager;-
279 d->session_manager = 0;-
280-
281-
282 clearPalette();-
283 QFontDatabase::removeAllApplicationFonts();-
284-
285-
286 d->cursor_list.clear();-
287-
288-
289 delete QGuiApplicationPrivate::app_icon;-
290 QGuiApplicationPrivate::app_icon = 0;-
291 delete QGuiApplicationPrivate::platform_name;-
292 QGuiApplicationPrivate::platform_name = 0;-
293 delete QGuiApplicationPrivate::displayName;-
294 QGuiApplicationPrivate::displayName = 0;-
295 delete QGuiApplicationPrivate::m_inputDeviceManager;-
296 QGuiApplicationPrivate::m_inputDeviceManager = 0;-
297}
never executed: end of block
0
298-
299QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags)-
300 : QCoreApplicationPrivate(argc, argv, flags),-
301 inputMethod(0),-
302 lastTouchType(QEvent::TouchEnd),-
303 ownGlobalShareContext(false)-
304{-
305 self = this;-
306 application_type = QCoreApplicationPrivate::Gui;-
307-
308 is_session_restored = false;-
309 is_saving_session = false;-
310-
311}
never executed: end of block
0
312void QGuiApplication::setApplicationDisplayName(const QString &name)-
313{-
314 if (!QGuiApplicationPrivate::displayName
!QGuiApplicati...e::displayNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
315 QGuiApplicationPrivate::displayName = new QString;
never executed: QGuiApplicationPrivate::displayName = new QString;
0
316 *QGuiApplicationPrivate::displayName = name;-
317}
never executed: end of block
0
318-
319QString QGuiApplication::applicationDisplayName()-
320{-
321 return
never executed: return QGuiApplicationPrivate::displayName ? *QGuiApplicationPrivate::displayName : applicationName();
QGuiApplicationPrivate::displayName
QGuiApplicatio...e::displayNameDescription
TRUEnever evaluated
FALSEnever evaluated
? *QGuiApplicationPrivate::displayName : applicationName();
never executed: return QGuiApplicationPrivate::displayName ? *QGuiApplicationPrivate::displayName : applicationName();
0
322}-
323QWindow *QGuiApplication::modalWindow()-
324{-
325 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 687, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
}
0
326 if (QGuiApplicationPrivate::self->modalWindowList.isEmpty()
QGuiApplicatio...List.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
327 return
never executed: return 0;
0;
never executed: return 0;
0
328 return
never executed: return QGuiApplicationPrivate::self->modalWindowList.first();
QGuiApplicationPrivate::self->modalWindowList.first();
never executed: return QGuiApplicationPrivate::self->modalWindowList.first();
0
329}-
330-
331static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)-
332{-
333 QWindowPrivate *p = qt_window_private(window);-
334 if (p->blockedByModalWindow != shouldBeBlocked
p->blockedByMo...houldBeBlockedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
335 p->blockedByModalWindow = shouldBeBlocked;-
336 QEvent e(shouldBeBlocked ? QEvent::WindowBlocked : QEvent::WindowUnblocked);-
337 QGuiApplication::sendEvent(window, &e);-
338 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(window->children())>::type> _container_((window->children())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QObject *c = *_container_.i; _container_.control; _container_.control = 0)-
339 if (c->isWindowType()
c->isWindowType()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
340 updateBlockedStatusRecursion(static_cast<QWindow *>(c), shouldBeBlocked);
never executed: updateBlockedStatusRecursion(static_cast<QWindow *>(c), shouldBeBlocked);
0
341 }
never executed: end of block
0
342}
never executed: end of block
0
343-
344void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)-
345{-
346 bool shouldBeBlocked = false;-
347 if (!QWindowPrivate::get(window)->isPopup()
!QWindowPrivat...ow)->isPopup()Description
TRUEnever evaluated
FALSEnever evaluated
&& !self->modalWindowList.isEmpty()
!self->modalWi...List.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
348 shouldBeBlocked = self->isWindowBlocked(window);
never executed: shouldBeBlocked = self->isWindowBlocked(window);
0
349 updateBlockedStatusRecursion(window, shouldBeBlocked);-
350}
never executed: end of block
0
351-
352void QGuiApplicationPrivate::showModalWindow(QWindow *modal)-
353{-
354 self->modalWindowList.prepend(modal);-
355-
356-
357 if (currentMouseWindow
currentMouseWindowDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QWindowPrivate::get(currentMouseWindow)->isPopup()
!QWindowPrivat...ow)->isPopup()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
358 bool shouldBeBlocked = self->isWindowBlocked(currentMouseWindow);-
359 if (shouldBeBlocked
shouldBeBlockedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
360-
361 self->modalWindowList.removeFirst();-
362 QEvent e(QEvent::Leave);-
363 QGuiApplication::sendEvent(currentMouseWindow, &e);-
364 currentMouseWindow = 0;-
365 self->modalWindowList.prepend(modal);-
366 }
never executed: end of block
0
367 }
never executed: end of block
0
368-
369 QWindowList windows = QGuiApplication::topLevelWindows();-
370 for (int i = 0; i < windows.count()
i < windows.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
371 QWindow *window = windows.at(i);-
372 if (!window->d_func()->blockedByModalWindow
!window->d_fun...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
373 updateBlockedStatus(window);
never executed: updateBlockedStatus(window);
0
374 }
never executed: end of block
0
375-
376 updateBlockedStatus(modal);-
377}
never executed: end of block
0
378-
379void QGuiApplicationPrivate::hideModalWindow(QWindow *window)-
380{-
381 self->modalWindowList.removeAll(window);-
382-
383 QWindowList windows = QGuiApplication::topLevelWindows();-
384 for (int i = 0; i < windows.count()
i < windows.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
385 QWindow *window = windows.at(i);-
386 if (window->d_func()->blockedByModalWindow
window->d_func...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
387 updateBlockedStatus(window);
never executed: updateBlockedStatus(window);
0
388 }
never executed: end of block
0
389}
never executed: end of block
0
390-
391-
392-
393-
394-
395-
396bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const-
397{-
398 QWindow *unused = 0;-
399 if (!blockingWindow
!blockingWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
400 blockingWindow = &unused;
never executed: blockingWindow = &unused;
0
401-
402 if (modalWindowList.isEmpty()
modalWindowList.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
403 *blockingWindow = 0;-
404 return
never executed: return false;
false;
never executed: return false;
0
405 }-
406-
407 for (int i = 0; i < modalWindowList.count()
i < modalWindowList.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
408 QWindow *modalWindow = modalWindowList.at(i);-
409-
410 {-
411-
412 QWindow *w = window;-
413 while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
414 if (w == modalWindow
w == modalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
415 *blockingWindow = 0;-
416 return
never executed: return false;
false;
never executed: return false;
0
417 }-
418 QWindow *p = w->parent();-
419 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
420 p = w->transientParent();
never executed: p = w->transientParent();
0
421 w = p;-
422 }
never executed: end of block
0
423 }-
424-
425 Qt::WindowModality windowModality = modalWindow->modality();-
426 switch (windowModality) {-
427 case
never executed: case Qt::ApplicationModal:
Qt::ApplicationModal:
never executed: case Qt::ApplicationModal:
0
428 {-
429 if (modalWindow != window
modalWindow != windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
430 *blockingWindow = modalWindow;-
431 return
never executed: return true;
true;
never executed: return true;
0
432 }-
433 break;
never executed: break;
0
434 }-
435 case
never executed: case Qt::WindowModal:
Qt::WindowModal:
never executed: case Qt::WindowModal:
0
436 {-
437 QWindow *w = window;-
438 do {-
439 QWindow *m = modalWindow;-
440 do {-
441 if (m == w
m == wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
442 *blockingWindow = m;-
443 return
never executed: return true;
true;
never executed: return true;
0
444 }-
445 QWindow *p = m->parent();-
446 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
447 p = m->transientParent();
never executed: p = m->transientParent();
0
448 m = p;-
449 }
never executed: end of block
while (m
mDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
450 QWindow *p = w->parent();-
451 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
452 p = w->transientParent();
never executed: p = w->transientParent();
0
453 w = p;-
454 }
never executed: end of block
while (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
455 break;
never executed: break;
0
456 }-
457 default
never executed: default:
:
never executed: default:
0
458 ((!(false)) ? qt_assert_x("QGuiApplication", "internal error, a modal widget cannot be modeless",__FILE__,820) : qt_noop());-
459 break;
never executed: break;
0
460 }-
461 }-
462 *blockingWindow = 0;-
463 return
never executed: return false;
false;
never executed: return false;
0
464}-
465-
466-
467-
468-
469-
470QWindow *QGuiApplication::focusWindow()-
471{-
472 return
never executed: return QGuiApplicationPrivate::focus_window;
QGuiApplicationPrivate::focus_window;
never executed: return QGuiApplicationPrivate::focus_window;
0
473}-
474QObject *QGuiApplication::focusObject()-
475{-
476 if (focusWindow()
focusWindow()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
477 return
never executed: return focusWindow()->focusObject();
focusWindow()->focusObject();
never executed: return focusWindow()->focusObject();
0
478 return
never executed: return 0;
0;
never executed: return 0;
0
479}-
480QWindowList QGuiApplication::allWindows()-
481{-
482 return
never executed: return QGuiApplicationPrivate::window_list;
QGuiApplicationPrivate::window_list;
never executed: return QGuiApplicationPrivate::window_list;
0
483}-
484QWindowList QGuiApplication::topLevelWindows()-
485{-
486 const QWindowList &list = QGuiApplicationPrivate::window_list;-
487 QWindowList topLevelWindows;-
488 for (int i = 0; i < list.size()
i < list.size()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
489 if (!list.at(i)->parent()
!list.at(i)->parent()Description
TRUEnever evaluated
FALSEnever evaluated
&& list.at(i)->type() != Qt::Desktop
list.at(i)->ty...!= Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
490-
491-
492 const bool embedded = list.at(i)->handle()
list.at(i)->handle()Description
TRUEnever evaluated
FALSEnever evaluated
&& list.at(i)->handle()->isEmbedded()
list.at(i)->ha...->isEmbedded()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
493 if (!embedded
!embeddedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
494 topLevelWindows.prepend(list.at(i));
never executed: topLevelWindows.prepend(list.at(i));
0
495 }
never executed: end of block
0
496 }
never executed: end of block
0
497 return
never executed: return topLevelWindows;
topLevelWindows;
never executed: return topLevelWindows;
0
498}-
499-
500QScreen *QGuiApplication::primaryScreen()-
501{-
502 if (QGuiApplicationPrivate::screen_list.isEmpty()
QGuiApplicatio...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
503 return
never executed: return 0;
0;
never executed: return 0;
0
504 return
never executed: return QGuiApplicationPrivate::screen_list.at(0);
QGuiApplicationPrivate::screen_list.at(0);
never executed: return QGuiApplicationPrivate::screen_list.at(0);
0
505}-
506-
507-
508-
509-
510-
511QList<QScreen *> QGuiApplication::screens()-
512{-
513 return
never executed: return QGuiApplicationPrivate::screen_list;
QGuiApplicationPrivate::screen_list;
never executed: return QGuiApplicationPrivate::screen_list;
0
514}-
515qreal QGuiApplication::devicePixelRatio() const-
516{-
517-
518 static qreal topDevicePixelRatio = 0.0;-
519 if (!qFuzzyIsNull(topDevicePixelRatio)
!qFuzzyIsNull(...icePixelRatio)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
520 return
never executed: return topDevicePixelRatio;
topDevicePixelRatio;
never executed: return topDevicePixelRatio;
0
521 }-
522-
523 topDevicePixelRatio = 1.0;-
524 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(QGuiApplicationPrivate::screen_list)>::type> _container_((QGuiApplicationPrivate::screen_list)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QScreen *screen = *_container_.i; _container_.control; _container_.control = 0) {-
525 topDevicePixelRatio = qMax(topDevicePixelRatio, screen->devicePixelRatio());-
526 }
never executed: end of block
0
527-
528 return
never executed: return topDevicePixelRatio;
topDevicePixelRatio;
never executed: return topDevicePixelRatio;
0
529}-
530-
531-
532-
533-
534QWindow *QGuiApplication::topLevelAt(const QPoint &pos)-
535{-
536 const QList<QScreen *> screens = QGuiApplication::screens();-
537 if (!screens.isEmpty()
!screens.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
538 const QList<QScreen *> primaryScreens = screens.first()->virtualSiblings();-
539 QScreen *windowScreen = nullptr;-
540-
541-
542 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(primaryScreens)>::type> _container_((primaryScreens)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QScreen *screen = *_container_.i; _container_.control; _container_.control = 0) {-
543 if (screen->geometry().contains(pos)
screen->geomet....contains(pos)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
544 windowScreen = screen;-
545 break;
never executed: break;
0
546 }-
547 }
never executed: end of block
0
548-
549-
550-
551-
552 if (!windowScreen
!windowScreenDescription
TRUEnever evaluated
FALSEnever evaluated
&& screens.count() != primaryScreens.count()
screens.count(...creens.count()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
553 for (int i = 1; i < screens.size()
i < screens.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
554 QScreen *screen = screens[i];-
555 if (screen->geometry().contains(pos)
screen->geomet....contains(pos)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
556 windowScreen = screen;-
557 break;
never executed: break;
0
558 }-
559 }
never executed: end of block
0
560 }
never executed: end of block
0
561-
562 if (windowScreen
windowScreenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
563 const QPoint devicePosition = QHighDpi::toNativePixels(pos, windowScreen);-
564 return
never executed: return windowScreen->handle()->topLevelAt(devicePosition);
windowScreen->handle()->topLevelAt(devicePosition);
never executed: return windowScreen->handle()->topLevelAt(devicePosition);
0
565 }-
566 }
never executed: end of block
0
567 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
568}-
569QString QGuiApplication::platformName()-
570{-
571 return
never executed: return QGuiApplicationPrivate::platform_name ? *QGuiApplicationPrivate::platform_name : QString();
QGuiApplicationPrivate::platform_name
QGuiApplicatio...:platform_nameDescription
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return QGuiApplicationPrivate::platform_name ? *QGuiApplicationPrivate::platform_name : QString();
0
572 *QGuiApplicationPrivate::platform_name : QString();
never executed: return QGuiApplicationPrivate::platform_name ? *QGuiApplicationPrivate::platform_name : QString();
0
573}-
574-
575static void init_platform(const QString &pluginArgument, const QString &platformPluginPath, const QString &platformThemeName, int &argc, char **argv)-
576{-
577-
578 QStringList arguments = pluginArgument.split(QLatin1Char(':'));-
579 const QString name = arguments.takeFirst().toLower();-
580 QString argumentsKey = name;-
581 argumentsKey[0] = argumentsKey.at(0).toUpper();-
582 arguments.append(QLibraryInfo::platformPluginArguments(argumentsKey));-
583-
584-
585 QGuiApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, arguments, argc, argv, platformPluginPath);-
586 if (QGuiApplicationPrivate::platform_integration
QGuiApplicatio...rm_integrationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
587 QGuiApplicationPrivate::platform_name = new QString(name);-
588 }
never executed: end of block
else {
0
589 QStringList keys = QPlatformIntegrationFactory::keys(platformPluginPath);-
590-
591 QString fatalMessage-
592 = ([]() -> QString { enum { Size = sizeof(u"" "This application failed to start because it could not find or load the Qt platform plugin \"%1\"\nin \"%2\".\n\n")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "This application failed to start because it could not find or load the Qt platform plugin \"%1\"\nin \"%2\".\n\n" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()).arg(name, QDir::toNativeSeparators(platformPluginPath));
0
593 if (!keys.isEmpty()
!keys.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
594 fatalMessage += ([]() -> QString { enum { Size = sizeof(u"" "Available platform plugins are: %1.\n\n")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Available platform plugins are: %1.\n\n" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()).arg(
0
595 keys.join(([]() -> QString { enum { Size = sizeof(u"" ", ")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" ", " }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}())));
0
596 }
never executed: end of block
0
597 fatalMessage += ([]() -> QString { enum { Size = sizeof(u"" "Reinstalling the application may fix this problem.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Reinstalling the application may fix this problem." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
598-
599-
600-
601-
602-
603-
604 QMessageLogger(__FILE__, 1087, __PRETTY_FUNCTION__).fatal("%s", QString(fatalMessage).toLocal8Bit().constData());-
605 return;
never executed: return;
0
606 }-
607-
608-
609-
610 if (QGuiApplication::primaryScreen()
QGuiApplicatio...rimaryScreen()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
611 QGuiApplicationPrivate::highDpiScalingUpdated = true;-
612 QHighDpiScaling::updateHighDpiScaling();-
613 }
never executed: end of block
0
614-
615-
616-
617-
618 QStringList themeNames;-
619 if (!platformThemeName.isEmpty()
!platformThemeName.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
620 themeNames.append(platformThemeName);
never executed: themeNames.append(platformThemeName);
0
621-
622-
623 themeNames += QGuiApplicationPrivate::platform_integration->themeNames();-
624-
625 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(themeNames)>::type> _container_((themeNames)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &themeName = *_container_.i; _container_.control; _container_.control = 0) {-
626 QGuiApplicationPrivate::platform_theme = QPlatformThemeFactory::create(themeName, platformPluginPath);-
627 if (QGuiApplicationPrivate::platform_theme
QGuiApplicatio...platform_themeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
628 break;
never executed: break;
0
629 }
never executed: end of block
0
630-
631-
632-
633 if (!QGuiApplicationPrivate::platform_theme
!QGuiApplicati...platform_themeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
634 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(themeNames)>::type> _container_((themeNames)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &themeName = *_container_.i; _container_.control; _container_.control = 0) {-
635 QGuiApplicationPrivate::platform_theme = QGuiApplicationPrivate::platform_integration->createPlatformTheme(themeName);-
636 if (QGuiApplicationPrivate::platform_theme
QGuiApplicatio...platform_themeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
637 break;
never executed: break;
0
638 }
never executed: end of block
0
639-
640 }
never executed: end of block
0
641-
642-
643 if (!QGuiApplicationPrivate::platform_theme
!QGuiApplicati...platform_themeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
644 QGuiApplicationPrivate::platform_theme = new QPlatformTheme;
never executed: QGuiApplicationPrivate::platform_theme = new QPlatformTheme;
0
645-
646-
647-
648-
649 if (!arguments.isEmpty()
!arguments.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
650 if (QObject *nativeInterface = QGuiApplicationPrivate::platform_integration->nativeInterface()
QObject *nativ...iveInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
651 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(arguments)>::type> _container_((arguments)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &argument = *_container_.i; _container_.control; _container_.control = 0) {-
652 const int equalsPos = argument.indexOf(QLatin1Char('='));-
653 const QByteArray name =-
654 equalsPos != -1
equalsPos != -1Description
TRUEnever evaluated
FALSEnever evaluated
? argument.left(equalsPos).toUtf8() : argument.toUtf8();
0
655 const QVariant value =-
656 equalsPos != -1
equalsPos != -1Description
TRUEnever evaluated
FALSEnever evaluated
? QVariant(argument.mid(equalsPos + 1)) : QVariant(true);
0
657 nativeInterface->setProperty(name.constData(), value);-
658 }
never executed: end of block
0
659 }
never executed: end of block
0
660 }
never executed: end of block
0
661-
662-
663 fontSmoothingGamma = QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::FontSmoothingGamma).toReal();-
664}
never executed: end of block
0
665-
666static void init_plugins(const QList<QByteArray> &pluginList)-
667{-
668 for (int i = 0; i < pluginList.count()
i < pluginList.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
669 QByteArray pluginSpec = pluginList.at(i);-
670 int colonPos = pluginSpec.indexOf(':');-
671 QObject *plugin;-
672 if (colonPos < 0
colonPos < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
673 plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec), QString());
never executed: plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec), QString());
0
674 else-
675 plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec.mid(0, colonPos)),
never executed: plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec.mid(0, colonPos)), QLatin1String(pluginSpec.mid(colonPos+1)));
0
676 QLatin1String(pluginSpec.mid(colonPos+1)));
never executed: plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec.mid(0, colonPos)), QLatin1String(pluginSpec.mid(colonPos+1)));
0
677 if (plugin
pluginDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
678 QGuiApplicationPrivate::generic_plugin_list.append(plugin);
never executed: QGuiApplicationPrivate::generic_plugin_list.append(plugin);
0
679 else-
680 QMessageLogger(__FILE__, 1163, __PRETTY_FUNCTION__).warning() << "No such plugin for spec " << pluginSpec;
never executed: QMessageLogger(__FILE__, 1163, __PRETTY_FUNCTION__).warning() << "No such plugin for spec " << pluginSpec;
0
681 }-
682}
never executed: end of block
0
683-
684void QGuiApplicationPrivate::createPlatformIntegration()-
685{-
686-
687-
688-
689 QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);-
690-
691-
692 QHighDpiScaling::initHighDpiScaling();-
693-
694-
695 QString platformPluginPath = QString::fromLocal8Bit(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH"));-
696-
697-
698 QByteArray platformName;-
699-
700 platformName = "xcb";-
701-
702 QByteArray platformNameEnv = qgetenv("QT_QPA_PLATFORM");-
703 if (!platformNameEnv.isEmpty()
!platformNameEnv.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
704 platformName = platformNameEnv;-
705 }
never executed: end of block
0
706-
707 QString platformThemeName = QString::fromLocal8Bit(qgetenv("QT_QPA_PLATFORMTHEME"));-
708-
709-
710-
711 QString icon;-
712-
713 int j = argc
argcDescription
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
0
714 for (int i=1; i<argc
i<argcDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
715 if (!argv[i]
!argv[i]Description
TRUEnever evaluated
FALSEnever evaluated
)
0
716 continue;
never executed: continue;
0
717 if (*
*argv[i] != '-'Description
TRUEnever evaluated
FALSEnever evaluated
argv[i] != '-'
*argv[i] != '-'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
718 argv[j++] = argv[i];-
719 continue;
never executed: continue;
0
720 }-
721 const bool isXcb = platformName == "xcb";-
722 const char *arg = argv[i];-
723 if (arg[1] == '-'
arg[1] == '-'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
724 ++
never executed: ++arg;
arg;
never executed: ++arg;
0
725 if (strcmp(arg, "-platformpluginpath") == 0
strcmp(arg, "-...ginpath") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
726 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
727 platformPluginPath = QString::fromLocal8Bit(argv[i]);
never executed: platformPluginPath = QString::fromLocal8Bit(argv[i]);
0
728 }
never executed: end of block
else if (strcmp(arg, "-platform") == 0
strcmp(arg, "-platform") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
729 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
730 platformName = argv[i];
never executed: platformName = argv[i];
0
731 }
never executed: end of block
else if (strcmp(arg, "-platformtheme") == 0
strcmp(arg, "-...rmtheme") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
732 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
733 platformThemeName = QString::fromLocal8Bit(argv[i]);
never executed: platformThemeName = QString::fromLocal8Bit(argv[i]);
0
734 }
never executed: end of block
else if (strcmp(arg, "-qwindowgeometry") == 0
strcmp(arg, "-...eometry") == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (isXcb
isXcbDescription
TRUEnever evaluated
FALSEnever evaluated
&& strcmp(arg, "-geometry") == 0
strcmp(arg, "-geometry") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
735 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
736 windowGeometrySpecification = QWindowGeometrySpecification::fromArgument(argv[i]);
never executed: windowGeometrySpecification = QWindowGeometrySpecification::fromArgument(argv[i]);
0
737 }
never executed: end of block
else if (strcmp(arg, "-qwindowtitle") == 0
strcmp(arg, "-...owtitle") == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (isXcb
isXcbDescription
TRUEnever evaluated
FALSEnever evaluated
&& strcmp(arg, "-title") == 0
strcmp(arg, "-title") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
738 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
739 firstWindowTitle = QString::fromLocal8Bit(argv[i]);
never executed: firstWindowTitle = QString::fromLocal8Bit(argv[i]);
0
740 }
never executed: end of block
else if (strcmp(arg, "-qwindowicon") == 0
strcmp(arg, "-...dowicon") == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (isXcb
isXcbDescription
TRUEnever evaluated
FALSEnever evaluated
&& strcmp(arg, "-icon") == 0
strcmp(arg, "-icon") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
741 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
742 icon = QString::fromLocal8Bit(argv[i]);-
743 }
never executed: end of block
0
744 }
never executed: end of block
else {
0
745 argv[j++] = argv[i];-
746 }
never executed: end of block
0
747 }-
748-
749 if (j < argc
j < argcDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
750 argv[j] = 0;-
751 argc = j;-
752 }
never executed: end of block
0
753-
754 init_platform(QLatin1String(platformName), platformPluginPath, platformThemeName, argc, argv);-
755-
756 if (!icon.isEmpty()
!icon.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
757 forcedWindowIcon = QDir::isAbsolutePath(icon)
QDir::isAbsolutePath(icon)Description
TRUEnever evaluated
FALSEnever evaluated
? QIcon(icon) : QIcon::fromTheme(icon);
never executed: forcedWindowIcon = QDir::isAbsolutePath(icon) ? QIcon(icon) : QIcon::fromTheme(icon);
0
758}
never executed: end of block
0
759-
760-
761-
762-
763-
764-
765-
766void QGuiApplicationPrivate::createEventDispatcher()-
767{-
768 ((!(!eventDispatcher)) ? qt_assert("!eventDispatcher",__FILE__,1251) : qt_noop());-
769-
770 if (platform_integration == 0
platform_integration == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
771 createPlatformIntegration();
never executed: createPlatformIntegration();
0
772-
773-
774 ((!(!eventDispatcher)) ? qt_assert("!eventDispatcher",__FILE__,1257) : qt_noop());-
775-
776 eventDispatcher = platform_integration->createEventDispatcher();-
777}
never executed: end of block
0
778-
779void QGuiApplicationPrivate::eventDispatcherReady()-
780{-
781 if (platform_integration == 0
platform_integration == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
782 createPlatformIntegration();
never executed: createPlatformIntegration();
0
783-
784 platform_integration->initialize();-
785-
786-
787-
788 if (!QGuiApplicationPrivate::highDpiScalingUpdated
!QGuiApplicati...ScalingUpdatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
789 QHighDpiScaling::updateHighDpiScaling();
never executed: QHighDpiScaling::updateHighDpiScaling();
0
790}
never executed: end of block
0
791-
792void QGuiApplicationPrivate::init()-
793{-
794 QCoreApplicationPrivate::init();-
795-
796 QCoreApplicationPrivate::is_app_running = false;-
797-
798 bool loadTestability = false;-
799 QList<QByteArray> pluginList;-
800-
801-
802 QString session_id;-
803 QString session_key;-
804 QString s;-
805 int j = argc
argcDescription
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
0
806 for (int i=1; i<argc
i<argcDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
807 if (!argv[i]
!argv[i]Description
TRUEnever evaluated
FALSEnever evaluated
)
0
808 continue;
never executed: continue;
0
809 if (*
*argv[i] != '-'Description
TRUEnever evaluated
FALSEnever evaluated
argv[i] != '-'
*argv[i] != '-'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
810 argv[j++] = argv[i];-
811 continue;
never executed: continue;
0
812 }-
813 const char *arg = argv[i];-
814 if (arg[1] == '-'
arg[1] == '-'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
815 ++
never executed: ++arg;
arg;
never executed: ++arg;
0
816 if (strcmp(arg, "-plugin") == 0
strcmp(arg, "-plugin") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
817 if (++
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
i < argc
++i < argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
818 pluginList << argv[i];
never executed: pluginList << argv[i];
0
819 }
never executed: end of block
else if (strcmp(arg, "-reverse") == 0
strcmp(arg, "-reverse") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
820 force_reverse = true;-
821 }
never executed: end of block
else if (strcmp(arg, "-session") == 0
strcmp(arg, "-session") == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& i < argc - 1
i < argc - 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
822 ++i;-
823 if (argv[i]
argv[i]Description
TRUEnever evaluated
FALSEnever evaluated
&& *
*argv[i]Description
TRUEnever evaluated
FALSEnever evaluated
argv[i]
*argv[i]Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
824 session_id = QString::fromLatin1(argv[i]);-
825 int p = session_id.indexOf(QLatin1Char('_'));-
826 if (p >= 0
p >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
827 session_key = session_id.mid(p +1);-
828 session_id = session_id.left(p);-
829 }
never executed: end of block
0
830 is_session_restored = true;-
831 }
never executed: end of block
0
832-
833 }
never executed: end of block
else if (strcmp(arg, "-testability") == 0
strcmp(arg, "-...ability") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
834 loadTestability = true;-
835 }
never executed: end of block
else if (strncmp(arg, "-style=", 7) == 0
strncmp(arg, "...yle=", 7) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
836 s = QString::fromLocal8Bit(arg + 7).toLower();-
837 }
never executed: end of block
else if (strcmp(arg, "-style") == 0
strcmp(arg, "-style") == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& i < argc - 1
i < argc - 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
838 s = QString::fromLocal8Bit(argv[++i]).toLower();-
839 }
never executed: end of block
else {
0
840 argv[j++] = argv[i];-
841 }
never executed: end of block
0
842-
843 if (!s.isEmpty()
!s.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
844 styleOverride = s;
never executed: styleOverride = s;
0
845 }
never executed: end of block
0
846-
847 if (j < argc
j < argcDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
848 argv[j] = 0;-
849 argc = j;-
850 }
never executed: end of block
0
851-
852-
853 QByteArray envPlugins = qgetenv("QT_QPA_GENERIC_PLUGINS");-
854 if (!envPlugins.isEmpty()
!envPlugins.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
855 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(envPlugins.split(','))>::type> _container_((envPlugins.split(','))); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QByteArray &plugin = *_container_.i; _container_.control; _container_.control = 0)-
856 pluginList << plugin;
never executed: pluginList << plugin;
0
857 }
never executed: end of block
0
858-
859 if (platform_integration == 0
platform_integration == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
860 createPlatformIntegration();
never executed: createPlatformIntegration();
0
861-
862 initPalette();-
863 QFont::initialize();-
864-
865 mouse_double_click_distance = platformTheme()->themeHint(QPlatformTheme::MouseDoubleClickDistance).toInt();-
866-
867-
868 QCursorData::initialize();-
869-
870-
871-
872 qRegisterGuiVariant();-
873-
874-
875-
876 qRegisterGuiGetInterpolator();-
877-
878-
879-
880-
881 if ((static_cast<
(static_cast<Q...penGLContexts)Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->testAttribute(Qt::AA_ShareOpenGLContexts)
(static_cast<Q...penGLContexts)Description
TRUEnever evaluated
FALSEnever evaluated
&& !qt_gl_global_share_context()
!qt_gl_global_share_context()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
882 QOpenGLContext *ctx = new QOpenGLContext;-
883 ctx->setFormat(QSurfaceFormat::defaultFormat());-
884 ctx->create();-
885 qt_gl_set_global_share_context(ctx);-
886 ownGlobalShareContext = true;-
887 }
never executed: end of block
0
888-
889-
890 QWindowSystemInterfacePrivate::eventTime.start();-
891-
892 is_app_running = true;-
893 init_plugins(pluginList);-
894 QWindowSystemInterface::flushWindowSystemEvents();-
895-
896-
897 QGuiApplication * const q = q_func();-
898-
899-
900 session_manager = new QSessionManager(q, session_id, session_key);-
901-
902-
903-
904 if (qEnvironmentVariableIntValue("QT_LOAD_TESTABILITY") > 0
qEnvironmentVa...TABILITY") > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
905 loadTestability = true;
never executed: loadTestability = true;
0
906-
907 if (loadTestability
loadTestabilityDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
908 QLibrary testLib(([]() -> QString { enum { Size = sizeof(u"" "qttestability")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qttestability" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
0
909 if (testLib.load()
testLib.load()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
910 typedef void (*TasInitialize)(void);-
911 TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");-
912 if (initFunction
initFunctionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
913 initFunction();-
914 }
never executed: end of block
else {
0
915 QMessageLogger(__FILE__, 1422, __PRETTY_FUNCTION__).critical() << "Library qttestability resolve failed!";-
916 }
never executed: end of block
0
917 } else {-
918 QMessageLogger(__FILE__, 1425, __PRETTY_FUNCTION__).critical() << "Library qttestability load failed:" << testLib.errorString();-
919 }
never executed: end of block
0
920 }-
921-
922-
923-
924-
925 if (layout_direction == Qt::LayoutDirectionAuto
layout_directi...tDirectionAutoDescription
TRUEnever evaluated
FALSEnever evaluated
|| force_reverse
force_reverseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
926 QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
never executed: QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
0
927-
928 scrollNoPhaseAllowed = qEnvironmentVariableIsSet("QT_ENABLE_MOUSE_WHEEL_TRACKING");-
929}
never executed: end of block
0
930-
931extern void qt_cleanupFontDatabase();-
932-
933QGuiApplicationPrivate::~QGuiApplicationPrivate()-
934{-
935 is_app_closing = true;-
936 is_app_running = false;-
937-
938 for (int i = 0; i < generic_plugin_list.count()
i < generic_pl...n_list.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
939 delete generic_plugin_list.at(i);
never executed: delete generic_plugin_list.at(i);
0
940 generic_plugin_list.clear();-
941-
942 clearFontUnlocked();-
943-
944 QFont::cleanup();-
945-
946-
947 QCursorData::cleanup();-
948-
949-
950 layout_direction = Qt::LeftToRight;-
951-
952 cleanupThreadData();-
953-
954 delete QGuiApplicationPrivate::styleHints;-
955 QGuiApplicationPrivate::styleHints = nullptr;-
956 delete inputMethod;-
957-
958 qt_cleanupFontDatabase();-
959-
960 QPixmapCache::clear();-
961-
962-
963 if (ownGlobalShareContext
ownGlobalShareContextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
964 delete qt_gl_global_share_context();-
965 qt_gl_set_global_share_context(0);-
966 }
never executed: end of block
0
967-
968-
969 platform_integration->destroy();-
970-
971 delete platform_theme;-
972 platform_theme = 0;-
973 delete platform_integration;-
974 platform_integration = 0;-
975 delete m_gammaTables.load();-
976-
977 window_list.clear();-
978}
never executed: end of block
0
979Qt::KeyboardModifiers QGuiApplication::keyboardModifiers()-
980{-
981 return
never executed: return QGuiApplicationPrivate::modifier_buttons;
QGuiApplicationPrivate::modifier_buttons;
never executed: return QGuiApplicationPrivate::modifier_buttons;
0
982}-
983Qt::KeyboardModifiers QGuiApplication::queryKeyboardModifiers()-
984{-
985 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 1542, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return Qt::KeyboardModifiers(0);
Qt::KeyboardModifiers(0);
never executed: return Qt::KeyboardModifiers(0);
}
0
986 QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration();-
987 return
never executed: return pi->queryKeyboardModifiers();
pi->queryKeyboardModifiers();
never executed: return pi->queryKeyboardModifiers();
0
988}-
989Qt::MouseButtons QGuiApplication::mouseButtons()-
990{-
991 return
never executed: return QGuiApplicationPrivate::mouse_buttons;
QGuiApplicationPrivate::mouse_buttons;
never executed: return QGuiApplicationPrivate::mouse_buttons;
0
992}-
993-
994-
995-
996-
997-
998QPlatformNativeInterface *QGuiApplication::platformNativeInterface()-
999{-
1000 QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration();-
1001 return
never executed: return pi ? pi->nativeInterface() : 0;
pi
piDescription
TRUEnever evaluated
FALSEnever evaluated
? pi->nativeInterface() : 0;
never executed: return pi ? pi->nativeInterface() : 0;
0
1002}-
1003-
1004-
1005-
1006-
1007QFunctionPointer QGuiApplication::platformFunction(const QByteArray &function)-
1008{-
1009 QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration();-
1010 if (!pi
!piDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1011 QMessageLogger(__FILE__, 1582, __PRETTY_FUNCTION__).warning() << "QGuiApplication::platformFunction(): Must construct a QGuiApplication before accessing a platform function";-
1012 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
1013 }-
1014-
1015 return
never executed: return pi->nativeInterface() ? pi->nativeInterface()->platformFunction(function) : nullptr;
pi->nativeInterface()
pi->nativeInterface()Description
TRUEnever evaluated
FALSEnever evaluated
? pi->nativeInterface()->platformFunction(function) : nullptr;
never executed: return pi->nativeInterface() ? pi->nativeInterface()->platformFunction(function) : nullptr;
0
1016}-
1017int QGuiApplication::exec()-
1018{-
1019-
1020 QAccessible::setRootObject((static_cast<QGuiApplication *>(QCoreApplication::instance())));-
1021-
1022 return
never executed: return QCoreApplication::exec();
QCoreApplication::exec();
never executed: return QCoreApplication::exec();
0
1023}-
1024-
1025-
1026-
1027bool QGuiApplication::notify(QObject *object, QEvent *event)-
1028{-
1029 if (object->isWindowType()
object->isWindowType()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1030 QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event);
never executed: QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event);
0
1031 return
never executed: return QCoreApplication::notify(object, event);
QCoreApplication::notify(object, event);
never executed: return QCoreApplication::notify(object, event);
0
1032}-
1033-
1034-
1035-
1036bool QGuiApplication::event(QEvent *e)-
1037{-
1038 if(e->type() == QEvent::LanguageChange
e->type() == Q...LanguageChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1039 setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);-
1040 }
never executed: end of block
0
1041 return
never executed: return QCoreApplication::event(e);
QCoreApplication::event(e);
never executed: return QCoreApplication::event(e);
0
1042}-
1043-
1044-
1045-
1046-
1047bool QGuiApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventList *postedEvents)-
1048{-
1049 return
never executed: return QCoreApplication::compressEvent(event, receiver, postedEvents);
QCoreApplication::compressEvent(event, receiver, postedEvents);
never executed: return QCoreApplication::compressEvent(event, receiver, postedEvents);
0
1050}-
1051-
1052void QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event)-
1053{-
1054 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1055 return;
never executed: return;
0
1056 QPlatformWindow *platformWindow = window->handle();-
1057 if (!platformWindow
!platformWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1058 return;
never executed: return;
0
1059-
1060 if (event->spontaneous()
event->spontaneous()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1061 return;
never executed: return;
0
1062-
1063 platformWindow->windowEvent(event);-
1064}
never executed: end of block
0
1065-
1066bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)-
1067{-
1068 return
never executed: return window->nativeEvent(eventType, message, result);
window->nativeEvent(eventType, message, result);
never executed: return window->nativeEvent(eventType, message, result);
0
1069}-
1070-
1071void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e)-
1072{-
1073 switch(e->type) {-
1074 case
never executed: case QWindowSystemInterfacePrivate::FrameStrutMouse:
QWindowSystemInterfacePrivate::FrameStrutMouse:
never executed: case QWindowSystemInterfacePrivate::FrameStrutMouse:
0
1075 case
never executed: case QWindowSystemInterfacePrivate::Mouse:
QWindowSystemInterfacePrivate::Mouse:
never executed: case QWindowSystemInterfacePrivate::Mouse:
0
1076 QGuiApplicationPrivate::processMouseEvent(static_cast<QWindowSystemInterfacePrivate::MouseEvent *>(e));-
1077 break;
never executed: break;
0
1078 case
never executed: case QWindowSystemInterfacePrivate::Wheel:
QWindowSystemInterfacePrivate::Wheel:
never executed: case QWindowSystemInterfacePrivate::Wheel:
0
1079 QGuiApplicationPrivate::processWheelEvent(static_cast<QWindowSystemInterfacePrivate::WheelEvent *>(e));-
1080 break;
never executed: break;
0
1081 case
never executed: case QWindowSystemInterfacePrivate::Key:
QWindowSystemInterfacePrivate::Key:
never executed: case QWindowSystemInterfacePrivate::Key:
0
1082 QGuiApplicationPrivate::processKeyEvent(static_cast<QWindowSystemInterfacePrivate::KeyEvent *>(e));-
1083 break;
never executed: break;
0
1084 case
never executed: case QWindowSystemInterfacePrivate::Touch:
QWindowSystemInterfacePrivate::Touch:
never executed: case QWindowSystemInterfacePrivate::Touch:
0
1085 QGuiApplicationPrivate::processTouchEvent(static_cast<QWindowSystemInterfacePrivate::TouchEvent *>(e));-
1086 break;
never executed: break;
0
1087 case
never executed: case QWindowSystemInterfacePrivate::GeometryChange:
QWindowSystemInterfacePrivate::GeometryChange:
never executed: case QWindowSystemInterfacePrivate::GeometryChange:
0
1088 QGuiApplicationPrivate::processGeometryChangeEvent(static_cast<QWindowSystemInterfacePrivate::GeometryChangeEvent*>(e));-
1089 break;
never executed: break;
0
1090 case
never executed: case QWindowSystemInterfacePrivate::Enter:
QWindowSystemInterfacePrivate::Enter:
never executed: case QWindowSystemInterfacePrivate::Enter:
0
1091 QGuiApplicationPrivate::processEnterEvent(static_cast<QWindowSystemInterfacePrivate::EnterEvent *>(e));-
1092 break;
never executed: break;
0
1093 case
never executed: case QWindowSystemInterfacePrivate::Leave:
QWindowSystemInterfacePrivate::Leave:
never executed: case QWindowSystemInterfacePrivate::Leave:
0
1094 QGuiApplicationPrivate::processLeaveEvent(static_cast<QWindowSystemInterfacePrivate::LeaveEvent *>(e));-
1095 break;
never executed: break;
0
1096 case
never executed: case QWindowSystemInterfacePrivate::ActivatedWindow:
QWindowSystemInterfacePrivate::ActivatedWindow:
never executed: case QWindowSystemInterfacePrivate::ActivatedWindow:
0
1097 QGuiApplicationPrivate::processActivatedEvent(static_cast<QWindowSystemInterfacePrivate::ActivatedWindowEvent *>(e));-
1098 break;
never executed: break;
0
1099 case
never executed: case QWindowSystemInterfacePrivate::WindowStateChanged:
QWindowSystemInterfacePrivate::WindowStateChanged:
never executed: case QWindowSystemInterfacePrivate::WindowStateChanged:
0
1100 QGuiApplicationPrivate::processWindowStateChangedEvent(static_cast<QWindowSystemInterfacePrivate::WindowStateChangedEvent *>(e));-
1101 break;
never executed: break;
0
1102 case
never executed: case QWindowSystemInterfacePrivate::WindowScreenChanged:
QWindowSystemInterfacePrivate::WindowScreenChanged:
never executed: case QWindowSystemInterfacePrivate::WindowScreenChanged:
0
1103 QGuiApplicationPrivate::processWindowScreenChangedEvent(static_cast<QWindowSystemInterfacePrivate::WindowScreenChangedEvent *>(e));-
1104 break;
never executed: break;
0
1105 case
never executed: case QWindowSystemInterfacePrivate::ApplicationStateChanged:
QWindowSystemInterfacePrivate::ApplicationStateChanged:
never executed: case QWindowSystemInterfacePrivate::ApplicationStateChanged:
{
0
1106 QWindowSystemInterfacePrivate::ApplicationStateChangedEvent * changeEvent = static_cast<QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *>(e);-
1107 QGuiApplicationPrivate::setApplicationState(changeEvent->newState, changeEvent->forcePropagate); }-
1108 break;
never executed: break;
0
1109 case
never executed: case QWindowSystemInterfacePrivate::FlushEvents:
QWindowSystemInterfacePrivate::FlushEvents:
never executed: case QWindowSystemInterfacePrivate::FlushEvents:
{
0
1110 QWindowSystemInterfacePrivate::FlushEventsEvent *flushEventsEvent = static_cast<QWindowSystemInterfacePrivate::FlushEventsEvent *>(e);-
1111 QWindowSystemInterface::deferredFlushWindowSystemEvents(flushEventsEvent->flags); }-
1112 break;
never executed: break;
0
1113 case
never executed: case QWindowSystemInterfacePrivate::Close:
QWindowSystemInterfacePrivate::Close:
never executed: case QWindowSystemInterfacePrivate::Close:
0
1114 QGuiApplicationPrivate::processCloseEvent(-
1115 static_cast<QWindowSystemInterfacePrivate::CloseEvent *>(e));-
1116 break;
never executed: break;
0
1117 case
never executed: case QWindowSystemInterfacePrivate::ScreenOrientation:
QWindowSystemInterfacePrivate::ScreenOrientation:
never executed: case QWindowSystemInterfacePrivate::ScreenOrientation:
0
1118 QGuiApplicationPrivate::reportScreenOrientationChange(-
1119 static_cast<QWindowSystemInterfacePrivate::ScreenOrientationEvent *>(e));-
1120 break;
never executed: break;
0
1121 case
never executed: case QWindowSystemInterfacePrivate::ScreenGeometry:
QWindowSystemInterfacePrivate::ScreenGeometry:
never executed: case QWindowSystemInterfacePrivate::ScreenGeometry:
0
1122 QGuiApplicationPrivate::reportGeometryChange(-
1123 static_cast<QWindowSystemInterfacePrivate::ScreenGeometryEvent *>(e));-
1124 break;
never executed: break;
0
1125 case
never executed: case QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInch:
QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInch:
never executed: case QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInch:
0
1126 QGuiApplicationPrivate::reportLogicalDotsPerInchChange(-
1127 static_cast<QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *>(e));-
1128 break;
never executed: break;
0
1129 case
never executed: case QWindowSystemInterfacePrivate::ScreenRefreshRate:
QWindowSystemInterfacePrivate::ScreenRefreshRate:
never executed: case QWindowSystemInterfacePrivate::ScreenRefreshRate:
0
1130 QGuiApplicationPrivate::reportRefreshRateChange(-
1131 static_cast<QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *>(e));-
1132 break;
never executed: break;
0
1133 case
never executed: case QWindowSystemInterfacePrivate::ThemeChange:
QWindowSystemInterfacePrivate::ThemeChange:
never executed: case QWindowSystemInterfacePrivate::ThemeChange:
0
1134 QGuiApplicationPrivate::processThemeChanged(-
1135 static_cast<QWindowSystemInterfacePrivate::ThemeChangeEvent *>(e));-
1136 break;
never executed: break;
0
1137 case
never executed: case QWindowSystemInterfacePrivate::Expose:
QWindowSystemInterfacePrivate::Expose:
never executed: case QWindowSystemInterfacePrivate::Expose:
0
1138 QGuiApplicationPrivate::processExposeEvent(static_cast<QWindowSystemInterfacePrivate::ExposeEvent *>(e));-
1139 break;
never executed: break;
0
1140 case
never executed: case QWindowSystemInterfacePrivate::Tablet:
QWindowSystemInterfacePrivate::Tablet:
never executed: case QWindowSystemInterfacePrivate::Tablet:
0
1141 QGuiApplicationPrivate::processTabletEvent(-
1142 static_cast<QWindowSystemInterfacePrivate::TabletEvent *>(e));-
1143 break;
never executed: break;
0
1144 case
never executed: case QWindowSystemInterfacePrivate::TabletEnterProximity:
QWindowSystemInterfacePrivate::TabletEnterProximity:
never executed: case QWindowSystemInterfacePrivate::TabletEnterProximity:
0
1145 QGuiApplicationPrivate::processTabletEnterProximityEvent(-
1146 static_cast<QWindowSystemInterfacePrivate::TabletEnterProximityEvent *>(e));-
1147 break;
never executed: break;
0
1148 case
never executed: case QWindowSystemInterfacePrivate::TabletLeaveProximity:
QWindowSystemInterfacePrivate::TabletLeaveProximity:
never executed: case QWindowSystemInterfacePrivate::TabletLeaveProximity:
0
1149 QGuiApplicationPrivate::processTabletLeaveProximityEvent(-
1150 static_cast<QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *>(e));-
1151 break;
never executed: break;
0
1152-
1153 case
never executed: case QWindowSystemInterfacePrivate::Gesture:
QWindowSystemInterfacePrivate::Gesture:
never executed: case QWindowSystemInterfacePrivate::Gesture:
0
1154 QGuiApplicationPrivate::processGestureEvent(-
1155 static_cast<QWindowSystemInterfacePrivate::GestureEvent *>(e));-
1156 break;
never executed: break;
0
1157-
1158 case
never executed: case QWindowSystemInterfacePrivate::PlatformPanel:
QWindowSystemInterfacePrivate::PlatformPanel:
never executed: case QWindowSystemInterfacePrivate::PlatformPanel:
0
1159 QGuiApplicationPrivate::processPlatformPanelEvent(-
1160 static_cast<QWindowSystemInterfacePrivate::PlatformPanelEvent *>(e));-
1161 break;
never executed: break;
0
1162 case
never executed: case QWindowSystemInterfacePrivate::FileOpen:
QWindowSystemInterfacePrivate::FileOpen:
never executed: case QWindowSystemInterfacePrivate::FileOpen:
0
1163 QGuiApplicationPrivate::processFileOpenEvent(-
1164 static_cast<QWindowSystemInterfacePrivate::FileOpenEvent *>(e));-
1165 break;
never executed: break;
0
1166-
1167 case
never executed: case QWindowSystemInterfacePrivate::ContextMenu:
QWindowSystemInterfacePrivate::ContextMenu:
never executed: case QWindowSystemInterfacePrivate::ContextMenu:
0
1168 QGuiApplicationPrivate::processContextMenuEvent(-
1169 static_cast<QWindowSystemInterfacePrivate::ContextMenuEvent *>(e));-
1170 break;
never executed: break;
0
1171-
1172 case
never executed: case QWindowSystemInterfacePrivate::EnterWhatsThisMode:
QWindowSystemInterfacePrivate::EnterWhatsThisMode:
never executed: case QWindowSystemInterfacePrivate::EnterWhatsThisMode:
0
1173 QGuiApplication::postEvent(QGuiApplication::instance(), new QEvent(QEvent::EnterWhatsThisMode));-
1174 break;
never executed: break;
0
1175 default
never executed: default:
:
never executed: default:
0
1176 QMessageLogger(__FILE__, 1771, __PRETTY_FUNCTION__).warning() << "Unknown user input event type:" << e->type;-
1177 break;
never executed: break;
0
1178 }-
1179}-
1180-
1181void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e)-
1182{-
1183 QEvent::Type type;-
1184 Qt::MouseButtons stateChange = e->buttons ^ buttons;-
1185 if (e->globalPos != QGuiApplicationPrivate::lastCursorPosition
e->globalPos !...CursorPositionDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(stateChange != Qt::NoButton)Description
TRUEnever evaluated
FALSEnever evaluated
stateChange != Qt::NoButton)
(stateChange != Qt::NoButton)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1186-
1187-
1188-
1189 QWindowSystemInterfacePrivate::MouseEvent mouseButtonEvent(-
1190 e->window.data(), e->timestamp, e->type, e->localPos, e->globalPos, e->buttons, e->modifiers, e->source);-
1191 if (e->flags & QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic
e->flags & QWi...ent::SyntheticDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1192 mouseButtonEvent.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
never executed: mouseButtonEvent.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
0
1193 e->buttons = buttons;-
1194 processMouseEvent(e);-
1195 processMouseEvent(&mouseButtonEvent);-
1196 return;
never executed: return;
0
1197 }-
1198-
1199 QWindow *window = e->window.data();-
1200 modifier_buttons = e->modifiers;-
1201-
1202 QPointF localPoint = e->localPos;-
1203 QPointF globalPoint = e->globalPos;-
1204-
1205 if (e->nullWindow()
e->nullWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1206 window = QGuiApplication::topLevelAt(globalPoint.toPoint());-
1207 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1208-
1209-
1210 if (e->buttons != Qt::NoButton
e->buttons != Qt::NoButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1211 if (!currentMousePressWindow
!currentMousePressWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1212 currentMousePressWindow = window;
never executed: currentMousePressWindow = window;
0
1213 else-
1214 window = currentMousePressWindow;
never executed: window = currentMousePressWindow;
0
1215 } else if (currentMousePressWindow
currentMousePressWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1216 window = currentMousePressWindow;-
1217 currentMousePressWindow = 0;-
1218 }
never executed: end of block
0
1219 QPointF delta = globalPoint - globalPoint.toPoint();-
1220 localPoint = window->mapFromGlobal(globalPoint.toPoint()) + delta;-
1221 }
never executed: end of block
0
1222 }
never executed: end of block
0
1223-
1224 Qt::MouseButton button = Qt::NoButton;-
1225 bool doubleClick = false;-
1226 const bool frameStrut = e->type == QWindowSystemInterfacePrivate::FrameStrutMouse;-
1227-
1228 if (QGuiApplicationPrivate::lastCursorPosition != globalPoint
QGuiApplicatio...!= globalPointDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1229 type = frameStrut
frameStrutDescription
TRUEnever evaluated
FALSEnever evaluated
? QEvent::NonClientAreaMouseMove : QEvent::MouseMove;
0
1230 QGuiApplicationPrivate::lastCursorPosition = globalPoint;-
1231 if (qAbs(globalPoint.x() - mousePressX) > mouse_double_click_distance
qAbs(globalPoi...click_distanceDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
1232 qAbs(globalPoint.y() - mousePressY) > mouse_double_click_distance
qAbs(globalPoi...click_distanceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1233 mousePressButton = Qt::NoButton;
never executed: mousePressButton = Qt::NoButton;
0
1234 }
never executed: end of block
else {
0
1235 for (int check = Qt::LeftButton;-
1236 check <= int(Qt::MaxMouseButton)
check <= int(Q...axMouseButton)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
1237 check = check << 1) {-
1238 if (check & stateChange
check & stateChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1239 button = Qt::MouseButton(check);-
1240 break;
never executed: break;
0
1241 }-
1242 }
never executed: end of block
0
1243 if (button == Qt::NoButton
button == Qt::NoButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1244-
1245 return;
never executed: return;
0
1246 }-
1247 mouse_buttons = buttons = e->buttons;-
1248 if (button & e->buttons
button & e->buttonsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1249 ulong doubleClickInterval = static_cast<ulong>(QGuiApplication::styleHints()->mouseDoubleClickInterval());-
1250 doubleClick = e->timestamp - mousePressTime < doubleClickInterval
e->timestamp -...eClickIntervalDescription
TRUEnever evaluated
FALSEnever evaluated
&& button == mousePressButton
button == mousePressButtonDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
1251 type = frameStrut
frameStrutDescription
TRUEnever evaluated
FALSEnever evaluated
? QEvent::NonClientAreaMouseButtonPress : QEvent::MouseButtonPress;
0
1252 mousePressTime = e->timestamp;-
1253 mousePressButton = button;-
1254 const QPoint point = QGuiApplicationPrivate::lastCursorPosition.toPoint();-
1255 mousePressX = point.x();-
1256 mousePressY = point.y();-
1257 }
never executed: end of block
else {
0
1258 type = frameStrut
frameStrutDescription
TRUEnever evaluated
FALSEnever evaluated
? QEvent::NonClientAreaMouseButtonRelease : QEvent::MouseButtonRelease;
0
1259 }
never executed: end of block
0
1260 }-
1261-
1262 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1263 return;
never executed: return;
0
1264-
1265-
1266 if (!e->synthetic()
!e->synthetic()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1267 if (const
const QScreen ...ndow->screen()Description
TRUEnever evaluated
FALSEnever evaluated
QScreen *screen = window->screen()
const QScreen ...ndow->screen()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1268 if (QPlatformCursor *cursor = screen->handle()->cursor()
QPlatformCurso...le()->cursor()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1269 const QPointF nativeLocalPoint = QHighDpi::toNativePixels(localPoint, screen);-
1270 const QPointF nativeGlobalPoint = QHighDpi::toNativePixels(globalPoint, screen);-
1271 QMouseEvent ev(type, nativeLocalPoint, nativeLocalPoint, nativeGlobalPoint,-
1272 button, buttons, e->modifiers, e->source);-
1273 ev.setTimestamp(e->timestamp);-
1274 cursor->pointerEvent(ev);-
1275 }
never executed: end of block
0
1276 }
never executed: end of block
0
1277-
1278-
1279 QMouseEvent ev(type, localPoint, localPoint, globalPoint, button, buttons, e->modifiers, e->source);-
1280 ev.setTimestamp(e->timestamp);-
1281-
1282 if (window->d_func()->blockedByModalWindow
window->d_func...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
&& !(static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->popupActive()
!(static_cast<...>popupActive()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1283-
1284 return;
never executed: return;
0
1285 }-
1286-
1287 if (doubleClick
doubleClickDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(ev.type() == ...seButtonPress)Description
TRUEnever evaluated
FALSEnever evaluated
ev.type() == QEvent::MouseButtonPress)
(ev.type() == ...seButtonPress)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1288-
1289 setMouseEventFlags(&ev, ev.flags() | Qt::MouseEventCreatedDoubleClick);-
1290 }
never executed: end of block
0
1291-
1292 QGuiApplication::sendSpontaneousEvent(window, &ev);-
1293 e->eventAccepted = ev.isAccepted();-
1294 if (!e->synthetic()
!e->synthetic()Description
TRUEnever evaluated
FALSEnever evaluated
&& !ev.isAccepted()
!ev.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
0
1295 && !frameStrut
!frameStrutDescription
TRUEnever evaluated
FALSEnever evaluated
0
1296 && (static_cast<
(static_cast<Q...edMouseEvents)Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->testAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents)
(static_cast<Q...edMouseEvents)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1297 if (!m_fakeTouchDevice
!m_fakeTouchDeviceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1298 m_fakeTouchDevice = new QTouchDevice;-
1299 QWindowSystemInterface::registerTouchDevice(m_fakeTouchDevice);-
1300 }
never executed: end of block
0
1301 QList<QWindowSystemInterface::TouchPoint> points;-
1302 QWindowSystemInterface::TouchPoint point;-
1303 point.id = 1;-
1304 point.area = QRectF(globalPoint.x() - 2, globalPoint.y() - 2, 4, 4);-
1305-
1306-
1307-
1308-
1309 if (type == QEvent::MouseButtonPress
type == QEvent...useButtonPressDescription
TRUEnever evaluated
FALSEnever evaluated
&& button == Qt::LeftButton
button == Qt::LeftButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1310 point.state = Qt::TouchPointPressed;-
1311 }
never executed: end of block
else if (type == QEvent::MouseButtonRelease
type == QEvent...eButtonReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
&& button == Qt::LeftButton
button == Qt::LeftButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1312 point.state = Qt::TouchPointReleased;-
1313 }
never executed: end of block
else if (type == QEvent::MouseMove
type == QEvent::MouseMoveDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(buttons & Qt::LeftButton)Description
TRUEnever evaluated
FALSEnever evaluated
buttons & Qt::LeftButton)
(buttons & Qt::LeftButton)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1314 point.state = Qt::TouchPointMoved;-
1315 }
never executed: end of block
else {
0
1316 return;
never executed: return;
0
1317 }-
1318-
1319 points << point;-
1320-
1321 QEvent::Type type;-
1322 QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::fromNativeTouchPoints(points, window, &type);-
1323-
1324 QWindowSystemInterfacePrivate::TouchEvent fake(window, e->timestamp, type, m_fakeTouchDevice, touchPoints, e->modifiers);-
1325 fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;-
1326 processTouchEvent(&fake);-
1327 }
never executed: end of block
0
1328 if (doubleClick
doubleClickDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1329 mousePressButton = Qt::NoButton;-
1330 if (!e->window.isNull()
!e->window.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
|| e->nullWindow()
e->nullWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1331 const QEvent::Type doubleClickType = frameStrut
frameStrutDescription
TRUEnever evaluated
FALSEnever evaluated
? QEvent::NonClientAreaMouseButtonDblClick : QEvent::MouseButtonDblClick;
0
1332 QMouseEvent dblClickEvent(doubleClickType, localPoint, localPoint, globalPoint,-
1333 button, buttons, e->modifiers, e->source);-
1334 dblClickEvent.setTimestamp(e->timestamp);-
1335 QGuiApplication::sendSpontaneousEvent(window, &dblClickEvent);-
1336 }
never executed: end of block
0
1337 }
never executed: end of block
0
1338}
never executed: end of block
0
1339-
1340void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e)-
1341{-
1342-
1343 QWindow *window = e->window.data();-
1344 QPointF globalPoint = e->globalPos;-
1345 QPointF localPoint = e->localPos;-
1346-
1347 if (e->nullWindow()
e->nullWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1348 window = QGuiApplication::topLevelAt(globalPoint.toPoint());-
1349 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1350 QPointF delta = globalPoint - globalPoint.toPoint();-
1351 localPoint = window->mapFromGlobal(globalPoint.toPoint()) + delta;-
1352 }
never executed: end of block
0
1353 }
never executed: end of block
0
1354-
1355 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1356 return;
never executed: return;
0
1357-
1358 QGuiApplicationPrivate::lastCursorPosition = globalPoint;-
1359 modifier_buttons = e->modifiers;-
1360-
1361 if (window->d_func()->blockedByModalWindow
window->d_func...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1362-
1363 return;
never executed: return;
0
1364 }-
1365-
1366 QWheelEvent ev(localPoint, globalPoint, e->pixelDelta, e->angleDelta, e->qt4Delta, e->qt4Orientation, buttons, e->modifiers, e->phase, e->source);-
1367 ev.setTimestamp(e->timestamp);-
1368 QGuiApplication::sendSpontaneousEvent(window, &ev);-
1369-
1370}
never executed: end of block
0
1371-
1372-
1373-
1374void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e)-
1375{-
1376 QWindow *window = e->window.data();-
1377 modifier_buttons = e->modifiers;-
1378 if (e->nullWindow()
e->nullWindow()Description
TRUEnever evaluated
FALSEnever evaluated
0
1379-
1380-
1381-
1382 ) {-
1383 window = QGuiApplication::focusWindow();-
1384 }
never executed: end of block
0
1385-
1386-
1387-
1388-
1389 if (e->keyType == QEvent::KeyPress
e->keyType == QEvent::KeyPressDescription
TRUEnever evaluated
FALSEnever evaluated
&& window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1390 if (QWindowSystemInterface::handleShortcutEvent(window, e->timestamp, e->key, e->modifiers,
QWindowSystemI...->repeatCount)Description
TRUEnever evaluated
FALSEnever evaluated
0
1391 e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, e->unicode, e->repeat, e->repeatCount)
QWindowSystemI...->repeatCount)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1392 return;
never executed: return;
0
1393 }
never executed: end of block
0
1394-
1395-
1396 QKeyEvent ev(e->keyType, e->key, e->modifiers,-
1397 e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers,-
1398 e->unicode, e->repeat, e->repeatCount);-
1399 ev.setTimestamp(e->timestamp);-
1400-
1401-
1402-
1403 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
&& !window->d_func()->blockedByModalWindow
!window->d_fun...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1404 QGuiApplication::sendSpontaneousEvent(window, &ev);
never executed: QGuiApplication::sendSpontaneousEvent(window, &ev);
0
1405 e->eventAccepted = ev.isAccepted();-
1406}
never executed: end of block
0
1407-
1408void QGuiApplicationPrivate::processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e)-
1409{-
1410 if (!e->enter
!e->enterDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1411 return;
never executed: return;
0
1412 if (e->enter.data()->d_func()->blockedByModalWindow
e->enter.data(...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1413-
1414 return;
never executed: return;
0
1415 }-
1416-
1417 currentMouseWindow = e->enter;-
1418-
1419 QEnterEvent event(e->localPos, e->localPos, e->globalPos);-
1420 QCoreApplication::sendSpontaneousEvent(e->enter.data(), &event);-
1421}
never executed: end of block
0
1422-
1423void QGuiApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e)-
1424{-
1425 if (!e->leave
!e->leaveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1426 return;
never executed: return;
0
1427 if (e->leave.data()->d_func()->blockedByModalWindow
e->leave.data(...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1428-
1429 return;
never executed: return;
0
1430 }-
1431-
1432 currentMouseWindow = 0;-
1433-
1434 QEvent event(QEvent::Leave);-
1435 QCoreApplication::sendSpontaneousEvent(e->leave.data(), &event);-
1436}
never executed: end of block
0
1437-
1438void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e)-
1439{-
1440 QWindow *previous = QGuiApplicationPrivate::focus_window;-
1441 QWindow *newFocus = e->activated.data();-
1442-
1443 if (previous == newFocus
previous == newFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1444 return;
never executed: return;
0
1445-
1446 if (newFocus
newFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1447 if (QPlatformWindow *platformWindow = newFocus->handle()
QPlatformWindo...ocus->handle()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1448 if (platformWindow->isAlertState()
platformWindow->isAlertState()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1449 platformWindow->setAlertState(false);
never executed: platformWindow->setAlertState(false);
0
1450-
1451 QObject *previousFocusObject = previous
previousDescription
TRUEnever evaluated
FALSEnever evaluated
? previous->focusObject() : 0;
0
1452-
1453 if (previous
previousDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1454 QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange);-
1455 QCoreApplication::sendSpontaneousEvent(previous, &focusAboutToChange);-
1456 }
never executed: end of block
0
1457-
1458 QGuiApplicationPrivate::focus_window = newFocus;-
1459 if (!(static_cast<QGuiApplication *>(QCoreApplication::instance()))
!(static_cast<...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1460 return;
never executed: return;
0
1461-
1462 if (previous
previousDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1463 Qt::FocusReason r = e->reason;-
1464 if ((r == Qt::OtherFocusReason
r == Qt::OtherFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
|| r == Qt::ActiveWindowFocusReason
r == Qt::Activ...dowFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
) &&
0
1465 newFocus
newFocusDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(newFocus->fla...) == Qt::PopupDescription
TRUEnever evaluated
FALSEnever evaluated
newFocus->flags() & Qt::Popup) == Qt::Popup
(newFocus->fla...) == Qt::PopupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1466 r = Qt::PopupFocusReason;
never executed: r = Qt::PopupFocusReason;
0
1467 QFocusEvent focusOut(QEvent::FocusOut, r);-
1468 QCoreApplication::sendSpontaneousEvent(previous, &focusOut);-
1469 QObject::disconnect(previous, qFlagLocation("2""focusObjectChanged(QObject*)" "\0" __FILE__ ":" "2082"),-
1470 (static_cast<QGuiApplication *>(QCoreApplication::instance())), qFlagLocation("1""_q_updateFocusObject(QObject*)" "\0" __FILE__ ":" "2083"));-
1471 }
never executed: end of block
else if (!platformIntegration()->hasCapability(QPlatformIntegration::ApplicationState)
!platformInteg...licationState)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1472 setApplicationState(Qt::ApplicationActive);-
1473 }
never executed: end of block
0
1474-
1475 if (QGuiApplicationPrivate::focus_window
QGuiApplicatio...::focus_windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1476 Qt::FocusReason r = e->reason;-
1477 if ((r == Qt::OtherFocusReason
r == Qt::OtherFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
|| r == Qt::ActiveWindowFocusReason
r == Qt::Activ...dowFocusReasonDescription
TRUEnever evaluated
FALSEnever evaluated
) &&
0
1478 previous
previousDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(previous->fla...) == Qt::PopupDescription
TRUEnever evaluated
FALSEnever evaluated
previous->flags() & Qt::Popup) == Qt::Popup
(previous->fla...) == Qt::PopupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1479 r = Qt::PopupFocusReason;
never executed: r = Qt::PopupFocusReason;
0
1480 QFocusEvent focusIn(QEvent::FocusIn, r);-
1481 QCoreApplication::sendSpontaneousEvent(QGuiApplicationPrivate::focus_window, &focusIn);-
1482 QObject::connect(QGuiApplicationPrivate::focus_window, qFlagLocation("2""focusObjectChanged(QObject*)" "\0" __FILE__ ":" "2095"),-
1483 (static_cast<QGuiApplication *>(QCoreApplication::instance())), qFlagLocation("1""_q_updateFocusObject(QObject*)" "\0" __FILE__ ":" "2096"));-
1484 }
never executed: end of block
else if (!platformIntegration()->hasCapability(QPlatformIntegration::ApplicationState)
!platformInteg...licationState)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1485 setApplicationState(Qt::ApplicationInactive);-
1486 }
never executed: end of block
0
1487-
1488 if (self
selfDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1489 self->notifyActiveWindowChange(previous);-
1490-
1491 if (previousFocusObject != (static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusObject()
previousFocusO...>focusObject()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1492 self->_q_updateFocusObject((static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusObject());
never executed: self->_q_updateFocusObject((static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusObject());
0
1493 }
never executed: end of block
0
1494-
1495 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusWindowChanged(newFocus);-
1496 if (previous
previousDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1497 previous->activeChanged();
never executed: previous->activeChanged();
0
1498 if (newFocus
newFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1499 newFocus->activeChanged();
never executed: newFocus->activeChanged();
0
1500}
never executed: end of block
0
1501-
1502void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfacePrivate::WindowStateChangedEvent *wse)-
1503{-
1504 if (QWindow *window = wse->window.data()
QWindow *windo...>window.data()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1505 QWindowStateChangeEvent e(window->windowState());-
1506 window->d_func()->windowState = wse->newState;-
1507 QGuiApplication::sendSpontaneousEvent(window, &e);-
1508 }
never executed: end of block
0
1509}
never executed: end of block
0
1510-
1511void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *wse)-
1512{-
1513 if (QWindow *window = wse->window.data()
QWindow *windo...>window.data()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1514 if (window->isTopLevel()
window->isTopLevel()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1515 if (QScreen *screen = wse->screen.data()
QScreen *scree...>screen.data()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1516 window->d_func()->setTopLevelScreen(screen, false );
never executed: window->d_func()->setTopLevelScreen(screen, false );
0
1517 else-
1518 window->setScreen(0);
never executed: window->setScreen(0);
0
1519 }-
1520-
1521 if (window->handle()
window->handle()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1522 QWindowSystemInterfacePrivate::GeometryChangeEvent gce(window, QHighDpi::fromNativePixels(window->handle()->geometry(), window), QRect());-
1523 processGeometryChangeEvent(&gce);-
1524 }
never executed: end of block
0
1525 }
never executed: end of block
0
1526}
never executed: end of block
0
1527-
1528void QGuiApplicationPrivate::processThemeChanged(QWindowSystemInterfacePrivate::ThemeChangeEvent *tce)-
1529{-
1530 if (self
selfDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1531 self->notifyThemeChanged();
never executed: self->notifyThemeChanged();
0
1532 if (QWindow *window = tce->window.data()
QWindow *windo...>window.data()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1533 QEvent e(QEvent::ThemeChange);-
1534 QGuiApplication::sendSpontaneousEvent(window, &e);-
1535 }
never executed: end of block
0
1536}
never executed: end of block
0
1537-
1538void QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e)-
1539{-
1540 if (e->tlw.isNull()
e->tlw.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1541 return;
never executed: return;
0
1542-
1543 QWindow *window = e->tlw.data();-
1544 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1545 return;
never executed: return;
0
1546-
1547 QRect newRect = e->newGeometry;-
1548 QRect oldRect = e->oldGeometry.isNull()
e->oldGeometry.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
? window->d_func()->geometry : e->oldGeometry;
0
1549-
1550 bool isResize = oldRect.size() != newRect.size();-
1551 bool isMove = oldRect.topLeft() != newRect.topLeft();-
1552-
1553 window->d_func()->geometry = newRect;-
1554-
1555 if (isResize
isResizeDescription
TRUEnever evaluated
FALSEnever evaluated
|| window->d_func()->resizeEventPending
window->d_func...zeEventPendingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1556 QResizeEvent e(newRect.size(), oldRect.size());-
1557 QGuiApplication::sendSpontaneousEvent(window, &e);-
1558-
1559 window->d_func()->resizeEventPending = false;-
1560-
1561 if (oldRect.width() != newRect.width()
oldRect.width(...ewRect.width()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1562 window->widthChanged(newRect.width());
never executed: window->widthChanged(newRect.width());
0
1563 if (oldRect.height() != newRect.height()
oldRect.height...wRect.height()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1564 window->heightChanged(newRect.height());
never executed: window->heightChanged(newRect.height());
0
1565 }
never executed: end of block
0
1566-
1567 if (isMove
isMoveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1568-
1569 QMoveEvent e(newRect.topLeft(), oldRect.topLeft());-
1570 QGuiApplication::sendSpontaneousEvent(window, &e);-
1571-
1572 if (oldRect.x() != newRect.x()
oldRect.x() != newRect.x()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1573 window->xChanged(newRect.x());
never executed: window->xChanged(newRect.x());
0
1574 if (oldRect.y() != newRect.y()
oldRect.y() != newRect.y()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1575 window->yChanged(newRect.y());
never executed: window->yChanged(newRect.y());
0
1576 }
never executed: end of block
0
1577}
never executed: end of block
0
1578-
1579void QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent *e)-
1580{-
1581 if (e->window.isNull()
e->window.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1582 return;
never executed: return;
0
1583 if (e->window.data()->d_func()->blockedByModalWindow
e->window.data...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1584-
1585 return;
never executed: return;
0
1586 }-
1587-
1588 QCloseEvent event;-
1589 QGuiApplication::sendSpontaneousEvent(e->window.data(), &event);-
1590 if (e->accepted
e->acceptedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1591 *(e->accepted) = event.isAccepted();-
1592 }
never executed: end of block
0
1593}
never executed: end of block
0
1594-
1595void QGuiApplicationPrivate::processFileOpenEvent(QWindowSystemInterfacePrivate::FileOpenEvent *e)-
1596{-
1597 if (e->url.isEmpty()
e->url.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1598 return;
never executed: return;
0
1599-
1600 QFileOpenEvent event(e->url);-
1601 QGuiApplication::sendSpontaneousEvent((static_cast<QGuiApplication *>(QCoreApplication::instance())), &event);-
1602}
never executed: end of block
0
1603-
1604void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::TabletEvent *e)-
1605{-
1606-
1607 QEvent::Type type = QEvent::TabletMove;-
1608 if (e->buttons != tabletState
e->buttons != tabletStateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1609 type = (
(e->buttons > tabletState)Description
TRUEnever evaluated
FALSEnever evaluated
e->buttons > tabletState)
(e->buttons > tabletState)Description
TRUEnever evaluated
FALSEnever evaluated
? QEvent::TabletPress : QEvent::TabletRelease;
never executed: type = (e->buttons > tabletState) ? QEvent::TabletPress : QEvent::TabletRelease;
0
1610-
1611 QWindow *window = e->window.data();-
1612 modifier_buttons = e->modifiers;-
1613-
1614 bool localValid = true;-
1615-
1616-
1617-
1618 if (type == QEvent::TabletPress
type == QEvent::TabletPressDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1619 if (e->nullWindow()
e->nullWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1620 window = QGuiApplication::topLevelAt(e->global.toPoint());-
1621 localValid = false;-
1622 }
never executed: end of block
0
1623 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1624 return;
never executed: return;
0
1625 tabletPressTarget = window;-
1626 }
never executed: end of block
else {
0
1627 if (e->nullWindow()
e->nullWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1628 window = tabletPressTarget;-
1629 localValid = false;-
1630 }
never executed: end of block
0
1631 if (type == QEvent::TabletRelease
type == QEvent::TabletReleaseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1632 tabletPressTarget = 0;
never executed: tabletPressTarget = 0;
0
1633 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1634 return;
never executed: return;
0
1635 }
never executed: end of block
0
1636 QPointF local = e->local;-
1637 if (!localValid
!localValidDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1638 QPointF delta = e->global - e->global.toPoint();-
1639 local = window->mapFromGlobal(e->global.toPoint()) + delta;-
1640 }
never executed: end of block
0
1641 Qt::MouseButtons stateChange = e->buttons ^ tabletState;-
1642 Qt::MouseButton button = Qt::NoButton;-
1643 for (int check = Qt::LeftButton; check <= int(Qt::MaxMouseButton)
check <= int(Q...axMouseButton)Description
TRUEnever evaluated
FALSEnever evaluated
; check = check << 1) {
0
1644 if (check & stateChange
check & stateChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1645 button = Qt::MouseButton(check);-
1646 break;
never executed: break;
0
1647 }-
1648 }
never executed: end of block
0
1649 QTabletEvent ev(type, local, e->global,-
1650 e->device, e->pointerType, e->pressure, e->xTilt, e->yTilt,-
1651 e->tangentialPressure, e->rotation, e->z,-
1652 e->modifiers, e->uid, button, e->buttons);-
1653 ev.setTimestamp(e->timestamp);-
1654 QGuiApplication::sendSpontaneousEvent(window, &ev);-
1655 tabletState = e->buttons;-
1656-
1657-
1658-
1659}
never executed: end of block
0
1660-
1661void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e)-
1662{-
1663-
1664 QTabletEvent ev(QEvent::TabletEnterProximity, QPointF(), QPointF(),-
1665 e->device, e->pointerType, 0, 0, 0,-
1666 0, 0, 0,-
1667 Qt::NoModifier, e->uid, Qt::NoButton, tabletState);-
1668 ev.setTimestamp(e->timestamp);-
1669 QGuiApplication::sendSpontaneousEvent((static_cast<QGuiApplication *>(QCoreApplication::instance())), &ev);-
1670-
1671-
1672-
1673}
never executed: end of block
0
1674-
1675void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e)-
1676{-
1677-
1678 QTabletEvent ev(QEvent::TabletLeaveProximity, QPointF(), QPointF(),-
1679 e->device, e->pointerType, 0, 0, 0,-
1680 0, 0, 0,-
1681 Qt::NoModifier, e->uid, Qt::NoButton, tabletState);-
1682 ev.setTimestamp(e->timestamp);-
1683 QGuiApplication::sendSpontaneousEvent((static_cast<QGuiApplication *>(QCoreApplication::instance())), &ev);-
1684-
1685-
1686-
1687}
never executed: end of block
0
1688-
1689-
1690void QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent *e)-
1691{-
1692 if (e->window.isNull()
e->window.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1693 return;
never executed: return;
0
1694-
1695 QNativeGestureEvent ev(e->type, e->pos, e->pos, e->globalPos, e->realValue, e->sequenceId, e->intValue);-
1696 ev.setTimestamp(e->timestamp);-
1697 QGuiApplication::sendSpontaneousEvent(e->window, &ev);-
1698}
never executed: end of block
0
1699-
1700-
1701void QGuiApplicationPrivate::processPlatformPanelEvent(QWindowSystemInterfacePrivate::PlatformPanelEvent *e)-
1702{-
1703 if (!e->window
!e->windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1704 return;
never executed: return;
0
1705-
1706 if (e->window->d_func()->blockedByModalWindow
e->window->d_f...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1707-
1708 return;
never executed: return;
0
1709 }-
1710-
1711 QEvent ev(QEvent::PlatformPanel);-
1712 QGuiApplication::sendSpontaneousEvent(e->window.data(), &ev);-
1713}
never executed: end of block
0
1714-
1715-
1716void QGuiApplicationPrivate::processContextMenuEvent(QWindowSystemInterfacePrivate::ContextMenuEvent *e)-
1717{-
1718-
1719-
1720 if (!e->window
!e->windowDescription
TRUEnever evaluated
FALSEnever evaluated
|| e->mouseTriggered
e->mouseTriggeredDescription
TRUEnever evaluated
FALSEnever evaluated
|| e->window->d_func()->blockedByModalWindow
e->window->d_f...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1721 return;
never executed: return;
0
1722-
1723 QContextMenuEvent ev(QContextMenuEvent::Keyboard, e->pos, e->globalPos, e->modifiers);-
1724 QGuiApplication::sendSpontaneousEvent(e->window.data(), &ev);-
1725}
never executed: end of block
0
1726-
1727-
1728__attribute__((visibility("default"))) uint qHash(const QGuiApplicationPrivate::ActiveTouchPointsKey &k)-
1729{-
1730 return
never executed: return qHash(k.device) + k.touchPointId;
qHash(k.device) + k.touchPointId;
never executed: return qHash(k.device) + k.touchPointId;
0
1731}-
1732-
1733__attribute__((visibility("default"))) bool operator==(const QGuiApplicationPrivate::ActiveTouchPointsKey &a,-
1734 const QGuiApplicationPrivate::ActiveTouchPointsKey &b)-
1735{-
1736 return
never executed: return a.device == b.device && a.touchPointId == b.touchPointId;
a.device == b.device
a.device == b.deviceDescription
TRUEnever evaluated
FALSEnever evaluated
never executed: return a.device == b.device && a.touchPointId == b.touchPointId;
0
1737 && a.touchPointId == b.touchPointId
a.touchPointId...b.touchPointIdDescription
TRUEnever evaluated
FALSEnever evaluated
;
never executed: return a.device == b.device && a.touchPointId == b.touchPointId;
0
1738}-
1739-
1740void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e)-
1741{-
1742 QGuiApplicationPrivate *d = self;-
1743 modifier_buttons = e->modifiers;-
1744-
1745 if (e->touchType == QEvent::TouchCancel
e->touchType =...t::TouchCancelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1746-
1747-
1748 QTouchEvent touchEvent(QEvent::TouchCancel, e->device, e->modifiers);-
1749 touchEvent.setTimestamp(e->timestamp);-
1750 QHash<ActiveTouchPointsKey, ActiveTouchPointsValue>::const_iterator it-
1751 = self->activeTouchPoints.constBegin(), ite = self->activeTouchPoints.constEnd();-
1752 QSet<QWindow *> windowsNeedingCancel;-
1753 while (it != ite
it != iteDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1754 QWindow *w = it->window.data();-
1755 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1756 windowsNeedingCancel.insert(w);
never executed: windowsNeedingCancel.insert(w);
0
1757 ++it;-
1758 }
never executed: end of block
0
1759 for (QSet<QWindow *>::const_iterator winIt = windowsNeedingCancel.constBegin(),-
1760 winItEnd = windowsNeedingCancel.constEnd(); winIt != winItEnd
winIt != winItEndDescription
TRUEnever evaluated
FALSEnever evaluated
; ++winIt) {
0
1761 touchEvent.setWindow(*winIt);-
1762 QGuiApplication::sendSpontaneousEvent(*winIt, &touchEvent);-
1763 }
never executed: end of block
0
1764 if (!self->synthesizedMousePoints.isEmpty()
!self->synthes...ints.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& !e->synthetic()
!e->synthetic()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1765 for (QHash<QWindow *, SynthesizedMouseData>::const_iterator synthIt = self->synthesizedMousePoints.constBegin(),-
1766 synthItEnd = self->synthesizedMousePoints.constEnd(); synthIt != synthItEnd
synthIt != synthItEndDescription
TRUEnever evaluated
FALSEnever evaluated
; ++synthIt) {
0
1767 if (!synthIt->window
!synthIt->windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1768 continue;
never executed: continue;
0
1769 QWindowSystemInterfacePrivate::MouseEvent fake(synthIt->window.data(),-
1770 e->timestamp,-
1771 synthIt->pos,-
1772 synthIt->screenPos,-
1773 buttons & ~Qt::LeftButton,-
1774 e->modifiers,-
1775 Qt::MouseEventSynthesizedByQt);-
1776 fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;-
1777 processMouseEvent(&fake);-
1778 }
never executed: end of block
0
1779 self->synthesizedMousePoints.clear();-
1780 }
never executed: end of block
0
1781 self->activeTouchPoints.clear();-
1782 self->lastTouchType = e->touchType;-
1783 return;
never executed: return;
0
1784 }-
1785-
1786-
1787 if (self->lastTouchType == QEvent::TouchCancel
self->lastTouc...t::TouchCancelDescription
TRUEnever evaluated
FALSEnever evaluated
&& e->touchType != QEvent::TouchBegin
e->touchType !...nt::TouchBeginDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1788 return;
never executed: return;
0
1789-
1790 self->lastTouchType = e->touchType;-
1791-
1792 QWindow *window = e->window.data();-
1793 typedef QPair<Qt::TouchPointStates, QList<QTouchEvent::TouchPoint> > StatesAndTouchPoints;-
1794 QHash<QWindow *, StatesAndTouchPoints> windowsNeedingEvents;-
1795-
1796 for (int i = 0; i < e->points.count()
i < e->points.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1797 QTouchEvent::TouchPoint touchPoint = e->points.at(i);-
1798-
1799-
1800-
1801 touchPoint.d = touchPoint.d->detach();-
1802-
1803-
1804 QPointer<QWindow> w;-
1805 QTouchEvent::TouchPoint previousTouchPoint;-
1806 ActiveTouchPointsKey touchInfoKey(e->device, touchPoint.id());-
1807 ActiveTouchPointsValue &touchInfo = d->activeTouchPoints[touchInfoKey];-
1808 switch (touchPoint.state()) {-
1809 case
never executed: case Qt::TouchPointPressed:
Qt::TouchPointPressed:
never executed: case Qt::TouchPointPressed:
0
1810 if (e->device->type() == QTouchDevice::TouchPad
e->device->typ...vice::TouchPadDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1811-
1812 w = d->activeTouchPoints.isEmpty()
d->activeTouchPoints.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
1813 ? QPointer<QWindow>()-
1814 : d->activeTouchPoints.constBegin().value().window;-
1815 }
never executed: end of block
0
1816-
1817 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1818-
1819 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1820 window = QGuiApplication::topLevelAt(touchPoint.screenPos().toPoint());
never executed: window = QGuiApplication::topLevelAt(touchPoint.screenPos().toPoint());
0
1821 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1822 continue;
never executed: continue;
0
1823 w = window;-
1824 }
never executed: end of block
0
1825-
1826 touchInfo.window = w;-
1827 touchPoint.d->startScreenPos = touchPoint.screenPos();-
1828 touchPoint.d->lastScreenPos = touchPoint.screenPos();-
1829 touchPoint.d->startNormalizedPos = touchPoint.normalizedPos();-
1830 touchPoint.d->lastNormalizedPos = touchPoint.normalizedPos();-
1831 if (touchPoint.pressure() < qreal(0.)
touchPoint.pre...() < qreal(0.)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1832 touchPoint.d->pressure = qreal(1.);
never executed: touchPoint.d->pressure = qreal(1.);
0
1833-
1834 touchInfo.touchPoint = touchPoint;-
1835 break;
never executed: break;
0
1836-
1837 case
never executed: case Qt::TouchPointReleased:
Qt::TouchPointReleased:
never executed: case Qt::TouchPointReleased:
0
1838 w = touchInfo.window;-
1839 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1840 continue;
never executed: continue;
0
1841-
1842 previousTouchPoint = touchInfo.touchPoint;-
1843 touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();-
1844 touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();-
1845 touchPoint.d->startPos = previousTouchPoint.startPos();-
1846 touchPoint.d->lastPos = previousTouchPoint.pos();-
1847 touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();-
1848 touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();-
1849 if (touchPoint.pressure() < qreal(0.)
touchPoint.pre...() < qreal(0.)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1850 touchPoint.d->pressure = qreal(0.);
never executed: touchPoint.d->pressure = qreal(0.);
0
1851-
1852 break;
never executed: break;
0
1853-
1854 default
never executed: default:
:
never executed: default:
0
1855 w = touchInfo.window;-
1856 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1857 continue;
never executed: continue;
0
1858-
1859 previousTouchPoint = touchInfo.touchPoint;-
1860 touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();-
1861 touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();-
1862 touchPoint.d->startPos = previousTouchPoint.startPos();-
1863 touchPoint.d->lastPos = previousTouchPoint.pos();-
1864 touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();-
1865 touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();-
1866 if (touchPoint.pressure() < qreal(0.)
touchPoint.pre...() < qreal(0.)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1867 touchPoint.d->pressure = qreal(1.);
never executed: touchPoint.d->pressure = qreal(1.);
0
1868-
1869-
1870-
1871 if (touchPoint.state() != Qt::TouchPointStationary
touchPoint.sta...ointStationaryDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1872 touchInfo.touchPoint = touchPoint;
never executed: touchInfo.touchPoint = touchPoint;
0
1873 break;
never executed: break;
0
1874 }-
1875-
1876 ((!(w.data() != 0)) ? qt_assert("w.data() != 0",__FILE__,2489) : qt_noop());-
1877-
1878-
1879 touchPoint.d->sceneRect = touchPoint.screenRect();-
1880 touchPoint.d->startScenePos = touchPoint.startScreenPos();-
1881 touchPoint.d->lastScenePos = touchPoint.lastScreenPos();-
1882-
1883 StatesAndTouchPoints &maskAndPoints = windowsNeedingEvents[w.data()];-
1884 maskAndPoints.first |= touchPoint.state();-
1885 maskAndPoints.second.append(touchPoint);-
1886 }
never executed: end of block
0
1887-
1888 if (windowsNeedingEvents.isEmpty()
windowsNeedingEvents.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1889 return;
never executed: return;
0
1890-
1891 QHash<QWindow *, StatesAndTouchPoints>::ConstIterator it = windowsNeedingEvents.constBegin();-
1892 const QHash<QWindow *, StatesAndTouchPoints>::ConstIterator end = windowsNeedingEvents.constEnd();-
1893 for (; it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
1894 QWindow *w = it.key();-
1895-
1896 QEvent::Type eventType;-
1897 switch (it.value().first) {-
1898 case
never executed: case Qt::TouchPointPressed:
Qt::TouchPointPressed:
never executed: case Qt::TouchPointPressed:
0
1899 eventType = QEvent::TouchBegin;-
1900 break;
never executed: break;
0
1901 case
never executed: case Qt::TouchPointReleased:
Qt::TouchPointReleased:
never executed: case Qt::TouchPointReleased:
0
1902 eventType = QEvent::TouchEnd;-
1903 break;
never executed: break;
0
1904 case
never executed: case Qt::TouchPointStationary:
Qt::TouchPointStationary:
never executed: case Qt::TouchPointStationary:
0
1905-
1906 continue;
never executed: continue;
0
1907 default
never executed: default:
:
never executed: default:
0
1908 eventType = QEvent::TouchUpdate;-
1909 break;
never executed: break;
0
1910 }-
1911-
1912 if (w->d_func()->blockedByModalWindow
w->d_func()->b...dByModalWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1913-
1914-
1915-
1916 if (eventType == QEvent::TouchEnd
eventType == QEvent::TouchEndDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1917-
1918-
1919 QTouchEvent touchEvent(QEvent::TouchCancel,-
1920 e->device,-
1921 e->modifiers);-
1922 touchEvent.setTimestamp(e->timestamp);-
1923 touchEvent.setWindow(w);-
1924 QGuiApplication::sendSpontaneousEvent(w, &touchEvent);-
1925 }
never executed: end of block
0
1926 continue;
never executed: continue;
0
1927 }-
1928-
1929 QTouchEvent touchEvent(eventType,-
1930 e->device,-
1931 e->modifiers,-
1932 it.value().first,-
1933 it.value().second);-
1934 touchEvent.setTimestamp(e->timestamp);-
1935 touchEvent.setWindow(w);-
1936-
1937 const int pointCount = touchEvent.touchPoints().count();-
1938 for (int i = 0; i < pointCount
i < pointCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1939 QTouchEvent::TouchPoint &touchPoint = touchEvent._touchPoints[i];-
1940-
1941-
1942 QRectF rect = touchPoint.screenRect();-
1943 const QPointF screenPos = rect.center();-
1944 const QPointF delta = screenPos - screenPos.toPoint();-
1945-
1946 rect.moveCenter(w->mapFromGlobal(screenPos.toPoint()) + delta);-
1947 touchPoint.d->rect = rect;-
1948 if (touchPoint.state() == Qt::TouchPointPressed
touchPoint.sta...chPointPressedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1949 touchPoint.d->startPos = w->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;-
1950 touchPoint.d->lastPos = w->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;-
1951 }
never executed: end of block
0
1952 }
never executed: end of block
0
1953-
1954 QGuiApplication::sendSpontaneousEvent(w, &touchEvent);-
1955 if (!e->synthetic()
!e->synthetic()Description
TRUEnever evaluated
FALSEnever evaluated
&& !touchEvent.isAccepted()
!touchEvent.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
&& (static_cast<
(static_cast<Q...edTouchEvents)Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)
(static_cast<Q...edTouchEvents)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1956-
1957 if (!(touchEvent.device()->capabilities() & QTouchDevice::MouseEmulation)
!(touchEvent.d...ouseEmulation)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1958 Qt::MouseButtons b = eventType == QEvent::TouchEnd
eventType == QEvent::TouchEndDescription
TRUEnever evaluated
FALSEnever evaluated
? Qt::NoButton : Qt::LeftButton;
0
1959 if (b == Qt::NoButton
b == Qt::NoButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1960 self->synthesizedMousePoints.clear();
never executed: self->synthesizedMousePoints.clear();
0
1961-
1962 QList<QTouchEvent::TouchPoint> touchPoints = touchEvent.touchPoints();-
1963 if (eventType == QEvent::TouchBegin
eventType == Q...nt::TouchBeginDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1964 m_fakeMouseSourcePointId = touchPoints.first().id();
never executed: m_fakeMouseSourcePointId = touchPoints.first().id();
0
1965-
1966 for (int i = 0; i < touchPoints.count()
i < touchPoints.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1967 const QTouchEvent::TouchPoint &touchPoint = touchPoints.at(i);-
1968 if (touchPoint.id() == m_fakeMouseSourcePointId
touchPoint.id(...eSourcePointIdDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1969 if (b != Qt::NoButton
b != Qt::NoButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1970 self->synthesizedMousePoints.insert(w, SynthesizedMouseData(
never executed: self->synthesizedMousePoints.insert(w, SynthesizedMouseData( touchPoint.pos(), touchPoint.screenPos(), w));
0
1971 touchPoint.pos(), touchPoint.screenPos(), w));
never executed: self->synthesizedMousePoints.insert(w, SynthesizedMouseData( touchPoint.pos(), touchPoint.screenPos(), w));
0
1972 QWindowSystemInterfacePrivate::MouseEvent fake(w, e->timestamp,-
1973 touchPoint.pos(),-
1974 touchPoint.screenPos(),-
1975 b | (buttons & ~Qt::LeftButton),-
1976 e->modifiers,-
1977 Qt::MouseEventSynthesizedByQt);-
1978 fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;-
1979 processMouseEvent(&fake);-
1980 break;
never executed: break;
0
1981 }-
1982 }
never executed: end of block
0
1983 }
never executed: end of block
0
1984 }
never executed: end of block
0
1985 }
never executed: end of block
0
1986-
1987-
1988-
1989-
1990-
1991 for (int i = 0; i < e->points.count()
i < e->points.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1992 QTouchEvent::TouchPoint touchPoint = e->points.at(i);-
1993 if (touchPoint.state() == Qt::TouchPointReleased
touchPoint.sta...hPointReleasedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1994 d->activeTouchPoints.remove(ActiveTouchPointsKey(e->device, touchPoint.id()));
never executed: d->activeTouchPoints.remove(ActiveTouchPointsKey(e->device, touchPoint.id()));
0
1995 }
never executed: end of block
0
1996}
never executed: end of block
0
1997-
1998void QGuiApplicationPrivate::reportScreenOrientationChange(QWindowSystemInterfacePrivate::ScreenOrientationEvent *e)-
1999{-
2000-
2001 if (QCoreApplication::startingUp()
QCoreApplication::startingUp()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2002 return;
never executed: return;
0
2003-
2004 if (!e->screen
!e->screenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2005 return;
never executed: return;
0
2006-
2007 QScreen *s = e->screen.data();-
2008 s->d_func()->orientation = e->orientation;-
2009-
2010 updateFilteredScreenOrientation(s);-
2011}
never executed: end of block
0
2012-
2013void QGuiApplicationPrivate::updateFilteredScreenOrientation(QScreen *s)-
2014{-
2015 Qt::ScreenOrientation o = s->d_func()->orientation;-
2016 if (o == Qt::PrimaryOrientation
o == Qt::PrimaryOrientationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2017 o = s->primaryOrientation();
never executed: o = s->primaryOrientation();
0
2018 o = Qt::ScreenOrientation(o & s->orientationUpdateMask());-
2019 if (o == Qt::PrimaryOrientation
o == Qt::PrimaryOrientationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2020 return;
never executed: return;
0
2021 if (o == s->d_func()->filteredOrientation
o == s->d_func...redOrientationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2022 return;
never executed: return;
0
2023 s->d_func()->filteredOrientation = o;-
2024 reportScreenOrientationChange(s);-
2025}
never executed: end of block
0
2026-
2027void QGuiApplicationPrivate::reportScreenOrientationChange(QScreen *s)-
2028{-
2029 s->orientationChanged(s->orientation());-
2030-
2031 QScreenOrientationChangeEvent event(s, s->orientation());-
2032 QCoreApplication::sendEvent(QCoreApplication::instance(), &event);-
2033}
never executed: end of block
0
2034-
2035void QGuiApplicationPrivate::reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e)-
2036{-
2037-
2038 if (QCoreApplication::startingUp()
QCoreApplication::startingUp()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2039 return;
never executed: return;
0
2040-
2041 if (!e->screen
!e->screenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2042 return;
never executed: return;
0
2043-
2044 QScreen *s = e->screen.data();-
2045-
2046 bool geometryChanged = e->geometry != s->d_func()->geometry;-
2047 s->d_func()->geometry = e->geometry;-
2048-
2049 bool availableGeometryChanged = e->availableGeometry != s->d_func()->availableGeometry;-
2050 s->d_func()->availableGeometry = e->availableGeometry;-
2051-
2052 if (geometryChanged
geometryChangedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2053 Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();-
2054 s->d_func()->updatePrimaryOrientation();-
2055-
2056 s->geometryChanged(s->geometry());-
2057 s->physicalSizeChanged(s->physicalSize());-
2058 s->physicalDotsPerInchChanged(s->physicalDotsPerInch());-
2059 s->logicalDotsPerInchChanged(s->logicalDotsPerInch());-
2060-
2061 if (s->primaryOrientation() != primaryOrientation
s->primaryOrie...aryOrientationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2062 s->primaryOrientationChanged(s->primaryOrientation());
never executed: s->primaryOrientationChanged(s->primaryOrientation());
0
2063-
2064 if (s->d_func()->orientation == Qt::PrimaryOrientation
s->d_func()->o...aryOrientationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2065 updateFilteredScreenOrientation(s);
never executed: updateFilteredScreenOrientation(s);
0
2066 }
never executed: end of block
0
2067-
2068 if (availableGeometryChanged
availableGeometryChangedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2069 s->availableGeometryChanged(s->availableGeometry());
never executed: s->availableGeometryChanged(s->availableGeometry());
0
2070-
2071 if (geometryChanged
geometryChangedDescription
TRUEnever evaluated
FALSEnever evaluated
|| availableGeometryChanged
availableGeometryChangedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2072 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(s->virtualSiblings())>::type> _container_((s->virtualSiblings())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QScreen* sibling = *_container_.i; _container_.control; _container_.control = 0)-
2073 sibling->virtualGeometryChanged(sibling->virtualGeometry());
never executed: sibling->virtualGeometryChanged(sibling->virtualGeometry());
0
2074 }
never executed: end of block
0
2075}
never executed: end of block
0
2076-
2077void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e)-
2078{-
2079-
2080 if (QCoreApplication::startingUp()
QCoreApplication::startingUp()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2081 return;
never executed: return;
0
2082-
2083 if (!e->screen
!e->screenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2084 return;
never executed: return;
0
2085-
2086 QScreen *s = e->screen.data();-
2087 s->d_func()->logicalDpi = QDpi(e->dpiX, e->dpiY);-
2088-
2089 s->logicalDotsPerInchChanged(s->logicalDotsPerInch());-
2090}
never executed: end of block
0
2091-
2092void QGuiApplicationPrivate::reportRefreshRateChange(QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e)-
2093{-
2094-
2095 if (QCoreApplication::startingUp()
QCoreApplication::startingUp()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2096 return;
never executed: return;
0
2097-
2098 if (!e->screen
!e->screenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2099 return;
never executed: return;
0
2100-
2101 QScreen *s = e->screen.data();-
2102 qreal rate = e->rate;-
2103-
2104 if (rate < 1.0
rate < 1.0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2105 rate = 60.0;
never executed: rate = 60.0;
0
2106 if (!qFuzzyCompare(s->d_func()->refreshRate, rate)
!qFuzzyCompare...eshRate, rate)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2107 s->d_func()->refreshRate = rate;-
2108 s->refreshRateChanged(s->refreshRate());-
2109 }
never executed: end of block
0
2110}
never executed: end of block
0
2111-
2112void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent *e)-
2113{-
2114 if (!e->exposed
!e->exposedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2115 return;
never executed: return;
0
2116-
2117 QWindow *window = e->exposed.data();-
2118 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2119 return;
never executed: return;
0
2120 QWindowPrivate *p = qt_window_private(window);-
2121-
2122 if (!p->receivedExpose
!p->receivedExposeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2123 if (p->resizeEventPending
p->resizeEventPendingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2124-
2125-
2126 QResizeEvent e(window->geometry().size(), p->geometry.size());-
2127 QGuiApplication::sendSpontaneousEvent(window, &e);-
2128-
2129 p->resizeEventPending = false;-
2130 }
never executed: end of block
0
2131-
2132 p->receivedExpose = true;-
2133 }
never executed: end of block
0
2134-
2135 p->exposed = e->isExposed
e->isExposedDescription
TRUEnever evaluated
FALSEnever evaluated
&& window->screen()
window->screen()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2136-
2137 QExposeEvent exposeEvent(e->region);-
2138 QCoreApplication::sendSpontaneousEvent(window, &exposeEvent);-
2139}
never executed: end of block
0
2140-
2141-
2142-
2143QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)-
2144{-
2145 static QPointer<QWindow> currentDragWindow;-
2146 static Qt::DropAction lastAcceptedDropAction = Qt::IgnoreAction;-
2147 QPlatformDrag *platformDrag = platformIntegration()->drag();-
2148 if (!platformDrag
!platformDragDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2149 lastAcceptedDropAction = Qt::IgnoreAction;-
2150 return
never executed: return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
never executed: return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
0
2151 }-
2152-
2153 if (!dropData
!dropDataDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2154 if (currentDragWindow.data() == w
currentDragWindow.data() == wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2155 currentDragWindow = 0;
never executed: currentDragWindow = 0;
0
2156 QDragLeaveEvent e;-
2157 QGuiApplication::sendEvent(w, &e);-
2158 lastAcceptedDropAction = Qt::IgnoreAction;-
2159 return
never executed: return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
never executed: return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
0
2160 }-
2161 QDragMoveEvent me(p, supportedActions, dropData,-
2162 QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());-
2163-
2164 if (w != currentDragWindow
w != currentDragWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2165 lastAcceptedDropAction = Qt::IgnoreAction;-
2166 if (currentDragWindow
currentDragWindowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2167 QDragLeaveEvent e;-
2168 QGuiApplication::sendEvent(currentDragWindow, &e);-
2169 }
never executed: end of block
0
2170 currentDragWindow = w;-
2171 QDragEnterEvent e(p, supportedActions, dropData,-
2172 QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());-
2173 QGuiApplication::sendEvent(w, &e);-
2174 if (e.isAccepted()
e.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
&& e.dropAction() != Qt::IgnoreAction
e.dropAction()...::IgnoreActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2175 lastAcceptedDropAction = e.dropAction();
never executed: lastAcceptedDropAction = e.dropAction();
0
2176 }
never executed: end of block
0
2177-
2178-
2179 if (lastAcceptedDropAction != Qt::IgnoreAction
lastAcceptedDr...::IgnoreActionDescription
TRUEnever evaluated
FALSEnever evaluated
0
2180 && (
(supportedActi...tedDropAction)Description
TRUEnever evaluated
FALSEnever evaluated
supportedActions & lastAcceptedDropAction)
(supportedActi...tedDropAction)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2181 me.setDropAction(lastAcceptedDropAction);-
2182 me.accept();-
2183 }
never executed: end of block
0
2184 QGuiApplication::sendEvent(w, &me);-
2185 lastAcceptedDropAction = me.isAccepted()
me.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
?
0
2186 me.dropAction() : Qt::IgnoreAction;-
2187 return
never executed: return QPlatformDragQtResponse(me.isAccepted(), lastAcceptedDropAction, me.answerRect());
QPlatformDragQtResponse(me.isAccepted(), lastAcceptedDropAction, me.answerRect());
never executed: return QPlatformDragQtResponse(me.isAccepted(), lastAcceptedDropAction, me.answerRect());
0
2188}-
2189-
2190QPlatformDropQtResponse QGuiApplicationPrivate::processDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)-
2191{-
2192 QDropEvent de(p, supportedActions, dropData,-
2193 QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());-
2194 QGuiApplication::sendEvent(w, &de);-
2195-
2196 Qt::DropAction acceptedAction = de.isAccepted()
de.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
? de.dropAction() : Qt::IgnoreAction;
0
2197 QPlatformDropQtResponse response(de.isAccepted(),acceptedAction);-
2198 return
never executed: return response;
response;
never executed: return response;
0
2199}-
2200-
2201-
2202-
2203-
2204-
2205-
2206-
2207QClipboard * QGuiApplication::clipboard()-
2208{-
2209 if (QGuiApplicationPrivate::qt_clipboard == 0
QGuiApplicatio...clipboard == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2210 if (!(static_cast<QGuiApplication *>(QCoreApplication::instance()))
!(static_cast<...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2211 QMessageLogger(__FILE__, 2824, __PRETTY_FUNCTION__).warning("QGuiApplication: Must construct a QGuiApplication before accessing a QClipboard");-
2212 return
never executed: return 0;
0;
never executed: return 0;
0
2213 }-
2214 QGuiApplicationPrivate::qt_clipboard = new QClipboard(0);-
2215 }
never executed: end of block
0
2216 return
never executed: return QGuiApplicationPrivate::qt_clipboard;
QGuiApplicationPrivate::qt_clipboard;
never executed: return QGuiApplicationPrivate::qt_clipboard;
0
2217}-
2218QPalette QGuiApplication::palette()-
2219{-
2220 initPalette();-
2221 return
never executed: return *QGuiApplicationPrivate::app_pal;
*QGuiApplicationPrivate::app_pal;
never executed: return *QGuiApplicationPrivate::app_pal;
0
2222}-
2223-
2224-
2225-
2226-
2227-
2228-
2229void QGuiApplication::setPalette(const QPalette &pal)-
2230{-
2231 if (QGuiApplicationPrivate::app_pal
QGuiApplicatio...ivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
&& pal.isCopyOf(*QGuiApplicationPrivate::app_pal)
pal.isCopyOf(*...vate::app_pal)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2232 return;
never executed: return;
0
2233 if (!QGuiApplicationPrivate::app_pal
!QGuiApplicati...ivate::app_palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2234 QGuiApplicationPrivate::app_pal = new QPalette(pal);
never executed: QGuiApplicationPrivate::app_pal = new QPalette(pal);
0
2235 else-
2236 *
never executed: *QGuiApplicationPrivate::app_pal = pal;
QGuiApplicationPrivate::app_pal = pal;
never executed: *QGuiApplicationPrivate::app_pal = pal;
0
2237 applicationResourceFlags |= ApplicationPaletteExplicitlySet;-
2238 QCoreApplication::setAttribute(Qt::AA_SetPalette);-
2239 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->paletteChanged(*QGuiApplicationPrivate::app_pal);-
2240}
never executed: end of block
0
2241-
2242void QGuiApplicationPrivate::applyWindowGeometrySpecificationTo(QWindow *window)-
2243{-
2244 windowGeometrySpecification.applyTo(window);-
2245}
never executed: end of block
0
2246-
2247-
2248-
2249-
2250-
2251-
2252QFont QGuiApplication::font()-
2253{-
2254 ((!(QGuiApplicationPrivate::self)) ? qt_assert_x("QGuiApplication::font()", "no QGuiApplication instance",__FILE__,2884) : qt_noop());-
2255 QMutexLocker locker(&applicationFontMutex);-
2256 initFontUnlocked();-
2257 return
never executed: return *QGuiApplicationPrivate::app_font;
*QGuiApplicationPrivate::app_font;
never executed: return *QGuiApplicationPrivate::app_font;
0
2258}-
2259-
2260-
2261-
2262-
2263-
2264-
2265void QGuiApplication::setFont(const QFont &font)-
2266{-
2267 QMutexLocker locker(&applicationFontMutex);-
2268 if (!QGuiApplicationPrivate::app_font
!QGuiApplicati...vate::app_fontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2269 QGuiApplicationPrivate::app_font = new QFont(font);
never executed: QGuiApplicationPrivate::app_font = new QFont(font);
0
2270 else-
2271 *
never executed: *QGuiApplicationPrivate::app_font = font;
QGuiApplicationPrivate::app_font = font;
never executed: *QGuiApplicationPrivate::app_font = font;
0
2272 applicationResourceFlags |= ApplicationFontExplicitlySet;-
2273}
never executed: end of block
0
2274void QGuiApplicationPrivate::notifyLayoutDirectionChange()-
2275{-
2276 const QWindowList list = QGuiApplication::topLevelWindows();-
2277 for (int i = 0; i < list.size()
i < list.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2278 QEvent ev(QEvent::ApplicationLayoutDirectionChange);-
2279 QCoreApplication::sendEvent(list.at(i), &ev);-
2280 }
never executed: end of block
0
2281}
never executed: end of block
0
2282-
2283void QGuiApplicationPrivate::notifyActiveWindowChange(QWindow *)-
2284{-
2285}-
2286-
2287-
2288-
2289-
2290-
2291-
2292-
2293QIcon QGuiApplication::windowIcon()-
2294{-
2295 return
never executed: return QGuiApplicationPrivate::app_icon ? *QGuiApplicationPrivate::app_icon : QIcon();
QGuiApplicationPrivate::app_icon
QGuiApplicatio...vate::app_iconDescription
TRUEnever evaluated
FALSEnever evaluated
? *QGuiApplicationPrivate::app_icon : QIcon();
never executed: return QGuiApplicationPrivate::app_icon ? *QGuiApplicationPrivate::app_icon : QIcon();
0
2296}-
2297-
2298void QGuiApplication::setWindowIcon(const QIcon &icon)-
2299{-
2300 if (!QGuiApplicationPrivate::app_icon
!QGuiApplicati...vate::app_iconDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2301 QGuiApplicationPrivate::app_icon = new QIcon();
never executed: QGuiApplicationPrivate::app_icon = new QIcon();
0
2302 *QGuiApplicationPrivate::app_icon = icon;-
2303 if (QGuiApplicationPrivate::platform_integration
QGuiApplicatio...rm_integrationDescription
TRUEnever evaluated
FALSEnever evaluated
0
2304 && QGuiApplicationPrivate::platform_integration->hasCapability(QPlatformIntegration::ApplicationIcon)
QGuiApplicatio...plicationIcon)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2305 QGuiApplicationPrivate::platform_integration->setApplicationIcon(icon);
never executed: QGuiApplicationPrivate::platform_integration->setApplicationIcon(icon);
0
2306 if (QGuiApplicationPrivate::is_app_running
QGuiApplicatio...is_app_runningDescription
TRUEnever evaluated
FALSEnever evaluated
&& !QGuiApplicationPrivate::is_app_closing
!QGuiApplicati...is_app_closingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2307 QGuiApplicationPrivate::self->notifyWindowIconChanged();
never executed: QGuiApplicationPrivate::self->notifyWindowIconChanged();
0
2308}
never executed: end of block
0
2309-
2310void QGuiApplicationPrivate::notifyWindowIconChanged()-
2311{-
2312 QEvent ev(QEvent::ApplicationWindowIconChange);-
2313 const QWindowList list = QGuiApplication::topLevelWindows();-
2314 for (int i = 0; i < list.size()
i < list.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
2315 QCoreApplication::sendEvent(list.at(i), &ev);
never executed: QCoreApplication::sendEvent(list.at(i), &ev);
0
2316}
never executed: end of block
0
2317void QGuiApplication::setQuitOnLastWindowClosed(bool quit)-
2318{-
2319 QCoreApplication::setQuitLockEnabled(quit);-
2320}
never executed: end of block
0
2321-
2322-
2323-
2324bool QGuiApplication::quitOnLastWindowClosed()-
2325{-
2326 return
never executed: return QCoreApplication::isQuitLockEnabled();
QCoreApplication::isQuitLockEnabled();
never executed: return QCoreApplication::isQuitLockEnabled();
0
2327}-
2328void QGuiApplicationPrivate::emitLastWindowClosed()-
2329{-
2330 if ((static_cast<
(static_cast<Q...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))
(static_cast<Q...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
&& (static_cast<
(static_cast<Q...unc()->in_execDescription
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->d_func()->in_exec
(static_cast<Q...unc()->in_execDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2331 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->lastWindowClosed();-
2332 }
never executed: end of block
0
2333}
never executed: end of block
0
2334-
2335bool QGuiApplicationPrivate::shouldQuit()-
2336{-
2337 const QWindowList processedWindows;-
2338 return
never executed: return shouldQuitInternal(processedWindows);
shouldQuitInternal(processedWindows);
never executed: return shouldQuitInternal(processedWindows);
0
2339}-
2340-
2341bool QGuiApplicationPrivate::shouldQuitInternal(const QWindowList &processedWindows)-
2342{-
2343-
2344 QWindowList list = QGuiApplication::topLevelWindows();-
2345 for (int i = 0; i < list.size()
i < list.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2346 QWindow *w = list.at(i);-
2347 if (processedWindows.contains(w)
processedWindows.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2348 continue;
never executed: continue;
0
2349 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& !w->transientParent()
!w->transientParent()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2350 return
never executed: return false;
false;
never executed: return false;
0
2351 }
never executed: end of block
0
2352 return
never executed: return true;
true;
never executed: return true;
0
2353}-
2354-
2355bool QGuiApplicationPrivate::tryCloseAllWindows()-
2356{-
2357 return
never executed: return tryCloseRemainingWindows(QWindowList());
tryCloseRemainingWindows(QWindowList());
never executed: return tryCloseRemainingWindows(QWindowList());
0
2358}-
2359-
2360bool QGuiApplicationPrivate::tryCloseRemainingWindows(QWindowList processedWindows)-
2361{-
2362 QWindowList list = QGuiApplication::topLevelWindows();-
2363 for (int i = 0; i < list.size()
i < list.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2364 QWindow *w = list.at(i);-
2365 if (w->isVisible()
w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
&& !processedWindows.contains(w)
!processedWindows.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2366 if (!w->close()
!w->close()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2367 return
never executed: return false;
false;
never executed: return false;
0
2368 processedWindows.append(w);-
2369 list = QGuiApplication::topLevelWindows();-
2370 i = -1;-
2371 }
never executed: end of block
0
2372 }
never executed: end of block
0
2373 return
never executed: return true;
true;
never executed: return true;
0
2374}-
2375Qt::ApplicationState QGuiApplication::applicationState()-
2376{-
2377 return
never executed: return QGuiApplicationPrivate::applicationState;
QGuiApplicationPrivate::applicationState;
never executed: return QGuiApplicationPrivate::applicationState;
0
2378}-
2379void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state, bool forcePropagate)-
2380{-
2381 if ((
(applicationState == state)Description
TRUEnever evaluated
FALSEnever evaluated
applicationState == state)
(applicationState == state)Description
TRUEnever evaluated
FALSEnever evaluated
&& !forcePropagate
!forcePropagateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2382 return;
never executed: return;
0
2383-
2384 applicationState = state;-
2385-
2386 switch (state) {-
2387 case
never executed: case Qt::ApplicationActive:
Qt::ApplicationActive:
never executed: case Qt::ApplicationActive:
{
0
2388 QEvent appActivate(QEvent::ApplicationActivate);-
2389 QCoreApplication::sendSpontaneousEvent((static_cast<QGuiApplication *>(QCoreApplication::instance())), &appActivate);-
2390 break;
never executed: break;
}
0
2391 case
never executed: case Qt::ApplicationInactive:
Qt::ApplicationInactive:
never executed: case Qt::ApplicationInactive:
{
0
2392 QEvent appDeactivate(QEvent::ApplicationDeactivate);-
2393 QCoreApplication::sendSpontaneousEvent((static_cast<QGuiApplication *>(QCoreApplication::instance())), &appDeactivate);-
2394 break;
never executed: break;
}
0
2395 default
never executed: default:
:
never executed: default:
0
2396 break;
never executed: break;
0
2397 }-
2398-
2399 QApplicationStateChangeEvent event(applicationState);-
2400 QCoreApplication::sendSpontaneousEvent((static_cast<QGuiApplication *>(QCoreApplication::instance())), &event);-
2401-
2402 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->applicationStateChanged(applicationState);-
2403}
never executed: end of block
0
2404bool QGuiApplication::isFallbackSessionManagementEnabled()-
2405{-
2406 return
never executed: return QGuiApplicationPrivate::is_fallback_session_management_enabled;
QGuiApplicationPrivate::is_fallback_session_management_enabled;
never executed: return QGuiApplicationPrivate::is_fallback_session_management_enabled;
0
2407}-
2408void QGuiApplication::setFallbackSessionManagementEnabled(bool enabled)-
2409{-
2410 QGuiApplicationPrivate::is_fallback_session_management_enabled = enabled;-
2411}
never executed: end of block
0
2412bool QGuiApplication::isSessionRestored() const-
2413{-
2414 const QGuiApplicationPrivate * const d = d_func();-
2415 return
never executed: return d->is_session_restored;
d->is_session_restored;
never executed: return d->is_session_restored;
0
2416}-
2417-
2418QString QGuiApplication::sessionId() const-
2419{-
2420 const QGuiApplicationPrivate * const d = d_func();-
2421 return
never executed: return d->session_manager->sessionId();
d->session_manager->sessionId();
never executed: return d->session_manager->sessionId();
0
2422}-
2423-
2424QString QGuiApplication::sessionKey() const-
2425{-
2426 const QGuiApplicationPrivate * const d = d_func();-
2427 return
never executed: return d->session_manager->sessionKey();
d->session_manager->sessionKey();
never executed: return d->session_manager->sessionKey();
0
2428}-
2429-
2430bool QGuiApplication::isSavingSession() const-
2431{-
2432 const QGuiApplicationPrivate * const d = d_func();-
2433 return
never executed: return d->is_saving_session;
d->is_saving_session;
never executed: return d->is_saving_session;
0
2434}-
2435-
2436void QGuiApplicationPrivate::commitData()-
2437{-
2438 QGuiApplication * const q = q_func();-
2439 is_saving_session = true;-
2440-
2441 q->commitDataRequest(*session_manager);-
2442 if (is_fallback_session_management_enabled
is_fallback_se...gement_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
&& session_manager->allowsInteraction()
session_manage...sInteraction()Description
TRUEnever evaluated
FALSEnever evaluated
0
2443 && !tryCloseAllWindows()
!tryCloseAllWindows()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2444 session_manager->cancel();-
2445 }
never executed: end of block
0
2446-
2447 is_saving_session = false;-
2448}
never executed: end of block
0
2449-
2450-
2451void QGuiApplicationPrivate::saveState()-
2452{-
2453 QGuiApplication * const q = q_func();-
2454 is_saving_session = true;-
2455 q->saveStateRequest(*session_manager);-
2456 is_saving_session = false;-
2457}
never executed: end of block
0
2458void QGuiApplication::sync()-
2459{-
2460 QCoreApplication::processEvents();-
2461 if (QGuiApplicationPrivate::platform_integration
QGuiApplicatio...rm_integrationDescription
TRUEnever evaluated
FALSEnever evaluated
0
2462 && QGuiApplicationPrivate::platform_integration->hasCapability(QPlatformIntegration::SyncState)
QGuiApplicatio...on::SyncState)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2463 QGuiApplicationPrivate::platform_integration->sync();-
2464 QCoreApplication::processEvents();-
2465 QWindowSystemInterface::flushWindowSystemEvents();-
2466 }
never executed: end of block
0
2467}
never executed: end of block
0
2468void QGuiApplication::setLayoutDirection(Qt::LayoutDirection direction)-
2469{-
2470 if (layout_direction == direction
layout_direction == directionDescription
TRUEnever evaluated
FALSEnever evaluated
|| direction == Qt::LayoutDirectionAuto
direction == Q...tDirectionAutoDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2471 return;
never executed: return;
0
2472-
2473 layout_direction = direction;-
2474-
2475 if ((static_cast<
(static_cast<Q...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))
(static_cast<Q...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2476 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->layoutDirectionChanged(direction);-
2477 QGuiApplicationPrivate::self->notifyLayoutDirectionChange();-
2478 }
never executed: end of block
0
2479}
never executed: end of block
0
2480-
2481Qt::LayoutDirection QGuiApplication::layoutDirection()-
2482{-
2483-
2484-
2485-
2486 return
never executed: return layout_direction == Qt::LayoutDirectionAuto ? Qt::LeftToRight : layout_direction;
layout_direction == Qt::LayoutDirectionAuto
layout_directi...tDirectionAutoDescription
TRUEnever evaluated
FALSEnever evaluated
? Qt::LeftToRight : layout_direction;
never executed: return layout_direction == Qt::LayoutDirectionAuto ? Qt::LeftToRight : layout_direction;
0
2487}-
2488QCursor *QGuiApplication::overrideCursor()-
2489{-
2490 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 3380, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
}
0
2491 return
never executed: return (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.isEmpty() ? 0 : &(static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.first();
(static_cast<
(static_cast<Q...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.isEmpty()
(static_cast<Q...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : &(static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.first();
never executed: return (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.isEmpty() ? 0 : &(static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.first();
0
2492}-
2493void QGuiApplication::changeOverrideCursor(const QCursor &cursor)-
2494{-
2495 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 3394, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return ;
;
never executed: return ;
}
0
2496 if ((static_cast<
(static_cast<Q...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.isEmpty()
(static_cast<Q...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2497 return;
never executed: return;
0
2498 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.removeFirst();-
2499 setOverrideCursor(cursor);-
2500}
never executed: end of block
0
2501-
2502-
2503-
2504-
2505static inline void applyCursor(QWindow *w, QCursor c)-
2506{-
2507 if (const
const QScreen ... = w->screen()Description
TRUEnever evaluated
FALSEnever evaluated
QScreen *screen = w->screen()
const QScreen ... = w->screen()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2508 if (QPlatformCursor *cursor = screen->handle()->cursor()
QPlatformCurso...le()->cursor()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2509 cursor->changeCursor(&c, w);
never executed: cursor->changeCursor(&c, w);
0
2510}
never executed: end of block
0
2511-
2512static inline void unsetCursor(QWindow *w)-
2513{-
2514 if (const
const QScreen ... = w->screen()Description
TRUEnever evaluated
FALSEnever evaluated
QScreen *screen = w->screen()
const QScreen ... = w->screen()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2515 if (QPlatformCursor *cursor = screen->handle()->cursor()
QPlatformCurso...le()->cursor()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2516 cursor->changeCursor(0, w);
never executed: cursor->changeCursor(0, w);
0
2517}
never executed: end of block
0
2518-
2519static inline void applyCursor(const QList<QWindow *> &l, const QCursor &c)-
2520{-
2521 for (int i = 0; i < l.size()
i < l.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2522 QWindow *w = l.at(i);-
2523 if (w->handle()
w->handle()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->type() != Qt::Desktop
w->type() != Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2524 applyCursor(w, c);
never executed: applyCursor(w, c);
0
2525 }
never executed: end of block
0
2526}
never executed: end of block
0
2527-
2528static inline void applyWindowCursor(const QList<QWindow *> &l)-
2529{-
2530 for (int i = 0; i < l.size()
i < l.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2531 QWindow *w = l.at(i);-
2532 if (w->handle()
w->handle()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->type() != Qt::Desktop
w->type() != Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2533 if (qt_window_private(w)->hasCursor
qt_window_priv...(w)->hasCursorDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2534 applyCursor(w, w->cursor());-
2535 }
never executed: end of block
else {
0
2536 unsetCursor(w);-
2537 }
never executed: end of block
0
2538 }-
2539 }
never executed: end of block
0
2540}
never executed: end of block
0
2541void QGuiApplication::setOverrideCursor(const QCursor &cursor)-
2542{-
2543 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 3469, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return ;
;
never executed: return ;
}
0
2544 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.prepend(cursor);-
2545 applyCursor(QGuiApplicationPrivate::window_list, cursor);-
2546}
never executed: end of block
0
2547void QGuiApplication::restoreOverrideCursor()-
2548{-
2549 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 3487, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return ;
;
never executed: return ;
}
0
2550 if ((static_cast<
(static_cast<Q...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.isEmpty()
(static_cast<Q...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2551 return;
never executed: return;
0
2552 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.removeFirst();-
2553 if ((static_cast<
(static_cast<Q...ist.size() > 0Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.size() > 0
(static_cast<Q...ist.size() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2554 QCursor c((static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->cursor_list.value(0));-
2555 applyCursor(QGuiApplicationPrivate::window_list, c);-
2556 }
never executed: end of block
else {
0
2557 applyWindowCursor(QGuiApplicationPrivate::window_list);-
2558 }
never executed: end of block
0
2559}-
2560QStyleHints *QGuiApplication::styleHints()-
2561{-
2562 if (!QGuiApplicationPrivate::styleHints
!QGuiApplicati...te::styleHintsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2563 QGuiApplicationPrivate::styleHints = new QStyleHints();
never executed: QGuiApplicationPrivate::styleHints = new QStyleHints();
0
2564 return
never executed: return QGuiApplicationPrivate::styleHints;
QGuiApplicationPrivate::styleHints;
never executed: return QGuiApplicationPrivate::styleHints;
0
2565}-
2566void QGuiApplication::setDesktopSettingsAware(bool on)-
2567{-
2568 QGuiApplicationPrivate::obey_desktop_settings = on;-
2569}
never executed: end of block
0
2570-
2571-
2572-
2573-
2574-
2575-
2576-
2577bool QGuiApplication::desktopSettingsAware()-
2578{-
2579 return
never executed: return QGuiApplicationPrivate::obey_desktop_settings;
QGuiApplicationPrivate::obey_desktop_settings;
never executed: return QGuiApplicationPrivate::obey_desktop_settings;
0
2580}-
2581QInputMethod *QGuiApplication::inputMethod()-
2582{-
2583 if (__builtin_expect(!!(QCoreApplication::instance()), true)
__builtin_expe...ance()), true)Description
TRUEnever evaluated
FALSEnever evaluated
) { }
never executed: end of block
else { QMessageLogger(__FILE__, 3555, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication first."); return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
}
0
2584 if (!(static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod
!(static_cast<...)->inputMethodDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2585 (static_cast<
never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod = new QInputMethod();
QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod = new QInputMethod();
never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod = new QInputMethod();
0
2586 return
never executed: return (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod;
(static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod;
never executed: return (static_cast<QGuiApplication *>(QCoreApplication::instance()))->d_func()->inputMethod;
0
2587}-
2588QPixmap QGuiApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)-
2589{-
2590 (void)cshape;;-
2591 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
2592}-
2593-
2594void QGuiApplicationPrivate::notifyThemeChanged()-
2595{-
2596 if (!(applicationResourceFlags & ApplicationPaletteExplicitlySet)
!(applicationR...ExplicitlySet)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
2597 !QCoreApplication::testAttribute(Qt::AA_SetPalette)
!QCoreApplicat...AA_SetPalette)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2598 clearPalette();-
2599 initPalette();-
2600 }
never executed: end of block
0
2601 if (!(applicationResourceFlags & ApplicationFontExplicitlySet)
!(applicationR...ExplicitlySet)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2602 QMutexLocker locker(&applicationFontMutex);-
2603 clearFontUnlocked();-
2604 initFontUnlocked();-
2605 }
never executed: end of block
0
2606}
never executed: end of block
0
2607-
2608-
2609void QGuiApplicationPrivate::notifyDragStarted(const QDrag *drag)-
2610{-
2611 (void)drag;-
2612-
2613}
never executed: end of block
0
2614-
2615-
2616const QDrawHelperGammaTables *QGuiApplicationPrivate::gammaTables()-
2617{-
2618 QDrawHelperGammaTables *result = m_gammaTables.load();-
2619 if (!result
!resultDescription
TRUEnever evaluated
FALSEnever evaluated
){
0
2620 QDrawHelperGammaTables *tables = new QDrawHelperGammaTables(fontSmoothingGamma);-
2621 if (!m_gammaTables.testAndSetRelease(0, tables)
!m_gammaTables...ase(0, tables)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2622 delete tables;
never executed: delete tables;
0
2623 result = m_gammaTables.load();-
2624 }
never executed: end of block
0
2625 return
never executed: return result;
result;
never executed: return result;
0
2626}-
2627-
2628void QGuiApplicationPrivate::_q_updateFocusObject(QObject *object)-
2629{-
2630 QGuiApplication * const q = q_func();-
2631-
2632 QPlatformInputContext *inputContext = platformIntegration()->inputContext();-
2633 bool enabled = false;-
2634 if (object
objectDescription
TRUEnever evaluated
FALSEnever evaluated
&& inputContext
inputContextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2635 QInputMethodQueryEvent query(Qt::ImEnabled | Qt::ImHints);-
2636 QGuiApplication::sendEvent(object, &query);-
2637 enabled = query.value(Qt::ImEnabled).toBool();-
2638 if (enabled
enabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2639 static const bool supportsHiddenText = inputContext->hasCapability(QPlatformInputContext::HiddenTextCapability);-
2640 const Qt::InputMethodHints hints = static_cast<Qt::InputMethodHints>(query.value(Qt::ImHints).toInt());-
2641 if ((
(hints & Qt::ImhHiddenText)Description
TRUEnever evaluated
FALSEnever evaluated
hints & Qt::ImhHiddenText)
(hints & Qt::ImhHiddenText)Description
TRUEnever evaluated
FALSEnever evaluated
&& !supportsHiddenText
!supportsHiddenTextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2642 enabled = false;
never executed: enabled = false;
0
2643 }
never executed: end of block
0
2644 }
never executed: end of block
0
2645-
2646 QPlatformInputContextPrivate::setInputMethodAccepted(enabled);-
2647 if (inputContext
inputContextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2648 inputContext->setFocusObject(object);
never executed: inputContext->setFocusObject(object);
0
2649 q->focusObjectChanged(object);-
2650}
never executed: end of block
0
2651-
2652enum {-
2653 MouseCapsMask = 0xFF,-
2654 MouseSourceMaskDst = 0xFF00,-
2655 MouseSourceMaskSrc = MouseCapsMask,-
2656 MouseSourceShift = 8,-
2657 MouseFlagsCapsMask = 0xFF0000,-
2658 MouseFlagsShift = 16-
2659};-
2660-
2661int QGuiApplicationPrivate::mouseEventCaps(QMouseEvent *event)-
2662{-
2663 return
never executed: return event->caps & MouseCapsMask;
event->caps & MouseCapsMask;
never executed: return event->caps & MouseCapsMask;
0
2664}-
2665-
2666QVector2D QGuiApplicationPrivate::mouseEventVelocity(QMouseEvent *event)-
2667{-
2668 return
never executed: return event->velocity;
event->velocity;
never executed: return event->velocity;
0
2669}-
2670-
2671void QGuiApplicationPrivate::setMouseEventCapsAndVelocity(QMouseEvent *event, int caps, const QVector2D &velocity)-
2672{-
2673 ((!(caps <= MouseCapsMask)) ? qt_assert("caps <= MouseCapsMask",__FILE__,3657) : qt_noop());-
2674 event->caps &= ~MouseCapsMask;-
2675 event->caps |= caps & MouseCapsMask;-
2676 event->velocity = velocity;-
2677}
never executed: end of block
0
2678-
2679Qt::MouseEventSource QGuiApplicationPrivate::mouseEventSource(const QMouseEvent *event)-
2680{-
2681 return
never executed: return Qt::MouseEventSource((event->caps & MouseSourceMaskDst) >> MouseSourceShift);
Qt::MouseEventSource((event->caps & MouseSourceMaskDst) >> MouseSourceShift);
never executed: return Qt::MouseEventSource((event->caps & MouseSourceMaskDst) >> MouseSourceShift);
0
2682}-
2683-
2684void QGuiApplicationPrivate::setMouseEventSource(QMouseEvent *event, Qt::MouseEventSource source)-
2685{-
2686-
2687-
2688 int value = source;-
2689 ((!(value <= MouseSourceMaskSrc)) ? qt_assert("value <= MouseSourceMaskSrc",__FILE__,3673) : qt_noop());-
2690 event->caps &= ~MouseSourceMaskDst;-
2691 event->caps |= (value & MouseSourceMaskSrc) << MouseSourceShift;-
2692}
never executed: end of block
0
2693-
2694Qt::MouseEventFlags QGuiApplicationPrivate::mouseEventFlags(const QMouseEvent *event)-
2695{-
2696 return
never executed: return Qt::MouseEventFlags((event->caps & MouseFlagsCapsMask) >> MouseFlagsShift);
Qt::MouseEventFlags((event->caps & MouseFlagsCapsMask) >> MouseFlagsShift);
never executed: return Qt::MouseEventFlags((event->caps & MouseFlagsCapsMask) >> MouseFlagsShift);
0
2697}-
2698-
2699void QGuiApplicationPrivate::setMouseEventFlags(QMouseEvent *event, Qt::MouseEventFlags flags)-
2700{-
2701-
2702 unsigned int value = flags;-
2703 ((!(value <= Qt::MouseEventFlagMask)) ? qt_assert("value <= Qt::MouseEventFlagMask",__FILE__,3687) : qt_noop());-
2704 event->caps &= ~MouseFlagsCapsMask;-
2705 event->caps |= (value & Qt::MouseEventFlagMask) << MouseFlagsShift;-
2706}
never executed: end of block
0
2707-
2708QInputDeviceManager *QGuiApplicationPrivate::inputDeviceManager()-
2709{-
2710 ((!(QGuiApplication::instance())) ? qt_assert("QGuiApplication::instance()",__FILE__,3694) : qt_noop());-
2711-
2712 if (!m_inputDeviceManager
!m_inputDeviceManagerDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2713 m_inputDeviceManager = new QInputDeviceManager(QGuiApplication::instance());
never executed: m_inputDeviceManager = new QInputDeviceManager(QGuiApplication::instance());
0
2714-
2715 return
never executed: return m_inputDeviceManager;
m_inputDeviceManager;
never executed: return m_inputDeviceManager;
0
2716}-
2717-
2718-
2719-
Switch to Source codePreprocessed file

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