| 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 | - | |||||||
| 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
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 blockExecuted 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 | ||||||
| 6 | - | |||||||
| 7 | - | |||||||
| 8 | - | |||||||
| 9 | QPlatformPrinterSupportPlugin::QPlatformPrinterSupportPlugin(QObject *parent) | - | ||||||
| 10 | : QObject(parent) | - | ||||||
| 11 | { | - | ||||||
| 12 | } executed 4 times by 4 tests: end of blockExecuted by:
| 4 | ||||||
| 13 | - | |||||||
| 14 | QPlatformPrinterSupportPlugin::~QPlatformPrinterSupportPlugin() | - | ||||||
| 15 | { | - | ||||||
| 16 | } | - | ||||||
| 17 | - | |||||||
| 18 | static QPlatformPrinterSupport *printerSupport = 0; | - | ||||||
| 19 | - | |||||||
| 20 | - | |||||||
| 21 | static void cleanupPrinterSupport() | - | ||||||
| 22 | { | - | ||||||
| 23 | - | |||||||
| 24 | delete printerSupport; | - | ||||||
| 25 | - | |||||||
| 26 | printerSupport = 0; | - | ||||||
| 27 | } executed 4 times by 4 tests: end of blockExecuted by:
| 4 | ||||||
| 28 | QPlatformPrinterSupport *QPlatformPrinterSupportPlugin::get() | - | ||||||
| 29 | { | - | ||||||
| 30 | - | |||||||
| 31 | if (!printerSupport
| 4-413 | ||||||
| 32 | const QMultiMap<int, QString> keyMap = loader()->keyMap(); | - | ||||||
| 33 | if (!keyMap.isEmpty()
| 0-4 | ||||||
| 34 | 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 | ||||||
| 35 | if (printerSupport
| 0-4 | ||||||
| 36 | qAddPostRoutine(cleanupPrinterSupport); executed 4 times by 4 tests: qAddPostRoutine(cleanupPrinterSupport);Executed by:
| 4 | ||||||
| 37 | } executed 4 times by 4 tests: end of blockExecuted by:
| 4 | ||||||
| 38 | - | |||||||
| 39 | return executed 417 times by 4 tests: printerSupport;return printerSupport;Executed by:
executed 417 times by 4 tests: return printerSupport;Executed by:
| 417 | ||||||
| 40 | } | - | ||||||
| 41 | - | |||||||
| 42 | - | |||||||
| Switch to Source code | Preprocessed file |