qxcbglintegrationfactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6namespace { namespace Q_QGS_loader { typedef QFactoryLoader Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;-
7-
8-
9-
10namespace { namespace Q_QGS_directLoader { typedef QFactoryLoader Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String(""), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String(""), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_directLoader::innerFunction, Q_QGS_directLoader::guard> directLoader;-
static inline QXcbGlIntegration *loadIntegration(QFactoryLoader *loader, const QString &key)
{
const int index = loader->indexOf(key);
if (index != -1) {
if (QXcbGlIntegrationPlugin *factory = qobject_cast<QXcbGlIntegrationPlugin *>(loader->instance(index)))
if (QXcbGlIntegration *result = factory->create())
return result;
}
return nullptr;
11-
12-
13-
}QStringList QXcbGlIntegrationFactory::keys(const QString &pluginPath)
15{-
16 QStringList list;-
17-
18 if (!pluginPath.isEmpty()
!pluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
19 QCoreApplication::addLibraryPath(pluginPath);-
20 list = directLoader()->keyMap().values();-
21 if (!list.isEmpty()
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
22 const QString postFix = ([]() -> QString { enum { Size = sizeof(u"" " (from ")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" " (from " }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())-
23 + QDir::toNativeSeparators(pluginPath)-
24 + QLatin1Char(')');-
25 const QStringList::iterator end = list.end();-
26 for (QStringList::iterator it = list.begin(); it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
27 (*
never executed: (*it).append(postFix);
it).append(postFix);
never executed: (*it).append(postFix);
0
28 }
never executed: end of block
0
29 }
never executed: end of block
0
30-
31-
32-
33 list.append(loader()->keyMap().values());-
34 return
never executed: return list;
list;
never executed: return list;
0
35}-
36-
37QXcbGlIntegration *QXcbGlIntegrationFactory::create(const QString &platform, const QString &pluginPath)-
38{-
39-
40-
41 if (!pluginPath.isEmpty()
!pluginPath.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-135
42 QCoreApplication::addLibraryPath(pluginPath);-
43 if (QXcbGlIntegration *ret = loadIntegration(qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(directLoader(), platform)
QXcbGlIntegrat...r(), platform)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
44 return
never executed: return ret;
ret;
never executed: return ret;
0
45 }
never executed: end of block
0
46-
47-
48-
49 if (return
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
qLoadPlugin<QXcbGlIntegration*ret = loadIntegration(, QXcbGlIntegrationPlugin>(loader(), platform))
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
return ret;
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
return nullptr;
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
);
executed 135 times by 5 tests: return qLoadPlugin<QXcbGlIntegration, QXcbGlIntegrationPlugin>(loader(), platform);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
50}-
51-
52-
Switch to Source codePreprocessed file

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