Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformintegrationfactory.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | namespace { 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
never executed: }guard.store(QtGlobalStatic::Destroyed); never executed: }; 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; returnend of block never executed: &holder.value;return &holder.value; never executed: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;return &holder.value; | 0 | ||||||
7 | - | |||||||
8 | namespace { 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
never executed: }guard.store(QtGlobalStatic::Destroyed); never executed: }; 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; returnend of block never executed: &holder.value;return &holder.value; never executed: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_directLoader::innerFunction, Q_QGS_directLoader::guard> directLoader;return &holder.value; | 0 | ||||||
9 | - | |||||||
10 | - | |||||||
11 | static inline QPlatformIntegration *loadIntegration(QFactoryLoader *loader, const QString &key, const QStringList ¶meters, int &argc, char ** argv) | - | ||||||
12 | { | - | ||||||
13 | const int index = loader->indexOf(key); | - | ||||||
14 | if (index != -1
| 0 | ||||||
15 | if (QPlatformIntegrationPlugin *factory = qobject_cast<QPlatformIntegrationPlugin *>(loader->instance(index))
| 0 | ||||||
16 | if (QPlatformIntegration *result = factory->create(key, parameters, argc, argv)
| 0 | ||||||
17 | return never executed: result;return result; never executed: return result; | 0 | ||||||
18 | } never executed: end of block | 0 | ||||||
19 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
20 | } | - | ||||||
21 | - | |||||||
22 | - | |||||||
23 | - | |||||||
24 | QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList ¶mList, int &argc, char **argv, const QString &platformPluginPath) | - | ||||||
25 | { | - | ||||||
26 | - | |||||||
27 | - | |||||||
28 | if (!platformPluginPath.isEmpty()
| 0 | ||||||
29 | QCoreApplication::addLibraryPath(platformPluginPath); | - | ||||||
30 | if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv)
| 0 | ||||||
31 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||
32 | } never executed: end of block | 0 | ||||||
33 | if (QPlatformIntegration *ret = loadIntegration(loader(), platform, paramList, argc, argv)
| 0 | ||||||
34 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||
35 | - | |||||||
36 | - | |||||||
37 | - | |||||||
38 | - | |||||||
39 | - | |||||||
40 | - | |||||||
41 | - | |||||||
42 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
43 | } | - | ||||||
44 | QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath) | - | ||||||
45 | { | - | ||||||
46 | - | |||||||
47 | QStringList list; | - | ||||||
48 | if (!platformPluginPath.isEmpty()
| 0 | ||||||
49 | QCoreApplication::addLibraryPath(platformPluginPath); | - | ||||||
50 | list = directLoader()->keyMap().values(); | - | ||||||
51 | if (!list.isEmpty()
| 0 | ||||||
52 | 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 never executed: qstring_literal_temp;return qstring_literal_temp; never executed: }())return qstring_literal_temp; | 0 | ||||||
53 | + QDir::toNativeSeparators(platformPluginPath) | - | ||||||
54 | + QLatin1Char(')'); | - | ||||||
55 | const QStringList::iterator end = list.end(); | - | ||||||
56 | for (QStringList::iterator it = list.begin(); it != end
| 0 | ||||||
57 | (* never executed: it).append(postFix);(*it).append(postFix); never executed: (*it).append(postFix); | 0 | ||||||
58 | } never executed: end of block | 0 | ||||||
59 | } never executed: end of block | 0 | ||||||
60 | list.append(loader()->keyMap().values()); | - | ||||||
61 | return never executed: list;return list; never executed: return list; | 0 | ||||||
62 | - | |||||||
63 | - | |||||||
64 | - | |||||||
65 | - | |||||||
66 | } | - | ||||||
67 | - | |||||||
68 | - | |||||||
Switch to Source code | Preprocessed file |