OpenCoverage

qquickmousearea.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickmousearea.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9static bool qmlVisualTouchDebugging() { static enum { Yes, No, Unknown } status = Unknown; if (status == Unknown
status == UnknownDescription
TRUEevaluated 46 times by 23 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
FALSEevaluated 1966 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
) { status = No; if (__builtin_expect(!!(!qEnvironmentVariableIsEmpty("QML_VISUAL_TOUCH_DEBUGGING")), false)
__builtin_expe...ING")), false)Description
TRUEnever evaluated
FALSEevaluated 46 times by 23 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
) { const QByteArray v = qgetenv("QML_VISUAL_TOUCH_DEBUGGING"); if (v != "0"
v != "0"Description
TRUEnever evaluated
FALSEnever evaluated
&& v != "false"
v != "false"Description
TRUEnever evaluated
FALSEnever evaluated
) status = Yes;
never executed: status = Yes;
}
never executed: end of block
}
executed 46 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
return
executed 2012 times by 23 tests: return status == Yes;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
status == Yes;
executed 2012 times by 23 tests: return status == Yes;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
}
0-2012
10-
11extern const QLoggingCategory &DBG_HOVER_TRACE();-
12-
13QQuickMouseAreaPrivate::QQuickMouseAreaPrivate()-
14: enabled(true), scrollGestureEnabled(true), hovered(false), longPress(false),-
15 moved(false), stealMouse(false), doubleClick(false), preventStealing(false),-
16 propagateComposedEvents(false), overThreshold(false), pressed(nullptr),-
17 pressAndHoldInterval(-1)-
18-
19 , drag(nullptr)-
20-
21-
22 , cursor(nullptr)-
23-
24{-
25}
executed 2012 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
2012
26-
27QQuickMouseAreaPrivate::~QQuickMouseAreaPrivate()-
28{-
29-
30 delete drag;-
31-
32-
33 delete cursor;-
34-
35}
executed 1970 times by 21 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
1970
36-
37void QQuickMouseAreaPrivate::init()-
38{-
39 QQuickMouseArea * const q = q_func();-
40 q->setAcceptedMouseButtons(Qt::LeftButton);-
41 q->setAcceptTouchEvents(false);-
42 q->setFiltersChildMouseEvents(true);-
43 if (qmlVisualTouchDebugging()
qmlVisualTouchDebugging()Description
TRUEnever evaluated
FALSEevaluated 2012 times by 23 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
) {
0-2012
44 q->setFlag(QQuickItem::ItemHasContents);-
45 }
never executed: end of block
0
46}
executed 2012 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
2012
47-
48void QQuickMouseAreaPrivate::saveEvent(QMouseEvent *event)-
49{-
50 lastPos = event->localPos();-
51 lastScenePos = event->windowPos();-
52 lastButton = event->button();-
53 lastButtons = event->buttons();-
54 lastModifiers = event->modifiers();-
55 lastFlags = event->flags();-
56}
executed 953 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
953
57-
58bool QQuickMouseAreaPrivate::isPressAndHoldConnected()-
59{-
60 QQuickMouseArea * const q = q_func();-
61 do { QObject *sender = (q); void (QQuickMouseArea::*signal)(QQuickMouseEvent *) = &QQuickMouseArea::pressAndHold; static QMetaMethod method = QMetaMethod::fromSignal(signal); static int signalIdx = QMetaObjectPrivate::signalIndex(method); return
executed 26 times by 1 test: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickmousearea
QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
executed 26 times by 1 test: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickmousearea
} while (0);
26
62}-
63-
64bool QQuickMouseAreaPrivate::isDoubleClickConnected()-
65{-
66 QQuickMouseArea * const q = q_func();-
67 do { QObject *sender = (q); void (QQuickMouseArea::*signal)(QQuickMouseEvent *) = &QQuickMouseArea::doubleClicked; static QMetaMethod method = QMetaMethod::fromSignal(signal); static int signalIdx = QMetaObjectPrivate::signalIndex(method); return
executed 80 times by 2 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
executed 80 times by 2 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
} while (0);
80
68}-
69-
70bool QQuickMouseAreaPrivate::isClickConnected()-
71{-
72 QQuickMouseArea * const q = q_func();-
73 do { QObject *sender = (q); void (QQuickMouseArea::*signal)(QQuickMouseEvent *) = &QQuickMouseArea::clicked; static QMetaMethod method = QMetaMethod::fromSignal(signal); static int signalIdx = QMetaObjectPrivate::signalIndex(method); return
executed 138 times by 4 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
executed 138 times by 4 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
} while (0);
138
74}-
75-
76bool QQuickMouseAreaPrivate::isWheelConnected()-
77{-
78 QQuickMouseArea * const q = q_func();-
79 do { QObject *sender = (q); void (QQuickMouseArea::*signal)(QQuickWheelEvent *) = &QQuickMouseArea::wheel; static QMetaMethod method = QMetaMethod::fromSignal(signal); static int signalIdx = QMetaObjectPrivate::signalIndex(method); return
executed 2 times by 1 test: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickmousearea
QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
executed 2 times by 1 test: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickmousearea
} while (0);
2
80}-
81-
82void QQuickMouseAreaPrivate::propagate(QQuickMouseEvent* event, PropagateType t)-
83{-
84 QQuickMouseArea * const q = q_func();-
85 if (!window
!windowDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 106 times by 3 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
|| !propagateComposedEvents
!propagateComposedEventsDescription
TRUEevaluated 86 times by 3 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
2-106
86 return;
executed 88 times by 3 tests: return;
Executed by:
  • tst_qquickitem
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
88
87 QPointF scenePos = q->mapToScene(QPointF(event->x(), event->y()));-
88 propagateHelper(event, window->contentItem(), scenePos, t);-
89}
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
20
90-
91bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *item,const QPointF &sp, PropagateType sig)-
92{-
93-
94-
95 const QQuickMouseArea * const q = q_func();-
96 QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);-
97-
98 if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape
itemPrivate->f...hildrenToShapeDescription
TRUEnever evaluated
FALSEevaluated 92 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
0-92
99 QPointF p = item->mapFromScene(sp);-
100 if (!item->contains(p)
!item->contains(p)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
101 return
never executed: return false;
false;
never executed: return false;
0
102 }
never executed: end of block
0
103-
104 QList<QQuickItem *> children = itemPrivate->paintOrderChildItems();-
105 for (int ii = children.count() - 1; ii >= 0
ii >= 0Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_qquickmousearea
; --ii) {
52-72
106 QQuickItem *child = children.at(ii);-
107 if (!child->isVisible()
!child->isVisible()Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_qquickmousearea
|| !child->isEnabled()
!child->isEnabled()Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
0-72
108 continue;
never executed: continue;
0
109 if (propagateHelper(ev, child, sp, sig)
propagateHelpe...hild, sp, sig)Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
32-40
110 return
executed 40 times by 1 test: return true;
Executed by:
  • tst_qquickmousearea
true;
executed 40 times by 1 test: return true;
Executed by:
  • tst_qquickmousearea
40
111 }
executed 32 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
32
112-
113 QQuickMouseArea* ma = qobject_cast<QQuickMouseArea*>(item);-
114 if (ma
maDescription
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& ma != q
ma != qDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& ma->isEnabled()
ma->isEnabled()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& itemPrivate->acceptedMouseButtons() & ev->button()) {
2-40
115 switch (sig) {-
116 case
executed 10 times by 1 test: case Click:
Executed by:
  • tst_qquickmousearea
Click:
executed 10 times by 1 test: case Click:
Executed by:
  • tst_qquickmousearea
10
117 if (!ma->d_func()->isClickConnected()
!ma->d_func()-...ickConnected()Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
0-10
118 return
never executed: return false;
false;
never executed: return false;
0
119 break;
executed 10 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
10
120 case
executed 4 times by 1 test: case DoubleClick:
Executed by:
  • tst_qquickmousearea
DoubleClick:
executed 4 times by 1 test: case DoubleClick:
Executed by:
  • tst_qquickmousearea
4
121 if (!ma->d_func()->isDoubleClickConnected()
!ma->d_func()-...ickConnected()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
0-4
122 return
never executed: return false;
false;
never executed: return false;
0
123 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
4
124 case
executed 4 times by 1 test: case PressAndHold:
Executed by:
  • tst_qquickmousearea
PressAndHold:
executed 4 times by 1 test: case PressAndHold:
Executed by:
  • tst_qquickmousearea
4
125 if (!ma->d_func()->isPressAndHoldConnected()
!ma->d_func()-...oldConnected()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
0-4
126 return
never executed: return false;
false;
never executed: return false;
0
127 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
4
128 }-
129 QPointF p = item->mapFromScene(sp);-
130 if (item->contains(p)
item->contains(p)Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-18
131 ev->setX(p.x());-
132 ev->setY(p.y());-
133 ev->setAccepted(true);-
134 switch (sig) {-
135 case
executed 10 times by 1 test: case Click:
Executed by:
  • tst_qquickmousearea
Click:
executed 10 times by 1 test: case Click:
Executed by:
  • tst_qquickmousearea
ma->clicked(ev); break;
executed 10 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
10
136 case
executed 4 times by 1 test: case DoubleClick:
Executed by:
  • tst_qquickmousearea
DoubleClick:
executed 4 times by 1 test: case DoubleClick:
Executed by:
  • tst_qquickmousearea
ma->doubleClicked(ev); break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
4
137 case
executed 4 times by 1 test: case PressAndHold:
Executed by:
  • tst_qquickmousearea
PressAndHold:
executed 4 times by 1 test: case PressAndHold:
Executed by:
  • tst_qquickmousearea
ma->pressAndHold(ev); break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
4
138 }-
139 if (ev->isAccepted()
ev->isAccepted()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
2-16
140 return
executed 16 times by 1 test: return true;
Executed by:
  • tst_qquickmousearea
true;
executed 16 times by 1 test: return true;
Executed by:
  • tst_qquickmousearea
16
141 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
2
142 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
2
143 return
executed 36 times by 1 test: return false;
Executed by:
  • tst_qquickmousearea
false;
executed 36 times by 1 test: return false;
Executed by:
  • tst_qquickmousearea
36
144-
145}-
146QQuickMouseArea::QQuickMouseArea(QQuickItem *parent)-
147 : QQuickItem(*(new QQuickMouseAreaPrivate), parent)-
148{-
149 QQuickMouseAreaPrivate * const d = d_func();-
150 d->init();-
151-
152-
153-
154-
155 setCursor(Qt::ArrowCursor);-
156-
157}
executed 2012 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
2012
158-
159QQuickMouseArea::~QQuickMouseArea()-
160{-
161}-
162qreal QQuickMouseArea::mouseX() const-
163{-
164 const QQuickMouseAreaPrivate * const d = d_func();-
165 return
executed 64 times by 3 tests: return d->lastPos.x();
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
d->lastPos.x();
executed 64 times by 3 tests: return d->lastPos.x();
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
64
166}-
167-
168qreal QQuickMouseArea::mouseY() const-
169{-
170 const QQuickMouseAreaPrivate * const d = d_func();-
171 return
executed 64 times by 3 tests: return d->lastPos.y();
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
d->lastPos.y();
executed 64 times by 3 tests: return d->lastPos.y();
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
64
172}-
173bool QQuickMouseArea::isEnabled() const-
174{-
175 const QQuickMouseAreaPrivate * const d = d_func();-
176 return
executed 48 times by 2 tests: return d->enabled;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
d->enabled;
executed 48 times by 2 tests: return d->enabled;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
48
177}-
178-
179void QQuickMouseArea::setEnabled(bool a)-
180{-
181 QQuickMouseAreaPrivate * const d = d_func();-
182 if (a != d->enabled
a != d->enabledDescription
TRUEevaluated 112 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
) {
10-112
183 d->enabled = a;-
184 enabledChanged();-
185 }
executed 112 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickmousearea
112
186}
executed 122 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickmousearea
122
187bool QQuickMouseArea::isScrollGestureEnabled() const-
188{-
189 const QQuickMouseAreaPrivate * const d = d_func();-
190 return
executed 26 times by 2 tests: return d->scrollGestureEnabled;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
d->scrollGestureEnabled;
executed 26 times by 2 tests: return d->scrollGestureEnabled;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
26
191}-
192-
193void QQuickMouseArea::setScrollGestureEnabled(bool e)-
194{-
195 QQuickMouseAreaPrivate * const d = d_func();-
196 if (e != d->scrollGestureEnabled
e != d->scrollGestureEnabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
197 d->scrollGestureEnabled = e;-
198 scrollGestureEnabledChanged();-
199 }
never executed: end of block
0
200}
never executed: end of block
0
201bool QQuickMouseArea::preventStealing() const-
202{-
203 const QQuickMouseAreaPrivate * const d = d_func();-
204 return
executed 24 times by 1 test: return d->preventStealing;
Executed by:
  • tst_qqmlenginedebugservice
d->preventStealing;
executed 24 times by 1 test: return d->preventStealing;
Executed by:
  • tst_qqmlenginedebugservice
24
205}-
206-
207void QQuickMouseArea::setPreventStealing(bool prevent)-
208{-
209 QQuickMouseAreaPrivate * const d = d_func();-
210 if (prevent != d->preventStealing
prevent != d->preventStealingDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
2-6
211 d->preventStealing = prevent;-
212 setKeepMouseGrab(d->preventStealing && d->enabled);-
213 preventStealingChanged();-
214 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
6
215}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
8
216bool QQuickMouseArea::propagateComposedEvents() const-
217{-
218 const QQuickMouseAreaPrivate * const d = d_func();-
219 return
executed 24 times by 1 test: return d->propagateComposedEvents;
Executed by:
  • tst_qqmlenginedebugservice
d->propagateComposedEvents;
executed 24 times by 1 test: return d->propagateComposedEvents;
Executed by:
  • tst_qqmlenginedebugservice
24
220}-
221-
222void QQuickMouseArea::setPropagateComposedEvents(bool prevent)-
223{-
224 QQuickMouseAreaPrivate * const d = d_func();-
225 if (prevent != d->propagateComposedEvents
prevent != d->...ComposedEventsDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-60
226 d->propagateComposedEvents = prevent;-
227 setKeepMouseGrab(d->propagateComposedEvents && d->enabled);-
228 propagateComposedEventsChanged();-
229 }
executed 60 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
60
230}
executed 60 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
60
231Qt::MouseButtons QQuickMouseArea::pressedButtons() const-
232{-
233 const QQuickMouseAreaPrivate * const d = d_func();-
234 return
executed 60 times by 3 tests: return d->pressed;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
d->pressed;
executed 60 times by 3 tests: return d->pressed;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
60
235}-
236-
237void QQuickMouseArea::mousePressEvent(QMouseEvent *event)-
238{-
239 QQuickMouseAreaPrivate * const d = d_func();-
240 d->moved = false;-
241 d->stealMouse = d->preventStealing;-
242 d->overThreshold = false;-
243 if (!d->enabled
!d->enabledDescription
TRUEevaluated 98 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 292 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
|| !(event->button() & acceptedMouseButtons())
!(event->butto...ouseButtons())Description
TRUEnever evaluated
FALSEevaluated 292 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
) {
0-292
244 QQuickItem::mousePressEvent(event);-
245 }
executed 98 times by 2 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickmousearea
else {
98
246 d->longPress = false;-
247 d->saveEvent(event);-
248-
249 if (d->drag
d->dragDescription
TRUEevaluated 80 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 212 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
)
80-212
250 d->drag->setActive(false);
executed 80 times by 4 tests: d->drag->setActive(false);
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
80
251-
252 setHovered(true);-
253 d->startScene = event->windowPos();-
254 setKeepMouseGrab(d->stealMouse);-
255 event->setAccepted(setPressed(event->button(), true, event->source()));-
256 if (event->isAccepted()
event->isAccepted()Description
TRUEevaluated 276 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
16-276
257 d->pressAndHoldTimer.start(pressAndHoldInterval(), this);
executed 276 times by 6 tests: d->pressAndHoldTimer.start(pressAndHoldInterval(), this);
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
276
258 }
executed 292 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
292
259}-
260-
261void QQuickMouseArea::mouseMoveEvent(QMouseEvent *event)-
262{-
263 QQuickMouseAreaPrivate * const d = d_func();-
264 if (!d->enabled
!d->enabledDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 397 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& !d->pressed
!d->pressedDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
0-397
265 QQuickItem::mouseMoveEvent(event);-
266 return;
never executed: return;
0
267 }-
268-
269 d->saveEvent(event);-
270-
271-
272-
273 setHovered(contains(d->lastPos));-
274-
275-
276 if (d->drag
d->dragDescription
TRUEevaluated 338 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 63 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& d->drag->target()
d->drag->target()Description
TRUEevaluated 338 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEnever evaluated
) {
0-338
277 if (!d->moved
!d->movedDescription
TRUEevaluated 82 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 256 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
) {
82-256
278 d->targetStartPos = d->drag->target()->parentItem()
d->drag->targe...->parentItem()Description
TRUEevaluated 82 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEnever evaluated
0-82
279 ? d->drag->target()->parentItem()->mapToScene(d->drag->target()->position())-
280 : d->drag->target()->position();-
281 }
executed 82 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
82
282-
283 QPointF startLocalPos;-
284 QPointF curLocalPos;-
285 if (drag()->target()->parentItem()
drag()->target()->parentItem()Description
TRUEevaluated 338 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEnever evaluated
) {
0-338
286 startLocalPos = drag()->target()->parentItem()->mapFromScene(d->startScene);-
287 curLocalPos = drag()->target()->parentItem()->mapFromScene(event->windowPos());-
288 }
executed 338 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
else {
338
289 startLocalPos = d->startScene;-
290 curLocalPos = event->windowPos();-
291 }
never executed: end of block
0
292-
293 if (keepMouseGrab()
keepMouseGrab()Description
TRUEevaluated 232 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 106 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& d->stealMouse
d->stealMouseDescription
TRUEevaluated 232 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEnever evaluated
&& d->overThreshold
d->overThresholdDescription
TRUEevaluated 220 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& !d->drag->active()
!d->drag->active()Description
TRUEevaluated 60 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 160 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
)
0-232
294 d->drag->setActive(true);
executed 60 times by 4 tests: d->drag->setActive(true);
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
60
295-
296 QPointF startPos = d->drag->target()->parentItem()
d->drag->targe...->parentItem()Description
TRUEevaluated 338 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEnever evaluated
0-338
297 ? d->drag->target()->parentItem()->mapFromScene(d->targetStartPos)-
298 : d->targetStartPos;-
299-
300 bool dragX = drag()->axis() & QQuickDrag::XAxis;-
301 bool dragY = drag()->axis() & QQuickDrag::YAxis;-
302-
303 QPointF dragPos = d->drag->target()->position();-
304 QPointF boundedDragPos = dragPos;-
305 if (dragX
dragXDescription
TRUEevaluated 324 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
14-324
306 dragPos.setX(startPos.x() + curLocalPos.x() - startLocalPos.x());-
307 boundedDragPos.setX(qBound(-
308 d->drag->xmin(),-
309 dragPos.x(),-
310 d->drag->xmax()));-
311 }
executed 324 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
324
312 if (dragY
dragYDescription
TRUEevaluated 318 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
20-318
313 dragPos.setY(startPos.y() + curLocalPos.y() - startLocalPos.y());-
314 boundedDragPos.setY(qBound(-
315 d->drag->ymin(),-
316 dragPos.y(),-
317 d->drag->ymax()));-
318 }
executed 318 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
318
319-
320 QPointF targetPos = d->drag->target()->position();-
321-
322 if (d->drag->active()
d->drag->active()Description
TRUEevaluated 220 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 118 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
)
118-220
323 d->drag->target()->setPosition(boundedDragPos);
executed 220 times by 4 tests: d->drag->target()->setPosition(boundedDragPos);
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
220
324-
325 bool dragOverThresholdX = QQuickWindowPrivate::dragOverThreshold(dragPos.x() - startPos.x(),-
326 Qt::XAxis, event, d->drag->threshold());-
327 bool dragOverThresholdY = QQuickWindowPrivate::dragOverThreshold(dragPos.y() - startPos.y(),-
328 Qt::YAxis, event, d->drag->threshold());-
329-
330 if (!d->overThreshold
!d->overThresholdDescription
TRUEevaluated 118 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 220 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& (((
(targetPos.x()...edDragPos.x())Description
TRUEevaluated 48 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
targetPos.x() != boundedDragPos.x())
(targetPos.x()...edDragPos.x())Description
TRUEevaluated 48 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
&& dragOverThresholdX
dragOverThresholdXDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicklistview
) ||
8-220
331 ((
(targetPos.y()...edDragPos.y())Description
TRUEevaluated 54 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
targetPos.y() != boundedDragPos.y())
(targetPos.y()...edDragPos.y())Description
TRUEevaluated 54 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
&& dragOverThresholdY
dragOverThresholdYDescription
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)))
20-54
332 {-
333 d->overThreshold = true;-
334 if (d->drag->smoothed()
d->drag->smoothed()Description
TRUEevaluated 72 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
2-72
335 d->startScene = event->windowPos();
executed 72 times by 4 tests: d->startScene = event->windowPos();
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
72
336 }
executed 74 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
74
337-
338 if (!keepMouseGrab()
!keepMouseGrab()Description
TRUEevaluated 106 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 232 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& d->overThreshold
d->overThresholdDescription
TRUEevaluated 70 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
) {
36-232
339 setKeepMouseGrab(true);-
340 d->stealMouse = true;-
341 }
executed 70 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
70
342-
343 d->moved = true;-
344 }
executed 338 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
338
345-
346-
347 QQuickMouseEvent &me = d->quickMouseEvent;-
348 me.reset(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress, event->flags());-
349 me.setSource(event->source());-
350 mouseXChanged(&me);-
351 me.setPosition(d->lastPos);-
352 mouseYChanged(&me);-
353 me.setPosition(d->lastPos);-
354 positionChanged(&me);-
355}
executed 401 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
401
356-
357void QQuickMouseArea::mouseReleaseEvent(QMouseEvent *event)-
358{-
359 QQuickMouseAreaPrivate * const d = d_func();-
360 d->stealMouse = false;-
361 d->overThreshold = false;-
362 if (!d->enabled
!d->enabledDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 220 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
&& !d->pressed
!d->pressedDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
0-220
363 QQuickItem::mouseReleaseEvent(event);-
364 }
never executed: end of block
else {
0
365 d->saveEvent(event);-
366 setPressed(event->button(), false, event->source());-
367 if (!d->pressed
!d->pressedDescription
TRUEevaluated 220 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
2-220
368-
369-
370 if (d->drag
d->dragDescription
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 162 times by 4 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
)
58-162
371 d->drag->setActive(false);
executed 58 times by 4 tests: d->drag->setActive(false);
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
58
372-
373-
374 if (!acceptHoverEvents()
!acceptHoverEvents()Description
TRUEevaluated 208 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
12-208
375 setHovered(false);
executed 208 times by 6 tests: setHovered(false);
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
208
376 QQuickWindow *w = window();-
377 if (w
wDescription
TRUEevaluated 218 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& w->mouseGrabberItem() == this
w->mouseGrabberItem() == thisDescription
TRUEevaluated 218 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
)
0-218
378 ungrabMouse();
executed 218 times by 6 tests: ungrabMouse();
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
218
379 setKeepMouseGrab(false);-
380 }
executed 220 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
220
381 }
executed 222 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
222
382 d->doubleClick = false;-
383}
executed 222 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
222
384-
385void QQuickMouseArea::mouseDoubleClickEvent(QMouseEvent *event)-
386{-
387 QQuickMouseAreaPrivate * const d = d_func();-
388 if (d->enabled
d->enabledDescription
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEnever evaluated
) {
0-38
389 d->saveEvent(event);-
390 QQuickMouseEvent &me = d->quickMouseEvent;-
391 me.reset(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true,-
392 false, event->flags());-
393 me.setSource(event->source());-
394 me.setAccepted(d->isDoubleClickConnected());-
395 this->doubleClicked(&me);-
396 if (!me.isAccepted()
!me.isAccepted()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
16-22
397 d->propagate(&me, QQuickMouseAreaPrivate::DoubleClick);
executed 22 times by 2 tests: d->propagate(&me, QQuickMouseAreaPrivate::DoubleClick);
Executed by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
22
398 d->doubleClick = d->isDoubleClickConnected()
d->isDoubleClickConnected()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
|| me.isAccepted()
me.isAccepted()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
;
2-20
399 }
executed 38 times by 2 tests: end of block
Executed by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
38
400 QQuickItem::mouseDoubleClickEvent(event);-
401}
executed 38 times by 2 tests: end of block
Executed by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
38
402-
403void QQuickMouseArea::hoverEnterEvent(QHoverEvent *event)-
404{-
405 QQuickMouseAreaPrivate * const d = d_func();-
406 if (!d->enabled
!d->enabledDescription
TRUEnever evaluated
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquickwidget
&& !d->pressed
!d->pressedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-24
407 QQuickItem::hoverEnterEvent(event);-
408 }
never executed: end of block
else {
0
409 d->lastPos = event->posF();-
410 d->lastModifiers = event->modifiers();-
411 setHovered(true);-
412 QQuickMouseEvent &me = d->quickMouseEvent;-
413 me.reset(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, Qt::NoButton, d->lastModifiers, false, false);-
414 mouseXChanged(&me);-
415 me.setPosition(d->lastPos);-
416 mouseYChanged(&me);-
417 me.setPosition(d->lastPos);-
418 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquickwidget
24
419}-
420-
421void QQuickMouseArea::hoverMoveEvent(QHoverEvent *event)-
422{-
423 QQuickMouseAreaPrivate * const d = d_func();-
424 if (!d->enabled
!d->enabledDescription
TRUEnever evaluated
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquickwidget
&& !d->pressed
!d->pressedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-12
425 QQuickItem::hoverMoveEvent(event);-
426 }
never executed: end of block
else if (d->lastPos != event->posF()
d->lastPos != event->posF()Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickwidget
) {
0-10
427 d->lastPos = event->posF();-
428 d->lastModifiers = event->modifiers();-
429 QQuickMouseEvent &me = d->quickMouseEvent;-
430 me.reset(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, Qt::NoButton, d->lastModifiers, false, false);-
431 mouseXChanged(&me);-
432 me.setPosition(d->lastPos);-
433 mouseYChanged(&me);-
434 me.setPosition(d->lastPos);-
435 positionChanged(&me);-
436 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qquickmousearea
  • tst_qquicktext
10
437}
executed 12 times by 3 tests: end of block
Executed by:
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquickwidget
12
438-
439void QQuickMouseArea::hoverLeaveEvent(QHoverEvent *event)-
440{-
441 QQuickMouseAreaPrivate * const d = d_func();-
442 if (!d->enabled
!d->enabledDescription
TRUEnever evaluated
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquickwidget
&& !d->pressed
!d->pressedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-10
443 QQuickItem::hoverLeaveEvent(event);
never executed: QQuickItem::hoverLeaveEvent(event);
0
444 else-
445 setHovered(false);
executed 10 times by 2 tests: setHovered(false);
Executed by:
  • tst_qquickmousearea
  • tst_qquickwidget
10
446}-
447-
448-
449void QQuickMouseArea::wheelEvent(QWheelEvent *event)-
450{-
451 QQuickMouseAreaPrivate * const d = d_func();-
452 if (!d->enabled
!d->enabledDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
|| (!isScrollGestureEnabled()
!isScrollGestureEnabled()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& event->source() != Qt::MouseEventNotSynthesized
event->source(...NotSynthesizedDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0-2
453 QQuickItem::wheelEvent(event);-
454 return;
never executed: return;
0
455 }-
456-
457 QQuickWheelEvent &we = d->quickWheelEvent;-
458 we.reset(event->posF().x(), event->posF().y(), event->angleDelta(), event->pixelDelta(),-
459 event->buttons(), event->modifiers(), event->inverted());-
460 we.setAccepted(d->isWheelConnected());-
461 wheel(&we);-
462 if (!we.isAccepted()
!we.isAccepted()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
0-2
463 QQuickItem::wheelEvent(event);
never executed: QQuickItem::wheelEvent(event);
0
464}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
2
465-
466-
467void QQuickMouseArea::ungrabMouse()-
468{-
469 QQuickMouseAreaPrivate * const d = d_func();-
470 if (d->pressed
d->pressedDescription
TRUEevaluated 40 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 426 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
) {
40-426
471-
472-
473 d->pressed = Qt::NoButton;-
474 d->stealMouse = false;-
475 d->doubleClick = false;-
476 d->overThreshold = false;-
477 setKeepMouseGrab(false);-
478-
479-
480 if (d->drag
d->dragDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 30 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
)
10-30
481 d->drag->setActive(false);
executed 10 times by 1 test: d->drag->setActive(false);
Executed by:
  • tst_qquickmousearea
10
482-
483-
484 canceled();-
485 pressedChanged();-
486 containsPressChanged();-
487 pressedButtonsChanged();-
488-
489 if (d->hovered
d->hoveredDescription
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
&& !isUnderMouse()
!isUnderMouse()Description
TRUEnever evaluated
FALSEevaluated 38 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickmousearea
  • tst_qquickpathview
) {
0-38
490 d->hovered = false;-
491 hoveredChanged();-
492 }
never executed: end of block
0
493 }
executed 40 times by 4 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
40
494}
executed 466 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
466
495-
496void QQuickMouseArea::mouseUngrabEvent()-
497{-
498 ungrabMouse();-
499}
executed 248 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
248
500-
501bool QQuickMouseArea::sendMouseEvent(QMouseEvent *event)-
502{-
503 QQuickMouseAreaPrivate * const d = d_func();-
504 QPointF localPos = mapFromScene(event->windowPos());-
505-
506 QQuickWindow *c = window();-
507 QQuickItem *grabber = c
cDescription
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
? c->mouseGrabberItem() : nullptr;
0-86
508 bool stealThisEvent = d->stealMouse;-
509 if ((stealThisEvent
stealThisEventDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_qquickmousearea
|| contains(localPos)
contains(localPos)Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) && (!grabber
!grabberDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquickmousearea
|| !grabber->keepMouseGrab()
!grabber->keepMouseGrab()Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)) {
0-62
510 QMouseEvent mouseEvent(event->type(), localPos, event->windowPos(), event->screenPos(),-
511 event->button(), event->buttons(), event->modifiers());-
512 mouseEvent.setAccepted(false);-
513-
514 switch (event->type()) {-
515 case
executed 38 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmousearea
QEvent::MouseMove:
executed 38 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmousearea
38
516 mouseMoveEvent(&mouseEvent);-
517 break;
executed 38 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
38
518 case
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmousearea
QEvent::MouseButtonPress:
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmousearea
24
519 mousePressEvent(&mouseEvent);-
520 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
24
521 case
never executed: case QEvent::MouseButtonRelease:
QEvent::MouseButtonRelease:
never executed: case QEvent::MouseButtonRelease:
0
522 mouseReleaseEvent(&mouseEvent);-
523 stealThisEvent = d->stealMouse;-
524 break;
never executed: break;
0
525 default
never executed: default:
:
never executed: default:
0
526 break;
never executed: break;
0
527 }-
528 grabber = c
cDescription
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
? c->mouseGrabberItem() : nullptr;
0-62
529 if (grabber
grabberDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& stealThisEvent
stealThisEventDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& !grabber->keepMouseGrab()
!grabber->keepMouseGrab()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
&& grabber != this
grabber != thisDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
)
0-38
530 grabMouse();
executed 10 times by 1 test: grabMouse();
Executed by:
  • tst_qquickmousearea
10
531-
532 return
executed 62 times by 1 test: return stealThisEvent;
Executed by:
  • tst_qquickmousearea
stealThisEvent;
executed 62 times by 1 test: return stealThisEvent;
Executed by:
  • tst_qquickmousearea
62
533 }-
534 if (event->type() == QEvent::MouseButtonRelease
event->type() ...eButtonReleaseDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
10-14
535 if (d->pressed
d->pressedDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-14
536 d->pressed &= ~event->button();-
537 pressedButtonsChanged();-
538 if (!d->pressed
!d->pressedDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-14
539-
540 d->stealMouse = false;-
541 d->overThreshold = false;-
542 if (c
cDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
&& c->mouseGrabberItem() == this
c->mouseGrabberItem() == thisDescription
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
0-14
543 ungrabMouse();
never executed: ungrabMouse();
0
544 canceled();-
545 pressedChanged();-
546 containsPressChanged();-
547 if (d->hovered
d->hoveredDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-14
548 d->hovered = false;-
549 hoveredChanged();-
550 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
14
551 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
14
552 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
14
553 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
14
554 return
executed 24 times by 1 test: return false;
Executed by:
  • tst_qquickmousearea
false;
executed 24 times by 1 test: return false;
Executed by:
  • tst_qquickmousearea
24
555}-
556-
557bool QQuickMouseArea::childMouseEventFilter(QQuickItem *i, QEvent *e)-
558{-
559 QQuickMouseAreaPrivate * const d = d_func();-
560 if (!d->pressed
!d->pressedDescription
TRUEevaluated 102 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 80 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&&
80-102
561 (!d->enabled
!d->enabledDescription
TRUEnever evaluated
FALSEevaluated 102 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
|| !isVisible()
!isVisible()Description
TRUEnever evaluated
FALSEevaluated 102 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
0-102
562-
563 || !d->drag
!d->dragDescription
TRUEevaluated 60 times by 2 tests
Evaluated by:
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
|| !d->drag->filterChildren()
!d->drag->filterChildren()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquickmousearea
4-60
564-
565 )-
566 )-
567 return
executed 64 times by 3 tests: return QQuickItem::childMouseEventFilter(i, e);
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
QQuickItem::childMouseEventFilter(i, e);
executed 64 times by 3 tests: return QQuickItem::childMouseEventFilter(i, e);
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
64
568 switch (e->type()) {-
569 case
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmousearea
QEvent::MouseButtonPress:
executed 24 times by 1 test: case QEvent::MouseButtonPress:
Executed by:
  • tst_qquickmousearea
24
570 case
executed 48 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmousearea
QEvent::MouseMove:
executed 48 times by 1 test: case QEvent::MouseMove:
Executed by:
  • tst_qquickmousearea
48
571 case
executed 14 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmousearea
QEvent::MouseButtonRelease:
executed 14 times by 1 test: case QEvent::MouseButtonRelease:
Executed by:
  • tst_qquickmousearea
14
572 return
executed 86 times by 1 test: return sendMouseEvent(static_cast<QMouseEvent *>(e));
Executed by:
  • tst_qquickmousearea
sendMouseEvent(static_cast<QMouseEvent *>(e));
executed 86 times by 1 test: return sendMouseEvent(static_cast<QMouseEvent *>(e));
Executed by:
  • tst_qquickmousearea
86
573 default
executed 32 times by 1 test: default:
Executed by:
  • tst_qquickmousearea
:
executed 32 times by 1 test: default:
Executed by:
  • tst_qquickmousearea
32
574 break;
executed 32 times by 1 test: break;
Executed by:
  • tst_qquickmousearea
32
575 }-
576-
577 return
executed 32 times by 1 test: return QQuickItem::childMouseEventFilter(i, e);
Executed by:
  • tst_qquickmousearea
QQuickItem::childMouseEventFilter(i, e);
executed 32 times by 1 test: return QQuickItem::childMouseEventFilter(i, e);
Executed by:
  • tst_qquickmousearea
32
578}-
579-
580void QQuickMouseArea::timerEvent(QTimerEvent *event)-
581{-
582 QQuickMouseAreaPrivate * const d = d_func();-
583 if (event->timerId() == d->pressAndHoldTimer.timerId()
event->timerId...imer.timerId()Description
TRUEevaluated 26 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-26
584 d->pressAndHoldTimer.stop();-
585-
586 bool dragged = d->drag
d->dragDescription
TRUEnever evaluated
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
&& d->drag->active()
d->drag->active()Description
TRUEnever evaluated
FALSEnever evaluated
;
0-26
587-
588-
589-
590 if (d->pressed && dragged == false
dragged == falseDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
&& d->hovered == true
d->hovered == trueDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-22
591 d->longPress = true;-
592 QQuickMouseEvent &me = d->quickMouseEvent;-
593 me.reset(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress, d->lastFlags);-
594 me.setSource(Qt::MouseEventSynthesizedByQt);-
595 me.setAccepted(d->isPressAndHoldConnected());-
596 pressAndHold(&me);-
597 if (!me.isAccepted()
!me.isAccepted()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
10-12
598 d->propagate(&me, QQuickMouseAreaPrivate::PressAndHold);
executed 12 times by 1 test: d->propagate(&me, QQuickMouseAreaPrivate::PressAndHold);
Executed by:
  • tst_qquickmousearea
12
599 if (!me.isAccepted()
!me.isAccepted()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
8-14
600 d->longPress = false;
executed 8 times by 1 test: d->longPress = false;
Executed by:
  • tst_qquickmousearea
8
601 }
executed 22 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
22
602 }
executed 26 times by 3 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
26
603}
executed 26 times by 3 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
26
604-
605void QQuickMouseArea::windowDeactivateEvent()-
606{-
607 ungrabMouse();-
608 QQuickItem::windowDeactivateEvent();-
609}
never executed: end of block
0
610-
611void QQuickMouseArea::geometryChanged(const QRectF &newGeometry,-
612 const QRectF &oldGeometry)-
613{-
614 QQuickMouseAreaPrivate * const d = d_func();-
615 QQuickItem::geometryChanged(newGeometry, oldGeometry);-
616-
617 if (d->lastScenePos.isNull
d->lastScenePos.isNullDescription
TRUEevaluated 1992 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
FALSEevaluated 1226 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
)
1226-1992
618 d->lastScenePos = mapToScene(d->lastPos);
executed 1992 times by 19 tests: d->lastScenePos = mapToScene(d->lastPos);
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
1992
619 else if (newGeometry.x() != oldGeometry.x()
newGeometry.x(...ldGeometry.x()Description
TRUEevaluated 216 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 1010 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
|| newGeometry.y() != oldGeometry.y()
newGeometry.y(...ldGeometry.y()Description
TRUEevaluated 116 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
FALSEevaluated 894 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_touchmouse
)
116-1010
620 d->lastPos = mapFromScene(d->lastScenePos);
executed 332 times by 4 tests: d->lastPos = mapFromScene(d->lastScenePos);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
332
621}
executed 3218 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
3218
622-
623void QQuickMouseArea::itemChange(ItemChange change, const ItemChangeData &value)-
624{-
625 QQuickMouseAreaPrivate * const d = d_func();-
626 switch (change) {-
627 case
executed 64 times by 4 tests: case ItemVisibleHasChanged:
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickloader
  • tst_qquickmousearea
ItemVisibleHasChanged:
executed 64 times by 4 tests: case ItemVisibleHasChanged:
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickloader
  • tst_qquickmousearea
64
628 if (acceptHoverEvents()
acceptHoverEvents()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickloader
&& d->hovered != (isVisible()
isVisible()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& isUnderMouse()
isUnderMouse()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
)
d->hovered != ...sUnderMouse())Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
0-60
629 if (!d->hovered
!d->hoveredDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-2
630 QPointF cursorPos = QGuiApplicationPrivate::lastCursorPosition;-
631 d->lastScenePos = d->window->mapFromGlobal(cursorPos.toPoint());-
632 d->lastPos = mapFromScene(d->lastScenePos);-
633 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
2
634 setHovered(!d->hovered);-
635 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
2
636 break;
executed 64 times by 4 tests: break;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquickloader
  • tst_qquickmousearea
64
637 default
executed 8206 times by 23 tests: default:
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
:
executed 8206 times by 23 tests: default:
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
8206
638 break;
executed 8206 times by 23 tests: break;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
8206
639 }-
640-
641 QQuickItem::itemChange(change, value);-
642}
executed 8270 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquickwidget
  • tst_signalspy
  • tst_touchmouse
8270
643bool QQuickMouseArea::hoverEnabled() const-
644{-
645 return
executed 24 times by 1 test: return acceptHoverEvents();
Executed by:
  • tst_qqmlenginedebugservice
acceptHoverEvents();
executed 24 times by 1 test: return acceptHoverEvents();
Executed by:
  • tst_qqmlenginedebugservice
24
646}-
647-
648void QQuickMouseArea::setHoverEnabled(bool h)-
649{-
650 if (h == acceptHoverEvents()
h == acceptHoverEvents()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 162 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquickwidget
  • tst_touchmouse
)
2-162
651 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickmousearea
2
652-
653 setAcceptHoverEvents(h);-
654 hoverEnabledChanged();-
655}
executed 162 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquickwidget
  • tst_touchmouse
162
656bool QQuickMouseArea::hovered() const-
657{-
658 const QQuickMouseAreaPrivate * const d = d_func();-
659 return
executed 224 times by 4 tests: return d->hovered;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
  • tst_qquickwidget
  • tst_touchmouse
d->hovered;
executed 224 times by 4 tests: return d->hovered;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
  • tst_qquickwidget
  • tst_touchmouse
224
660}-
661-
662-
663-
664-
665-
666bool QQuickMouseArea::pressed() const-
667{-
668 const QQuickMouseAreaPrivate * const d = d_func();-
669 return
executed 688 times by 8 tests: return d->pressed;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickstates
  • tst_signalspy
d->pressed;
executed 688 times by 8 tests: return d->pressed;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickbehaviors
  • tst_qquickflickable
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickstates
  • tst_signalspy
688
670}-
671bool QQuickMouseArea::containsPress() const-
672{-
673 const QQuickMouseAreaPrivate * const d = d_func();-
674 return
executed 68 times by 2 tests: return d->pressed && d->hovered;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
d->pressed && d->hovered;
executed 68 times by 2 tests: return d->pressed && d->hovered;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
68
675}-
676-
677void QQuickMouseArea::setHovered(bool h)-
678{-
679 QQuickMouseAreaPrivate * const d = d_func();-
680 if (d->hovered != h
d->hovered != hDescription
TRUEevaluated 510 times by 8 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquickwidget
FALSEevaluated 427 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
) {
427-510
681 for (bool qt_category_enabled = DBG_HOVER_TRACE().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 510 times by 8 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquickwidget
; qt_category_enabled = false) QMessageLogger(__FILE__, 1155, __PRETTY_FUNCTION__, DBG_HOVER_TRACE().categoryName()).debug() << this << d->hovered << "->" << h;
never executed: QMessageLogger(__FILE__, 1155, __PRETTY_FUNCTION__, DBG_HOVER_TRACE().categoryName()).debug() << this << d->hovered << "->" << h;
0-510
682 d->hovered = h;-
683 hoveredChanged();-
684 d->hovered ? entered() : exited();-
685 if (d->pressed
d->pressedDescription
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 488 times by 8 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquickwidget
)
22-488
686 containsPressChanged();
executed 22 times by 3 tests: containsPressChanged();
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
22
687 }
executed 510 times by 8 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquickwidget
510
688}
executed 937 times by 8 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquickwidget
937
689Qt::MouseButtons QQuickMouseArea::acceptedButtons() const-
690{-
691 return
executed 24 times by 1 test: return acceptedMouseButtons();
Executed by:
  • tst_qqmlenginedebugservice
acceptedMouseButtons();
executed 24 times by 1 test: return acceptedMouseButtons();
Executed by:
  • tst_qqmlenginedebugservice
24
692}-
693-
694void QQuickMouseArea::setAcceptedButtons(Qt::MouseButtons buttons)-
695{-
696 if (buttons != acceptedMouseButtons()
buttons != acc...MouseButtons()Description
TRUEevaluated 54 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquicktext
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
16-54
697 setAcceptedMouseButtons(buttons);-
698 acceptedButtonsChanged();-
699 }
executed 54 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquicktext
54
700}
executed 70 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquicktext
70
701-
702bool QQuickMouseArea::setPressed(Qt::MouseButton button, bool p, Qt::MouseEventSource source)-
703{-
704 QQuickMouseAreaPrivate * const d = d_func();-
705-
706-
707 bool dragged = d->drag
d->dragDescription
TRUEevaluated 138 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 376 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
&& d->drag->active()
d->drag->active()Description
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 80 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
;
58-376
708-
709-
710-
711 bool wasPressed = d->pressed & button;-
712 bool isclick = wasPressed
wasPressedDescription
TRUEevaluated 228 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 286 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
&& p == false
p == falseDescription
TRUEevaluated 222 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& dragged == false
dragged == falseDescription
TRUEevaluated 164 times by 4 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 58 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& d->hovered == true
d->hovered == trueDescription
TRUEevaluated 162 times by 4 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
;
2-286
713 Qt::MouseButtons oldPressed = d->pressed;-
714-
715 if (wasPressed != p
wasPressed != pDescription
TRUEevaluated 508 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
6-508
716 QQuickMouseEvent &me = d->quickMouseEvent;-
717 me.reset(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress, d->lastFlags);-
718 me.setSource(source);-
719 if (p
pDescription
TRUEevaluated 286 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 222 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
) {
222-286
720 d->pressed |= button;-
721 if (!d->doubleClick
!d->doubleClickDescription
TRUEevaluated 286 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEnever evaluated
)
0-286
722 pressed(&me);
executed 286 times by 6 tests: pressed(&me);
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
286
723 me.setPosition(d->lastPos);-
724 mouseXChanged(&me);-
725 me.setPosition(d->lastPos);-
726 mouseYChanged(&me);-
727-
728 if (!me.isAccepted()
!me.isAccepted()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 276 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
) {
10-276
729 d->pressed = Qt::NoButton;-
730 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
10
731-
732 if (!oldPressed
!oldPressedDescription
TRUEevaluated 284 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
2-284
733 pressedChanged();-
734 containsPressChanged();-
735 }
executed 284 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
284
736 pressedButtonsChanged();-
737 }
executed 286 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
else {
286
738 d->pressed &= ~button;-
739 released(&me);-
740 me.setPosition(d->lastPos);-
741 if (!d->pressed
!d->pressedDescription
TRUEevaluated 220 times by 6 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
2-220
742 pressedChanged();-
743 containsPressChanged();-
744 }
executed 220 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
220
745 pressedButtonsChanged();-
746 if (isclick
isclickDescription
TRUEevaluated 162 times by 4 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 60 times by 4 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
&& !d->longPress
!d->longPressDescription
TRUEevaluated 148 times by 4 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickmousearea
&& !d->doubleClick
!d->doubleClickDescription
TRUEevaluated 128 times by 4 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickmousearea
){
14-162
747 me.setAccepted(d->isClickConnected());-
748 clicked(&me);-
749 if (!me.isAccepted()
!me.isAccepted()Description
TRUEevaluated 74 times by 3 tests
Evaluated by:
  • tst_qquickitem
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
FALSEevaluated 54 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
)
54-74
750 d->propagate(&me, QQuickMouseAreaPrivate::Click);
executed 74 times by 3 tests: d->propagate(&me, QQuickMouseAreaPrivate::Click);
Executed by:
  • tst_qquickitem
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
74
751 }
executed 128 times by 4 tests: end of block
Executed by:
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
128
752 }
executed 222 times by 6 tests: end of block
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
222
753-
754 return
executed 508 times by 6 tests: return me.isAccepted();
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
me.isAccepted();
executed 508 times by 6 tests: return me.isAccepted();
Executed by:
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
508
755 }-
756 return
executed 6 times by 1 test: return false;
Executed by:
  • tst_qquickmousearea
false;
executed 6 times by 1 test: return false;
Executed by:
  • tst_qquickmousearea
6
757}-
758Qt::CursorShape QQuickMouseArea::cursorShape() const-
759{-
760 return
executed 30 times by 2 tests: return cursor().shape();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
cursor().shape();
executed 30 times by 2 tests: return cursor().shape();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickmousearea
30
761}-
762-
763void QQuickMouseArea::setCursorShape(Qt::CursorShape shape)-
764{-
765 if (cursor().shape() == shape
cursor().shape() == shapeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
)
2-4
766 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickmousearea
2
767-
768 setCursor(shape);-
769-
770 cursorShapeChanged();-
771}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
4
772int QQuickMouseArea::pressAndHoldInterval() const-
773{-
774 const QQuickMouseAreaPrivate * const d = d_func();-
775 return
executed 300 times by 7 tests: return d->pressAndHoldInterval > -1 ? d->pressAndHoldInterval : QGuiApplication::styleHints()->mousePressAndHoldInterval();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
d->pressAndHoldInterval > -1 ?
executed 300 times by 7 tests: return d->pressAndHoldInterval > -1 ? d->pressAndHoldInterval : QGuiApplication::styleHints()->mousePressAndHoldInterval();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
300
776 d->pressAndHoldInterval : QGuiApplication::styleHints()->mousePressAndHoldInterval();
executed 300 times by 7 tests: return d->pressAndHoldInterval > -1 ? d->pressAndHoldInterval : QGuiApplication::styleHints()->mousePressAndHoldInterval();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
300
777}-
778-
779void QQuickMouseArea::setPressAndHoldInterval(int interval)-
780{-
781 QQuickMouseAreaPrivate * const d = d_func();-
782 if (interval != d->pressAndHoldInterval
interval != d-...ndHoldIntervalDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickmousearea
FALSEnever evaluated
) {
0-4
783 d->pressAndHoldInterval = interval;-
784 pressAndHoldIntervalChanged();-
785 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
4
786}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
4
787-
788void QQuickMouseArea::resetPressAndHoldInterval()-
789{-
790 QQuickMouseAreaPrivate * const d = d_func();-
791 if (d->pressAndHoldInterval > -1
d->pressAndHoldInterval > -1Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickmousearea
) {
0-2
792 d->pressAndHoldInterval = -1;-
793 pressAndHoldIntervalChanged();-
794 }
never executed: end of block
0
795}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickmousearea
2
796QQuickDrag *QQuickMouseArea::drag()-
797{-
798 QQuickMouseAreaPrivate * const d = d_func();-
799 if (!d->drag
!d->dragDescription
TRUEevaluated 452 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
FALSEevaluated 3098 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
)
452-3098
800 d->drag = new QQuickDrag;
executed 452 times by 6 tests: d->drag = new QQuickDrag;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
452
801 return
executed 3550 times by 6 tests: return d->drag;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
d->drag;
executed 3550 times by 6 tests: return d->drag;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
3550
802}-
803-
804-
805QSGNode *QQuickMouseArea::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)-
806{-
807 (void)data;;-
808 QQuickMouseAreaPrivate * const d = d_func();-
809-
810 if (!qmlVisualTouchDebugging()
!qmlVisualTouchDebugging()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
811 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
812-
813 QSGInternalRectangleNode *rectangle = static_cast<QSGInternalRectangleNode *>(oldNode);-
814 if (!rectangle
!rectangleDescription
TRUEnever evaluated
FALSEnever evaluated
) rectangle = d->sceneGraphContext()->createInternalRectangleNode();
never executed: rectangle = d->sceneGraphContext()->createInternalRectangleNode();
0
815-
816 rectangle->setRect(QRectF(0, 0, width(), height()));-
817 rectangle->setColor(QColor(255, 0, 0, 50));-
818 rectangle->update();-
819 return
never executed: return rectangle;
rectangle;
never executed: return rectangle;
0
820}-
821-
822-
823-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0