qeglfshooks.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/eglfs/qeglfshooks.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4extern const QLoggingCategory &qLcEglDevDebug();-
5class DeviceIntegration-
6{-
7public:-
8 DeviceIntegration();-
9 ~DeviceIntegration() { delete m_integration; }
never executed: end of block
0
10 QEGLDeviceIntegration *integration() { return
never executed: return m_integration;
m_integration;
never executed: return m_integration;
}
0
11private:-
12 QEGLDeviceIntegration *m_integration;-
13};-
14-
15namespace { namespace Q_QGS_deviceIntegration { typedef DeviceIntegration Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<DeviceIntegration, Q_QGS_deviceIntegration::innerFunction, Q_QGS_deviceIntegration::guard> deviceIntegration;
0
16-
17DeviceIntegration::DeviceIntegration()-
18 : m_integration(nullptr)-
19{-
20 QStringList pluginKeys = QEGLDeviceIntegrationFactory::keys();-
21 if (!pluginKeys.isEmpty()
!pluginKeys.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
22-
23 if (qEnvironmentVariableIsSet("DISPLAY")
qEnvironmentVa...Set("DISPLAY")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
24 const QString x11key = ([]() -> QString { enum { Size = sizeof(u"" "eglfs_x11")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "eglfs_x11" }; 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
25 if (pluginKeys.contains(x11key)
pluginKeys.contains(x11key)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
26 pluginKeys.removeOne(x11key);-
27 pluginKeys.prepend(x11key);-
28 }
never executed: end of block
0
29 }
never executed: end of block
else {
0
30 const QString kmskey = ([]() -> QString { enum { Size = sizeof(u"" "eglfs_kms")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "eglfs_kms" }; 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
31 if (pluginKeys.contains(kmskey)
pluginKeys.contains(kmskey)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
32 pluginKeys.removeOne(kmskey);-
33 pluginKeys.prepend(kmskey);-
34 }
never executed: end of block
0
35 }
never executed: end of block
0
36-
37 QByteArray requested;-
38-
39-
40 if (qEnvironmentVariableIsSet("QT_QPA_EGLFS_INTEGRATION")
qEnvironmentVa..._INTEGRATION")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
41 requested = qgetenv("QT_QPA_EGLFS_INTEGRATION");-
42 }
never executed: end of block
else {
0
43-
44-
45-
46-
47-
48-
49-
50 }
never executed: end of block
0
51-
52-
53-
54-
55 if (requested != ([]() -> QByteArray { enum { Size = sizeof("none") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "none" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }())
requested != (...eturn ba; }())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
56 if (!requested.isEmpty()
!requested.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
57 QString reqStr = QString::fromLocal8Bit(requested);-
58 pluginKeys.removeOne(reqStr);-
59 pluginKeys.prepend(reqStr);-
60 }
never executed: end of block
0
61 for (bool qt_category_enabled = qLcEglDevDebug().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 113, __PRETTY_FUNCTION__, qLcEglDevDebug().categoryName()).debug() << "EGL device integration plugin keys (sorted):" << pluginKeys;
never executed: QMessageLogger(__FILE__, 113, __PRETTY_FUNCTION__, qLcEglDevDebug().categoryName()).debug() << "EGL device integration plugin keys (sorted):" << pluginKeys;
0
62 while (!m_integration
!m_integrationDescription
TRUEnever evaluated
FALSEnever evaluated
&& !pluginKeys.isEmpty()
!pluginKeys.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
63 QString key = pluginKeys.takeFirst();-
64 for (bool qt_category_enabled = qLcEglDevDebug().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 116, __PRETTY_FUNCTION__, qLcEglDevDebug().categoryName()).debug() << "Trying to load device EGL integration" << key;
never executed: QMessageLogger(__FILE__, 116, __PRETTY_FUNCTION__, qLcEglDevDebug().categoryName()).debug() << "Trying to load device EGL integration" << key;
0
65 m_integration = QEGLDeviceIntegrationFactory::create(key);-
66 }
never executed: end of block
0
67 }
never executed: end of block
0
68 }
never executed: end of block
0
69-
70 if (!m_integration
!m_integrationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
71-
72-
73 for (bool qt_category_enabled = qLcEglDevDebug().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 125, __PRETTY_FUNCTION__, qLcEglDevDebug().categoryName()).debug() << "Using base device integration";
never executed: QMessageLogger(__FILE__, 125, __PRETTY_FUNCTION__, qLcEglDevDebug().categoryName()).debug() << "Using base device integration";
0
74 m_integration = new QEGLDeviceIntegration;-
75 }
never executed: end of block
0
76}
never executed: end of block
0
77-
78QEGLDeviceIntegration *qt_egl_device_integration()-
79{-
80 return
never executed: return deviceIntegration()->integration();
deviceIntegration()->integration();
never executed: return deviceIntegration()->integration();
0
81}-
82-
83-
84-
85-
Switch to Source codePreprocessed file

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