qplatformthemefactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformthemefactory.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5namespace { 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-
9namespace { 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-
13QPlatformTheme *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()
!platformPluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
20 QCoreApplication::addLibraryPath(platformPluginPath);-
21 if (QPlatformTheme *ret = qLoadPlugin1qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(directLoader(), platform, paramList)
QPlatformTheme...rm, paramList)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
22 return
never executed: return ret;
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: return qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList);
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-
36QStringList QPlatformThemeFactory::keys(const QString &platformPluginPath)-
37{-
38 QStringList list;-
39-
40-
41 if (!platformPluginPath.isEmpty()
!platformPluginPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
42 QCoreApplication::addLibraryPath(platformPluginPath);-
43 list += directLoader()->keyMap().values();-
44 if (!list.isEmpty()
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
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
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
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: return list;
list;
never executed: return list;
0
58}-
59-
60-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9