qplatformintegration.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformintegration.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7QPlatformFontDatabase *QPlatformIntegration::fontDatabase() const-
8{-
9 static QPlatformFontDatabase *db = 0;-
10 if (!db
!dbDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
11 db = new QPlatformFontDatabase;-
12 }
never executed: end of block
0
13 return
never executed: return db;
db;
never executed: return db;
0
14}-
15QPlatformClipboard *QPlatformIntegration::clipboard() const-
16{-
17 static QPlatformClipboard *clipboard = 0;-
18 if (!clipboard
!clipboardDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
19 clipboard = new QPlatformClipboard;-
20 }
never executed: end of block
0
21 return
never executed: return clipboard;
clipboard;
never executed: return clipboard;
0
22}-
23QPlatformDrag *QPlatformIntegration::drag() const-
24{-
25 static QSimpleDrag *drag = 0;-
26 if (!drag
!dragDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
27 drag = new QSimpleDrag;-
28 }
never executed: end of block
0
29 return
never executed: return drag;
drag;
never executed: return drag;
0
30}-
31-
32-
33QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const-
34{-
35 return
never executed: return 0;
0;
never executed: return 0;
0
36}-
37-
38QPlatformServices *QPlatformIntegration::services() const-
39{-
40 return
never executed: return 0;
0;
never executed: return 0;
0
41}-
42bool QPlatformIntegration::hasCapability(Capability cap) const-
43{-
44 return
never executed: return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement;
cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement;
never executed: return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement;
0
45}-
46-
47QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const-
48{-
49 return
never executed: return new QRasterPlatformPixmap(type);
new QRasterPlatformPixmap(type);
never executed: return new QRasterPlatformPixmap(type);
0
50}-
51QPlatformOpenGLContext *QPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const-
52{-
53 (void)context;;-
54 QMessageLogger(__FILE__, 294, __PRETTY_FUNCTION__).warning("This plugin does not support createPlatformOpenGLContext!");-
55 return
never executed: return 0;
0;
never executed: return 0;
0
56}-
57-
58-
59-
60-
61-
62-
63QPlatformSharedGraphicsCache *QPlatformIntegration::createPlatformSharedGraphicsCache(const char *cacheId) const-
64{-
65 QMessageLogger(__FILE__, 305, __PRETTY_FUNCTION__).warning("This plugin does not support createPlatformSharedGraphicsBuffer for cacheId: %s!",-
66 cacheId);-
67 return
never executed: return 0;
0;
never executed: return 0;
0
68}-
69-
70-
71-
72-
73-
74QPaintEngine *QPlatformIntegration::createImagePaintEngine(QPaintDevice *paintDevice) const-
75{-
76 (void)paintDevice;-
77 return
never executed: return 0;
0;
never executed: return 0;
0
78}-
79void QPlatformIntegration::initialize()-
80{-
81}-
82-
83-
84-
85-
86-
87-
88-
89void QPlatformIntegration::destroy()-
90{-
91}-
92-
93-
94-
95-
96-
97-
98QPlatformInputContext *QPlatformIntegration::inputContext() const-
99{-
100 return
never executed: return 0;
0;
never executed: return 0;
0
101}-
102QPlatformAccessibility *QPlatformIntegration::accessibility() const-
103{-
104 return
never executed: return 0;
0;
never executed: return 0;
0
105}-
106-
107-
108-
109QVariant QPlatformIntegration::styleHint(StyleHint hint) const-
110{-
111 switch (hint) {-
112 case
never executed: case CursorFlashTime:
CursorFlashTime:
never executed: case CursorFlashTime:
0
113 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
0
114 case
never executed: case KeyboardInputInterval:
KeyboardInputInterval:
never executed: case KeyboardInputInterval:
0
115 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
0
116 case
never executed: case KeyboardAutoRepeatRate:
KeyboardAutoRepeatRate:
never executed: case KeyboardAutoRepeatRate:
0
117 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
0
118 case
never executed: case MouseDoubleClickInterval:
MouseDoubleClickInterval:
never executed: case MouseDoubleClickInterval:
0
119 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
0
120 case
never executed: case StartDragDistance:
StartDragDistance:
never executed: case StartDragDistance:
0
121 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
0
122 case
never executed: case StartDragTime:
StartDragTime:
never executed: case StartDragTime:
0
123 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
0
124 case
never executed: case ShowIsFullScreen:
ShowIsFullScreen:
never executed: case ShowIsFullScreen:
0
125 return
never executed: return false;
false;
never executed: return false;
0
126 case
never executed: case ShowIsMaximized:
ShowIsMaximized:
never executed: case ShowIsMaximized:
0
127 return
never executed: return false;
false;
never executed: return false;
0
128 case
never executed: case PasswordMaskDelay:
PasswordMaskDelay:
never executed: case PasswordMaskDelay:
0
129 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
0
130 case
never executed: case PasswordMaskCharacter:
PasswordMaskCharacter:
never executed: case PasswordMaskCharacter:
0
131 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
0
132 case
never executed: case FontSmoothingGamma:
FontSmoothingGamma:
never executed: case FontSmoothingGamma:
0
133 return
never executed: return qreal(1.7);
qreal(1.7);
never executed: return qreal(1.7);
0
134 case
never executed: case StartDragVelocity:
StartDragVelocity:
never executed: case StartDragVelocity:
0
135 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
0
136 case
never executed: case UseRtlExtensions:
UseRtlExtensions:
never executed: case UseRtlExtensions:
0
137 return
never executed: return QVariant(false);
QVariant(false);
never executed: return QVariant(false);
0
138 case
never executed: case SetFocusOnTouchRelease:
SetFocusOnTouchRelease:
never executed: case SetFocusOnTouchRelease:
0
139 return
never executed: return QVariant(false);
QVariant(false);
never executed: return QVariant(false);
0
140 case
never executed: case MousePressAndHoldInterval:
MousePressAndHoldInterval:
never executed: case MousePressAndHoldInterval:
0
141 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
0
142 case
never executed: case TabFocusBehavior:
TabFocusBehavior:
never executed: case TabFocusBehavior:
0
143 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
0
144 case
never executed: case ReplayMousePressOutsidePopup:
ReplayMousePressOutsidePopup:
never executed: case ReplayMousePressOutsidePopup:
0
145 return
never executed: return true;
true;
never executed: return true;
0
146 case
never executed: case ItemViewActivateItemOnSingleClick:
ItemViewActivateItemOnSingleClick:
never executed: case ItemViewActivateItemOnSingleClick:
0
147 return
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
never executed: return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
0
148 }-
149-
150 return
never executed: return 0;
0;
never executed: return 0;
0
151}-
152-
153Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags) const-
154{-
155-
156 if (flags & Qt::Popup & ~Qt::Window
flags & Qt::Po... & ~Qt::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
157 return
never executed: return Qt::WindowNoState;
Qt::WindowNoState;
never executed: return Qt::WindowNoState;
0
158-
159 if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool()
styleHint(QPla...reen).toBool()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
160 return
never executed: return Qt::WindowFullScreen;
Qt::WindowFullScreen;
never executed: return Qt::WindowFullScreen;
0
161 else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool()
styleHint(QPla...ized).toBool()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
162 return
never executed: return Qt::WindowMaximized;
Qt::WindowMaximized;
never executed: return Qt::WindowMaximized;
0
163-
164 return
never executed: return Qt::WindowNoState;
Qt::WindowNoState;
never executed: return Qt::WindowNoState;
0
165}-
166-
167Qt::KeyboardModifiers QPlatformIntegration::queryKeyboardModifiers() const-
168{-
169 return
never executed: return QGuiApplication::keyboardModifiers();
QGuiApplication::keyboardModifiers();
never executed: return QGuiApplication::keyboardModifiers();
0
170}-
171QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const-
172{-
173 return
never executed: return QList<int>();
QList<int>();
never executed: return QList<int>();
0
174}-
175void QPlatformIntegration::screenAdded(QPlatformScreen *ps, bool isPrimary)-
176{-
177 QScreen *screen = new QScreen(ps);-
178-
179 if (isPrimary
isPrimaryDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
180 QGuiApplicationPrivate::screen_list.prepend(screen);-
181 }
never executed: end of block
else {
0
182 QGuiApplicationPrivate::screen_list.append(screen);-
183 }
never executed: end of block
0
184 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->screenAdded(screen);-
185-
186 if (isPrimary
isPrimaryDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
187 (static_cast<
never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(screen);
QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(screen);
never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(screen);
0
188}
never executed: end of block
0
189-
190-
191-
192-
193-
194-
195-
196void QPlatformIntegration::removeScreen(QScreen *screen)-
197{-
198 const bool wasPrimary = (!QGuiApplicationPrivate::screen_list.isEmpty()
!QGuiApplicati...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& QGuiApplicationPrivate::screen_list.at(0) == screen
QGuiApplicatio...t(0) == screenDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
199 QGuiApplicationPrivate::screen_list.removeOne(screen);-
200-
201 if (wasPrimary
wasPrimaryDescription
TRUEnever evaluated
FALSEnever evaluated
&& (static_cast<
(static_cast<Q...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))
(static_cast<Q...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
&& !QGuiApplicationPrivate::screen_list.isEmpty()
!QGuiApplicati...list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
202 (static_cast<
never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0));
QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0));
never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0));
0
203}
never executed: end of block
0
204void QPlatformIntegration::destroyScreen(QPlatformScreen *screen)-
205{-
206 QScreen *qScreen = screen->screen();-
207 removeScreen(qScreen);-
208 delete qScreen;-
209 delete screen;-
210}
never executed: end of block
0
211void QPlatformIntegration::setPrimaryScreen(QPlatformScreen *newPrimary)-
212{-
213 QScreen* newPrimaryScreen = newPrimary->screen();-
214 int idx = QGuiApplicationPrivate::screen_list.indexOf(newPrimaryScreen);-
215 ((!(idx >= 0)) ? qt_assert("idx >= 0",__FILE__,511) : qt_noop());-
216 if (idx == 0
idx == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
217 return;
never executed: return;
0
218-
219 QGuiApplicationPrivate::screen_list.swap(0, idx);-
220 (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(newPrimaryScreen);-
221}
never executed: end of block
0
222-
223QStringList QPlatformIntegration::themeNames() const-
224{-
225 return
never executed: return QStringList();
QStringList();
never executed: return QStringList();
0
226}-
227-
228class QPlatformTheme *QPlatformIntegration::createPlatformTheme(const QString &name) const-
229{-
230 (void)name;-
231 return
never executed: return new QPlatformTheme;
new QPlatformTheme;
never executed: return new QPlatformTheme;
0
232}-
233-
234-
235-
236-
237-
238-
239QPlatformOffscreenSurface *QPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const-
240{-
241 (void)surface;-
242 return
never executed: return 0;
0;
never executed: return 0;
0
243}-
244QPlatformSessionManager *QPlatformIntegration::createPlatformSessionManager(const QString &id, const QString &key) const-
245{-
246 return
never executed: return new QPlatformSessionManager(id, key);
new QPlatformSessionManager(id, key);
never executed: return new QPlatformSessionManager(id, key);
0
247}-
248void QPlatformIntegration::sync()-
249{-
250}-
251void QPlatformIntegration::beep() const-
252{-
253}-
254QOpenGLContext::OpenGLModuleType QPlatformIntegration::openGLModuleType()-
255{-
256 QMessageLogger(__FILE__, 599, __PRETTY_FUNCTION__).warning("This plugin does not support dynamic OpenGL loading!");-
257 return
never executed: return QOpenGLContext::LibGL;
QOpenGLContext::LibGL;
never executed: return QOpenGLContext::LibGL;
0
258}-
259void QPlatformIntegration::setApplicationIcon(const QIcon &icon) const-
260{-
261 (void)icon;;-
262}
never executed: end of block
0
263-
264-
Switch to Source codePreprocessed file

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