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__, 51, __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_startDragDistance(-1)-
31 , m_startDragTime(-1)-
32 , m_keyboardInputInterval(-1)-
33 , m_cursorFlashTime(-1)-
34 {}
never executed: end of block
0
35-
36 int m_mouseDoubleClickInterval;-
37 int m_startDragDistance;-
38 int m_startDragTime;-
39 int m_keyboardInputInterval;-
40 int m_cursorFlashTime;-
41};-
42QStyleHints::QStyleHints()-
43 : QObject(*new QStyleHintsPrivate(), 0)-
44{-
45}
never executed: end of block
0
46-
47-
48-
49-
50-
51-
52-
53void QStyleHints::setMouseDoubleClickInterval(int mouseDoubleClickInterval)-
54{-
55 QStyleHintsPrivate * const d = d_func();-
56 if (d->m_mouseDoubleClickInterval == mouseDoubleClickInterval
d->m_mouseDoub...eClickIntervalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
57 return;
never executed: return;
0
58 d->m_mouseDoubleClickInterval = mouseDoubleClickInterval;-
59 mouseDoubleClickIntervalChanged(mouseDoubleClickInterval);-
60}
never executed: end of block
0
61-
62-
63-
64-
65-
66-
67int QStyleHints::mouseDoubleClickInterval() const-
68{-
69 const QStyleHintsPrivate * const d = d_func();-
70 return
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
d->m_mouseDoubleClickInterval >= 0
d->m_mouseDoub...kInterval >= 0Description
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
0
71 d->m_mouseDoubleClickInterval :
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
0
72 themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
never executed: return d->m_mouseDoubleClickInterval >= 0 ? d->m_mouseDoubleClickInterval : themeableHint(QPlatformTheme::MouseDoubleClickInterval, QPlatformIntegration::MouseDoubleClickInterval).toInt();
0
73}-
74int QStyleHints::mousePressAndHoldInterval() const-
75{-
76 return
never executed: return themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
never executed: return themeableHint(QPlatformTheme::MousePressAndHoldInterval, QPlatformIntegration::MousePressAndHoldInterval).toInt();
0
77}-
78-
79-
80-
81-
82-
83-
84-
85void QStyleHints::setStartDragDistance(int startDragDistance)-
86{-
87 QStyleHintsPrivate * const d = d_func();-
88 if (d->m_startDragDistance == startDragDistance
d->m_startDrag...rtDragDistanceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
89 return;
never executed: return;
0
90 d->m_startDragDistance = startDragDistance;-
91 startDragDistanceChanged(startDragDistance);-
92}
never executed: end of block
0
93int QStyleHints::startDragDistance() const-
94{-
95 const QStyleHintsPrivate * const d = d_func();-
96 return
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
d->m_startDragDistance >= 0
d->m_startDragDistance >= 0Description
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
0
97 d->m_startDragDistance :
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
0
98 themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
never executed: return d->m_startDragDistance >= 0 ? d->m_startDragDistance : themeableHint(QPlatformTheme::StartDragDistance, QPlatformIntegration::StartDragDistance).toInt();
0
99}-
100-
101-
102-
103-
104-
105-
106-
107void QStyleHints::setStartDragTime(int startDragTime)-
108{-
109 QStyleHintsPrivate * const d = d_func();-
110 if (d->m_startDragTime == startDragTime
d->m_startDrag... startDragTimeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
111 return;
never executed: return;
0
112 d->m_startDragTime = startDragTime;-
113 startDragTimeChanged(startDragTime);-
114}
never executed: end of block
0
115int QStyleHints::startDragTime() const-
116{-
117 const QStyleHintsPrivate * const d = d_func();-
118 return
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
d->m_startDragTime >= 0
d->m_startDragTime >= 0Description
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
0
119 d->m_startDragTime :
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
0
120 themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
never executed: return d->m_startDragTime >= 0 ? d->m_startDragTime : themeableHint(QPlatformTheme::StartDragTime, QPlatformIntegration::StartDragTime).toInt();
0
121}-
122int QStyleHints::startDragVelocity() const-
123{-
124 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
125}-
126-
127-
128-
129-
130-
131-
132-
133void QStyleHints::setKeyboardInputInterval(int keyboardInputInterval)-
134{-
135 QStyleHintsPrivate * const d = d_func();-
136 if (d->m_keyboardInputInterval == keyboardInputInterval
d->m_keyboardI...dInputIntervalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
137 return;
never executed: return;
0
138 d->m_keyboardInputInterval = keyboardInputInterval;-
139 keyboardInputIntervalChanged(keyboardInputInterval);-
140}
never executed: end of block
0
141-
142-
143-
144-
145-
146-
147int QStyleHints::keyboardInputInterval() const-
148{-
149 const QStyleHintsPrivate * const d = d_func();-
150 return
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
d->m_keyboardInputInterval >= 0
d->m_keyboardI...tInterval >= 0Description
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
0
151 d->m_keyboardInputInterval :
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
0
152 themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
never executed: return d->m_keyboardInputInterval >= 0 ? d->m_keyboardInputInterval : themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
0
153}-
154-
155-
156-
157-
158-
159-
160int QStyleHints::keyboardAutoRepeatRate() const-
161{-
162 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
163}-
164-
165-
166-
167-
168-
169-
170-
171void QStyleHints::setCursorFlashTime(int cursorFlashTime)-
172{-
173 QStyleHintsPrivate * const d = d_func();-
174 if (d->m_cursorFlashTime == cursorFlashTime
d->m_cursorFla...ursorFlashTimeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
175 return;
never executed: return;
0
176 d->m_cursorFlashTime = cursorFlashTime;-
177 cursorFlashTimeChanged(cursorFlashTime);-
178}
never executed: end of block
0
179int QStyleHints::cursorFlashTime() const-
180{-
181 const QStyleHintsPrivate * const d = d_func();-
182 return
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
d->m_cursorFlashTime >= 0
d->m_cursorFlashTime >= 0Description
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
0
183 d->m_cursorFlashTime :
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
0
184 themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
never executed: return d->m_cursorFlashTime >= 0 ? d->m_cursorFlashTime : themeableHint(QPlatformTheme::CursorFlashTime, QPlatformIntegration::CursorFlashTime).toInt();
0
185}-
186bool QStyleHints::showIsFullScreen() const-
187{-
188 return
never executed: return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
hint(QPlatformIntegration::ShowIsFullScreen).toBool();
never executed: return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
0
189}-
190bool QStyleHints::showIsMaximized() const-
191{-
192 return
never executed: return hint(QPlatformIntegration::ShowIsMaximized).toBool();
hint(QPlatformIntegration::ShowIsMaximized).toBool();
never executed: return hint(QPlatformIntegration::ShowIsMaximized).toBool();
0
193}-
194-
195-
196-
197-
198-
199-
200int QStyleHints::passwordMaskDelay() const-
201{-
202 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
203}-
204-
205-
206-
207-
208-
209-
210QChar QStyleHints::passwordMaskCharacter() const-
211{-
212 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
213}-
214-
215-
216-
217-
218-
219qreal QStyleHints::fontSmoothingGamma() const-
220{-
221 return
never executed: return hint(QPlatformIntegration::FontSmoothingGamma).toReal();
hint(QPlatformIntegration::FontSmoothingGamma).toReal();
never executed: return hint(QPlatformIntegration::FontSmoothingGamma).toReal();
0
222}-
223-
224-
225-
226-
227-
228-
229bool QStyleHints::useRtlExtensions() const-
230{-
231 return
never executed: return hint(QPlatformIntegration::UseRtlExtensions).toBool();
hint(QPlatformIntegration::UseRtlExtensions).toBool();
never executed: return hint(QPlatformIntegration::UseRtlExtensions).toBool();
0
232}-
233bool QStyleHints::setFocusOnTouchRelease() const-
234{-
235 return
never executed: return hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
never executed: return hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
0
236}-
237Qt::TabFocusBehavior QStyleHints::tabFocusBehavior() const-
238{-
239 return
never executed: return Qt::TabFocusBehavior(themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
Qt::TabFocusBehavior(themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
never executed: return Qt::TabFocusBehavior(themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
0
240}-
241bool QStyleHints::singleClickActivation() const-
242{-
243 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
244}-
245-
246-
Switch to Source codePreprocessed file

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