| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | #include "qgenericpluginfactory.h" | - |
| 35 | | - |
| 36 | #include "qguiapplication.h" | - |
| 37 | #include "private/qfactoryloader_p.h" | - |
| 38 | #include "qgenericplugin.h" | - |
| 39 | #include "qdebug.h" | - |
| 40 | | - |
| 41 | QT_BEGIN_NAMESPACE | - |
| 42 | | - |
| 43 | #if !defined(Q_OS_WIN32) || defined(QT_SHARED) | - |
| 44 | #ifndef QT_NO_LIBRARY | - |
| 45 | | - |
| 46 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, never executed: end of block never executed: guard.store(QtGlobalStatic::Destroyed); never executed: return &holder.value; | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 47 | (QGenericPluginFactoryInterface_iid, | - |
| 48 | QLatin1String("/generic"), Qt::CaseInsensitive)) | - |
| 49 | | - |
| 50 | #endif //QT_NO_LIBRARY | - |
| 51 | #endif //QT_SHARED | - |
| 52 | | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | | - |
| 60 | | - |
| 61 | | - |
| 62 | | - |
| 63 | | - |
| 64 | | - |
| 65 | | - |
| 66 | | - |
| 67 | | - |
| 68 | | - |
| 69 | | - |
| 70 | QObject *QGenericPluginFactory::create(const QString& key, const QString &specification) | - |
| 71 | { | - |
| 72 | #if (!defined(Q_OS_WIN32) || defined(QT_SHARED)) && !defined(QT_NO_LIBRARY) | - |
| 73 | const QString driver = key.toLower(); | - |
| 74 | if (QObject *object = qLoadPlugin1<QObject, QGenericPlugin>(loader(), driver, specification))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 75 | return object; never executed: return object; | 0 |
| 76 | #else // (!Q_OS_WIN32 || QT_SHARED) && !QT_NO_LIBRARY | - |
| 77 | Q_UNUSED(key) | - |
| 78 | Q_UNUSED(specification) | - |
| 79 | #endif | - |
| 80 | return 0; never executed: return 0; | 0 |
| 81 | } | - |
| 82 | | - |
| 83 | | - |
| 84 | | - |
| 85 | | - |
| 86 | | - |
| 87 | | - |
| 88 | QStringList QGenericPluginFactory::keys() | - |
| 89 | { | - |
| 90 | QStringList list; | - |
| 91 | | - |
| 92 | #if !defined(Q_OS_WIN32) || defined(QT_SHARED) | - |
| 93 | #ifndef QT_NO_LIBRARY | - |
| 94 | typedef QMultiMap<int, QString> PluginKeyMap; | - |
| 95 | typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator; | - |
| 96 | | - |
| 97 | const PluginKeyMap keyMap = loader()->keyMap(); | - |
| 98 | const PluginKeyMapConstIterator cend = keyMap.constEnd(); | - |
| 99 | for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 100 | if (!list.contains(it.value()))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 101 | list += it.value(); never executed: list += it.value(); | 0 |
| 102 | #endif //QT_NO_LIBRARY | - |
| 103 | #endif | - |
| 104 | return list; never executed: return list; | 0 |
| 105 | } | - |
| 106 | | - |
| 107 | QT_END_NAMESPACE | - |
| | |