OpenCoverage

qquicktextnodeengine.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktextnodeengine.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6QQuickTextNodeEngine::BinaryTreeNodeKey::BinaryTreeNodeKey(BinaryTreeNode *node)-
7 : fontEngine(QRawFontPrivate::get(node->glyphRun.rawFont())->fontEngine)-
8 , clipNode(node->clipNode)-
9 , color(node->color.rgba())-
10 , selectionState(node->selectionState)-
11{-
12}
executed 500019 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
500019
13-
14QQuickTextNodeEngine::BinaryTreeNode::BinaryTreeNode(const QGlyphRun &g,-
15 SelectionState selState,-
16 const QRectF &brect,-
17 const Decorations &decs,-
18 const QColor &c,-
19 const QColor &bc,-
20 const QPointF &pos, qreal a)-
21 : glyphRun(g)-
22 , boundingRect(brect)-
23 , selectionState(selState)-
24 , clipNode(nullptr)-
25 , decorations(decs)-
26 , color(c)-
27 , backgroundColor(bc)-
28 , position(pos)-
29 , ascent(a)-
30 , leftChildIndex(-1)-
31 , rightChildIndex(-1)-
32{-
33 QGlyphRunPrivate *d = QGlyphRunPrivate::get(g);-
34 ranges.append(qMakePair(d->textRangeStart, d->textRangeEnd));-
35}
executed 250924 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250924
36-
37-
38void QQuickTextNodeEngine::BinaryTreeNode::insert(QVarLengthArray<BinaryTreeNode, 16> *binaryTree, const QGlyphRun &glyphRun, SelectionState selectionState,-
39 Decorations decorations, const QColor &textColor,-
40 const QColor &backgroundColor, const QPointF &position)-
41{-
42 QRectF searchRect = glyphRun.boundingRect();-
43 searchRect.translate(position);-
44-
45 if (qFuzzyIsNull(searchRect.width())
qFuzzyIsNull(s...hRect.width())Description
TRUEnever evaluated
FALSEevaluated 250924 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
|| qFuzzyIsNull(searchRect.height())
qFuzzyIsNull(s...Rect.height())Description
TRUEnever evaluated
FALSEevaluated 250924 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
0-250924
46 return;
never executed: return;
0
47-
48 decorations |= (glyphRun.underline()
glyphRun.underline()Description
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 250908 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
? Decoration::Underline : Decoration::NoDecoration);
16-250908
49 decorations |= (glyphRun.overline()
glyphRun.overline()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250912 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
? Decoration::Overline : Decoration::NoDecoration);
12-250912
50 decorations |= (glyphRun.strikeOut()
glyphRun.strikeOut()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250912 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
? Decoration::StrikeOut : Decoration::NoDecoration);
12-250912
51 decorations |= (backgroundColor.isValid()
backgroundColor.isValid()Description
TRUEnever evaluated
FALSEevaluated 250924 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
? Decoration::Background : Decoration::NoDecoration);
0-250924
52-
53 qreal ascent = glyphRun.rawFont().ascent();-
54 insert(binaryTree, BinaryTreeNode(glyphRun,-
55 selectionState,-
56 searchRect,-
57 decorations,-
58 textColor,-
59 backgroundColor,-
60 position,-
61 ascent));-
62}
executed 250924 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250924
63-
64void QQuickTextNodeEngine::BinaryTreeNode::insert(QVarLengthArray<BinaryTreeNode, 16> *binaryTree, const BinaryTreeNode &binaryTreeNode)-
65{-
66 int newIndex = binaryTree->size();-
67 binaryTree->append(binaryTreeNode);-
68 if (newIndex == 0
newIndex == 0Description
TRUEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 306 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
)
306-250622
69 return;
executed 250622 times by 24 tests: return;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250622
70-
71 int searchIndex = 0;-
72 for(;;) {-
73 BinaryTreeNode *node = binaryTree->data() + searchIndex;-
74 if (binaryTreeNode.boundingRect.left() < node->boundingRect.left()
binaryTreeNode...ingRect.left()Description
TRUEnever evaluated
FALSEevaluated 600 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
0-600
75 if (node->leftChildIndex < 0
node->leftChildIndex < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
76 node->leftChildIndex = newIndex;-
77 break;
never executed: break;
0
78 } else {-
79 searchIndex = node->leftChildIndex;-
80 }
never executed: end of block
0
81 } else {-
82 if (node->rightChildIndex < 0
node->rightChildIndex < 0Description
TRUEevaluated 306 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 294 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
294-306
83 node->rightChildIndex = newIndex;-
84 break;
executed 306 times by 4 tests: break;
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
306
85 } else {-
86 searchIndex = node->rightChildIndex;-
87 }
executed 294 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
294
88 }-
89 }-
90}
executed 306 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
306
91-
92void QQuickTextNodeEngine::BinaryTreeNode::inOrder(const QVarLengthArray<BinaryTreeNode, 16> &binaryTree,-
93 QVarLengthArray<int> *sortedIndexes, int currentIndex)-
94{-
95 ((currentIndex < binaryTree.size()) ? static_cast<void>(0) : qt_assert("currentIndex < binaryTree.size()", __FILE__, 149));-
96-
97 const BinaryTreeNode *node = binaryTree.data() + currentIndex;-
98 if (node->leftChildIndex >= 0
node->leftChildIndex >= 0Description
TRUEnever evaluated
FALSEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
0-250928
99 inOrder(binaryTree, sortedIndexes, node->leftChildIndex);
never executed: inOrder(binaryTree, sortedIndexes, node->leftChildIndex);
0
100-
101 sortedIndexes->append(currentIndex);-
102-
103 if (node->rightChildIndex >= 0
node->rightChildIndex >= 0Description
TRUEevaluated 306 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
306-250622
104 inOrder(binaryTree, sortedIndexes, node->rightChildIndex);
executed 306 times by 4 tests: inOrder(binaryTree, sortedIndexes, node->rightChildIndex);
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
306
105}
executed 250928 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250928
106-
107-
108int QQuickTextNodeEngine::addText(const QTextBlock &block,-
109 const QTextCharFormat &charFormat,-
110 const QColor &textColor,-
111 const QVarLengthArray<QTextLayout::FormatRange> &colorChanges,-
112 int textPos, int fragmentEnd,-
113 int selectionStart, int selectionEnd)-
114{-
115 if (charFormat.foreground().style() != Qt::NoBrush
charFormat.for...!= Qt::NoBrushDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktextedit
FALSEevaluated 566 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
4-566
116 setTextColor(charFormat.foreground().color());
executed 4 times by 2 tests: setTextColor(charFormat.foreground().color());
Executed by:
  • tst_examples
  • tst_qquicktextedit
4
117 else-
118 setTextColor(textColor);
executed 566 times by 5 tests: setTextColor(textColor);
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
566
119-
120 while (textPos < fragmentEnd
textPos < fragmentEndDescription
TRUEevaluated 674 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 570 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
) {
570-674
121 int blockRelativePosition = textPos - block.position();-
122 QTextLine line = block.layout()->lineForTextPosition(blockRelativePosition);-
123 if (!currentLine().isValid()
!currentLine().isValid()Description
TRUEevaluated 508 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 166 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
166-508
124 || line.lineNumber() != currentLine().lineNumber()
line.lineNumbe...).lineNumber()Description
TRUEevaluated 104 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 62 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
) {
62-104
125 setCurrentLine(line);-
126 }
executed 612 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
612
127-
128 ((line.textLength() > 0) ? static_cast<void>(0) : qt_assert("line.textLength() > 0", __FILE__, 182));-
129 int lineEnd = line.textStart() + block.position() + line.textLength();-
130-
131 int len = qMin(lineEnd - textPos, fragmentEnd - textPos);-
132 ((len > 0) ? static_cast<void>(0) : qt_assert("len > 0", __FILE__, 186));-
133-
134 int currentStepEnd = textPos + len;-
135-
136 addGlyphsForRanges(colorChanges,-
137 textPos - block.position(),-
138 currentStepEnd - block.position(),-
139 selectionStart - block.position(),-
140 selectionEnd - block.position());-
141-
142 textPos = currentStepEnd;-
143 }
executed 674 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
674
144 return
executed 570 times by 5 tests: return textPos;
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
textPos;
executed 570 times by 5 tests: return textPos;
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
570
145}-
146-
147void QQuickTextNodeEngine::addTextDecorations(const QVarLengthArray<TextDecoration> &textDecorations,-
148 qreal offset, qreal thickness)-
149{-
150 for (int i=0; i<textDecorations.size()
i<textDecorations.size()Description
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
; ++i) {
40
151 TextDecoration textDecoration = textDecorations.at(i);-
152-
153 {-
154 QRectF &rect = textDecoration.rect;-
155 rect.setY(qRound(rect.y()-
156 + m_currentLine.ascent()-
157 + (m_currentLine.leadingIncluded() ? m_currentLine.leading() : qreal(0.0f))-
158 + offset));-
159 rect.setHeight(thickness);-
160 }-
161-
162 m_lines.append(textDecoration);-
163 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
40
164}
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
40
165-
166void QQuickTextNodeEngine::processCurrentLine()-
167{-
168-
169 if (m_currentLineTree.isEmpty()
m_currentLineTree.isEmpty()Description
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
34-250622
170 return;
executed 34 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquicktext
34
171-
172-
173-
174-
175-
176-
177-
178 QVarLengthArray<int> sortedIndexes;-
179 BinaryTreeNode::inOrder(m_currentLineTree, &sortedIndexes);-
180-
181 ((sortedIndexes.size() == m_currentLineTree.size()) ? static_cast<void>(0) : qt_assert("sortedIndexes.size() == m_currentLineTree.size()", __FILE__, 235));-
182-
183 SelectionState currentSelectionState = Unselected;-
184 QRectF currentRect;-
185-
186 Decorations currentDecorations = Decoration::NoDecoration;-
187 qreal underlineOffset = 0.0;-
188 qreal underlineThickness = 0.0;-
189-
190 qreal overlineOffset = 0.0;-
191 qreal overlineThickness = 0.0;-
192-
193 qreal strikeOutOffset = 0.0;-
194 qreal strikeOutThickness = 0.0;-
195-
196 QRectF decorationRect = currentRect;-
197-
198 QColor lastColor;-
199 QColor lastBackgroundColor;-
200-
201 QVarLengthArray<TextDecoration> pendingUnderlines;-
202 QVarLengthArray<TextDecoration> pendingOverlines;-
203 QVarLengthArray<TextDecoration> pendingStrikeOuts;-
204 if (!sortedIndexes.isEmpty()
!sortedIndexes.isEmpty()Description
TRUEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEnever evaluated
) {
0-250622
205 QQuickDefaultClipNode *currentClipNode = m_hasSelection
m_hasSelectionDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250564 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
? new QQuickDefaultClipNode(QRectF()) : nullptr;
58-250564
206 bool currentClipNodeUsed = false;-
207 for (int i=0; i<=sortedIndexes.size()
i<=sortedIndexes.size()Description
TRUEevaluated 501550 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
250622-501550
208 BinaryTreeNode *node = nullptr;-
209 if (i < sortedIndexes.size()
i < sortedIndexes.size()Description
TRUEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
250622-250928
210 int sortedIndex = sortedIndexes.at(i);-
211 ((sortedIndex < m_currentLineTree.size()) ? static_cast<void>(0) : qt_assert("sortedIndex < m_currentLineTree.size()", __FILE__, 265));-
212-
213 node = m_currentLineTree.data() + sortedIndex;-
214 }
executed 250928 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250928
215-
216 if (i == 0
i == 0Description
TRUEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
250622-250928
217 currentSelectionState = node->selectionState;
executed 250622 times by 24 tests: currentSelectionState = node->selectionState;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250622
218-
219-
220 if (currentDecorations != Decoration::NoDecoration
currentDecorat...::NoDecorationDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 501510 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
40-501510
221 decorationRect.setY(m_position.y() + m_currentLine.y());-
222 decorationRect.setHeight(m_currentLine.height());-
223-
224 if (node != nullptr
node != nullptrDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 38 times by 2 tests
Evaluated by:
  • tst_qquicktext
  • tst_qquicktextedit
)
2-38
225 decorationRect.setRight(node->boundingRect.left());
executed 2 times by 1 test: decorationRect.setRight(node->boundingRect.left());
Executed by:
  • tst_examples
2
226-
227 TextDecoration textDecoration(currentSelectionState, decorationRect, lastColor);-
228 if (currentDecorations & Decoration::Underline
currentDecorat...ion::UnderlineDescription
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
)
16-24
229 pendingUnderlines.append(textDecoration);
executed 16 times by 3 tests: pendingUnderlines.append(textDecoration);
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
16
230-
231 if (currentDecorations & Decoration::Overline
currentDecorat...tion::OverlineDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
)
12-28
232 pendingOverlines.append(textDecoration);
executed 12 times by 1 test: pendingOverlines.append(textDecoration);
Executed by:
  • tst_qquicktext
12
233-
234 if (currentDecorations & Decoration::StrikeOut
currentDecorat...ion::StrikeOutDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
)
12-28
235 pendingStrikeOuts.append(textDecoration);
executed 12 times by 1 test: pendingStrikeOuts.append(textDecoration);
Executed by:
  • tst_qquicktext
12
236-
237 if (currentDecorations & Decoration::Background
currentDecorat...on::BackgroundDescription
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
)
0-40
238 m_backgrounds.append(qMakePair(decorationRect, lastBackgroundColor));
never executed: m_backgrounds.append(qMakePair(decorationRect, lastBackgroundColor));
0
239 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
40
240-
241-
242-
243-
244 if (node == nullptr
node == nullptrDescription
TRUEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
|| node->selectionState != currentSelectionState
node->selectio...SelectionStateDescription
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250862 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
66-250928
245 currentRect.setY(m_position.y() + m_currentLine.y());-
246 currentRect.setHeight(m_currentLine.height());-
247-
248 if (currentSelectionState == Selected
currentSelecti...te == SelectedDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250630 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
58-250630
249 m_selectionRects.append(currentRect);
executed 58 times by 2 tests: m_selectionRects.append(currentRect);
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
250-
251 if (currentClipNode != nullptr
currentClipNode != nullptrDescription
TRUEevaluated 124 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250564 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
124-250564
252 if (!currentClipNodeUsed
!currentClipNodeUsedDescription
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
58-66
253 delete currentClipNode;-
254 }
executed 66 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
else {
66
255 currentClipNode->setIsRectangular(true);-
256 currentClipNode->setRect(currentRect);-
257 currentClipNode->update();-
258 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
259 }-
260-
261 if (node != nullptr
node != nullptrDescription
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
&& m_hasSelection
m_hasSelectionDescription
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
)
0-250622
262 currentClipNode = new QQuickDefaultClipNode(QRectF());
executed 66 times by 2 tests: currentClipNode = new QQuickDefaultClipNode(QRectF());
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
66
263 else-
264 currentClipNode = nullptr;
executed 250622 times by 24 tests: currentClipNode = nullptr;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250622
265 currentClipNodeUsed = false;-
266-
267 if (node != nullptr
node != nullptrDescription
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
66-250622
268 currentSelectionState = node->selectionState;-
269 currentRect = node->boundingRect;-
270-
271-
272 if (currentRect.isNull()
currentRect.isNull()Description
TRUEnever evaluated
FALSEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
)
0-66
273 currentRect.setSize(QSizeF(1, 1));
never executed: currentRect.setSize(QSizeF(1, 1));
0
274 }
executed 66 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
66
275 }
executed 250688 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
else {
250688
276 if (currentRect.isNull()
currentRect.isNull()Description
TRUEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 240 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
)
240-250622
277 currentRect = node->boundingRect;
executed 250622 times by 24 tests: currentRect = node->boundingRect;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250622
278 else-
279 currentRect = currentRect.united(node->boundingRect);
executed 240 times by 3 tests: currentRect = currentRect.united(node->boundingRect);
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
240
280 }-
281-
282 if (node != nullptr
node != nullptrDescription
TRUEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 250622 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
250622-250928
283 if (node->selectionState == Selected
node->selectio...te == SelectedDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250870 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
58-250870
284 node->clipNode = currentClipNode;-
285 currentClipNodeUsed = true;-
286 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
287-
288 decorationRect = node->boundingRect;-
289-
290-
291-
292 if (!pendingUnderlines.isEmpty()
!pendingUnderlines.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 250926 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
2-250926
293 && !(node->decorations & Decoration::Underline)
!(node->decora...on::Underline)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-2
294 addTextDecorations(pendingUnderlines, underlineOffset, underlineThickness);-
295-
296 pendingUnderlines.clear();-
297-
298 underlineOffset = 0.0;-
299 underlineThickness = 0.0;-
300 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
301-
302-
303-
304 if (!pendingOverlines.isEmpty()
!pendingOverlines.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
0-250928
305 addTextDecorations(pendingOverlines, overlineOffset, overlineThickness);-
306-
307 pendingOverlines.clear();-
308-
309 overlineOffset = 0.0;-
310 overlineThickness = 0.0;-
311 }
never executed: end of block
0
312-
313-
314-
315 if (!pendingStrikeOuts.isEmpty()
!pendingStrikeOuts.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
0-250928
316 addTextDecorations(pendingStrikeOuts, strikeOutOffset, strikeOutThickness);-
317-
318 pendingStrikeOuts.clear();-
319-
320 strikeOutOffset = 0.0;-
321 strikeOutThickness = 0.0;-
322 }
never executed: end of block
0
323-
324-
325 QRawFont rawFont = node->glyphRun.rawFont();-
326 if (node->decorations & Decoration::Underline
node->decorati...ion::UnderlineDescription
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 250912 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
16-250912
327 if (rawFont.lineThickness() > underlineThickness
rawFont.lineTh...rlineThicknessDescription
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
) {
0-16
328 underlineThickness = rawFont.lineThickness();-
329 underlineOffset = rawFont.underlinePosition();-
330 }
executed 16 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
16
331 }
executed 16 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
16
332-
333 if (node->decorations & Decoration::Overline
node->decorati...tion::OverlineDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250916 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
12-250916
334 overlineOffset = -rawFont.ascent();-
335 overlineThickness = rawFont.lineThickness();-
336 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquicktext
12
337-
338 if (node->decorations & Decoration::StrikeOut
node->decorati...ion::StrikeOutDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250916 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
12-250916
339 strikeOutThickness = rawFont.lineThickness();-
340 strikeOutOffset = rawFont.ascent() / -3.0;-
341 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquicktext
12
342-
343 currentDecorations = node->decorations;-
344 lastColor = node->color;-
345 lastBackgroundColor = node->backgroundColor;-
346 m_processedNodes.append(*node);-
347 }
executed 250928 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250928
348 }
executed 501550 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
501550
349-
350 if (!pendingUnderlines.isEmpty()
!pendingUnderlines.isEmpty()Description
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 250608 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
14-250608
351 addTextDecorations(pendingUnderlines, underlineOffset, underlineThickness);
executed 14 times by 2 tests: addTextDecorations(pendingUnderlines, underlineOffset, underlineThickness);
Executed by:
  • tst_qquicktext
  • tst_qquicktextedit
14
352-
353 if (!pendingOverlines.isEmpty()
!pendingOverlines.isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250610 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
12-250610
354 addTextDecorations(pendingOverlines, overlineOffset, overlineThickness);
executed 12 times by 1 test: addTextDecorations(pendingOverlines, overlineOffset, overlineThickness);
Executed by:
  • tst_qquicktext
12
355-
356 if (!pendingStrikeOuts.isEmpty()
!pendingStrikeOuts.isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250610 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
12-250610
357 addTextDecorations(pendingStrikeOuts, strikeOutOffset, strikeOutThickness);
executed 12 times by 1 test: addTextDecorations(pendingStrikeOuts, strikeOutOffset, strikeOutThickness);
Executed by:
  • tst_qquicktext
12
358 }
executed 250622 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250622
359-
360 m_currentLineTree.clear();-
361 m_currentLine = QTextLine();-
362 m_hasSelection = false;-
363}
executed 250622 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250622
364-
365void QQuickTextNodeEngine::addImage(const QRectF &rect, const QImage &image, qreal ascent,-
366 SelectionState selectionState,-
367 QTextFrameFormat::Position layoutPosition)-
368{-
369 QRectF searchRect = rect;-
370 if (layoutPosition == QTextFrameFormat::InFlow
layoutPosition...Format::InFlowDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-4
371 if (m_currentLineTree.isEmpty()
m_currentLineTree.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-4
372 if (m_currentTextDirection == Qt::RightToLeft
m_currentTextD...t::RightToLeftDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
)
0-4
373 searchRect.moveTopRight(m_position + m_currentLine.rect().topRight() + QPointF(0, 1));
never executed: searchRect.moveTopRight(m_position + m_currentLine.rect().topRight() + QPointF(0, 1));
0
374 else-
375 searchRect.moveTopLeft(m_position + m_currentLine.position() + QPointF(0,1));
executed 4 times by 1 test: searchRect.moveTopLeft(m_position + m_currentLine.position() + QPointF(0,1));
Executed by:
  • tst_qquicktext
4
376 } else {-
377 const BinaryTreeNode *lastNode = m_currentLineTree.data() + m_currentLineTree.size() - 1;-
378 if (lastNode->glyphRun.isRightToLeft()
lastNode->glyp...sRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
379 QPointF lastPos = lastNode->boundingRect.topLeft();-
380 searchRect.moveTopRight(lastPos - QPointF(0, ascent - lastNode->ascent));-
381 }
never executed: end of block
else {
0
382 QPointF lastPos = lastNode->boundingRect.topRight();-
383 searchRect.moveTopLeft(lastPos - QPointF(0, ascent - lastNode->ascent));-
384 }
never executed: end of block
0
385 }-
386 }-
387-
388 BinaryTreeNode::insert(&m_currentLineTree, searchRect, image, ascent, selectionState);-
389 m_hasContents = true;-
390}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
391-
392void QQuickTextNodeEngine::addTextObject(const QPointF &position, const QTextCharFormat &format,-
393 SelectionState selectionState,-
394 QTextDocument *textDocument, int pos,-
395 QTextFrameFormat::Position layoutPosition)-
396{-
397 QTextObjectInterface *handler = textDocument->documentLayout()->handlerForObject(format.objectType());-
398 if (handler != nullptr
handler != nullptrDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-6
399 QImage image;-
400 QSizeF size = handler->intrinsicSize(textDocument, pos, format);-
401-
402 if (format.objectType() == QTextFormat::ImageObject
format.objectT...t::ImageObjectDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-6
403 QTextImageFormat imageFormat = format.toImageFormat();-
404 if (QQuickTextDocumentWithImageResources *imageDoc = qobject_cast<QQuickTextDocumentWithImageResources *>(textDocument)
QQuickTextDocu...(textDocument)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-6
405 image = imageDoc->image(imageFormat);-
406-
407 if (image.isNull()
image.isNull()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
)
2-4
408 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquicktext
2
409 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
else {
4
410 QTextImageHandler *imageHandler = static_cast<QTextImageHandler *>(handler);-
411 image = imageHandler->image(textDocument, imageFormat);-
412 }
never executed: end of block
0
413 }-
414-
415 if (image.isNull()
image.isNull()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
) {
0-4
416 image = QImage(size.toSize(), QImage::Format_ARGB32_Premultiplied);-
417 image.fill(Qt::transparent);-
418 {-
419 QPainter painter(&image);-
420 handler->drawObject(&painter, image.rect(), textDocument, pos, format);-
421 }-
422 }
never executed: end of block
0
423-
424 qreal ascent;-
425 QFontMetrics m(format.font());-
426 switch (format.verticalAlignment())-
427 {-
428 case
never executed: case QTextCharFormat::AlignMiddle:
QTextCharFormat::AlignMiddle:
never executed: case QTextCharFormat::AlignMiddle:
0
429 ascent = size.height() / 2 - 1;-
430 break;
never executed: break;
0
431 case
never executed: case QTextCharFormat::AlignBaseline:
QTextCharFormat::AlignBaseline:
never executed: case QTextCharFormat::AlignBaseline:
0
432 ascent = size.height() - m.descent() - 1;-
433 break;
never executed: break;
0
434 default
executed 4 times by 1 test: default:
Executed by:
  • tst_qquicktext
:
executed 4 times by 1 test: default:
Executed by:
  • tst_qquicktext
4
435 ascent = size.height() - 1;-
436 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
437-
438 addImage(QRectF(position, size), image, ascent, selectionState, layoutPosition);-
439 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
440}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
441-
442void QQuickTextNodeEngine::addUnselectedGlyphs(const QGlyphRun &glyphRun)-
443{-
444 BinaryTreeNode::insert(&m_currentLineTree,-
445 glyphRun,-
446 Unselected,-
447 Decoration::NoDecoration,-
448 m_textColor,-
449 m_backgroundColor,-
450 m_position);-
451}
executed 250866 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250866
452-
453void QQuickTextNodeEngine::addSelectedGlyphs(const QGlyphRun &glyphRun)-
454{-
455 int currentSize = m_currentLineTree.size();-
456 BinaryTreeNode::insert(&m_currentLineTree,-
457 glyphRun,-
458 Selected,-
459 Decoration::NoDecoration,-
460 m_textColor,-
461 m_backgroundColor,-
462 m_position);-
463 m_hasSelection = m_hasSelection
m_hasSelectionDescription
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
|| m_currentLineTree.size() > currentSize
m_currentLineT... > currentSizeDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
;
0-58
464}
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
465-
466void QQuickTextNodeEngine::addGlyphsForRanges(const QVarLengthArray<QTextLayout::FormatRange> &ranges,-
467 int start, int end,-
468 int selectionStart, int selectionEnd)-
469{-
470 int currentPosition = start;-
471 int remainingLength = end - start;-
472 for (int j=0; j<ranges.size()
j<ranges.size()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 250664 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++j) {
12-250664
473 const QTextLayout::FormatRange &range = ranges.at(j);-
474 if (range.start + range.length >= currentPosition
range.start + ...urrentPositionDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
0-12
475 && range.start < currentPosition + remainingLength
range.start < ...emainingLengthDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-12
476-
477 if (range.start > currentPosition
range.start > currentPositionDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
) {
0-12
478 addGlyphsInRange(currentPosition, range.start - currentPosition,-
479 QColor(), QColor(), selectionStart, selectionEnd);-
480 }
never executed: end of block
0
481 int rangeEnd = qMin(range.start + range.length, currentPosition + remainingLength);-
482 QColor rangeColor;-
483 if (range.format.hasProperty(QTextFormat::ForegroundBrush)
range.format.h...regroundBrush)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
)
0-12
484 rangeColor = range.format.foreground().color();
executed 12 times by 1 test: rangeColor = range.format.foreground().color();
Executed by:
  • tst_examples
12
485 else if (range.format.isAnchor()
range.format.isAnchor()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
486 rangeColor = m_anchorColor;
never executed: rangeColor = m_anchorColor;
0
487 QColor rangeBackgroundColor = range.format.hasProperty(QTextFormat::BackgroundBrush)
range.format.h...ckgroundBrush)Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
0-12
488 ? range.format.background().color()-
489 : QColor();-
490-
491 addGlyphsInRange(range.start, rangeEnd - range.start,-
492 rangeColor, rangeBackgroundColor,-
493 selectionStart, selectionEnd);-
494-
495 currentPosition = range.start + range.length;-
496 remainingLength = end - currentPosition;-
497-
498 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_examples
else if (range.start > currentPosition + remainingLength
range.start > ...emainingLengthDescription
TRUEnever evaluated
FALSEnever evaluated
|| remainingLength <= 0
remainingLength <= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-12
499 break;
never executed: break;
0
500 }-
501 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_examples
12
502-
503 if (remainingLength > 0
remainingLength > 0Description
TRUEevaluated 250648 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_examples
) {
16-250648
504 addGlyphsInRange(currentPosition, remainingLength, QColor(), QColor(),-
505 selectionStart, selectionEnd);-
506 }
executed 250648 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250648
507-
508}
executed 250664 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250664
509-
510void QQuickTextNodeEngine::addGlyphsInRange(int rangeStart, int rangeLength,-
511 const QColor &color, const QColor &backgroundColor,-
512 int selectionStart, int selectionEnd)-
513{-
514 QColor oldColor;-
515 if (color.isValid()
color.isValid()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 250648 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
12-250648
516 oldColor = m_textColor;-
517 m_textColor = color;-
518 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_examples
12
519-
520 QColor oldBackgroundColor = m_backgroundColor;-
521 if (backgroundColor.isValid()
backgroundColor.isValid()Description
TRUEnever evaluated
FALSEevaluated 250660 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
0-250660
522 oldBackgroundColor = m_backgroundColor;-
523 m_backgroundColor = backgroundColor;-
524 }
never executed: end of block
0
525-
526 bool hasSelection = selectionEnd >= 0
selectionEnd >= 0Description
TRUEevaluated 72 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 250588 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
72-250588
527 && selectionStart <= selectionEnd
selectionStart <= selectionEndDescription
TRUEevaluated 62 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktextedit
;
10-62
528-
529 QTextLine &line = m_currentLine;-
530 int rangeEnd = rangeStart + rangeLength;-
531 if (!hasSelection
!hasSelectionDescription
TRUEevaluated 250598 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 62 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
|| (selectionStart > rangeEnd
selectionStart > rangeEndDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktextedit
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
|| selectionEnd < rangeStart
selectionEnd < rangeStartDescription
TRUEnever evaluated
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
)) {
0-250598
532 QList<QGlyphRun> glyphRuns = line.glyphRuns(rangeStart, rangeLength);-
533 for (int j=0; j<glyphRuns.size()
j<glyphRuns.size()Description
TRUEevaluated 250752 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 250602 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++j) {
250602-250752
534 const QGlyphRun &glyphRun = glyphRuns.at(j);-
535 addUnselectedGlyphs(glyphRun);-
536 }
executed 250752 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250752
537 }
executed 250602 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
else {
250602
538 if (rangeStart < selectionStart
rangeStart < selectionStartDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
28-30
539 int length = qMin(selectionStart - rangeStart, rangeLength);-
540 QList<QGlyphRun> glyphRuns = line.glyphRuns(rangeStart, length);-
541 for (int j=0; j<glyphRuns.size()
j<glyphRuns.size()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
; ++j) {
28
542 const QGlyphRun &glyphRun = glyphRuns.at(j);-
543 addUnselectedGlyphs(glyphRun);-
544 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
28
545 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
28
546-
547 if (rangeEnd > selectionStart
rangeEnd > selectionStartDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
) {
0-58
548 int start = qMax(selectionStart, rangeStart);-
549 int length = qMin(selectionEnd - start + 1, rangeEnd - start);-
550 QList<QGlyphRun> glyphRuns = line.glyphRuns(start, length);-
551-
552 for (int j=0; j<glyphRuns.size()
j<glyphRuns.size()Description
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
; ++j) {
58
553 const QGlyphRun &glyphRun = glyphRuns.at(j);-
554 addSelectedGlyphs(glyphRun);-
555 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
556 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
557-
558 if (selectionEnd >= rangeStart
selectionEnd >= rangeStartDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
&& selectionEnd < rangeEnd
selectionEnd < rangeEndDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
) {
0-58
559 int start = selectionEnd + 1;-
560 int length = rangeEnd - selectionEnd - 1;-
561 QList<QGlyphRun> glyphRuns = line.glyphRuns(start, length);-
562 for (int j=0; j<glyphRuns.size()
j<glyphRuns.size()Description
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
; ++j) {
38-58
563 const QGlyphRun &glyphRun = glyphRuns.at(j);-
564 addUnselectedGlyphs(glyphRun);-
565 }
executed 38 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
38
566 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
567 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
568-
569 if (backgroundColor.isValid()
backgroundColor.isValid()Description
TRUEnever evaluated
FALSEevaluated 250660 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
0-250660
570 m_backgroundColor = oldBackgroundColor;
never executed: m_backgroundColor = oldBackgroundColor;
0
571-
572 if (oldColor.isValid()
oldColor.isValid()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 250648 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
12-250648
573 m_textColor = oldColor;
executed 12 times by 1 test: m_textColor = oldColor;
Executed by:
  • tst_examples
12
574}
executed 250660 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250660
575-
576void QQuickTextNodeEngine::addBorder(const QRectF &rect, qreal border,-
577 QTextFrameFormat::BorderStyle borderStyle,-
578 const QBrush &borderBrush)-
579{-
580 QColor color = borderBrush.color();-
581-
582-
583 (void)borderStyle;;-
584-
585 m_backgrounds.append(qMakePair(QRectF(rect.left(), rect.top(), border, rect.height() + border), color));-
586 m_backgrounds.append(qMakePair(QRectF(rect.left() + border, rect.top(), rect.width(), border), color));-
587 m_backgrounds.append(qMakePair(QRectF(rect.right(), rect.top() + border, border, rect.height() - border), color));-
588 m_backgrounds.append(qMakePair(QRectF(rect.left() + border, rect.bottom(), rect.width(), border), color));-
589}
never executed: end of block
0
590-
591void QQuickTextNodeEngine::addFrameDecorations(QTextDocument *document, QTextFrame *frame)-
592{-
593 QTextDocumentLayout *documentLayout = qobject_cast<QTextDocumentLayout *>(document->documentLayout());-
594 if (__builtin_expect(!!(!documentLayout), false)
__builtin_expe...ayout), false)Description
TRUEnever evaluated
FALSEevaluated 382 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
0-382
595 return;
never executed: return;
0
596-
597 QTextFrameFormat frameFormat = frame->format().toFrameFormat();-
598 QTextTable *table = qobject_cast<QTextTable *>(frame);-
599-
600 QRectF boundingRect = table == nullptr
table == nullptrDescription
TRUEevaluated 382 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
0-382
601 ? documentLayout->frameBoundingRect(frame)-
602 : documentLayout->tableBoundingRect(table);-
603-
604 QBrush bg = frame->frameFormat().background();-
605 if (bg.style() != Qt::NoBrush
bg.style() != Qt::NoBrushDescription
TRUEnever evaluated
FALSEevaluated 382 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
0-382
606 m_backgrounds.append(qMakePair(boundingRect, bg.color()));
never executed: m_backgrounds.append(qMakePair(boundingRect, bg.color()));
0
607-
608 if (!frameFormat.hasProperty(QTextFormat::FrameBorder)
!frameFormat.h...::FrameBorder)Description
TRUEevaluated 382 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
)
0-382
609 return;
executed 382 times by 5 tests: return;
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
382
610-
611 qreal borderWidth = frameFormat.border();-
612 if (qFuzzyIsNull(borderWidth)
qFuzzyIsNull(borderWidth)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
613 return;
never executed: return;
0
614-
615 QBrush borderBrush = frameFormat.borderBrush();-
616 QTextFrameFormat::BorderStyle borderStyle = frameFormat.borderStyle();-
617 if (borderStyle == QTextFrameFormat::BorderStyle_None
borderStyle ==...rderStyle_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
618 return;
never executed: return;
0
619-
620 addBorder(boundingRect.adjusted(frameFormat.leftMargin(), frameFormat.topMargin(),-
621 -frameFormat.rightMargin(), -frameFormat.bottomMargin()),-
622 borderWidth, borderStyle, borderBrush);-
623 if (table != nullptr
table != nullptrDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
624 int rows = table->rows();-
625 int columns = table->columns();-
626-
627 for (int row=0; row<rows
row<rowsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++row) {
0
628 for (int column=0; column<columns
column<columnsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++column) {
0
629 QTextTableCell cell = table->cellAt(row, column);-
630-
631 QRectF cellRect = documentLayout->tableCellBoundingRect(table, cell);-
632 addBorder(cellRect.adjusted(-borderWidth, -borderWidth, 0, 0), borderWidth,-
633 borderStyle, borderBrush);-
634 }
never executed: end of block
0
635 }
never executed: end of block
0
636 }
never executed: end of block
0
637}
never executed: end of block
0
638-
639uint qHash(const QQuickTextNodeEngine::BinaryTreeNodeKey &key)-
640{-
641-
642 return
executed 500019 times by 24 tests: return qHash(qMakePair(key.fontEngine, qMakePair(key.clipNode, qMakePair(key.color, key.selectionState))));
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
qHash(qMakePair(key.fontEngine, qMakePair(key.clipNode,
executed 500019 times by 24 tests: return qHash(qMakePair(key.fontEngine, qMakePair(key.clipNode, qMakePair(key.color, key.selectionState))));
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
500019
643 qMakePair(key.color, key.selectionState))));
executed 500019 times by 24 tests: return qHash(qMakePair(key.fontEngine, qMakePair(key.clipNode, qMakePair(key.color, key.selectionState))));
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
500019
644}-
645-
646void QQuickTextNodeEngine::mergeProcessedNodes(QList<BinaryTreeNode *> *regularNodes,-
647 QList<BinaryTreeNode *> *imageNodes)-
648{-
649 QHash<BinaryTreeNodeKey, QList<BinaryTreeNode *> > map;-
650-
651 for (int i = 0; i < m_processedNodes.size()
i < m_processedNodes.size()Description
TRUEevaluated 250928 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
249381-250928
652 BinaryTreeNode *node = m_processedNodes.data() + i;-
653-
654 if (node->image.isNull()
node->image.isNull()Description
TRUEevaluated 250924 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
) {
4-250924
655 BinaryTreeNodeKey key(node);-
656-
657 QList<BinaryTreeNode *> &nodes = map[key];-
658 if (nodes.isEmpty()
nodes.isEmpty()Description
TRUEevaluated 249095 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 1829 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
)
1829-249095
659 regularNodes->append(node);
executed 249095 times by 24 tests: regularNodes->append(node);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249095
660-
661 nodes.append(node);-
662 }
executed 250924 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
else {
250924
663 imageNodes->append(node);-
664 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
665 }-
666-
667 for (int i = 0; i < regularNodes->size()
i < regularNodes->size()Description
TRUEevaluated 249095 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
249095-249381
668 BinaryTreeNode *primaryNode = regularNodes->at(i);-
669 BinaryTreeNodeKey key(primaryNode);-
670-
671 const QList<BinaryTreeNode *> &nodes = map.value(key);-
672 ((nodes.first() == primaryNode) ? static_cast<void>(0) : qt_assert("nodes.first() == primaryNode", __FILE__, 726));-
673-
674 int count = 0;-
675 for (int j = 0; j < nodes.size()
j < nodes.size()Description
TRUEevaluated 250924 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 249095 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++j)
249095-250924
676 count += nodes.at(j)->glyphRun.glyphIndexes().size();
executed 250924 times by 24 tests: count += nodes.at(j)->glyphRun.glyphIndexes().size();
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
250924
677-
678 if (count != primaryNode->glyphRun.glyphIndexes().size()
count != prima...dexes().size()Description
TRUEevaluated 633 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
FALSEevaluated 248462 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
633-248462
679 QGlyphRun &glyphRun = primaryNode->glyphRun;-
680 QVector<quint32> glyphIndexes = glyphRun.glyphIndexes();-
681 glyphIndexes.reserve(count);-
682-
683 QVector<QPointF> glyphPositions = glyphRun.positions();-
684 glyphPositions.reserve(count);-
685-
686 QRectF glyphBoundingRect = glyphRun.boundingRect();-
687-
688 for (int j = 1; j < nodes.size()
j < nodes.size()Description
TRUEevaluated 1829 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
FALSEevaluated 633 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
; ++j) {
633-1829
689 BinaryTreeNode *otherNode = nodes.at(j);-
690 glyphIndexes += otherNode->glyphRun.glyphIndexes();-
691 primaryNode->ranges += otherNode->ranges;-
692 glyphBoundingRect = glyphBoundingRect.united(otherNode->boundingRect);-
693-
694 QVector<QPointF> otherPositions = otherNode->glyphRun.positions();-
695 for (int k = 0; k < otherPositions.size()
k < otherPositions.size()Description
TRUEevaluated 21352 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
FALSEevaluated 1829 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
; ++k)
1829-21352
696 glyphPositions += otherPositions.at(k) + (otherNode->position - primaryNode->position);
executed 21352 times by 7 tests: glyphPositions += otherPositions.at(k) + (otherNode->position - primaryNode->position);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
21352
697 }
executed 1829 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
1829
698-
699 ((glyphPositions.size() == count) ? static_cast<void>(0) : qt_assert("glyphPositions.size() == count", __FILE__, 753));-
700 ((glyphIndexes.size() == count) ? static_cast<void>(0) : qt_assert("glyphIndexes.size() == count", __FILE__, 754));-
701-
702 glyphRun.setGlyphIndexes(glyphIndexes);-
703 glyphRun.setPositions(glyphPositions);-
704 glyphRun.setBoundingRect(glyphBoundingRect);-
705 }
executed 633 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
633
706 }
executed 249095 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249095
707}
executed 249381 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249381
708-
709void QQuickTextNodeEngine::addToSceneGraph(QQuickTextNode *parentNode,-
710 QQuickText::TextStyle style,-
711 const QColor &styleColor)-
712{-
713 if (m_currentLine.isValid()
m_currentLine.isValid()Description
TRUEevaluated 248443 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 938 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
938-248443
714 processCurrentLine();
executed 248443 times by 24 tests: processCurrentLine();
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
248443
715-
716 QList<BinaryTreeNode *> nodes;-
717 QList<BinaryTreeNode *> imageNodes;-
718 mergeProcessedNodes(&nodes, &imageNodes);-
719-
720 for (int i = 0; i < m_backgrounds.size()
i < m_backgrounds.size()Description
TRUEnever evaluated
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
0-249381
721 const QRectF &rect = m_backgrounds.at(i).first;-
722 const QColor &color = m_backgrounds.at(i).second;-
723-
724 parentNode->addRectangleNode(rect, color);-
725 }
never executed: end of block
0
726-
727-
728 for (int i = 0; i < nodes.size()
i < nodes.size()Description
TRUEevaluated 249095 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
249095-249381
729 const BinaryTreeNode *node = nodes.at(i);-
730 parentNode->addGlyphs(node->position, node->glyphRun, node->color, style, styleColor, nullptr);-
731 }
executed 249095 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249095
732-
733 for (int i = 0; i < imageNodes.size()
i < imageNodes.size()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
4-249381
734 const BinaryTreeNode *node = imageNodes.at(i);-
735 if (node->selectionState == Unselected
node->selectio... == UnselectedDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
)
0-4
736 parentNode->addImage(node->boundingRect, node->image);
executed 4 times by 1 test: parentNode->addImage(node->boundingRect, node->image);
Executed by:
  • tst_qquicktext
4
737 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
738-
739-
740 for (int i = 0; i < m_selectionRects.size()
i < m_selectionRects.size()Description
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
58-249381
741 const QRectF &rect = m_selectionRects.at(i);-
742-
743 parentNode->addRectangleNode(rect, m_selectionColor);-
744 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
745-
746-
747 for (int i = 0; i < m_lines.size()
i < m_lines.size()Description
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
40-249381
748 const TextDecoration &textDecoration = m_lines.at(i);-
749-
750 QColor color = textDecoration.selectionState == Selected
textDecoration...te == SelectedDescription
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
0-40
751 ? m_selectedTextColor-
752 : textDecoration.color;-
753-
754 parentNode->addRectangleNode(textDecoration.rect, color);-
755 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
40
756-
757-
758 for (int i = 0; i < nodes.size()
i < nodes.size()Description
TRUEevaluated 249095 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
249095-249381
759 const BinaryTreeNode *node = nodes.at(i);-
760 QQuickDefaultClipNode *clipNode = node->clipNode;-
761 if (clipNode != nullptr
clipNode != nullptrDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 249037 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
&& clipNode->parent() == nullptr
clipNode->parent() == nullptrDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
)
0-249037
762 parentNode->appendChildNode(clipNode);
executed 58 times by 2 tests: parentNode->appendChildNode(clipNode);
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
763-
764 if (node->selectionState == Selected
node->selectio...te == SelectedDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 249037 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
) {
58-249037
765 QColor color = m_selectedTextColor;-
766 int previousNodeIndex = i - 1;-
767 int nextNodeIndex = i + 1;-
768 const BinaryTreeNode *previousNode = previousNodeIndex < 0
previousNodeIndex < 0Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
? 0 : nodes.at(previousNodeIndex);
28-30
769 while (previousNode != nullptr
previousNode != nullptrDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
&& qFuzzyCompare(previousNode->boundingRect.left(), node->boundingRect.left())
qFuzzyCompare(...ngRect.left())Description
TRUEnever evaluated
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
)
0-30
770 previousNode = --
--previousNodeIndex < 0Description
TRUEnever evaluated
FALSEnever evaluated
previousNodeIndex < 0
--previousNodeIndex < 0Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : nodes.at(previousNodeIndex);
never executed: previousNode = --previousNodeIndex < 0 ? 0 : nodes.at(previousNodeIndex);
0
771-
772 const BinaryTreeNode *nextNode = nextNodeIndex == nodes.size()
nextNodeIndex == nodes.size()Description
TRUEevaluated 36 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
? 0 : nodes.at(nextNodeIndex);
22-36
773-
774 if (previousNode != nullptr
previousNode != nullptrDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
&& previousNode->selectionState == Unselected
previousNode->... == UnselectedDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
)
0-30
775 parentNode->addGlyphs(previousNode->position, previousNode->glyphRun, color, style, styleColor, clipNode);
executed 28 times by 2 tests: parentNode->addGlyphs(previousNode->position, previousNode->glyphRun, color, style, styleColor, clipNode);
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
28
776-
777 if (nextNode != nullptr
nextNode != nullptrDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
&& nextNode->selectionState == Unselected
nextNode->sele... == UnselectedDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
)
0-36
778 parentNode->addGlyphs(nextNode->position, nextNode->glyphRun, color, style, styleColor, clipNode);
executed 22 times by 2 tests: parentNode->addGlyphs(nextNode->position, nextNode->glyphRun, color, style, styleColor, clipNode);
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
22
779-
780-
781-
782 bool drawCurrent = false;-
783 if (previousNode != nullptr
previousNode != nullptrDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
|| nextNode != nullptr
nextNode != nullptrDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktextedit
) {
8-30
784 for (int i = 0; i < node->ranges.size()
i < node->ranges.size()Description
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
; ++i) {
0-50
785 const QPair<int, int> &range = node->ranges.at(i);-
786-
787 int rangeLength = range.second - range.first + 1;-
788 if (previousNode != nullptr
previousNode != nullptrDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
22-28
789 for (int j = 0; j < previousNode->ranges.size()
j < previousNo...>ranges.size()Description
TRUEevaluated 44 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
; ++j) {
28-44
790 const QPair<int, int> &otherRange = previousNode->ranges.at(j);-
791-
792 if (range.first < otherRange.second
range.first < ...erRange.secondDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
&& range.second > otherRange.first
range.second >...herRange.firstDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
0-28
793 int start = qMax(range.first, otherRange.first);-
794 int end = qMin(range.second, otherRange.second);-
795 rangeLength -= end - start + 1;-
796 if (rangeLength == 0
rangeLength == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
797 break;
never executed: break;
0
798 }
never executed: end of block
0
799 }
executed 44 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
44
800 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
28
801-
802 if (nextNode != nullptr
nextNode != nullptrDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
&& rangeLength > 0
rangeLength > 0Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
) {
0-28
803 for (int j = 0; j < nextNode->ranges.size()
j < nextNode->ranges.size()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
; ++j) {
22
804 const QPair<int, int> &otherRange = nextNode->ranges.at(j);-
805-
806 if (range.first < otherRange.second
range.first < ...erRange.secondDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
&& range.second > otherRange.first
range.second >...herRange.firstDescription
TRUEnever evaluated
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
) {
0-22
807 int start = qMax(range.first, otherRange.first);-
808 int end = qMin(range.second, otherRange.second);-
809 rangeLength -= end - start + 1;-
810 if (rangeLength == 0
rangeLength == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
811 break;
never executed: break;
0
812 }
never executed: end of block
0
813 }
executed 22 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
22
814 }
executed 22 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
22
815-
816 if (rangeLength > 0
rangeLength > 0Description
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
) {
0-50
817 drawCurrent = true;-
818 break;
executed 50 times by 2 tests: break;
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
50
819 }-
820 }
never executed: end of block
0
821 }
executed 50 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
else {
50
822 drawCurrent = true;-
823 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicktextedit
8
824-
825 if (drawCurrent
drawCurrentDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_qquicktextedit
  • tst_qquicktextinput
FALSEnever evaluated
)
0-58
826 parentNode->addGlyphs(node->position, node->glyphRun, color, style, styleColor, clipNode);
executed 58 times by 2 tests: parentNode->addGlyphs(node->position, node->glyphRun, color, style, styleColor, clipNode);
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
827 }
executed 58 times by 2 tests: end of block
Executed by:
  • tst_qquicktextedit
  • tst_qquicktextinput
58
828 }
executed 249095 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249095
829-
830 for (int i = 0; i < imageNodes.size()
i < imageNodes.size()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 249381 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
4-249381
831 const BinaryTreeNode *node = imageNodes.at(i);-
832 if (node->selectionState == Selected
node->selectio...te == SelectedDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
) {
0-4
833 parentNode->addImage(node->boundingRect, node->image);-
834 if (node->selectionState == Selected
node->selectio...te == SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
835 QColor color = m_selectionColor;-
836 color.setAlpha(128);-
837 parentNode->addRectangleNode(node->boundingRect, color);-
838 }
never executed: end of block
0
839 }
never executed: end of block
0
840 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
841}
executed 249381 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249381
842-
843void QQuickTextNodeEngine::mergeFormats(QTextLayout *textLayout, QVarLengthArray<QTextLayout::FormatRange> *mergedFormats)-
844{-
845 ((mergedFormats != nullptr) ? static_cast<void>(0) : qt_assert("mergedFormats != nullptr", __FILE__, 899));-
846 if (textLayout == nullptr
textLayout == nullptrDescription
TRUEnever evaluated
FALSEevaluated 249113 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
)
0-249113
847 return;
never executed: return;
0
848-
849 QVector<QTextLayout::FormatRange> additionalFormats = textLayout->formats();-
850 for (int i=0; i<additionalFormats.size()
i<additionalFormats.size()Description
TRUEevaluated 188 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 249113 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
; ++i) {
188-249113
851 QTextLayout::FormatRange additionalFormat = additionalFormats.at(i);-
852 if (additionalFormat.format.hasProperty(QTextFormat::ForegroundBrush)
additionalForm...regroundBrush)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
12-176
853 || additionalFormat.format.hasProperty(QTextFormat::BackgroundBrush)
additionalForm...ckgroundBrush)Description
TRUEnever evaluated
FALSEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
0-176
854 || additionalFormat.format.isAnchor()
additionalForm...mat.isAnchor()Description
TRUEnever evaluated
FALSEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
) {
0-176
855-
856 if (!mergedFormats->isEmpty()
!mergedFormats->isEmpty()Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
) {
0-12
857 QTextLayout::FormatRange *lastFormat = mergedFormats->data() + mergedFormats->size() - 1;-
858-
859 if (additionalFormat.start < lastFormat->start + lastFormat->length
additionalForm...Format->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
860 QTextLayout::FormatRange *mergedRange = nullptr;-
861-
862 int length = additionalFormat.length;-
863 if (additionalFormat.start > lastFormat->start
additionalForm...tFormat->startDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
864 lastFormat->length = additionalFormat.start - lastFormat->start;-
865 length -= lastFormat->length;-
866-
867 mergedFormats->append(QTextLayout::FormatRange());-
868 mergedRange = mergedFormats->data() + mergedFormats->size() - 1;-
869 lastFormat = mergedFormats->data() + mergedFormats->size() - 2;-
870 }
never executed: end of block
else {
0
871 mergedRange = lastFormat;-
872 }
never executed: end of block
0
873-
874 mergedRange->format = lastFormat->format;-
875 mergedRange->format.merge(additionalFormat.format);-
876 mergedRange->start = additionalFormat.start;-
877-
878 int end = qMin(additionalFormat.start + additionalFormat.length,-
879 lastFormat->start + lastFormat->length);-
880-
881 mergedRange->length = end - mergedRange->start;-
882 length -= mergedRange->length;-
883-
884 additionalFormat.start = end;-
885 additionalFormat.length = length;-
886 }
never executed: end of block
0
887 }
never executed: end of block
0
888-
889 if (additionalFormat.length > 0
additionalFormat.length > 0Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
)
0-12
890 mergedFormats->append(additionalFormat);
executed 12 times by 1 test: mergedFormats->append(additionalFormat);
Executed by:
  • tst_examples
12
891 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_examples
12
892 }
executed 188 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
188
893-
894}
executed 249113 times by 24 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_scenegraph
  • tst_touchmouse
249113
895-
896void QQuickTextNodeEngine::addTextBlock(QTextDocument *textDocument, const QTextBlock &block, const QPointF &position, const QColor &textColor, const QColor &anchorColor, int selectionStart, int selectionEnd)-
897{-
898 ((textDocument) ? static_cast<void>(0) : qt_assert("textDocument", __FILE__, 952));-
899-
900 int preeditLength = block.isValid()
block.isValid()Description
TRUEevaluated 670 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
? block.layout()->preeditAreaText().length() : 0;
0-670
901 int preeditPosition = block.isValid()
block.isValid()Description
TRUEevaluated 670 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
? block.layout()->preeditAreaPosition() : -1;
0-670
902-
903-
904 setCurrentTextDirection(block.textDirection());-
905-
906 QVarLengthArray<QTextLayout::FormatRange> colorChanges;-
907 mergeFormats(block.layout(), &colorChanges);-
908-
909 QPointF blockPosition = textDocument->documentLayout()->blockBoundingRect(block).topLeft() + position;-
910 if (QTextList *textList = block.textList()
QTextList *tex...ock.textList()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 622 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
) {
48-622
911 QPointF pos = blockPosition;-
912 QTextLayout *layout = block.layout();-
913 if (layout->lineCount() > 0
layout->lineCount() > 0Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-48
914 QTextLine firstLine = layout->lineAt(0);-
915 ((firstLine.isValid()) ? static_cast<void>(0) : qt_assert("firstLine.isValid()", __FILE__, 969));-
916-
917 setCurrentLine(firstLine);-
918-
919 QRectF textRect = firstLine.naturalTextRect();-
920 pos += textRect.topLeft();-
921 if (block.textDirection() == Qt::RightToLeft
block.textDire...t::RightToLeftDescription
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
)
0-48
922 pos.rx() += textRect.width();
never executed: pos.rx() += textRect.width();
0
923-
924 const QTextCharFormat charFormat = block.charFormat();-
925 QFont font(charFormat.font());-
926 QFontMetricsF fontMetrics(font);-
927 QTextListFormat listFormat = textList->format();-
928-
929 QString listItemBullet;-
930 switch (listFormat.style()) {-
931 case
never executed: case QTextListFormat::ListCircle:
QTextListFormat::ListCircle:
never executed: case QTextListFormat::ListCircle:
0
932 listItemBullet = QChar(0x25E6);-
933 break;
never executed: break;
0
934 case
executed 4 times by 1 test: case QTextListFormat::ListSquare:
Executed by:
  • tst_qquicktext
QTextListFormat::ListSquare:
executed 4 times by 1 test: case QTextListFormat::ListSquare:
Executed by:
  • tst_qquicktext
4
935 listItemBullet = QChar(0x25AA);-
936 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquicktext
4
937 case
executed 12 times by 1 test: case QTextListFormat::ListDecimal:
Executed by:
  • tst_qquicktext
QTextListFormat::ListDecimal:
executed 12 times by 1 test: case QTextListFormat::ListDecimal:
Executed by:
  • tst_qquicktext
12
938 case
executed 4 times by 1 test: case QTextListFormat::ListLowerAlpha:
Executed by:
  • tst_qquicktext
QTextListFormat::ListLowerAlpha:
executed 4 times by 1 test: case QTextListFormat::ListLowerAlpha:
Executed by:
  • tst_qquicktext
4
939 case
executed 4 times by 1 test: case QTextListFormat::ListUpperAlpha:
Executed by:
  • tst_qquicktext
QTextListFormat::ListUpperAlpha:
executed 4 times by 1 test: case QTextListFormat::ListUpperAlpha:
Executed by:
  • tst_qquicktext
4
940 case
executed 4 times by 1 test: case QTextListFormat::ListLowerRoman:
Executed by:
  • tst_qquicktext
QTextListFormat::ListLowerRoman:
executed 4 times by 1 test: case QTextListFormat::ListLowerRoman:
Executed by:
  • tst_qquicktext
4
941 case
executed 4 times by 1 test: case QTextListFormat::ListUpperRoman:
Executed by:
  • tst_qquicktext
QTextListFormat::ListUpperRoman:
executed 4 times by 1 test: case QTextListFormat::ListUpperRoman:
Executed by:
  • tst_qquicktext
4
942 listItemBullet = textList->itemText(block);-
943 break;
executed 28 times by 1 test: break;
Executed by:
  • tst_qquicktext
28
944 default
executed 16 times by 1 test: default:
Executed by:
  • tst_qquicktext
:
executed 16 times by 1 test: default:
Executed by:
  • tst_qquicktext
16
945 listItemBullet = QChar(0x2022);-
946 break;
executed 16 times by 1 test: break;
Executed by:
  • tst_qquicktext
16
947 };-
948-
949 QSizeF size(fontMetrics.width(listItemBullet), fontMetrics.height());-
950 qreal xoff = fontMetrics.width(QLatin1Char(' '));-
951 if (block.textDirection() == Qt::LeftToRight
block.textDire...t::LeftToRightDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
)
0-48
952 xoff = -xoff - size.width();
executed 48 times by 1 test: xoff = -xoff - size.width();
Executed by:
  • tst_qquicktext
48
953 setPosition(pos + QPointF(xoff, 0));-
954-
955 QTextLayout layout;-
956 layout.setFont(font);-
957 layout.setText(listItemBullet);-
958 layout.beginLayout();-
959 QTextLine line = layout.createLine();-
960 line.setPosition(QPointF(0, 0));-
961 layout.endLayout();-
962-
963 QList<QGlyphRun> glyphRuns = layout.glyphRuns();-
964 for (int i=0; i<glyphRuns.size()
i<glyphRuns.size()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
; ++i)
48
965 addUnselectedGlyphs(glyphRuns.at(i));
executed 48 times by 1 test: addUnselectedGlyphs(glyphRuns.at(i));
Executed by:
  • tst_qquicktext
48
966 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_qquicktext
48
967 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_qquicktext
48
968-
969 int textPos = block.position();-
970 QTextBlock::iterator blockIterator = block.begin();-
971-
972 while (!blockIterator.atEnd()
!blockIterator.atEnd()Description
TRUEevaluated 576 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 670 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
) {
576-670
973 QTextFragment fragment = blockIterator.fragment();-
974 QString text = fragment.text();-
975 if (text.isEmpty()
text.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 576 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
0-576
976 continue;
never executed: continue;
0
977-
978 QTextCharFormat charFormat = fragment.charFormat();-
979 QFont font(charFormat.font());-
980 QFontMetricsF fontMetrics(font);-
981-
982 int fontHeight = fontMetrics.descent() + fontMetrics.ascent();-
983 int valign = charFormat.verticalAlignment();-
984 if (valign == QTextCharFormat::AlignSuperScript
valign == QTex...ignSuperScriptDescription
TRUEnever evaluated
FALSEevaluated 576 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
0-576
985 setPosition(QPointF(blockPosition.x(), blockPosition.y() - fontHeight / 2));
never executed: setPosition(QPointF(blockPosition.x(), blockPosition.y() - fontHeight / 2));
0
986 else if (valign == QTextCharFormat::AlignSubScript
valign == QTex...AlignSubScriptDescription
TRUEnever evaluated
FALSEevaluated 576 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
0-576
987 setPosition(QPointF(blockPosition.x(), blockPosition.y() + fontHeight / 6));
never executed: setPosition(QPointF(blockPosition.x(), blockPosition.y() + fontHeight / 6));
0
988 else-
989 setPosition(blockPosition);
executed 576 times by 5 tests: setPosition(blockPosition);
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
576
990-
991 if (text.contains(QChar::ObjectReplacementCharacter)
text.contains(...mentCharacter)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 570 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
) {
6-570
992 QTextFrame *frame = qobject_cast<QTextFrame *>(textDocument->objectForFormat(charFormat));-
993 if (frame
frameDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
&& frame->frameFormat().position() == QTextFrameFormat::InFlow
frame->frameFo...Format::InFlowDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
) {
0-6
994 int blockRelativePosition = textPos - block.position();-
995 QTextLine line = block.layout()->lineForTextPosition(blockRelativePosition);-
996 if (!currentLine().isValid()
!currentLine().isValid()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-6
997 || line.lineNumber() != currentLine().lineNumber()
line.lineNumbe...).lineNumber()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
998 setCurrentLine(line);-
999 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
1000-
1001 QQuickTextNodeEngine::SelectionState selectionState =-
1002 (selectionStart < textPos + text.length()
selectionStart... text.length()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-6
1003 && selectionEnd >= textPos
selectionEnd >= textPosDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
)
0-6
1004 ? QQuickTextNodeEngine::Selected-
1005 : QQuickTextNodeEngine::Unselected;-
1006-
1007 addTextObject(QPointF(), charFormat, selectionState, textDocument, textPos);-
1008 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
1009 textPos += text.length();-
1010 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
else {
6
1011 if (charFormat.foreground().style() != Qt::NoBrush
charFormat.for...!= Qt::NoBrushDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktextedit
FALSEevaluated 566 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
4-566
1012 setTextColor(charFormat.foreground().color());
executed 4 times by 2 tests: setTextColor(charFormat.foreground().color());
Executed by:
  • tst_examples
  • tst_qquicktextedit
4
1013 else if (charFormat.isAnchor()
charFormat.isAnchor()Description
TRUEnever evaluated
FALSEevaluated 566 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
)
0-566
1014 setTextColor(anchorColor);
never executed: setTextColor(anchorColor);
0
1015 else-
1016 setTextColor(textColor);
executed 566 times by 5 tests: setTextColor(textColor);
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
566
1017-
1018 int fragmentEnd = textPos + fragment.length();-
1019-
1020 if (preeditPosition >= 0
preeditPosition >= 0Description
TRUEnever evaluated
FALSEevaluated 570 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
0-570
1021 && (
(preeditPositi...()) >= textPosDescription
TRUEnever evaluated
FALSEnever evaluated
preeditPosition + block.position()) >= textPos
(preeditPositi...()) >= textPosDescription
TRUEnever evaluated
FALSEnever evaluated
0
1022 && (
(preeditPositi...<= fragmentEndDescription
TRUEnever evaluated
FALSEnever evaluated
preeditPosition + block.position()) <= fragmentEnd
(preeditPositi...<= fragmentEndDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1023 fragmentEnd += preeditLength;-
1024 }
never executed: end of block
0
1025-
1026 if (charFormat.background().style() != Qt::NoBrush
charFormat.bac...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEevaluated 570 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
) {
0-570
1027 QTextLayout::FormatRange additionalFormat;-
1028 additionalFormat.start = textPos - block.position();-
1029 additionalFormat.length = fragmentEnd - textPos;-
1030 additionalFormat.format = charFormat;-
1031 colorChanges << additionalFormat;-
1032 }
never executed: end of block
0
1033-
1034 textPos = addText(block, charFormat, textColor, colorChanges, textPos, fragmentEnd,-
1035 selectionStart, selectionEnd);-
1036 }
executed 570 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
570
1037-
1038 ++blockIterator;-
1039 }
executed 576 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
576
1040-
1041-
1042 if (preeditLength >= 0
preeditLength >= 0Description
TRUEevaluated 670 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
&& textPos <= block.position() + preeditPosition
textPos <= blo...reeditPositionDescription
TRUEnever evaluated
FALSEevaluated 670 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
) {
0-670
1043 setPosition(blockPosition);-
1044 textPos = block.position() + preeditPosition;-
1045 QTextLine line = block.layout()->lineForTextPosition(preeditPosition);-
1046 if (!currentLine().isValid()
!currentLine().isValid()Description
TRUEnever evaluated
FALSEnever evaluated
0
1047 || line.lineNumber() != currentLine().lineNumber()
line.lineNumbe...).lineNumber()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1048 setCurrentLine(line);-
1049 }
never executed: end of block
0
1050 textPos = addText(block, block.charFormat(), textColor, colorChanges,-
1051 textPos, textPos + preeditLength,-
1052 selectionStart, selectionEnd);-
1053 }
never executed: end of block
0
1054-
1055-
1056 setCurrentLine(QTextLine());-
1057 m_hasContents = true;-
1058}
executed 670 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfocusscope
  • tst_qquickitem2
  • tst_qquicktext
  • tst_qquicktextedit
670
1059-
1060-
1061-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0