| 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 | 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) guard.store(QtGlobalStatic::Destroyed); } }; 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; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader; | - | ||||||
| 6 | QObject *QGenericPluginFactory::create(const QString& key, const QString &specification) | - | ||||||
| 7 | { | - | ||||||
| 8 | const QString driver = key.toLower(); | 0 | ||||||
|     if (QObject *object = qLoadPlugin1return never executed:  return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification);never executed:   qLoadPlugin<QObject, QGenericPlugin>(loader(), driver,key.toLower(), specification))return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification);never executed:  return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification); | ||||||||
|         return object; never executed:  return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification); | ||||||||
|     return 0; never executed:  return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification);never executed:  );return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification);never executed:  return qLoadPlugin<QObject, QGenericPlugin>(loader(), key.toLower(), specification); | ||||||||
| 9 | } | - | ||||||
| 10 | - | |||||||
| 11 | - | |||||||
| 12 | - | |||||||
| 13 | - | |||||||
| 14 | - | |||||||
| 15 | - | |||||||
| 16 | QStringList QGenericPluginFactory::keys() | - | ||||||
| 17 | { | - | ||||||
| 18 | QStringList list; | - | ||||||
| 19 | - | |||||||
| 20 | typedef QMultiMap<int, QString> PluginKeyMap; | - | ||||||
| 21 | typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator; | - | ||||||
| 22 | - | |||||||
| 23 | const PluginKeyMap keyMap = loader()->keyMap(); | - | ||||||
| 24 | const PluginKeyMapConstIterator cend = keyMap.constEnd(); | - | ||||||
| 25 |     for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend
  | 0 | ||||||
| 26 |         if (!list.contains(it.value())
  | 0 | ||||||
| 27 |             list += it.value(); never executed:  list += it.value(); | 0 | ||||||
| 28 |     return never executed:   list;return list;never executed:  return list; | 0 | ||||||
| 29 | } | - | ||||||
| 30 | - | |||||||
| 31 | - | |||||||
| Switch to Source code | Preprocessed file |