| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformthemefactory.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
never executed: }guard.store(QtGlobalStatic::Destroyed);never executed: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", QLatin1String("/platformthemes"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", QLatin1String("/platformthemes"), 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 | ||||||
| 6 | - | |||||||
| 7 | - | |||||||
| 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.QPlatformThemeFactoryInterface.5.1", QLatin1String(""), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", 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 | - | |||||||
| 13 | QPlatformTheme *QPlatformThemeFactory::create(const QString& key, const QString &platformPluginPath) | - | ||||||
| 14 | { | - | ||||||
| 15 | QStringList paramList = key.split(QLatin1Char(':')); | - | ||||||
| 16 | const QString platform = paramList.takeFirst().toLower(); | - | ||||||
| 17 | - | |||||||
| 18 | - | |||||||
| 19 | if (!platformPluginPath.isEmpty()
| 0 | ||||||
| 20 | QCoreApplication::addLibraryPath(platformPluginPath); | - | ||||||
| 21 | if (QPlatformTheme *ret = qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(directLoader(), platform, paramList)
| 0 | ||||||
| 22 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||
| 23 | } never executed: end of block | 0 | ||||||
| 24 | - | |||||||
| 25 | - | |||||||
| 26 | - | |||||||
| 27 | return never executed: qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList);return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList);never executed: return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList); | 0 | ||||||
| 28 | } | - | ||||||
| 29 | - | |||||||
| 30 | - | |||||||
| 31 | - | |||||||
| 32 | - | |||||||
| 33 | - | |||||||
| 34 | - | |||||||
| 35 | - | |||||||
| 36 | QStringList QPlatformThemeFactory::keys(const QString &platformPluginPath) | - | ||||||
| 37 | { | - | ||||||
| 38 | QStringList list; | - | ||||||
| 39 | - | |||||||
| 40 | - | |||||||
| 41 | if (!platformPluginPath.isEmpty()
| 0 | ||||||
| 42 | QCoreApplication::addLibraryPath(platformPluginPath); | - | ||||||
| 43 | list += directLoader()->keyMap().values(); | - | ||||||
| 44 | if (!list.isEmpty()
| 0 | ||||||
| 45 | const QString postFix = QLatin1String(" (from ") | - | ||||||
| 46 | + QDir::toNativeSeparators(platformPluginPath) | - | ||||||
| 47 | + QLatin1Char(')'); | - | ||||||
| 48 | const QStringList::iterator end = list.end(); | - | ||||||
| 49 | for (QStringList::iterator it = list.begin(); it != end
| 0 | ||||||
| 50 | (* never executed: it).append(postFix);(*it).append(postFix);never executed: (*it).append(postFix); | 0 | ||||||
| 51 | } never executed: end of block | 0 | ||||||
| 52 | } never executed: end of block | 0 | ||||||
| 53 | - | |||||||
| 54 | - | |||||||
| 55 | - | |||||||
| 56 | list += loader()->keyMap().values(); | - | ||||||
| 57 | return never executed: list;return list;never executed: return list; | 0 | ||||||
| 58 | } | - | ||||||
| 59 | - | |||||||
| 60 | - | |||||||
| Switch to Source code | Preprocessed file |