Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qcoreglobaldata.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | namespace { namespace Q_QGS_globalInstance { typedef QCoreGlobalData Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
executed 1434 times by 541 tests: }guard.store(QtGlobalStatic::Destroyed); Executed by:
executed 1434 times by 541 tests: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block Executed by:
executed 974733 times by 419 tests: &holder.value;return &holder.value; Executed by:
executed 974733 times by 419 tests: } } } static QGlobalStatic<QCoreGlobalData, Q_QGS_globalInstance::innerFunction, Q_QGS_globalInstance::guard> globalInstance;return &holder.value; Executed by:
| 0-974733 | ||||||
5 | - | |||||||
6 | QCoreGlobalData::QCoreGlobalData() | - | ||||||
7 | : codecForLocale(0) | - | ||||||
8 | { | - | ||||||
9 | } executed 980 times by 14 tests: end of block Executed by:
| 980 | ||||||
10 | - | |||||||
11 | QCoreGlobalData::~QCoreGlobalData() | - | ||||||
12 | { | - | ||||||
13 | codecForLocale = 0; | - | ||||||
14 | for (QList<QTextCodec *>::const_iterator it = allCodecs.constBegin(); it != allCodecs.constEnd()
| 1434-1574 | ||||||
15 | delete *it; executed 1574 times by 541 tests: delete *it; Executed by:
| 1574 | ||||||
16 | } executed 1434 times by 541 tests: end of block Executed by:
| 1434 | ||||||
17 | - | |||||||
18 | QCoreGlobalData *QCoreGlobalData::instance() | - | ||||||
19 | { | - | ||||||
20 | return executed 974741 times by 420 tests: globalInstance();return globalInstance(); Executed by:
executed 974741 times by 420 tests: return globalInstance(); Executed by:
| 974741 | ||||||
21 | } | - | ||||||
22 | - | |||||||
23 | - | |||||||
Switch to Source code | Preprocessed file |