Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformclipboard.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | class QClipboardData | - | ||||||
8 | { | - | ||||||
9 | public: | - | ||||||
10 | QClipboardData(); | - | ||||||
11 | ~QClipboardData(); | - | ||||||
12 | - | |||||||
13 | void setSource(QMimeData* s) | - | ||||||
14 | { | - | ||||||
15 | if (s == src
| 0 | ||||||
16 | return; never executed: return; | 0 | ||||||
17 | delete src; | - | ||||||
18 | src = s; | - | ||||||
19 | } never executed: end of block | 0 | ||||||
20 | QMimeData* source() | - | ||||||
21 | { return never executed: src;return src; never executed: }return src; | 0 | ||||||
22 | - | |||||||
23 | private: | - | ||||||
24 | QMimeData* src; | - | ||||||
25 | }; | - | ||||||
26 | - | |||||||
27 | QClipboardData::QClipboardData() | - | ||||||
28 | { | - | ||||||
29 | src = 0; | - | ||||||
30 | } never executed: end of block | 0 | ||||||
31 | - | |||||||
32 | QClipboardData::~QClipboardData() | - | ||||||
33 | { | - | ||||||
34 | delete src; | - | ||||||
35 | } never executed: end of block | 0 | ||||||
36 | - | |||||||
37 | namespace { namespace Q_QGS_q_clipboardData { typedef QClipboardData Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
never executed: }guard.store(QtGlobalStatic::Destroyed); never executed: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block never executed: &holder.value;return &holder.value; never executed: } } } static QGlobalStatic<QClipboardData, Q_QGS_q_clipboardData::innerFunction, Q_QGS_q_clipboardData::guard> q_clipboardData;;return &holder.value; | 0 | ||||||
38 | QPlatformClipboard::~QPlatformClipboard() | - | ||||||
39 | { | - | ||||||
40 | - | |||||||
41 | } | - | ||||||
42 | - | |||||||
43 | QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode) | - | ||||||
44 | { | - | ||||||
45 | - | |||||||
46 | (void)mode;; | - | ||||||
47 | return never executed: q_clipboardData()->source();return q_clipboardData()->source(); never executed: return q_clipboardData()->source(); | 0 | ||||||
48 | } | - | ||||||
49 | - | |||||||
50 | void QPlatformClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) | - | ||||||
51 | { | - | ||||||
52 | - | |||||||
53 | (void)mode;; | - | ||||||
54 | q_clipboardData()->setSource(data); | - | ||||||
55 | - | |||||||
56 | emitChanged(mode); | - | ||||||
57 | } never executed: end of block | 0 | ||||||
58 | - | |||||||
59 | bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const | - | ||||||
60 | { | - | ||||||
61 | return never executed: mode == QClipboard::Clipboard;return mode == QClipboard::Clipboard; never executed: return mode == QClipboard::Clipboard; | 0 | ||||||
62 | } | - | ||||||
63 | - | |||||||
64 | bool QPlatformClipboard::ownsMode(QClipboard::Mode mode) const | - | ||||||
65 | { | - | ||||||
66 | (void)mode;; | - | ||||||
67 | return never executed: false;return false; never executed: return false; | 0 | ||||||
68 | } | - | ||||||
69 | - | |||||||
70 | void QPlatformClipboard::emitChanged(QClipboard::Mode mode) | - | ||||||
71 | { | - | ||||||
72 | if (!QGuiApplicationPrivate::is_app_closing
| 0 | ||||||
73 | QGuiApplication::clipboard()->emitChanged(mode); never executed: QGuiApplication::clipboard()->emitChanged(mode); | 0 | ||||||
74 | } never executed: end of block | 0 | ||||||
75 | - | |||||||
76 | - | |||||||
Switch to Source code | Preprocessed file |