| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | 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
executed 241 times by 219 tests: }guard.store(QtGlobalStatic::Destroyed);Executed by:
executed 241 times by 219 tests: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of blockExecuted by:
executed 129 times by 5 tests: &holder.value;return &holder.value;Executed by:
executed 129 times by 5 tests: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;return &holder.value;Executed by:
| 0-241 | ||||||
| 8 | - | |||||||
| 9 | namespace { 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
never executed: }guard.store(QtGlobalStatic::Destroyed);never executed: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String(""), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", QLatin1String(""), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of blocknever executed: &holder.value;return &holder.value;never executed: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_directLoader::innerFunction, Q_QGS_directLoader::guard> directLoader;return &holder.value; | 0 | ||||||
| 10 | - | |||||||
| 11 | - | |||||||
| 12 | static inline QXcbGlIntegration *loadIntegration(QFactoryLoader *loader, const QString &key) | - | ||||||
| 13 | { | - | ||||||
| 14 | const int index = loader->indexOf(key); | - | ||||||
| 15 | if (index != -1
| 0-129 | ||||||
| 16 | if (QXcbGlIntegrationPlugin *factory = qobject_cast<QXcbGlIntegrationPlugin *>(loader->instance(index))
| 0-129 | ||||||
| 17 | if (QXcbGlIntegration *result = factory->create()
| 0-129 | ||||||
| 18 | return executed 129 times by 5 tests: result;return result;Executed by:
executed 129 times by 5 tests: return result;Executed by:
| 129 | ||||||
| 19 | } never executed: end of block | 0 | ||||||
| 20 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||
| 21 | } | - | ||||||
| 22 | - | |||||||
| 23 | - | |||||||
| 24 | QStringList QXcbGlIntegrationFactory::keys(const QString &pluginPath) | - | ||||||
| 25 | { | - | ||||||
| 26 | - | |||||||
| 27 | QStringList list; | - | ||||||
| 28 | if (!pluginPath.isEmpty()
| 0 | ||||||
| 29 | QCoreApplication::addLibraryPath(pluginPath); | - | ||||||
| 30 | list = directLoader()->keyMap().values(); | - | ||||||
| 31 | if (!list.isEmpty()
| 0 | ||||||
| 32 | 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: qstring_literal_temp;return qstring_literal_temp;never executed: }())return qstring_literal_temp; | 0 | ||||||
| 33 | + QDir::toNativeSeparators(pluginPath) | - | ||||||
| 34 | + QLatin1Char(')'); | - | ||||||
| 35 | const QStringList::iterator end = list.end(); | - | ||||||
| 36 | for (QStringList::iterator it = list.begin(); it != end
| 0 | ||||||
| 37 | (* never executed: it).append(postFix);(*it).append(postFix);never executed: (*it).append(postFix); | 0 | ||||||
| 38 | } never executed: end of block | 0 | ||||||
| 39 | } never executed: end of block | 0 | ||||||
| 40 | list.append(loader()->keyMap().values()); | - | ||||||
| 41 | return never executed: list;return list;never executed: return list; | 0 | ||||||
| 42 | - | |||||||
| 43 | - | |||||||
| 44 | - | |||||||
| 45 | - | |||||||
| 46 | } | - | ||||||
| 47 | - | |||||||
| 48 | QXcbGlIntegration *QXcbGlIntegrationFactory::create(const QString &platform, const QString &pluginPath) | - | ||||||
| 49 | { | - | ||||||
| 50 | - | |||||||
| 51 | - | |||||||
| 52 | if (!pluginPath.isEmpty()
| 0-129 | ||||||
| 53 | QCoreApplication::addLibraryPath(pluginPath); | - | ||||||
| 54 | if (QXcbGlIntegration *ret = loadIntegration(directLoader(), platform)
| 0 | ||||||
| 55 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||
| 56 | } never executed: end of block | 0 | ||||||
| 57 | if (QXcbGlIntegration *ret = loadIntegration(loader(), platform)
| 0-129 | ||||||
| 58 | return executed 129 times by 5 tests: ret;return ret;Executed by:
executed 129 times by 5 tests: return ret;Executed by:
| 129 | ||||||
| 59 | - | |||||||
| 60 | - | |||||||
| 61 | - | |||||||
| 62 | - | |||||||
| 63 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||
| 64 | } | - | ||||||
| 65 | - | |||||||
| 66 | - | |||||||
| Switch to Source code | Preprocessed file |