qstylefactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstylefactory.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.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; 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; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;
0
6QStyle *QStyleFactory::create(const QString& key)-
7{-
8 QStyle *ret = 0;-
9 QString style = key.toLower();-
10-
11 if (style == QLatin1String("windows")
style == QLati...ing("windows")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
12 ret = new QWindowsStyle;
never executed: ret = new QWindowsStyle;
0
13 else-
14 if (style == QLatin1String("fusion")
style == QLati...ring("fusion")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
15 ret = new QFusionStyle;
never executed: ret = new QFusionStyle;
0
16 else-
17 { }
never executed: end of block
0
18 if (!ret
!retDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
19 ret = qLoadPlugin<QStyle, QStylePlugin>(loader(), style);
never executed: ret = qLoadPlugin<QStyle, QStylePlugin>(loader(), style);
0
20 if(ret
retDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
21 ret->setObjectName(style);
never executed: ret->setObjectName(style);
0
22 return
never executed: return ret;
ret;
never executed: return ret;
0
23}-
24-
25-
26-
27-
28-
29-
30-
31QStringList 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
it != cendDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
39 list.append(it.value());
never executed: list.append(it.value());
0
40-
41 if (!list.contains(QLatin1String("Windows"))
!list.contains...ng("Windows"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
42 list << QLatin1String("Windows");
never executed: list << QLatin1String("Windows");
0
43 if (!list.contains(QLatin1String("Fusion"))
!list.contains...ing("Fusion"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
44 list << QLatin1String("Fusion");
never executed: list << QLatin1String("Fusion");
0
45 return
never executed: return list;
list;
never executed: return list;
0
46}-
47-
48-
Switch to Source codePreprocessed file

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