| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | static QFactoryLoader *loader() { static QGlobalStatic<QFactoryLoader > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QFactoryLoader *x = new QFactoryLoader ("org.qt-project.Qt.QGenericPluginFactoryInterface", QLatin1String("/generic"), Qt::CaseInsensitive); if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QFactoryLoader > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); } never executed: delete x; executed: return thisGlobalStatic.pointer.load();Execution Count:290 evaluated: !thisGlobalStatic.pointer.load()| yes Evaluation Count:187 | yes Evaluation Count:103 |
partially evaluated: !thisGlobalStatic.destroyed| yes Evaluation Count:187 | no Evaluation Count:0 |
partially evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)| no Evaluation Count:0 | yes Evaluation Count:187 |
| 0-290 |
| 9 | QObject *QGenericPluginFactory::create(const QString& key, const QString &specification) | - |
| 10 | { | - |
| 11 | const QString driver = key.toLower(); | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | if (QObject *object = qLoadPlugin1<QObject, QGenericPlugin>(loader(), driver, specification)) evaluated: QObject *object = qLoadPlugin1<QObject, QGenericPlugin>(loader(), driver, specification)| yes Evaluation Count:1 | yes Evaluation Count:289 |
| 1-289 |
| 16 | return object; executed: return object;Execution Count:1 | 1 |
| 17 | | - |
| 18 | | - |
| 19 | return 0; executed: return 0;Execution Count:289 | 289 |
| 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; ++it) never evaluated: it != cend | 0 |
| 39 | if (!list.contains(it.value())) never evaluated: !list.contains(it.value()) | 0 |
| 40 | list += it.value(); never executed: list += it.value(); | 0 |
| 41 | | - |
| 42 | | - |
| 43 | return list; never executed: return list; | 0 |
| 44 | } | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| | |