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 1505 times by 508 tests: }guard.store(QtGlobalStatic::Destroyed); Executed by:
executed 1505 times by 508 tests: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block Executed by:
executed 922404 times by 421 tests: &holder.value;return &holder.value; Executed by:
executed 922404 times by 421 tests: } } } static QGlobalStatic<QCoreGlobalData, Q_QGS_globalInstance::innerFunction, Q_QGS_globalInstance::guard> globalInstance;return &holder.value; Executed by:
| 0-922404 | ||||||
5 | - | |||||||
6 | QCoreGlobalData::QCoreGlobalData() | - | ||||||
7 | : codecForLocale(0) | - | ||||||
8 | { | - | ||||||
9 | } executed 1097 times by 14 tests: end of block Executed by:
| 1097 | ||||||
10 | - | |||||||
11 | QCoreGlobalData::~QCoreGlobalData() | - | ||||||
12 | { | - | ||||||
13 | codecForLocale = 0; | - | ||||||
14 | for (QList<QTextCodec *>::const_iterator it = allCodecs.constBegin(); it != allCodecs.constEnd()
| 1505-1645 | ||||||
15 | delete *it; executed 1645 times by 508 tests: delete *it; Executed by:
| 1645 | ||||||
16 | } executed 1505 times by 508 tests: end of block Executed by:
| 1505 | ||||||
17 | - | |||||||
18 | QCoreGlobalData *QCoreGlobalData::instance() | - | ||||||
19 | { | - | ||||||
20 | return executed 922412 times by 422 tests: globalInstance();return globalInstance(); Executed by:
executed 922412 times by 422 tests: return globalInstance(); Executed by:
| 922412 | ||||||
21 | } | - | ||||||
22 | - | |||||||
23 | - | |||||||
Switch to Source code | Preprocessed file |