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-
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.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 ("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
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;
0
7-
8namespace { 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.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 ("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
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QFactoryLoader, Q_QGS_directLoader::innerFunction, Q_QGS_directLoader::guard> directLoader;
0
9-
10-
11static inline QPlatformIntegration *loadIntegration(QFactoryLoader *loader, const QString &key, const QStringList &parameters, int &argc, char ** argv)-
12{-
13 const int index = loader->indexOf(key);-
14 if (index != -1
index != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
15 if (QPlatformIntegrationPlugin *factory = qobject_cast<QPlatformIntegrationPlugin *>(loader->instance(index))
QPlatformInteg...stance(index))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
16 if (QPlatformIntegration *result = factory->create(key, parameters, argc, argv)
QPlatformInteg...s, argc, argv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
17 return
never executed: return result;
result;
never executed: return result;
0
18 }
never executed: end of block
0
19 return
never executed: return 0;
0;
never executed: return 0;
0
20}-
21-
22-
23-
24QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList &paramList, int &argc, char **argv, const QString &platformPluginPath)-
25{-
26-
27-
28 if (!platformPluginPath.isEmpty()
!platformPluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
29 QCoreApplication::addLibraryPath(platformPluginPath);-
30 if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv)
QPlatformInteg...t, argc, argv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
31 return
never executed: return ret;
ret;
never executed: return ret;
0
32 }
never executed: end of block
0
33 if (QPlatformIntegration *ret = loadIntegration(loader(), platform, paramList, argc, argv)
QPlatformInteg...t, argc, argv)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
34 return
never executed: return ret;
ret;
never executed: return ret;
0
35-
36-
37-
38-
39-
40-
41-
42 return
never executed: return 0;
0;
never executed: return 0;
0
43}-
44QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath)-
45{-
46-
47 QStringList list;-
48 if (!platformPluginPath.isEmpty()
!platformPluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
49 QCoreApplication::addLibraryPath(platformPluginPath);-
50 list = directLoader()->keyMap().values();-
51 if (!list.isEmpty()
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
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: return qstring_literal_temp;
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
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
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: return list;
list;
never executed: return list;
0
62-
63-
64-
65-
66}-
67-
68-
Switch to Source codePreprocessed file

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