Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickdroparea.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||
7 | QQuickDropAreaDrag::QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent) | - | ||||||||||||||||||||||||
8 | : QObject(parent) | - | ||||||||||||||||||||||||
9 | , d(d) | - | ||||||||||||||||||||||||
10 | { | - | ||||||||||||||||||||||||
11 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||
13 | QQuickDropAreaDrag::~QQuickDropAreaDrag() | - | ||||||||||||||||||||||||
14 | { | - | ||||||||||||||||||||||||
15 | } | - | ||||||||||||||||||||||||
16 | - | |||||||||||||||||||||||||
17 | class QQuickDropAreaPrivate : public QQuickItemPrivate | - | ||||||||||||||||||||||||
18 | { | - | ||||||||||||||||||||||||
19 | inline QQuickDropArea* q_func() { return static_cast<QQuickDropArea *>(q_ptr); } inline const QQuickDropArea* q_func() const { return static_cast<const QQuickDropArea *>(q_ptr); } friend class QQuickDropArea; | - | ||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||
21 | public: | - | ||||||||||||||||||||||||
22 | QQuickDropAreaPrivate(); | - | ||||||||||||||||||||||||
23 | ~QQuickDropAreaPrivate(); | - | ||||||||||||||||||||||||
24 | - | |||||||||||||||||||||||||
25 | bool hasMatchingKey(const QStringList &keys) const; | - | ||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||
27 | QStringList getKeys(const QMimeData *mimeData) const; | - | ||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||
29 | QStringList keys; | - | ||||||||||||||||||||||||
30 | QRegExp keyRegExp; | - | ||||||||||||||||||||||||
31 | QPointF dragPosition; | - | ||||||||||||||||||||||||
32 | QQuickDropAreaDrag *drag; | - | ||||||||||||||||||||||||
33 | QPointer<QObject> source; | - | ||||||||||||||||||||||||
34 | bool containsDrag; | - | ||||||||||||||||||||||||
35 | }; | - | ||||||||||||||||||||||||
36 | - | |||||||||||||||||||||||||
37 | QQuickDropAreaPrivate::QQuickDropAreaPrivate() | - | ||||||||||||||||||||||||
38 | : drag(nullptr) | - | ||||||||||||||||||||||||
39 | , containsDrag(false) | - | ||||||||||||||||||||||||
40 | { | - | ||||||||||||||||||||||||
41 | } executed 214 times by 3 tests: end of block Executed by:
| 214 | ||||||||||||||||||||||||
42 | - | |||||||||||||||||||||||||
43 | QQuickDropAreaPrivate::~QQuickDropAreaPrivate() | - | ||||||||||||||||||||||||
44 | { | - | ||||||||||||||||||||||||
45 | delete drag; | - | ||||||||||||||||||||||||
46 | } executed 214 times by 3 tests: end of block Executed by:
| 214 | ||||||||||||||||||||||||
47 | QQuickDropArea::QQuickDropArea(QQuickItem *parent) | - | ||||||||||||||||||||||||
48 | : QQuickItem(*new QQuickDropAreaPrivate, parent) | - | ||||||||||||||||||||||||
49 | { | - | ||||||||||||||||||||||||
50 | setFlags(ItemAcceptsDrops); | - | ||||||||||||||||||||||||
51 | } executed 214 times by 3 tests: end of block Executed by:
| 214 | ||||||||||||||||||||||||
52 | - | |||||||||||||||||||||||||
53 | QQuickDropArea::~QQuickDropArea() | - | ||||||||||||||||||||||||
54 | { | - | ||||||||||||||||||||||||
55 | } | - | ||||||||||||||||||||||||
56 | bool QQuickDropArea::containsDrag() const | - | ||||||||||||||||||||||||
57 | { | - | ||||||||||||||||||||||||
58 | const QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
59 | return executed 240 times by 2 tests: d->containsDrag;return d->containsDrag; Executed by:
executed 240 times by 2 tests: return d->containsDrag; Executed by:
| 240 | ||||||||||||||||||||||||
60 | } | - | ||||||||||||||||||||||||
61 | QStringList QQuickDropArea::keys() const | - | ||||||||||||||||||||||||
62 | { | - | ||||||||||||||||||||||||
63 | const QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
64 | return executed 46 times by 1 test: d->keys;return d->keys; Executed by:
executed 46 times by 1 test: return d->keys; Executed by:
| 46 | ||||||||||||||||||||||||
65 | } | - | ||||||||||||||||||||||||
66 | - | |||||||||||||||||||||||||
67 | void QQuickDropArea::setKeys(const QStringList &keys) | - | ||||||||||||||||||||||||
68 | { | - | ||||||||||||||||||||||||
69 | QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
70 | if (d->keys != keys
| 2-60 | ||||||||||||||||||||||||
71 | d->keys = keys; | - | ||||||||||||||||||||||||
72 | - | |||||||||||||||||||||||||
73 | if (keys.isEmpty()
| 4-56 | ||||||||||||||||||||||||
74 | d->keyRegExp = QRegExp(); | - | ||||||||||||||||||||||||
75 | } executed 4 times by 1 test: else {end of block Executed by:
| 4 | ||||||||||||||||||||||||
76 | QString pattern = QLatin1Char('(') + QRegExp::escape(keys.first()); | - | ||||||||||||||||||||||||
77 | for (int i = 1; i < keys.count()
| 8-56 | ||||||||||||||||||||||||
78 | pattern += QLatin1Char('|') + QRegExp::escape(keys.at(i)); executed 8 times by 1 test: pattern += QLatin1Char('|') + QRegExp::escape(keys.at(i)); Executed by:
| 8 | ||||||||||||||||||||||||
79 | pattern += QLatin1Char(')'); | - | ||||||||||||||||||||||||
80 | d->keyRegExp = QRegExp(pattern.replace(QLatin1String("\\*"), QLatin1String(".+"))); | - | ||||||||||||||||||||||||
81 | } executed 56 times by 2 tests: end of block Executed by:
| 56 | ||||||||||||||||||||||||
82 | keysChanged(); | - | ||||||||||||||||||||||||
83 | } executed 60 times by 2 tests: end of block Executed by:
| 60 | ||||||||||||||||||||||||
84 | } executed 62 times by 2 tests: end of block Executed by:
| 62 | ||||||||||||||||||||||||
85 | - | |||||||||||||||||||||||||
86 | QQuickDropAreaDrag *QQuickDropArea::drag() | - | ||||||||||||||||||||||||
87 | { | - | ||||||||||||||||||||||||
88 | QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
89 | if (!d->drag
| 6-74 | ||||||||||||||||||||||||
90 | d->drag = new QQuickDropAreaDrag(d); executed 6 times by 1 test: d->drag = new QQuickDropAreaDrag(d); Executed by:
| 6 | ||||||||||||||||||||||||
91 | return executed 80 times by 1 test: d->drag;return d->drag; Executed by:
executed 80 times by 1 test: return d->drag; Executed by:
| 80 | ||||||||||||||||||||||||
92 | } | - | ||||||||||||||||||||||||
93 | - | |||||||||||||||||||||||||
94 | - | |||||||||||||||||||||||||
95 | - | |||||||||||||||||||||||||
96 | - | |||||||||||||||||||||||||
97 | - | |||||||||||||||||||||||||
98 | - | |||||||||||||||||||||||||
99 | - | |||||||||||||||||||||||||
100 | QObject *QQuickDropAreaDrag::source() const | - | ||||||||||||||||||||||||
101 | { | - | ||||||||||||||||||||||||
102 | return executed 20 times by 1 test: d->source;return d->source; Executed by:
executed 20 times by 1 test: return d->source; Executed by:
| 20 | ||||||||||||||||||||||||
103 | } | - | ||||||||||||||||||||||||
104 | qreal QQuickDropAreaDrag::x() const | - | ||||||||||||||||||||||||
105 | { | - | ||||||||||||||||||||||||
106 | return executed 30 times by 1 test: d->dragPosition.x();return d->dragPosition.x(); Executed by:
executed 30 times by 1 test: return d->dragPosition.x(); Executed by:
| 30 | ||||||||||||||||||||||||
107 | } | - | ||||||||||||||||||||||||
108 | - | |||||||||||||||||||||||||
109 | qreal QQuickDropAreaDrag::y() const | - | ||||||||||||||||||||||||
110 | { | - | ||||||||||||||||||||||||
111 | return executed 30 times by 1 test: d->dragPosition.y();return d->dragPosition.y(); Executed by:
executed 30 times by 1 test: return d->dragPosition.y(); Executed by:
| 30 | ||||||||||||||||||||||||
112 | } | - | ||||||||||||||||||||||||
113 | void QQuickDropArea::dragMoveEvent(QDragMoveEvent *event) | - | ||||||||||||||||||||||||
114 | { | - | ||||||||||||||||||||||||
115 | QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
116 | if (!d->containsDrag
| 0-140 | ||||||||||||||||||||||||
117 | return; never executed: return; | 0 | ||||||||||||||||||||||||
118 | - | |||||||||||||||||||||||||
119 | d->dragPosition = event->pos(); | - | ||||||||||||||||||||||||
120 | if (d->drag
| 10-130 | ||||||||||||||||||||||||
121 | d->drag->positionChanged(); executed 10 times by 1 test: d->drag->positionChanged(); Executed by:
| 10 | ||||||||||||||||||||||||
122 | - | |||||||||||||||||||||||||
123 | event->accept(); | - | ||||||||||||||||||||||||
124 | QQuickDropEvent dragTargetEvent(d, event); | - | ||||||||||||||||||||||||
125 | positionChanged(&dragTargetEvent); | - | ||||||||||||||||||||||||
126 | } executed 140 times by 2 tests: end of block Executed by:
| 140 | ||||||||||||||||||||||||
127 | - | |||||||||||||||||||||||||
128 | bool QQuickDropAreaPrivate::hasMatchingKey(const QStringList &keys) const | - | ||||||||||||||||||||||||
129 | { | - | ||||||||||||||||||||||||
130 | if (keyRegExp.isEmpty()
| 58-64 | ||||||||||||||||||||||||
131 | return executed 64 times by 2 tests: true;return true; Executed by:
executed 64 times by 2 tests: return true; Executed by:
| 64 | ||||||||||||||||||||||||
132 | - | |||||||||||||||||||||||||
133 | QRegExp copy = keyRegExp; | - | ||||||||||||||||||||||||
134 | for (const QString &key : keys) { | - | ||||||||||||||||||||||||
135 | if (copy.exactMatch(key)
| 26-42 | ||||||||||||||||||||||||
136 | return executed 42 times by 1 test: true;return true; Executed by:
executed 42 times by 1 test: return true; Executed by:
| 42 | ||||||||||||||||||||||||
137 | } executed 26 times by 1 test: end of block Executed by:
| 26 | ||||||||||||||||||||||||
138 | return executed 16 times by 1 test: false;return false; Executed by:
executed 16 times by 1 test: return false; Executed by:
| 16 | ||||||||||||||||||||||||
139 | } | - | ||||||||||||||||||||||||
140 | - | |||||||||||||||||||||||||
141 | QStringList QQuickDropAreaPrivate::getKeys(const QMimeData *mimeData) const | - | ||||||||||||||||||||||||
142 | { | - | ||||||||||||||||||||||||
143 | if (const
| 50-98 | ||||||||||||||||||||||||
144 | return executed 98 times by 2 tests: dragMime->keys();return dragMime->keys(); Executed by:
executed 98 times by 2 tests: return dragMime->keys(); Executed by:
| 98 | ||||||||||||||||||||||||
145 | return executed 50 times by 1 test: mimeData->formats();return mimeData->formats(); Executed by:
executed 50 times by 1 test: return mimeData->formats(); Executed by:
| 50 | ||||||||||||||||||||||||
146 | } | - | ||||||||||||||||||||||||
147 | void QQuickDropArea::dragEnterEvent(QDragEnterEvent *event) | - | ||||||||||||||||||||||||
148 | { | - | ||||||||||||||||||||||||
149 | QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
150 | const QMimeData *mimeData = event->mimeData(); | - | ||||||||||||||||||||||||
151 | if (!d->effectiveEnable
| 0-138 | ||||||||||||||||||||||||
152 | return; executed 32 times by 1 test: return; Executed by:
| 32 | ||||||||||||||||||||||||
153 | - | |||||||||||||||||||||||||
154 | d->dragPosition = event->pos(); | - | ||||||||||||||||||||||||
155 | - | |||||||||||||||||||||||||
156 | event->accept(); | - | ||||||||||||||||||||||||
157 | - | |||||||||||||||||||||||||
158 | QQuickDropEvent dragTargetEvent(d, event); | - | ||||||||||||||||||||||||
159 | entered(&dragTargetEvent); | - | ||||||||||||||||||||||||
160 | if (!event->isAccepted()
| 2-104 | ||||||||||||||||||||||||
161 | return; executed 2 times by 1 test: return; Executed by:
| 2 | ||||||||||||||||||||||||
162 | - | |||||||||||||||||||||||||
163 | d->containsDrag = true; | - | ||||||||||||||||||||||||
164 | if (QQuickDragMimeData *dragMime = qobject_cast<QQuickDragMimeData *>(const_cast<QMimeData *>(mimeData))
| 30-74 | ||||||||||||||||||||||||
165 | d->source = dragMime->source(); executed 74 times by 2 tests: d->source = dragMime->source(); Executed by:
| 74 | ||||||||||||||||||||||||
166 | else | - | ||||||||||||||||||||||||
167 | d->source = event->source(); executed 30 times by 1 test: d->source = event->source(); Executed by:
| 30 | ||||||||||||||||||||||||
168 | d->dragPosition = event->pos(); | - | ||||||||||||||||||||||||
169 | if (d->drag
| 8-96 | ||||||||||||||||||||||||
170 | d->drag->positionChanged(); | - | ||||||||||||||||||||||||
171 | d->drag->sourceChanged(); | - | ||||||||||||||||||||||||
172 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||
173 | containsDragChanged(); | - | ||||||||||||||||||||||||
174 | } executed 104 times by 2 tests: end of block Executed by:
| 104 | ||||||||||||||||||||||||
175 | void QQuickDropArea::dragLeaveEvent(QDragLeaveEvent *) | - | ||||||||||||||||||||||||
176 | { | - | ||||||||||||||||||||||||
177 | QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
178 | if (!d->containsDrag
| 0-72 | ||||||||||||||||||||||||
179 | return; never executed: return; | 0 | ||||||||||||||||||||||||
180 | - | |||||||||||||||||||||||||
181 | exited(); | - | ||||||||||||||||||||||||
182 | - | |||||||||||||||||||||||||
183 | d->containsDrag = false; | - | ||||||||||||||||||||||||
184 | d->source = nullptr; | - | ||||||||||||||||||||||||
185 | containsDragChanged(); | - | ||||||||||||||||||||||||
186 | if (d->drag
| 6-66 | ||||||||||||||||||||||||
187 | d->drag->sourceChanged(); executed 6 times by 1 test: d->drag->sourceChanged(); Executed by:
| 6 | ||||||||||||||||||||||||
188 | } executed 72 times by 2 tests: end of block Executed by:
| 72 | ||||||||||||||||||||||||
189 | void QQuickDropArea::dropEvent(QDropEvent *event) | - | ||||||||||||||||||||||||
190 | { | - | ||||||||||||||||||||||||
191 | QQuickDropAreaPrivate * const d = d_func(); | - | ||||||||||||||||||||||||
192 | if (!d->containsDrag
| 0-28 | ||||||||||||||||||||||||
193 | return; never executed: return; | 0 | ||||||||||||||||||||||||
194 | - | |||||||||||||||||||||||||
195 | QQuickDropEvent dragTargetEvent(d, event); | - | ||||||||||||||||||||||||
196 | dropped(&dragTargetEvent); | - | ||||||||||||||||||||||||
197 | - | |||||||||||||||||||||||||
198 | d->containsDrag = false; | - | ||||||||||||||||||||||||
199 | d->source = nullptr; | - | ||||||||||||||||||||||||
200 | containsDragChanged(); | - | ||||||||||||||||||||||||
201 | if (d->drag
| 2-26 | ||||||||||||||||||||||||
202 | d->drag->sourceChanged(); executed 2 times by 1 test: d->drag->sourceChanged(); Executed by:
| 2 | ||||||||||||||||||||||||
203 | } executed 28 times by 1 test: end of block Executed by:
| 28 | ||||||||||||||||||||||||
204 | QObject *QQuickDropEvent::source() const | - | ||||||||||||||||||||||||
205 | { | - | ||||||||||||||||||||||||
206 | if (const
| 0-104 | ||||||||||||||||||||||||
207 | return executed 104 times by 2 tests: dragMime->source();return dragMime->source(); Executed by:
executed 104 times by 2 tests: return dragMime->source(); Executed by:
| 104 | ||||||||||||||||||||||||
208 | else | - | ||||||||||||||||||||||||
209 | return never executed: event->source();return event->source(); never executed: return event->source(); | 0 | ||||||||||||||||||||||||
210 | } | - | ||||||||||||||||||||||||
211 | - | |||||||||||||||||||||||||
212 | QStringList QQuickDropEvent::keys() const | - | ||||||||||||||||||||||||
213 | { | - | ||||||||||||||||||||||||
214 | return executed 26 times by 1 test: d->getKeys(event->mimeData());return d->getKeys(event->mimeData()); Executed by:
executed 26 times by 1 test: return d->getKeys(event->mimeData()); Executed by:
| 26 | ||||||||||||||||||||||||
215 | } | - | ||||||||||||||||||||||||
216 | - | |||||||||||||||||||||||||
217 | bool QQuickDropEvent::hasColor() const | - | ||||||||||||||||||||||||
218 | { | - | ||||||||||||||||||||||||
219 | return never executed: event->mimeData()->hasColor();return event->mimeData()->hasColor(); never executed: return event->mimeData()->hasColor(); | 0 | ||||||||||||||||||||||||
220 | } | - | ||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||
222 | bool QQuickDropEvent::hasHtml() const | - | ||||||||||||||||||||||||
223 | { | - | ||||||||||||||||||||||||
224 | return never executed: event->mimeData()->hasHtml();return event->mimeData()->hasHtml(); never executed: return event->mimeData()->hasHtml(); | 0 | ||||||||||||||||||||||||
225 | } | - | ||||||||||||||||||||||||
226 | - | |||||||||||||||||||||||||
227 | bool QQuickDropEvent::hasText() const | - | ||||||||||||||||||||||||
228 | { | - | ||||||||||||||||||||||||
229 | return never executed: event->mimeData()->hasText();return event->mimeData()->hasText(); never executed: return event->mimeData()->hasText(); | 0 | ||||||||||||||||||||||||
230 | } | - | ||||||||||||||||||||||||
231 | - | |||||||||||||||||||||||||
232 | bool QQuickDropEvent::hasUrls() const | - | ||||||||||||||||||||||||
233 | { | - | ||||||||||||||||||||||||
234 | return never executed: event->mimeData()->hasUrls();return event->mimeData()->hasUrls(); never executed: return event->mimeData()->hasUrls(); | 0 | ||||||||||||||||||||||||
235 | } | - | ||||||||||||||||||||||||
236 | - | |||||||||||||||||||||||||
237 | QVariant QQuickDropEvent::colorData() const | - | ||||||||||||||||||||||||
238 | { | - | ||||||||||||||||||||||||
239 | return never executed: event->mimeData()->colorData();return event->mimeData()->colorData(); never executed: return event->mimeData()->colorData(); | 0 | ||||||||||||||||||||||||
240 | } | - | ||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||
242 | QString QQuickDropEvent::html() const | - | ||||||||||||||||||||||||
243 | { | - | ||||||||||||||||||||||||
244 | return never executed: event->mimeData()->html();return event->mimeData()->html(); never executed: return event->mimeData()->html(); | 0 | ||||||||||||||||||||||||
245 | } | - | ||||||||||||||||||||||||
246 | - | |||||||||||||||||||||||||
247 | QString QQuickDropEvent::text() const | - | ||||||||||||||||||||||||
248 | { | - | ||||||||||||||||||||||||
249 | return never executed: event->mimeData()->text();return event->mimeData()->text(); never executed: return event->mimeData()->text(); | 0 | ||||||||||||||||||||||||
250 | } | - | ||||||||||||||||||||||||
251 | - | |||||||||||||||||||||||||
252 | QList<QUrl> QQuickDropEvent::urls() const | - | ||||||||||||||||||||||||
253 | { | - | ||||||||||||||||||||||||
254 | return never executed: event->mimeData()->urls();return event->mimeData()->urls(); never executed: return event->mimeData()->urls(); | 0 | ||||||||||||||||||||||||
255 | } | - | ||||||||||||||||||||||||
256 | - | |||||||||||||||||||||||||
257 | QStringList QQuickDropEvent::formats() const | - | ||||||||||||||||||||||||
258 | { | - | ||||||||||||||||||||||||
259 | return never executed: event->mimeData()->formats();return event->mimeData()->formats(); never executed: return event->mimeData()->formats(); | 0 | ||||||||||||||||||||||||
260 | } | - | ||||||||||||||||||||||||
261 | - | |||||||||||||||||||||||||
262 | void QQuickDropEvent::getDataAsString(QQmlV4Function *args) | - | ||||||||||||||||||||||||
263 | { | - | ||||||||||||||||||||||||
264 | if (args->length() != 0
| 0 | ||||||||||||||||||||||||
265 | QV4::ExecutionEngine *v4 = args->v4engine(); | - | ||||||||||||||||||||||||
266 | QV4::Scope scope(v4); | - | ||||||||||||||||||||||||
267 | QV4::ScopedValue v(scope, (*args)[0]); | - | ||||||||||||||||||||||||
268 | QString format = v->toQString(); | - | ||||||||||||||||||||||||
269 | QString rv = QString::fromUtf8(event->mimeData()->data(format)); | - | ||||||||||||||||||||||||
270 | args->setReturnValue(v4->newString(rv)->asReturnedValue()); | - | ||||||||||||||||||||||||
271 | } never executed: end of block | 0 | ||||||||||||||||||||||||
272 | } never executed: end of block | 0 | ||||||||||||||||||||||||
273 | - | |||||||||||||||||||||||||
274 | void QQuickDropEvent::getDataAsArrayBuffer(QQmlV4Function *args) | - | ||||||||||||||||||||||||
275 | { | - | ||||||||||||||||||||||||
276 | if (args->length() != 0
| 0-2 | ||||||||||||||||||||||||
277 | QV4::ExecutionEngine *v4 = args->v4engine(); | - | ||||||||||||||||||||||||
278 | QV4::Scope scope(v4); | - | ||||||||||||||||||||||||
279 | QV4::ScopedValue v(scope, (*args)[0]); | - | ||||||||||||||||||||||||
280 | const QString format = v->toQString(); | - | ||||||||||||||||||||||||
281 | args->setReturnValue(v4->newArrayBuffer(event->mimeData()->data(format))->asReturnedValue()); | - | ||||||||||||||||||||||||
282 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
283 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
284 | - | |||||||||||||||||||||||||
285 | void QQuickDropEvent::acceptProposedAction(QQmlV4Function *) | - | ||||||||||||||||||||||||
286 | { | - | ||||||||||||||||||||||||
287 | event->acceptProposedAction(); | - | ||||||||||||||||||||||||
288 | } never executed: end of block | 0 | ||||||||||||||||||||||||
289 | - | |||||||||||||||||||||||||
290 | void QQuickDropEvent::accept(QQmlV4Function *args) | - | ||||||||||||||||||||||||
291 | { | - | ||||||||||||||||||||||||
292 | Qt::DropAction action = event->dropAction(); | - | ||||||||||||||||||||||||
293 | - | |||||||||||||||||||||||||
294 | if (args->length() >= 1
| 2-108 | ||||||||||||||||||||||||
295 | QV4::Scope scope(args->v4engine()); | - | ||||||||||||||||||||||||
296 | QV4::ScopedValue v(scope, (*args)[0]); | - | ||||||||||||||||||||||||
297 | if (v->isInt32()
| 0-2 | ||||||||||||||||||||||||
298 | action = Qt::DropAction(v->integerValue()); executed 2 times by 1 test: action = Qt::DropAction(v->integerValue()); Executed by:
| 2 | ||||||||||||||||||||||||
299 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
300 | - | |||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||
302 | event->setDropAction(action); | - | ||||||||||||||||||||||||
303 | event->accept(); | - | ||||||||||||||||||||||||
304 | } executed 110 times by 2 tests: end of block Executed by:
| 110 | ||||||||||||||||||||||||
305 | - | |||||||||||||||||||||||||
306 | - | |||||||||||||||||||||||||
307 | - | |||||||||||||||||||||||||
308 | - | |||||||||||||||||||||||||
Switch to Source code | Preprocessed file |