kernel/qapplication_qpa.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8 -
9 -
10 -
11 -
12 -
13 -
14static QString appFont; -
15static bool popupGrabOk; -
16extern QWidget *qt_button_down; -
17extern QWidget *qt_popup_down; -
18extern bool qt_replay_popup_mouse_event; -
19int openPopupCount = 0; -
20extern QPointer<QWidget> qt_last_mouse_receiver; -
21 -
22void QApplicationPrivate::createEventDispatcher() -
23{ -
24 QGuiApplicationPrivate::createEventDispatcher(); -
25}
executed: }
Execution Count:215
215
26 -
27bool qt_try_modal(QWidget *widget, QEvent::Type type) -
28{ -
29 QWidget * top = 0; -
30 -
31 if (QApplicationPrivate::tryModalHelper(widget, &top))
partially evaluated: QApplicationPrivate::tryModalHelper(widget, &top)
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
32 return true;
executed: return true;
Execution Count:3
3
33 -
34 bool block_event = false; -
35 bool paint_event = false; -
36 -
37 switch (type) { -
38 -
39 -
40 -
41 -
42 -
43 -
44 case QEvent::MouseButtonPress: -
45 case QEvent::MouseButtonRelease: -
46 case QEvent::MouseMove: -
47 case QEvent::KeyPress: -
48 case QEvent::KeyRelease: -
49 block_event = true; -
50 break;
never executed: break;
0
51 default: -
52 break;
never executed: break;
0
53 } -
54 -
55 if ((block_event || paint_event) && top->parentWidget() == 0)
never evaluated: block_event
never evaluated: paint_event
never evaluated: top->parentWidget() == 0
0
56 top->raise();
never executed: top->raise();
0
57 -
58 return !block_event;
never executed: return !block_event;
0
59} -
60 -
61bool QApplicationPrivate::modalState() -
62{ -
63 return !self->modalWindowList.isEmpty();
executed: return !self->modalWindowList.isEmpty();
Execution Count:479
479
64} -
65 -
66QWidget *qt_tlw_for_window(QWindow *wnd) -
67{ -
68 if (wnd)
evaluated: wnd
TRUEFALSE
yes
Evaluation Count:1685
yes
Evaluation Count:44
44-1685
69 for (QForeachContainer<__typeof__((static_cast<QApplication *>(QCoreApplication::instance()))->topLevelWidgets())> _container_((static_cast<QApplication *>(QCoreApplication::instance()))->topLevelWidgets()); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (QWidget *tlw = *_container_.i;; __extension__ ({--_container_.brk; break;})) -
70 if (tlw->windowHandle() == wnd)
evaluated: tlw->windowHandle() == wnd
TRUEFALSE
yes
Evaluation Count:1681
yes
Evaluation Count:1564
1564-1681
71 return tlw;
executed: return tlw;
Execution Count:1681
1681
72 return 0;
executed: return 0;
Execution Count:48
48
73} -
74 -
75void QApplicationPrivate::notifyActiveWindowChange(QWindow *previous) -
76{ -
77 (void)previous;; -
78 QWindow *wnd = QGuiApplicationPrivate::focus_window; -
79 if (inPopupMode())
evaluated: inPopupMode()
TRUEFALSE
yes
Evaluation Count:65
yes
Evaluation Count:1729
65-1729
80 return;
executed: return;
Execution Count:65
65
81 QWidget *tlw = qt_tlw_for_window(wnd); -
82 QApplication::setActiveWindow(tlw); -
83}
executed: }
Execution Count:1729
1729
84 -
85static void ungrabKeyboardForPopup(QWidget *popup) -
86{ -
87 if (QWidget::keyboardGrabber())
evaluated: QWidget::keyboardGrabber()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:88
1-88
88 qt_widget_private(QWidget::keyboardGrabber())->stealKeyboardGrab(true);
executed: qt_widget_private(QWidget::keyboardGrabber())->stealKeyboardGrab(true);
Execution Count:1
1
89 else -
90 qt_widget_private(popup)->stealKeyboardGrab(false);
executed: qt_widget_private(popup)->stealKeyboardGrab(false);
Execution Count:88
88
91} -
92 -
93static void ungrabMouseForPopup(QWidget *popup) -
94{ -
95 if (QWidget::mouseGrabber())
partially evaluated: QWidget::mouseGrabber()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:89
0-89
96 qt_widget_private(QWidget::mouseGrabber())->stealMouseGrab(true);
never executed: qt_widget_private(QWidget::mouseGrabber())->stealMouseGrab(true);
0
97 else -
98 qt_widget_private(popup)->stealMouseGrab(false);
executed: qt_widget_private(popup)->stealMouseGrab(false);
Execution Count:89
89
99} -
100 -
101static void grabForPopup(QWidget *popup) -
102{ -
103 qt_noop(); -
104 popupGrabOk = qt_widget_private(popup)->stealKeyboardGrab(true); -
105 if (popupGrabOk) {
partially evaluated: popupGrabOk
TRUEFALSE
yes
Evaluation Count:110
no
Evaluation Count:0
0-110
106 popupGrabOk = qt_widget_private(popup)->stealMouseGrab(true); -
107 if (!popupGrabOk) {
partially evaluated: !popupGrabOk
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:110
0-110
108 -
109 ungrabKeyboardForPopup(popup); -
110 }
never executed: }
0
111 }
executed: }
Execution Count:110
110
112}
executed: }
Execution Count:110
110
113 -
114void QApplicationPrivate::closePopup(QWidget *popup) -
115{ -
116 if (!popupWidgets)
evaluated: !popupWidgets
TRUEFALSE
yes
Evaluation Count:622
yes
Evaluation Count:114
114-622
117 return;
executed: return;
Execution Count:622
622
118 popupWidgets->removeAll(popup); -
119 -
120 if (popup == qt_popup_down) {
partially evaluated: popup == qt_popup_down
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:114
0-114
121 qt_button_down = 0; -
122 qt_popup_down = 0; -
123 }
never executed: }
0
124 -
125 if (QApplicationPrivate::popupWidgets->count() == 0) {
evaluated: QApplicationPrivate::popupWidgets->count() == 0
TRUEFALSE
yes
Evaluation Count:89
yes
Evaluation Count:25
25-89
126 delete QApplicationPrivate::popupWidgets; -
127 QApplicationPrivate::popupWidgets = 0; -
128 -
129 if (popupGrabOk) {
partially evaluated: popupGrabOk
TRUEFALSE
yes
Evaluation Count:89
no
Evaluation Count:0
0-89
130 popupGrabOk = false; -
131 -
132 if (popup->geometry().contains(QPoint(QGuiApplicationPrivate::mousePressX, 11-78
133 QGuiApplicationPrivate::mousePressY))
evaluated: popup->geometry().contains(QPoint(QGuiApplicationPrivate::mousePressX, QGuiApplicationPrivate::mousePressY))
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:78
11-78
134 || popup->testAttribute(Qt::WA_NoMouseReplay)) {
partially evaluated: popup->testAttribute(Qt::WA_NoMouseReplay)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:78
0-78
135 -
136 qt_replay_popup_mouse_event = false; -
137 } else {
executed: }
Execution Count:11
11
138 QGuiApplicationPrivate::mousePressTime -= 10000; -
139 qt_replay_popup_mouse_event = true; -
140 }
executed: }
Execution Count:78
78
141 -
142 -
143 ungrabMouseForPopup(popup); -
144 -
145 -
146 ungrabKeyboardForPopup(popup); -
147 }
executed: }
Execution Count:89
89
148 -
149 if (active_window) {
evaluated: active_window
TRUEFALSE
yes
Evaluation Count:55
yes
Evaluation Count:34
34-55
150 if (QWidget *fw = active_window->focusWidget()) {
evaluated: QWidget *fw = active_window->focusWidget()
TRUEFALSE
yes
Evaluation Count:43
yes
Evaluation Count:12
12-43
151 if (fw != QApplication::focusWidget()) {
evaluated: fw != QApplication::focusWidget()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:40
3-40
152 fw->setFocus(Qt::PopupFocusReason); -
153 } else {
executed: }
Execution Count:3
3
154 QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason); -
155 QCoreApplication::sendEvent(fw, &e); -
156 }
executed: }
Execution Count:40
40
157 } -
158 }
executed: }
Execution Count:55
55
159 -
160 } else {
executed: }
Execution Count:89
89
161 -
162 QWidget* aw = QApplicationPrivate::popupWidgets->last(); -
163 if (QWidget *fw = aw->focusWidget())
evaluated: QWidget *fw = aw->focusWidget()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:22
3-22
164 fw->setFocus(Qt::PopupFocusReason);
executed: fw->setFocus(Qt::PopupFocusReason);
Execution Count:3
3
165 -
166 if (QApplicationPrivate::popupWidgets->count() == 1)
evaluated: QApplicationPrivate::popupWidgets->count() == 1
TRUEFALSE
yes
Evaluation Count:21
yes
Evaluation Count:4
4-21
167 grabForPopup(aw);
executed: grabForPopup(aw);
Execution Count:21
21
168 }
executed: }
Execution Count:25
25
169 -
170} -
171 -
172void QApplicationPrivate::openPopup(QWidget *popup) -
173{ -
174 openPopupCount++; -
175 if (!popupWidgets)
evaluated: !popupWidgets
TRUEFALSE
yes
Evaluation Count:89
yes
Evaluation Count:7
7-89
176 popupWidgets = new QWidgetList;
executed: popupWidgets = new QWidgetList;
Execution Count:89
89
177 popupWidgets->append(popup); -
178 -
179 if (QApplicationPrivate::popupWidgets->count() == 1)
evaluated: QApplicationPrivate::popupWidgets->count() == 1
TRUEFALSE
yes
Evaluation Count:89
yes
Evaluation Count:7
7-89
180 grabForPopup(popup);
executed: grabForPopup(popup);
Execution Count:89
89
181 -
182 -
183 -
184 -
185 if (popup->focusWidget()) {
evaluated: popup->focusWidget()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:93
3-93
186 popup->focusWidget()->setFocus(Qt::PopupFocusReason); -
187 } else if (popupWidgets->count() == 1) {
evaluated: popupWidgets->count() == 1
TRUEFALSE
yes
Evaluation Count:86
yes
Evaluation Count:7
executed: }
Execution Count:3
3-86
188 if (QWidget *fw = QApplication::focusWidget()) {
evaluated: QWidget *fw = QApplication::focusWidget()
TRUEFALSE
yes
Evaluation Count:55
yes
Evaluation Count:31
31-55
189 QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason); -
190 QApplication::sendEvent(fw, &e); -
191 }
executed: }
Execution Count:55
55
192 }
executed: }
Execution Count:86
86
193} -
194 -
195void QApplicationPrivate::initializeMultitouch_sys() -
196{ -
197} -
198 -
199void QApplicationPrivate::cleanupMultitouch_sys() -
200{ -
201} -
202 -
203static void setPossiblePalette(const QPalette *palette, const char *className) -
204{ -
205 if (palette == 0)
partially evaluated: palette == 0
TRUEFALSE
yes
Evaluation Count:832
no
Evaluation Count:0
0-832
206 return;
executed: return;
Execution Count:832
832
207 QApplicationPrivate::setPalette_helper(*palette, className, false); -
208}
never executed: }
0
209 -
210 -
211void QApplicationPrivate::initializeWidgetPaletteHash() -
212{ -
213 QPlatformTheme *platformTheme = QGuiApplicationPrivate::platformTheme(); -
214 if (!platformTheme)
partially evaluated: !platformTheme
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:64
0-64
215 return;
never executed: return;
0
216 setPossiblePalette(platformTheme->palette(QPlatformTheme::ToolButtonPalette), "QToolButton"); -
217 setPossiblePalette(platformTheme->palette(QPlatformTheme::ButtonPalette), "QAbstractButton"); -
218 setPossiblePalette(platformTheme->palette(QPlatformTheme::HeaderPalette), "QHeaderView"); -
219 setPossiblePalette(platformTheme->palette(QPlatformTheme::ItemViewPalette), "QAbstractItemView"); -
220 setPossiblePalette(platformTheme->palette(QPlatformTheme::MessageBoxLabelPelette), "QMessageBoxLabel"); -
221 setPossiblePalette(platformTheme->palette(QPlatformTheme::TabBarPalette), "QTabBar"); -
222 setPossiblePalette(platformTheme->palette(QPlatformTheme::LabelPalette), "QLabel"); -
223 setPossiblePalette(platformTheme->palette(QPlatformTheme::GroupBoxPalette), "QGroupBox"); -
224 setPossiblePalette(platformTheme->palette(QPlatformTheme::MenuPalette), "QMenu"); -
225 setPossiblePalette(platformTheme->palette(QPlatformTheme::MenuBarPalette), "QMenuBar"); -
226 setPossiblePalette(platformTheme->palette(QPlatformTheme::TextEditPalette), "QTextEdit"); -
227 setPossiblePalette(platformTheme->palette(QPlatformTheme::TextEditPalette), "QTextControl"); -
228 setPossiblePalette(platformTheme->palette(QPlatformTheme::TextLineEditPalette), "QLineEdit"); -
229}
executed: }
Execution Count:64
64
230 -
231void QApplicationPrivate::initializeWidgetFontHash() -
232{ -
233 const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme(); -
234 if (!theme)
partially evaluated: !theme
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
235 return;
never executed: return;
0
236 FontHash *fontHash = qt_app_fonts_hash(); -
237 if (const QFont *font = theme->font(QPlatformTheme::MenuFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::MenuFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
238 fontHash->insert(QByteArray("QMenu", sizeof("QMenu") - 1), *font);
never executed: fontHash->insert(QByteArray("QMenu", sizeof("QMenu") - 1), *font);
0
239 if (const QFont *font = theme->font(QPlatformTheme::MenuBarFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::MenuBarFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
240 fontHash->insert(QByteArray("QMenuBar", sizeof("QMenuBar") - 1), *font);
never executed: fontHash->insert(QByteArray("QMenuBar", sizeof("QMenuBar") - 1), *font);
0
241 if (const QFont *font = theme->font(QPlatformTheme::MenuItemFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::MenuItemFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
242 fontHash->insert(QByteArray("QMenuItem", sizeof("QMenuItem") - 1), *font);
never executed: fontHash->insert(QByteArray("QMenuItem", sizeof("QMenuItem") - 1), *font);
0
243 if (const QFont *font = theme->font(QPlatformTheme::MessageBoxFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::MessageBoxFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
244 fontHash->insert(QByteArray("QMessageBox", sizeof("QMessageBox") - 1), *font);
never executed: fontHash->insert(QByteArray("QMessageBox", sizeof("QMessageBox") - 1), *font);
0
245 if (const QFont *font = theme->font(QPlatformTheme::LabelFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::LabelFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
246 fontHash->insert(QByteArray("QLabel", sizeof("QLabel") - 1), *font);
never executed: fontHash->insert(QByteArray("QLabel", sizeof("QLabel") - 1), *font);
0
247 if (const QFont *font = theme->font(QPlatformTheme::TipLabelFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::TipLabelFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
248 fontHash->insert(QByteArray("QTipLabel", sizeof("QTipLabel") - 1), *font);
never executed: fontHash->insert(QByteArray("QTipLabel", sizeof("QTipLabel") - 1), *font);
0
249 if (const QFont *font = theme->font(QPlatformTheme::TitleBarFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::TitleBarFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
250 fontHash->insert(QByteArray("QTitleBar", sizeof("QTitleBar") - 1), *font);
never executed: fontHash->insert(QByteArray("QTitleBar", sizeof("QTitleBar") - 1), *font);
0
251 if (const QFont *font = theme->font(QPlatformTheme::StatusBarFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::StatusBarFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
252 fontHash->insert(QByteArray("QStatusBar", sizeof("QStatusBar") - 1), *font);
never executed: fontHash->insert(QByteArray("QStatusBar", sizeof("QStatusBar") - 1), *font);
0
253 if (const QFont *font = theme->font(QPlatformTheme::MdiSubWindowTitleFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::MdiSubWindowTitleFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
254 fontHash->insert(QByteArray("QMdiSubWindowTitleBar", sizeof("QMdiSubWindowTitleBar") - 1), *font);
never executed: fontHash->insert(QByteArray("QMdiSubWindowTitleBar", sizeof("QMdiSubWindowTitleBar") - 1), *font);
0
255 if (const QFont *font = theme->font(QPlatformTheme::DockWidgetTitleFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::DockWidgetTitleFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
256 fontHash->insert(QByteArray("QDockWidgetTitle", sizeof("QDockWidgetTitle") - 1), *font);
never executed: fontHash->insert(QByteArray("QDockWidgetTitle", sizeof("QDockWidgetTitle") - 1), *font);
0
257 if (const QFont *font = theme->font(QPlatformTheme::PushButtonFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::PushButtonFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
258 fontHash->insert(QByteArray("QPushButton", sizeof("QPushButton") - 1), *font);
never executed: fontHash->insert(QByteArray("QPushButton", sizeof("QPushButton") - 1), *font);
0
259 if (const QFont *font = theme->font(QPlatformTheme::ToolButtonFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::ToolButtonFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
260 fontHash->insert(QByteArray("QToolButton", sizeof("QToolButton") - 1), *font);
never executed: fontHash->insert(QByteArray("QToolButton", sizeof("QToolButton") - 1), *font);
0
261 if (const QFont *font = theme->font(QPlatformTheme::ItemViewFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::ItemViewFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
262 fontHash->insert(QByteArray("QAbstractItemView", sizeof("QAbstractItemView") - 1), *font);
never executed: fontHash->insert(QByteArray("QAbstractItemView", sizeof("QAbstractItemView") - 1), *font);
0
263 if (const QFont *font = theme->font(QPlatformTheme::ListViewFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::ListViewFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
264 fontHash->insert(QByteArray("QListViewFont", sizeof("QListViewFont") - 1), *font);
never executed: fontHash->insert(QByteArray("QListViewFont", sizeof("QListViewFont") - 1), *font);
0
265 if (const QFont *font = theme->font(QPlatformTheme::HeaderViewFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::HeaderViewFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
266 fontHash->insert(QByteArray("QHeaderViewFont", sizeof("QHeaderViewFont") - 1), *font);
never executed: fontHash->insert(QByteArray("QHeaderViewFont", sizeof("QHeaderViewFont") - 1), *font);
0
267 if (const QFont *font = theme->font(QPlatformTheme::ListBoxFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::ListBoxFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
268 fontHash->insert(QByteArray("QListBox", sizeof("QListBox") - 1), *font);
never executed: fontHash->insert(QByteArray("QListBox", sizeof("QListBox") - 1), *font);
0
269 if (const QFont *font = theme->font(QPlatformTheme::ComboMenuItemFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::ComboMenuItemFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
270 fontHash->insert(QByteArray("QComboMenuItemFont", sizeof("QComboMenuItemFont") - 1), *font);
never executed: fontHash->insert(QByteArray("QComboMenuItemFont", sizeof("QComboMenuItemFont") - 1), *font);
0
271 if (const QFont *font = theme->font(QPlatformTheme::ComboLineEditFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::ComboLineEditFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
272 fontHash->insert(QByteArray("QComboLineEditFont", sizeof("QComboLineEditFont") - 1), *font);
never executed: fontHash->insert(QByteArray("QComboLineEditFont", sizeof("QComboLineEditFont") - 1), *font);
0
273 if (const QFont *font = theme->font(QPlatformTheme::SmallFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::SmallFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
274 fontHash->insert(QByteArray("QSmallFont", sizeof("QSmallFont") - 1), *font);
never executed: fontHash->insert(QByteArray("QSmallFont", sizeof("QSmallFont") - 1), *font);
0
275 if (const QFont *font = theme->font(QPlatformTheme::MiniFont))
partially evaluated: const QFont *font = theme->font(QPlatformTheme::MiniFont)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
276 fontHash->insert(QByteArray("QMiniFont", sizeof("QMiniFont") - 1), *font);
never executed: fontHash->insert(QByteArray("QMiniFont", sizeof("QMiniFont") - 1), *font);
0
277}
executed: }
Execution Count:215
215
278 -
279 -
280void QApplication::setWheelScrollLines(int lines) -
281{ -
282 QApplicationPrivate::wheel_scroll_lines = lines; -
283}
executed: }
Execution Count:8
8
284 -
285int QApplication::wheelScrollLines() -
286{ -
287 return QApplicationPrivate::wheel_scroll_lines;
executed: return QApplicationPrivate::wheel_scroll_lines;
Execution Count:30
30
288} -
289 -
290 -
291static inline int uiEffectToFlag(Qt::UIEffect effect) -
292{ -
293 switch (effect) { -
294 case Qt::UI_General: -
295 return QPlatformTheme::GeneralUiEffect;
never executed: return QPlatformTheme::GeneralUiEffect;
0
296 case Qt::UI_AnimateMenu: -
297 return QPlatformTheme::AnimateMenuUiEffect;
executed: return QPlatformTheme::AnimateMenuUiEffect;
Execution Count:2
2
298 case Qt::UI_FadeMenu: -
299 return QPlatformTheme::FadeMenuUiEffect;
never executed: return QPlatformTheme::FadeMenuUiEffect;
0
300 case Qt::UI_AnimateCombo: -
301 return QPlatformTheme::AnimateComboUiEffect;
never executed: return QPlatformTheme::AnimateComboUiEffect;
0
302 case Qt::UI_AnimateTooltip: -
303 return QPlatformTheme::AnimateTooltipUiEffect;
never executed: return QPlatformTheme::AnimateTooltipUiEffect;
0
304 case Qt::UI_FadeTooltip: -
305 return QPlatformTheme::FadeTooltipUiEffect;
never executed: return QPlatformTheme::FadeTooltipUiEffect;
0
306 case Qt::UI_AnimateToolBox: -
307 return QPlatformTheme::AnimateToolBoxUiEffect;
never executed: return QPlatformTheme::AnimateToolBoxUiEffect;
0
308 } -
309 return 0;
never executed: return 0;
0
310} -
311 -
312void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable) -
313{ -
314 int effectFlags = uiEffectToFlag(effect); -
315 if (enable) {
partially evaluated: enable
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
316 if (effectFlags & QPlatformTheme::FadeMenuUiEffect)
never evaluated: effectFlags & QPlatformTheme::FadeMenuUiEffect
0
317 effectFlags |= QPlatformTheme::AnimateMenuUiEffect;
never executed: effectFlags |= QPlatformTheme::AnimateMenuUiEffect;
0
318 if (effectFlags & QPlatformTheme::FadeTooltipUiEffect)
never evaluated: effectFlags & QPlatformTheme::FadeTooltipUiEffect
0
319 effectFlags |= QPlatformTheme::AnimateTooltipUiEffect;
never executed: effectFlags |= QPlatformTheme::AnimateTooltipUiEffect;
0
320 QApplicationPrivate::enabledAnimations |= effectFlags; -
321 } else {
never executed: }
0
322 QApplicationPrivate::enabledAnimations &= ~effectFlags; -
323 }
executed: }
Execution Count:2
2
324} -
325 -
326bool QApplication::isEffectEnabled(Qt::UIEffect effect) -
327{ -
328 return QColormap::instance().depth() >= 16 79
329 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect) 79
330 && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
executed: return QColormap::instance().depth() >= 16 && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect) && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
Execution Count:79
79
331} -
332 -
333QWidget *QApplication::topLevelAt(const QPoint &pos) -
334{ -
335 QList<QScreen *> screens = QGuiApplication::screens(); -
336 QList<QScreen *>::const_iterator screen = screens.constBegin(); -
337 QList<QScreen *>::const_iterator end = screens.constEnd(); -
338 -
339 while (screen != end) {
partially evaluated: screen != end
TRUEFALSE
yes
Evaluation Count:156
no
Evaluation Count:0
0-156
340 if ((*screen)->geometry().contains(pos)) {
partially evaluated: (*screen)->geometry().contains(pos)
TRUEFALSE
yes
Evaluation Count:156
no
Evaluation Count:0
0-156
341 QWidgetWindow *w = qobject_cast<QWidgetWindow *>((*screen)->handle()->topLevelAt(pos)); -
342 return w ? w->widget() : 0;
executed: return w ? w->widget() : 0;
Execution Count:156
156
343 } -
344 ++screen; -
345 }
never executed: }
0
346 return 0;
never executed: return 0;
0
347} -
348 -
349void QApplication::beep() -
350{ -
351} -
352 -
353void QApplication::alert(QWidget *, int) -
354{ -
355} -
356 -
357void qt_init(QApplicationPrivate *priv, int type) -
358{ -
359 (void)priv;; -
360 (void)type;; -
361 -
362 QColormap::initialize(); -
363 -
364 -
365 if (const QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette))
partially evaluated: const QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-215
366 QToolTip::setPalette(*toolTipPalette);
never executed: QToolTip::setPalette(*toolTipPalette);
0
367 -
368 -
369 QApplicationPrivate::initializeWidgetFontHash(); -
370}
executed: }
Execution Count:215
215
371void qt_cleanup() -
372{ -
373 QPixmapCache::clear(); -
374 QColormap::cleanup(); -
375 -
376 QApplicationPrivate::active_window = 0; -
377 -
378 -
379 -
380 -
381 -
382 -
383}
executed: }
Execution Count:213
213
384 -
385 -
386 -
387 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial