| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qgenericpluginfactory.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | - | |||||||
| 8 | 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.QGenericPluginFactoryInterface", QLatin1String("/generic"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QGenericPluginFactoryInterface", QLatin1String("/generic"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of blocknever executed: &holder.value;return &holder.value;never executed: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;return &holder.value; | 0 | ||||||
| 9 | QObject *QGenericPluginFactory::create(const QString& key, const QString &specification) | - | ||||||
| 10 | { | - | ||||||
| 11 | - | |||||||
| 12 | const QString driver = key.toLower(); | - | ||||||
| 13 | if (QObject *object = qLoadPlugin1<QObject, QGenericPlugin>(loader(), driver, specification)
| 0 | ||||||
| 14 | return never executed: object;return object;never executed: return object; | 0 | ||||||
| 15 | - | |||||||
| 16 | - | |||||||
| 17 | - | |||||||
| 18 | - | |||||||
| 19 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 20 | } | - | ||||||
| 21 | - | |||||||
| 22 | - | |||||||
| 23 | - | |||||||
| 24 | - | |||||||
| 25 | - | |||||||
| 26 | - | |||||||
| 27 | QStringList QGenericPluginFactory::keys() | - | ||||||
| 28 | { | - | ||||||
| 29 | QStringList list; | - | ||||||
| 30 | - | |||||||
| 31 | - | |||||||
| 32 | - | |||||||
| 33 | typedef QMultiMap<int, QString> PluginKeyMap; | - | ||||||
| 34 | typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator; | - | ||||||
| 35 | - | |||||||
| 36 | const PluginKeyMap keyMap = loader()->keyMap(); | - | ||||||
| 37 | const PluginKeyMapConstIterator cend = keyMap.constEnd(); | - | ||||||
| 38 | for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend
| 0 | ||||||
| 39 | if (!list.contains(it.value())
| 0 | ||||||
| 40 | list += it.value(); never executed: list += it.value(); | 0 | ||||||
| 41 | - | |||||||
| 42 | - | |||||||
| 43 | return never executed: list;return list;never executed: return list; | 0 | ||||||
| 44 | } | - | ||||||
| 45 | - | |||||||
| 46 | - | |||||||
| Switch to Source code | Preprocessed file |