| 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) guard.store(QtGlobalStatic::Destroyed); } }; 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; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader; | - | ||||||
| 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) guard.store(QtGlobalStatic::Destroyed); } }; 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; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_directLoader::innerFunction, Q_QGS_directLoader::guard> directLoader; | - | ||||||
| 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 = qLoadPlugin1qLoadPlugin<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 |     if (QPlatformTheme *ret = qLoadPlugin1return never executed:  return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList);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 | ||||||
|            return ret; never executed:  return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList); | ||||||||
|     return 0; never executed:  return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList);never executed:  );return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList);never executed:  return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList); | ||||||||
| 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 = ([]() -> QString { enum { Size= sizeofQLatin1String(u"" " (from ")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) | - | ||||||
| 46 | }, u"" " (from " }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())+ 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 |