qplatformintegrationfactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformintegrationfactory.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5namespace { 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.QPlatformIntegrationFactoryInterface.5.3", QLatin1String("/platforms"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", QLatin1String("/platforms"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;-
6-
7-
8-
9namespace { 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.QPlatformIntegrationFactoryInterface.5.3", QLatin1String(""), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", 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 QPlatformIntegration *loadIntegration(QFactoryLoader *loader, const QString &key, const QStringList &parameters, int &argc, char ** argv)
{
const int index = loader->indexOf(key);
if (index != -1) {
if (QPlatformIntegrationPlugin *factory = qobject_cast<QPlatformIntegrationPlugin *>(loader->instance(index)))
if (QPlatformIntegration *result = factory->create(key, parameters, argc, argv))
return result;
}
return 0;
10-
11-
12-
}QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList &paramList, int &argc, char **argv, const QString &platformPluginPath)
14{-
15-
16-
17 if (!platformPluginPath.isEmpty()
!platformPluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
18 QCoreApplication::addLibraryPath(platformPluginPath);-
19 if (QPlatformIntegration *ret = loadIntegration(qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(directLoader(), platform, paramList, argc, argv)
QPlatformInteg...t, argc, argv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
20 return
never executed: return ret;
ret;
never executed: return ret;
0
21 }
never executed: end of block
0
22-
23-
24-
25 if (return
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
qLoadPlugin<QPlatformIntegration*ret = loadIntegration(, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv))
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
0
return ret;
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
return 0;
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
);
never executed: return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList, argc, argv);
26}-
27QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath)-
28{-
29 QStringList list;-
30-
31 if (!platformPluginPath.isEmpty()
!platformPluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
32 QCoreApplication::addLibraryPath(platformPluginPath);-
33 list = directLoader()->keyMap().values();-
34 if (!list.isEmpty()
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
35 const QString postFix = ([]() -> QString { enum { Size= sizeofQLatin1String(u"" " (from ")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData)-
36 }, u"" " (from " }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())+ QDir::toNativeSeparators(platformPluginPath)-
37 + QLatin1Char(')');-
38 const QStringList::iterator end = list.end();-
39 for (QStringList::iterator it = list.begin(); it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
40 (*
never executed: (*it).append(postFix);
it).append(postFix);
never executed: (*it).append(postFix);
0
41 }
never executed: end of block
0
42 }
never executed: end of block
0
43-
44-
45-
46 list.append(loader()->keyMap().values());-
47 return
never executed: return list;
list;
never executed: return list;
0
48}-
49-
50-
Switch to Source codePreprocessed file

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