OpenCoverage

qstylehints.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qstylehints.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static inline QVariant hint(QPlatformIntegration::StyleHint h)-
5{-
6 return
never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(h);
QGuiApplicationPrivate::platformIntegration()->styleHint(h);
never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(h);
0
7}-
8-
9static inline QVariant themeableHint(QPlatformTheme::ThemeHint th,-
10 QPlatformIntegration::StyleHint ih)-
11{-
12 if (!QCoreApplication::instance()
!QCoreApplication::instance()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
13 QMessageLogger(__FILE__, 57, __PRETTY_FUNCTION__).warning("Must construct a QGuiApplication before accessing a platform theme hint.");-
14 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
15 }-
16 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
17 const QVariant themeHint = theme->themeHint(th);-
18 if (themeHint.isValid()
themeHint.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
19 return
never executed: return themeHint;
themeHint;
never executed: return themeHint;
0
20 }
never executed: end of block
0
21 return
never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(ih);
QGuiApplicationPrivate::platformIntegration()->styleHint(ih);
never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(ih);
0
22}-
23-
24class QStyleHintsPrivate : public QObjectPrivate-
25{-
26 inline QStyleHints* q_func() { return static_cast<QStyleHints *>(q_ptr); } inline const QStyleHints* q_func() const { return static_cast<const QStyleHints *>(q_ptr); } friend class QStyleHints;-
27public:-
28 inline QStyleHintsPrivate()-
29 : m_mouseDoubleClickInterval(-1)-
30 , m_mousePressAndHoldInterval(-1)-
31 , m_startDragDistance(-1)-
32 , m_startDragTime(-1)-
33 , m_keyboardInputInterval(-1)-
34 , m_cursorFlashTime(-1)-
35 , m_tabFocusBehavior(-1)-
36 {}
never executed: end of block
0
37-
38 int m_mouseDoubleClickInterval;-
39 int m_mousePressAndHoldInterval;-
40 int m_startDragDistance;-
41 int m_startDragTime;-
42 int m_keyboardInputInterval;-
43 int m_cursorFlashTime;-
44 int m_tabFocusBehavior;-
45};-
46QStyleHints::QStyleHints()-
47 : QObject(*new QStyleHintsPrivate(), 0)-
48{-
49}
never executed: end of block
0
50-
51-
52-
53-
54-
55-
56-
57void QStyleHints::setMouseDoubleClickInterval(int mouseDoubleClickInterval)-
58{-
59 QStyleHintsPrivate * const d = d_func();-
60 if (d->m_mouseDoubleClickInterval == mouseDoubleClickInterval
d->m_mouseDoub...eClickIntervalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
61 return;
never executed: return;
0
62 d->m_mouseDoubleClickInterval = mouseDoubleClickInterval;-
63 mouseDoubleClickIntervalChanged(mouseDoubleClickInterval);-
64}
never executed: end of block
0
65-
66-
67-
68-
69-
70-
71int QStyleHints::mouseDoubleClickInterval() const-
72{-
73 const QStyleHintsPrivate * const d = d_func();-
74 return
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
d->m_mouseDoubleClickInterval >= 0 ?
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
0
75 d->m_mouseDoubleClickInterval :
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
0
76 themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
0
77}-
78-
79-
80-
81-
82-
83-
84-
85void QStyleHints::setMousePressAndHoldInterval(int mousePressAndHoldInterval)-
86{-
87 QStyleHintsPrivate * const d = d_func();-
88 if (d->m_mousePressAndHoldInterval == mousePressAndHoldInterval
d->m_mousePres...ndHoldIntervalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
89 return;
never executed: return;
0
90 d->m_mousePressAndHoldInterval = mousePressAndHoldInterval;-
91 mousePressAndHoldIntervalChanged(mousePressAndHoldInterval);-
92}
never executed: end of block
0
93int QStyleHints::mousePressAndHoldInterval() const-
94{-
95 const QStyleHintsPrivate * const d = d_func();-
96 return
never executed: return d->m_mousePressAndHoldInterval >= 0 ? d->m_mousePressAndHoldInterval : themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
d->m_mousePressAndHoldInterval >= 0 ?
never executed: return d->m_mousePressAndHoldInterval >= 0 ? d->m_mousePressAndHoldInterval : themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
0
97 d->m_mousePressAndHoldInterval :
never executed: return d->m_mousePressAndHoldInterval >= 0 ? d->m_mousePressAndHoldInterval : themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
0
98 themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
never executed: return d->m_mousePressAndHoldInterval >= 0 ? d->m_mousePressAndHoldInterval : themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
0
99}-
100-
101-
102-
103-
104-
105-
106-
107void QStyleHints::setStartDragDistance(int startDragDistance)-
108{-
109 QStyleHintsPrivate * const d = d_func();-
110 if (d->m_startDragDistance == startDragDistance
d->m_startDrag...rtDragDistanceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
111 return;
never executed: return;
0
112 d->m_startDragDistance = startDragDistance;-
113 startDragDistanceChanged(startDragDistance);-
114}
never executed: end of block
0
115int QStyleHints::startDragDistance() const-
116{-
117 const QStyleHintsPrivate * const d = d_func();-
118 return
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
d->m_startDragDistance >= 0 ?
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
0
119 d->m_startDragDistance :
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
0
120 themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
0
121}-
122-
123-
124-
125-
126-
127-
128-
129void QStyleHints::setStartDragTime(int startDragTime)-
130{-
131 QStyleHintsPrivate * const d = d_func();-
132 if (d->m_startDragTime == startDragTime
d->m_startDrag... startDragTimeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
133 return;
never executed: return;
0
134 d->m_startDragTime = startDragTime;-
135 startDragTimeChanged(startDragTime);-
136}
never executed: end of block
0
137int QStyleHints::startDragTime() const-
138{-
139 const QStyleHintsPrivate * const d = d_func();-
140 return
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
d->m_startDragTime >= 0 ?
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
0
141 d->m_startDragTime :
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
0
142 themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
0
143}-
144int QStyleHints::startDragVelocity() const-
145{-
146 return
never executed: return themeableHint(QPlatformTheme::StartDragVelocity, QPlatformIntegration::StartDragVelocity).toInt();
themeableHint(QPlatformTheme::StartDragVelocity, QPlatformIntegration::StartDragVelocity).toInt();
never executed: return themeableHint(QPlatformTheme::StartDragVelocity, QPlatformIntegration::StartDragVelocity).toInt();
0
147}-
148-
149-
150-
151-
152-
153-
154-
155void QStyleHints::setKeyboardInputInterval(int keyboardInputInterval)-
156{-
157 QStyleHintsPrivate * const d = d_func();-
158 if (d->m_keyboardInputInterval == keyboardInputInterval
d->m_keyboardI...dInputIntervalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
159 return;
never executed: return;
0
160 d->m_keyboardInputInterval = keyboardInputInterval;-
161 keyboardInputIntervalChanged(keyboardInputInterval);-
162}
never executed: end of block
0
163-
164-
165-
166-
167-
168-
169int QStyleHints::keyboardInputInterval() const-
170{-
171 const QStyleHintsPrivate * const d = d_func();-
172 return
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
d->m_keyboardInputInterval >= 0 ?
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
0
173 d->m_keyboardInputInterval :
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
0
174 themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
0
175}-
176-
177-
178-
179-
180-
181-
182int QStyleHints::keyboardAutoRepeatRate() const-
183{-
184 return
never executed: return themeableHint(QPlatformTheme::KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardAutoRepeatRate).toInt();
themeableHint(QPlatformTheme::KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardAutoRepeatRate).toInt();
never executed: return themeableHint(QPlatformTheme::KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardAutoRepeatRate).toInt();
0
185}-
186-
187-
188-
189-
190-
191-
192-
193void QStyleHints::setCursorFlashTime(int cursorFlashTime)-
194{-
195 QStyleHintsPrivate * const d = d_func();-
196 if (d->m_cursorFlashTime == cursorFlashTime
d->m_cursorFla...ursorFlashTimeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
197 return;
never executed: return;
0
198 d->m_cursorFlashTime = cursorFlashTime;-
199 cursorFlashTimeChanged(cursorFlashTime);-
200}
never executed: end of block
0
201int QStyleHints::cursorFlashTime() const-
202{-
203 const QStyleHintsPrivate * const d = d_func();-
204 return
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
d->m_cursorFlashTime >= 0 ?
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
0
205 d->m_cursorFlashTime :
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
0
206 themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
0
207}-
208bool QStyleHints::showIsFullScreen() const-
209{-
210 return
never executed: return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
hint(QPlatformIntegration::ShowIsFullScreen).toBool();
never executed: return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
0
211}-
212bool QStyleHints::showIsMaximized() const-
213{-
214 return
never executed: return hint(QPlatformIntegration::ShowIsMaximized).toBool();
hint(QPlatformIntegration::ShowIsMaximized).toBool();
never executed: return hint(QPlatformIntegration::ShowIsMaximized).toBool();
0
215}-
216-
217-
218-
219-
220-
221-
222int QStyleHints::passwordMaskDelay() const-
223{-
224 return
never executed: return themeableHint(QPlatformTheme::PasswordMaskDelay, QPlatformIntegration::PasswordMaskDelay).toInt();
themeableHint(QPlatformTheme::PasswordMaskDelay, QPlatformIntegration::PasswordMaskDelay).toInt();
never executed: return themeableHint(QPlatformTheme::PasswordMaskDelay, QPlatformIntegration::PasswordMaskDelay).toInt();
0
225}-
226-
227-
228-
229-
230-
231-
232QChar QStyleHints::passwordMaskCharacter() const-
233{-
234 return
never executed: return themeableHint(QPlatformTheme::PasswordMaskCharacter, QPlatformIntegration::PasswordMaskCharacter).toChar();
themeableHint(QPlatformTheme::PasswordMaskCharacter, QPlatformIntegration::PasswordMaskCharacter).toChar();
never executed: return themeableHint(QPlatformTheme::PasswordMaskCharacter, QPlatformIntegration::PasswordMaskCharacter).toChar();
0
235}-
236-
237-
238-
239-
240-
241qreal QStyleHints::fontSmoothingGamma() const-
242{-
243 return
never executed: return hint(QPlatformIntegration::FontSmoothingGamma).toReal();
hint(QPlatformIntegration::FontSmoothingGamma).toReal();
never executed: return hint(QPlatformIntegration::FontSmoothingGamma).toReal();
0
244}-
245-
246-
247-
248-
249-
250-
251bool QStyleHints::useRtlExtensions() const-
252{-
253 return
never executed: return hint(QPlatformIntegration::UseRtlExtensions).toBool();
hint(QPlatformIntegration::UseRtlExtensions).toBool();
never executed: return hint(QPlatformIntegration::UseRtlExtensions).toBool();
0
254}-
255bool QStyleHints::setFocusOnTouchRelease() const-
256{-
257 return
never executed: return hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
never executed: return hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
0
258}-
259Qt::TabFocusBehavior QStyleHints::tabFocusBehavior() const-
260{-
261 const QStyleHintsPrivate * const d = d_func();-
262 return
never executed: return Qt::TabFocusBehavior(d->m_tabFocusBehavior >= 0 ? d->m_tabFocusBehavior : themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
Qt::TabFocusBehavior(d->m_tabFocusBehavior >= 0 ?
never executed: return Qt::TabFocusBehavior(d->m_tabFocusBehavior >= 0 ? d->m_tabFocusBehavior : themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
0
263 d->m_tabFocusBehavior :
never executed: return Qt::TabFocusBehavior(d->m_tabFocusBehavior >= 0 ? d->m_tabFocusBehavior : themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
0
264 themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
never executed: return Qt::TabFocusBehavior(d->m_tabFocusBehavior >= 0 ? d->m_tabFocusBehavior : themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
0
265}-
266-
267-
268-
269-
270-
271-
272-
273void QStyleHints::setTabFocusBehavior(Qt::TabFocusBehavior tabFocusBehavior)-
274{-
275 QStyleHintsPrivate * const d = d_func();-
276 if (d->m_tabFocusBehavior == tabFocusBehavior
d->m_tabFocusB...bFocusBehaviorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
277 return;
never executed: return;
0
278 d->m_tabFocusBehavior = tabFocusBehavior;-
279 tabFocusBehaviorChanged(tabFocusBehavior);-
280}
never executed: end of block
0
281bool QStyleHints::singleClickActivation() const-
282{-
283 return
never executed: return themeableHint(QPlatformTheme::ItemViewActivateItemOnSingleClick, QPlatformIntegration::ItemViewActivateItemOnSingleClick).toBool();
themeableHint(QPlatformTheme::ItemViewActivateItemOnSingleClick, QPlatformIntegration::ItemViewActivateItemOnSingleClick).toBool();
never executed: return themeableHint(QPlatformTheme::ItemViewActivateItemOnSingleClick, QPlatformIntegration::ItemViewActivateItemOnSingleClick).toBool();
0
284}-
285-
286-
Switch to Source codePreprocessed file

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