Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/printsupport/kernel/qplatformprintplugin.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | 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
executed 4 times by 4 tests: }guard.store(QtGlobalStatic::Destroyed); Executed by:
executed 4 times by 4 tests: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.QPlatformPrinterSupportFactoryInterface.5.1", QLatin1String("/printsupport"), Qt::CaseInsensitive))) : value ("org.qt-project.QPlatformPrinterSupportFactoryInterface.5.1", QLatin1String("/printsupport"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block Executed by:
executed 8 times by 4 tests: &holder.value;return &holder.value; Executed by:
executed 8 times by 4 tests: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;return &holder.value; Executed by:
| 0-8 | ||||||
5 | - | |||||||
6 | - | |||||||
7 | QPlatformPrinterSupportPlugin::QPlatformPrinterSupportPlugin(QObject *parent) | - | ||||||
8 | : QObject(parent) | - | ||||||
9 | { | - | ||||||
10 | } executed 4 times by 4 tests: end of block Executed by:
| 4 | ||||||
11 | - | |||||||
12 | QPlatformPrinterSupportPlugin::~QPlatformPrinterSupportPlugin() | - | ||||||
13 | { | - | ||||||
14 | } | - | ||||||
15 | - | |||||||
16 | static QPlatformPrinterSupport *printerSupport = 0; | - | ||||||
17 | - | |||||||
18 | static void cleanupPrinterSupport() | - | ||||||
19 | { | - | ||||||
20 | delete printerSupport; | - | ||||||
21 | printerSupport = 0; | - | ||||||
22 | } executed 4 times by 4 tests: end of block Executed by:
| 4 | ||||||
23 | QPlatformPrinterSupport *QPlatformPrinterSupportPlugin::get() | - | ||||||
24 | { | - | ||||||
25 | if (!printerSupport
| 4-413 | ||||||
26 | const QMultiMap<int, QString> keyMap = loader()->keyMap(); | - | ||||||
27 | if (!keyMap.isEmpty()
| 0-4 | ||||||
28 | printerSupport = qLoadPlugin<QPlatformPrinterSupport, QPlatformPrinterSupportPlugin>(loader(), keyMap.constBegin().value()); executed 4 times by 4 tests: printerSupport = qLoadPlugin<QPlatformPrinterSupport, QPlatformPrinterSupportPlugin>(loader(), keyMap.constBegin().value()); Executed by:
| 4 | ||||||
29 | if (printerSupport
| 0-4 | ||||||
30 | qAddPostRoutine(cleanupPrinterSupport); executed 4 times by 4 tests: qAddPostRoutine(cleanupPrinterSupport); Executed by:
| 4 | ||||||
31 | } executed 4 times by 4 tests: end of block Executed by:
| 4 | ||||||
32 | return executed 417 times by 4 tests: printerSupport;return printerSupport; Executed by:
executed 417 times by 4 tests: return printerSupport; Executed by:
| 417 | ||||||
33 | } | - | ||||||
34 | - | |||||||
35 | - | |||||||
Switch to Source code | Preprocessed file |