kernel/qplatformclipboard.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7class QClipboardData -
8{ -
9public: -
10 QClipboardData(); -
11 ~QClipboardData(); -
12 -
13 void setSource(QMimeData* s) -
14 { -
15 if (s == src)
never evaluated: s == src
0
16 return;
never executed: return;
0
17 delete src; -
18 src = s; -
19 }
never executed: }
0
20 QMimeData* source() -
21 { return src; }
never executed: return src;
0
22 -
23private: -
24 QMimeData* src; -
25}; -
26 -
27QClipboardData::QClipboardData() -
28{ -
29 src = 0; -
30}
never executed: }
0
31 -
32QClipboardData::~QClipboardData() -
33{ -
34 delete src; -
35}
never executed: }
0
36 -
37static 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
38QPlatformClipboard::~QPlatformClipboard() -
39{ -
40 -
41} -
42 -
43QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode) -
44{ -
45 -
46 (void)mode;; -
47 return q_clipboardData()->source();
never executed: return q_clipboardData()->source();
0
48} -
49 -
50void QPlatformClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) -
51{ -
52 -
53 (void)mode;; -
54 q_clipboardData()->setSource(data); -
55 -
56 emitChanged(mode); -
57}
never executed: }
0
58 -
59bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const -
60{ -
61 return mode == QClipboard::Clipboard;
never executed: return mode == QClipboard::Clipboard;
0
62} -
63 -
64bool QPlatformClipboard::ownsMode(QClipboard::Mode mode) const -
65{ -
66 (void)mode;; -
67 return false;
never executed: return false;
0
68} -
69 -
70void QPlatformClipboard::emitChanged(QClipboard::Mode mode) -
71{ -
72 QGuiApplication::clipboard()->emitChanged(mode); -
73}
executed: }
Execution Count:45
45
74 -
75 -
76 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial