Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstylefactory.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.QStyleFactoryInterface", QLatin1String("/styles"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QStyleFactoryInterface", QLatin1String("/styles"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block never 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 | QStyle *QStyleFactory::create(const QString& key) | - | ||||||
7 | { | - | ||||||
8 | QStyle *ret = 0; | - | ||||||
9 | QString style = key.toLower(); | - | ||||||
10 | - | |||||||
11 | if (style == QLatin1String("windows")
| 0 | ||||||
12 | ret = new QWindowsStyle; never executed: ret = new QWindowsStyle; | 0 | ||||||
13 | else | - | ||||||
14 | if (style == QLatin1String("fusion")
| 0 | ||||||
15 | ret = new QFusionStyle; never executed: ret = new QFusionStyle; | 0 | ||||||
16 | else | - | ||||||
17 | { } never executed: end of block | 0 | ||||||
18 | if (!ret
| 0 | ||||||
19 | ret = qLoadPlugin<QStyle, QStylePlugin>(loader(), style); never executed: ret = qLoadPlugin<QStyle, QStylePlugin>(loader(), style); | 0 | ||||||
20 | if(ret
| 0 | ||||||
21 | ret->setObjectName(style); never executed: ret->setObjectName(style); | 0 | ||||||
22 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||
23 | } | - | ||||||
24 | - | |||||||
25 | - | |||||||
26 | - | |||||||
27 | - | |||||||
28 | - | |||||||
29 | - | |||||||
30 | - | |||||||
31 | QStringList QStyleFactory::keys() | - | ||||||
32 | { | - | ||||||
33 | QStringList list; | - | ||||||
34 | typedef QMultiMap<int, QString> PluginKeyMap; | - | ||||||
35 | - | |||||||
36 | const PluginKeyMap keyMap = loader()->keyMap(); | - | ||||||
37 | const PluginKeyMap::const_iterator cend = keyMap.constEnd(); | - | ||||||
38 | for (PluginKeyMap::const_iterator it = keyMap.constBegin(); it != cend
| 0 | ||||||
39 | list.append(it.value()); never executed: list.append(it.value()); | 0 | ||||||
40 | - | |||||||
41 | if (!list.contains(QLatin1String("Windows"))
| 0 | ||||||
42 | list << QLatin1String("Windows"); never executed: list << QLatin1String("Windows"); | 0 | ||||||
43 | if (!list.contains(QLatin1String("Fusion"))
| 0 | ||||||
44 | list << QLatin1String("Fusion"); never executed: list << QLatin1String("Fusion"); | 0 | ||||||
45 | return never executed: list;return list; never executed: return list; | 0 | ||||||
46 | } | - | ||||||
47 | - | |||||||
48 | - | |||||||
Switch to Source code | Preprocessed file |