OpenCoverage

qquicktextutil_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktextutil_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QQuickTextUtil : public QObject-
5{-
6 public:-
7#pragma GCC diagnostic push-
8 -
9#pragma GCC diagnostic ignored "-Wsuggest-override"-
10 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
11#pragma GCC diagnostic ignored "-Wattributes"-
12 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
13#pragma GCC diagnostic pop-
14 struct QPrivateSignal {};-
15public:-
16 template <typename Private> static void setCursorDelegate(Private *d, QQmlComponent *delegate);-
17 template <typename Private> static void createCursor(Private *d);-
18-
19 template <typename T> static typename T::RenderType textRenderType();-
20-
21 static qreal alignedX(qreal textWidth, qreal itemWidth, int alignment);-
22 static qreal alignedY(qreal textHeight, qreal itemHeight, int alignment);-
23-
24private:-
25 static QQuickItem *createCursor(-
26 QQmlComponent *component,-
27 QQuickItem *parent,-
28 const QRectF &cursorRectangle,-
29 const char *className);-
30-
31};-
32-
33template <typename Private>-
34void QQuickTextUtil::setCursorDelegate(Private *d, QQmlComponent *delegate)-
35{-
36 if (d->cursorComponent == delegate
d->cursorComponent == delegateDescription
TRUEnever evaluated
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
)
0-60
37 return;
never executed: return;
0
38-
39 typename Private::Public *parent = d->q_func();-
40-
41 if (d->cursorComponent
d->cursorComponentDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 46 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
14-46
42 disconnect(d->cursorComponent, qFlagLocation("2""statusChanged(QQmlComponent::Status)" "\0" __FILE__ ":" "91"),-
43 parent, qFlagLocation("1""createCursor()" "\0" __FILE__ ":" "92"));-
44 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
14
45-
46 delete d->cursorItem;-
47 d->cursorItem = 0;-
48 d->cursorPending = true;-
49-
50 d->cursorComponent = delegate;-
51-
52 if (parent->isCursorVisible()
parent->isCursorVisible()Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
&& parent->isComponentComplete()
parent->isComponentComplete()Description
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktextedit
)
4-42
53 createCursor(d);
executed 14 times by 2 tests: createCursor(d);
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
14
54-
55 parent->cursorDelegateChanged();-
56}
executed 60 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
60
57-
58template <typename Private>-
59void QQuickTextUtil::createCursor(Private *d)-
60{-
61 if (!d->cursorPending
!d->cursorPendingDescription
TRUEevaluated 686 times by 5 tests
Evaluated by:
  • tst_qquickfocusscope
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 64 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
)
64-686
62 return;
executed 686 times by 5 tests: return;
Executed by:
  • tst_qquickfocusscope
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicktextedit
  • tst_qquicktextinput
686
63-
64 d->cursorPending = false;-
65-
66 typename Private::Public *parent = d->q_func();-
67 if (d->cursorComponent
d->cursorComponentDescription
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
14-50
68 d->cursorItem = createCursor(-
69 d->cursorComponent,-
70 parent,-
71 parent->cursorRectangle(),-
72 Private::Public::staticMetaObject.className());-
73 }
executed 50 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
50
74-
75 d->setNativeCursorEnabled(!d->cursorItem);-
76 d->updateType = Private::UpdatePaintNode;-
77 parent->update();-
78}
executed 64 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
64
79-
80template <typename T>-
81typename T::RenderType QQuickTextUtil::textRenderType()-
82{-
83 switch (QQuickWindow::textRenderType()) {-
84 case
executed 266796 times by 39 tests: case QQuickWindow::QtTextRendering:
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
QQuickWindow::QtTextRendering:
executed 266796 times by 39 tests: case QQuickWindow::QtTextRendering:
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
266796
85 return
executed 266796 times by 39 tests: return T::QtRendering;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
T::QtRendering;
executed 266796 times by 39 tests: return T::QtRendering;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
266796
86 case
never executed: case QQuickWindow::NativeTextRendering:
QQuickWindow::NativeTextRendering:
never executed: case QQuickWindow::NativeTextRendering:
0
87 return
never executed: return T::NativeRendering;
T::NativeRendering;
never executed: return T::NativeRendering;
0
88 }-
89-
90 do { ((false) ? static_cast<void>(0) : qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached", __FILE__, 139)); __builtin_unreachable(); } while (false);-
91 return
never executed: return T::QtRendering;
T::QtRendering;
never executed: return T::QtRendering;
0
92}-
93-
94-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0