Line | Source Code | Coverage |
---|
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) never evaluated: s == src | 0 |
16 | return; | 0 |
17 | delete src; | - |
18 | src = s; | - |
19 | } | 0 |
20 | QMimeData* source() | - |
21 | { return src; } never executed: return src; | 0 |
22 | | - |
23 | private: | - |
24 | QMimeData* src; | - |
25 | }; | - |
26 | | - |
27 | QClipboardData::QClipboardData() | - |
28 | { | - |
29 | src = 0; | - |
30 | } | 0 |
31 | | - |
32 | QClipboardData::~QClipboardData() | - |
33 | { | - |
34 | delete src; | - |
35 | } | 0 |
36 | | - |
37 | static QClipboardData *q_clipboardData() { static QGlobalStatic<QClipboardData > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QClipboardData *x = new QClipboardData; if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QClipboardData > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }; never evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x) never evaluated: !thisGlobalStatic.pointer.load() never evaluated: !thisGlobalStatic.destroyed never executed: delete x; never executed: return thisGlobalStatic.pointer.load(); | 0 |
38 | QPlatformClipboard::~QPlatformClipboard() | - |
39 | { | - |
40 | | - |
41 | } | - |
42 | | - |
43 | QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode) | - |
44 | { | - |
45 | | - |
46 | (void)mode;; | - |
47 | 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 | } | 0 |
58 | | - |
59 | bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const | - |
60 | { | - |
61 | 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 false; never executed: return false; | 0 |
68 | } | - |
69 | | - |
70 | void QPlatformClipboard::emitChanged(QClipboard::Mode mode) | - |
71 | { | - |
72 | QGuiApplication::clipboard()->emitChanged(mode); | - |
73 | } executed: } Execution Count:45 | 45 |
74 | | - |
75 | | - |
76 | | - |
| | |