Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | QQuickTextNodeEngine::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 | | - |
14 | QQuickTextNodeEngine::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 | | - |
38 | void 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())TRUE | never evaluated | FALSE | evaluated 250924 times by 24 testsEvaluated 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())TRUE | never evaluated | FALSE | evaluated 250924 times by 24 testsEvaluated 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()TRUE | evaluated 16 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 250908 times by 24 testsEvaluated 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()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250912 times by 24 testsEvaluated 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()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250912 times by 24 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 250924 times by 24 testsEvaluated 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 | | - |
64 | void QQuickTextNodeEngine::BinaryTreeNode::insert(QVarLengthArray<BinaryTreeNode, 16> *binaryTree, const BinaryTreeNode &binaryTreeNode) | - |
65 | { | - |
66 | int newIndex = binaryTree->size(); | - |
67 | binaryTree->append(binaryTreeNode); | - |
68 | if (newIndex == 0TRUE | evaluated 250622 times by 24 testsEvaluated 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
| FALSE | evaluated 306 times by 4 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 600 times by 4 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
|
) { | 0-600 |
75 | if (node->leftChildIndex < 0TRUE | never evaluated | FALSE | never 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 < 0TRUE | evaluated 306 times by 4 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 294 times by 4 testsEvaluated 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 | | - |
92 | void 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 >= 0TRUE | never evaluated | FALSE | evaluated 250928 times by 24 testsEvaluated 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 >= 0TRUE | evaluated 306 times by 4 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250622 times by 24 testsEvaluated 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 | | - |
108 | int 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::NoBrushTRUE | evaluated 4 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktextedit
| FALSE | evaluated 566 times by 5 testsEvaluated 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 < fragmentEndTRUE | evaluated 674 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 570 times by 5 testsEvaluated 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()TRUE | evaluated 508 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 166 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
|
| 166-508 |
124 | || line.lineNumber() != currentLine().lineNumber()TRUE | evaluated 104 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 62 times by 3 testsEvaluated 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 | returnexecuted 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 | | - |
147 | void QQuickTextNodeEngine::addTextDecorations(const QVarLengthArray<TextDecoration> &textDecorations, | - |
148 | qreal offset, qreal thickness) | - |
149 | { | - |
150 | for (int i=0; i<textDecorations.size()TRUE | evaluated 40 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 40 times by 3 testsEvaluated 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 | | - |
166 | void QQuickTextNodeEngine::processCurrentLine() | - |
167 | { | - |
168 | | - |
169 | if (m_currentLineTree.isEmpty()TRUE | evaluated 34 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktext
| FALSE | evaluated 250622 times by 24 testsEvaluated 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()TRUE | evaluated 250622 times by 24 testsEvaluated 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
| FALSE | never evaluated |
) { | 0-250622 |
205 | QQuickDefaultClipNode *currentClipNode = m_hasSelectionTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250564 times by 24 testsEvaluated 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()TRUE | evaluated 501550 times by 24 testsEvaluated 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
| FALSE | evaluated 250622 times by 24 testsEvaluated 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()TRUE | evaluated 250928 times by 24 testsEvaluated 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
| FALSE | evaluated 250622 times by 24 testsEvaluated 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 == 0TRUE | evaluated 250622 times by 24 testsEvaluated 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
| FALSE | evaluated 250928 times by 24 testsEvaluated 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::NoDecorationTRUE | evaluated 40 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 501510 times by 24 testsEvaluated 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 != nullptrTRUE | evaluated 2 times by 1 test | FALSE | evaluated 38 times by 2 testsEvaluated by:- tst_qquicktext
- tst_qquicktextedit
|
) | 2-38 |
225 | decorationRect.setRight(node->boundingRect.left());executed 2 times by 1 test: decorationRect.setRight(node->boundingRect.left()); | 2 |
226 | | - |
227 | TextDecoration textDecoration(currentSelectionState, decorationRect, lastColor); | - |
228 | if (currentDecorations & Decoration::UnderlineTRUE | evaluated 16 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 24 times by 1 test |
) | 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::OverlineTRUE | evaluated 12 times by 1 test | FALSE | evaluated 28 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
|
) | 12-28 |
232 | pendingOverlines.append(textDecoration);executed 12 times by 1 test: pendingOverlines.append(textDecoration); | 12 |
233 | | - |
234 | if (currentDecorations & Decoration::StrikeOutTRUE | evaluated 12 times by 1 test | FALSE | evaluated 28 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
|
) | 12-28 |
235 | pendingStrikeOuts.append(textDecoration);executed 12 times by 1 test: pendingStrikeOuts.append(textDecoration); | 12 |
236 | | - |
237 | if (currentDecorations & Decoration::BackgroundTRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated 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 == nullptrTRUE | evaluated 250622 times by 24 testsEvaluated 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
| FALSE | evaluated 250928 times by 24 testsEvaluated 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 != currentSelectionStateTRUE | evaluated 66 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250862 times by 24 testsEvaluated 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 == SelectedTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250630 times by 24 testsEvaluated 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 != nullptrTRUE | evaluated 124 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250564 times by 24 testsEvaluated 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 (!currentClipNodeUsedTRUE | evaluated 66 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 58 times by 2 testsEvaluated 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 != nullptrTRUE | evaluated 66 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250622 times by 24 testsEvaluated 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_hasSelectionTRUE | evaluated 66 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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 != nullptrTRUE | evaluated 66 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250622 times by 24 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 66 times by 2 testsEvaluated 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()TRUE | evaluated 250622 times by 24 testsEvaluated 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
| FALSE | evaluated 240 times by 3 testsEvaluated 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 != nullptrTRUE | evaluated 250928 times by 24 testsEvaluated 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
| FALSE | evaluated 250622 times by 24 testsEvaluated 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 == SelectedTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250870 times by 24 testsEvaluated 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()TRUE | evaluated 2 times by 1 test | FALSE | evaluated 250926 times by 24 testsEvaluated 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)TRUE | evaluated 2 times by 1 test | FALSE | never 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 | 2 |
301 | | - |
302 | | - |
303 | | - |
304 | if (!pendingOverlines.isEmpty()TRUE | never evaluated | FALSE | evaluated 250928 times by 24 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 250928 times by 24 testsEvaluated 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::UnderlineTRUE | evaluated 16 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 250912 times by 24 testsEvaluated 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() > underlineThicknessTRUE | evaluated 16 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | never 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::OverlineTRUE | evaluated 12 times by 1 test | FALSE | evaluated 250916 times by 24 testsEvaluated 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 | 12 |
337 | | - |
338 | if (node->decorations & Decoration::StrikeOutTRUE | evaluated 12 times by 1 test | FALSE | evaluated 250916 times by 24 testsEvaluated 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 | 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()TRUE | evaluated 14 times by 2 testsEvaluated by:- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 250608 times by 24 testsEvaluated 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()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250610 times by 24 testsEvaluated 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); | 12 |
355 | | - |
356 | if (!pendingStrikeOuts.isEmpty()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250610 times by 24 testsEvaluated 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); | 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 | | - |
365 | void 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::InFlowTRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
) { | 0-4 |
371 | if (m_currentLineTree.isEmpty()TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
) { | 0-4 |
372 | if (m_currentTextDirection == Qt::RightToLeftTRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) | 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)); | 4 |
376 | } else { | - |
377 | const BinaryTreeNode *lastNode = m_currentLineTree.data() + m_currentLineTree.size() - 1; | - |
378 | if (lastNode->glyphRun.isRightToLeft()TRUE | never evaluated | FALSE | never 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 | 4 |
391 | | - |
392 | void 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 != nullptrTRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
) { | 0-6 |
399 | QImage image; | - |
400 | QSizeF size = handler->intrinsicSize(textDocument, pos, format); | - |
401 | | - |
402 | if (format.objectType() == QTextFormat::ImageObjectTRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
) { | 0-6 |
403 | QTextImageFormat imageFormat = format.toImageFormat(); | - |
404 | if (QQuickTextDocumentWithImageResources *imageDoc = qobject_cast<QQuickTextDocumentWithImageResources *>(textDocument)TRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
) { | 0-6 |
405 | image = imageDoc->image(imageFormat); | - |
406 | | - |
407 | if (image.isNull()TRUE | evaluated 2 times by 1 test | FALSE | evaluated 4 times by 1 test |
) | 2-4 |
408 | return;executed 2 times by 1 test: return; | 2 |
409 | }executed 4 times by 1 test: end of block 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()TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) { | 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 | defaultexecuted 4 times by 1 test: default: :executed 4 times by 1 test: default: | 4 |
435 | ascent = size.height() - 1; | - |
436 | }executed 4 times by 1 test: end of block | 4 |
437 | | - |
438 | addImage(QRectF(position, size), image, ascent, selectionState, layoutPosition); | - |
439 | }executed 4 times by 1 test: end of block | 4 |
440 | }executed 4 times by 1 test: end of block | 4 |
441 | | - |
442 | void 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 | | - |
453 | void 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_hasSelectionTRUE | never evaluated | FALSE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
|| m_currentLineTree.size() > currentSizeTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never evaluated |
; | 0-58 |
464 | }executed 58 times by 2 tests: end of block Executed by:- tst_qquicktextedit
- tst_qquicktextinput
| 58 |
465 | | - |
466 | void 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()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250664 times by 24 testsEvaluated 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 >= currentPositionTRUE | evaluated 12 times by 1 test | FALSE | never evaluated |
| 0-12 |
475 | && range.start < currentPosition + remainingLengthTRUE | evaluated 12 times by 1 test | FALSE | never evaluated |
) { | 0-12 |
476 | | - |
477 | if (range.start > currentPositionTRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
) { | 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)TRUE | evaluated 12 times by 1 test | FALSE | never evaluated |
) | 0-12 |
484 | rangeColor = range.format.foreground().color();executed 12 times by 1 test: rangeColor = range.format.foreground().color(); | 12 |
485 | else if (range.format.isAnchor()TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
486 | rangeColor = m_anchorColor; never executed: rangeColor = m_anchorColor; | 0 |
487 | QColor rangeBackgroundColor = range.format.hasProperty(QTextFormat::BackgroundBrush)TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
| 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 else if (range.start > currentPosition + remainingLengthTRUE | never evaluated | FALSE | never evaluated |
|| remainingLength <= 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0-12 |
499 | break; never executed: break; | 0 |
500 | } | - |
501 | }executed 12 times by 1 test: end of block | 12 |
502 | | - |
503 | if (remainingLength > 0TRUE | evaluated 250648 times by 24 testsEvaluated 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
| FALSE | evaluated 16 times by 1 test |
) { | 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 | | - |
510 | void 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()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250648 times by 24 testsEvaluated 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 | 12 |
519 | | - |
520 | QColor oldBackgroundColor = m_backgroundColor; | - |
521 | if (backgroundColor.isValid()TRUE | never evaluated | FALSE | evaluated 250660 times by 24 testsEvaluated 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 >= 0TRUE | evaluated 72 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 250588 times by 24 testsEvaluated 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 <= selectionEndTRUE | evaluated 62 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 10 times by 1 test |
; | 10-62 |
528 | | - |
529 | QTextLine &line = m_currentLine; | - |
530 | int rangeEnd = rangeStart + rangeLength; | - |
531 | if (!hasSelectionTRUE | evaluated 250598 times by 24 testsEvaluated 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
| FALSE | evaluated 62 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
|| (selectionStart > rangeEndTRUE | evaluated 4 times by 1 test | FALSE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
|| selectionEnd < rangeStartTRUE | never evaluated | FALSE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
)) { | 0-250598 |
532 | QList<QGlyphRun> glyphRuns = line.glyphRuns(rangeStart, rangeLength); | - |
533 | for (int j=0; j<glyphRuns.size()TRUE | evaluated 250752 times by 24 testsEvaluated 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
| FALSE | evaluated 250602 times by 24 testsEvaluated 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 < selectionStartTRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 30 times by 2 testsEvaluated 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()TRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 28 times by 2 testsEvaluated 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 > selectionStartTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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()TRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 58 times by 2 testsEvaluated 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 >= rangeStartTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never evaluated |
&& selectionEnd < rangeEndTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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()TRUE | evaluated 38 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 58 times by 2 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 250660 times by 24 testsEvaluated 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()TRUE | evaluated 12 times by 1 test | FALSE | evaluated 250648 times by 24 testsEvaluated 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; | 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 | | - |
576 | void 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 | | - |
591 | void QQuickTextNodeEngine::addFrameDecorations(QTextDocument *document, QTextFrame *frame) | - |
592 | { | - |
593 | QTextDocumentLayout *documentLayout = qobject_cast<QTextDocumentLayout *>(document->documentLayout()); | - |
594 | if (__builtin_expect(!!(!documentLayout), false)TRUE | never evaluated | FALSE | evaluated 382 times by 5 testsEvaluated 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 == nullptrTRUE | evaluated 382 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | never evaluated |
| 0-382 |
601 | ? documentLayout->frameBoundingRect(frame) | - |
602 | : documentLayout->tableBoundingRect(table); | - |
603 | | - |
604 | QBrush bg = frame->frameFormat().background(); | - |
605 | if (bg.style() != Qt::NoBrushTRUE | never evaluated | FALSE | evaluated 382 times by 5 testsEvaluated 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)TRUE | evaluated 382 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | never 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)TRUE | never evaluated | FALSE | never 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_NoneTRUE | never evaluated | FALSE | never 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 != nullptrTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
624 | int rows = table->rows(); | - |
625 | int columns = table->columns(); | - |
626 | | - |
627 | for (int row=0; row<rowsTRUE | never evaluated | FALSE | never evaluated |
; ++row) { | 0 |
628 | for (int column=0; column<columnsTRUE | never evaluated | FALSE | never 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 | | - |
639 | uint qHash(const QQuickTextNodeEngine::BinaryTreeNodeKey &key) | - |
640 | { | - |
641 | | - |
642 | returnexecuted 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 | | - |
646 | void 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()TRUE | evaluated 250928 times by 24 testsEvaluated 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
| FALSE | evaluated 249381 times by 24 testsEvaluated 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()TRUE | evaluated 250924 times by 24 testsEvaluated 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
| FALSE | evaluated 4 times by 1 test |
) { | 4-250924 |
655 | BinaryTreeNodeKey key(node); | - |
656 | | - |
657 | QList<BinaryTreeNode *> &nodes = map[key]; | - |
658 | if (nodes.isEmpty()TRUE | evaluated 249095 times by 24 testsEvaluated 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
| FALSE | evaluated 1829 times by 7 testsEvaluated 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 | 4 |
665 | } | - |
666 | | - |
667 | for (int i = 0; i < regularNodes->size()TRUE | evaluated 249095 times by 24 testsEvaluated 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
| FALSE | evaluated 249381 times by 24 testsEvaluated 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()TRUE | evaluated 250924 times by 24 testsEvaluated 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
| FALSE | evaluated 249095 times by 24 testsEvaluated 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()TRUE | evaluated 633 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickfocusscope
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
| FALSE | evaluated 248462 times by 24 testsEvaluated 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()TRUE | evaluated 1829 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickfocusscope
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
| FALSE | evaluated 633 times by 7 testsEvaluated 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()TRUE | evaluated 21352 times by 7 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qquickfocusscope
- tst_qquicktext
- tst_qquicktextedit
- tst_qquicktextinput
- tst_scenegraph
| FALSE | evaluated 1829 times by 7 testsEvaluated 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 | | - |
709 | void QQuickTextNodeEngine::addToSceneGraph(QQuickTextNode *parentNode, | - |
710 | QQuickText::TextStyle style, | - |
711 | const QColor &styleColor) | - |
712 | { | - |
713 | if (m_currentLine.isValid()TRUE | evaluated 248443 times by 24 testsEvaluated 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
| FALSE | evaluated 938 times by 5 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 249381 times by 24 testsEvaluated 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()TRUE | evaluated 249095 times by 24 testsEvaluated 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
| FALSE | evaluated 249381 times by 24 testsEvaluated 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()TRUE | evaluated 4 times by 1 test | FALSE | evaluated 249381 times by 24 testsEvaluated 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 == UnselectedTRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
) | 0-4 |
736 | parentNode->addImage(node->boundingRect, node->image);executed 4 times by 1 test: parentNode->addImage(node->boundingRect, node->image); | 4 |
737 | }executed 4 times by 1 test: end of block | 4 |
738 | | - |
739 | | - |
740 | for (int i = 0; i < m_selectionRects.size()TRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 249381 times by 24 testsEvaluated 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()TRUE | evaluated 40 times by 3 testsEvaluated by:- tst_examples
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 249381 times by 24 testsEvaluated 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 == SelectedTRUE | never evaluated | FALSE | evaluated 40 times by 3 testsEvaluated 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()TRUE | evaluated 249095 times by 24 testsEvaluated 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
| FALSE | evaluated 249381 times by 24 testsEvaluated 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 != nullptrTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 249037 times by 24 testsEvaluated 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() == nullptrTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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 == SelectedTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 249037 times by 24 testsEvaluated 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 < 0TRUE | evaluated 30 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
? 0 : nodes.at(previousNodeIndex); | 28-30 |
769 | while (previousNode != nullptrTRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 30 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
&& qFuzzyCompare(previousNode->boundingRect.left(), node->boundingRect.left())TRUE | never evaluated | FALSE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
) | 0-30 |
770 | previousNode = --TRUE | never evaluated | FALSE | never evaluated |
previousNodeIndex < 0TRUE | never evaluated | FALSE | never evaluated |
? 0 : nodes.at(previousNodeIndex);never executed: previousNode = --previousNodeIndex < 0 ? 0 : nodes.at(previousNodeIndex); | 0 |
771 | | - |
772 | const BinaryTreeNode *nextNode = nextNodeIndex == nodes.size()TRUE | evaluated 36 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
? 0 : nodes.at(nextNodeIndex); | 22-36 |
773 | | - |
774 | if (previousNode != nullptrTRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 30 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
&& previousNode->selectionState == UnselectedTRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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 != nullptrTRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 36 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
&& nextNode->selectionState == UnselectedTRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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 != nullptrTRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 30 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
|| nextNode != nullptrTRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 8 times by 1 test |
) { | 8-30 |
784 | for (int i = 0; i < node->ranges.size()TRUE | evaluated 50 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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 != nullptrTRUE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
) { | 22-28 |
789 | for (int j = 0; j < previousNode->ranges.size()TRUE | evaluated 44 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
; ++j) { | 28-44 |
790 | const QPair<int, int> &otherRange = previousNode->ranges.at(j); | - |
791 | | - |
792 | if (range.first < otherRange.secondTRUE | evaluated 16 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
&& range.second > otherRange.firstTRUE | never evaluated | FALSE | evaluated 16 times by 2 testsEvaluated 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 == 0TRUE | never evaluated | FALSE | never 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 != nullptrTRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 28 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
&& rangeLength > 0TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never evaluated |
) { | 0-28 |
803 | for (int j = 0; j < nextNode->ranges.size()TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
|
; ++j) { | 22 |
804 | const QPair<int, int> &otherRange = nextNode->ranges.at(j); | - |
805 | | - |
806 | if (range.first < otherRange.secondTRUE | evaluated 22 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never evaluated |
&& range.second > otherRange.firstTRUE | never evaluated | FALSE | evaluated 22 times by 2 testsEvaluated 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 == 0TRUE | never evaluated | FALSE | never 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 > 0TRUE | evaluated 50 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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 | 8 |
824 | | - |
825 | if (drawCurrentTRUE | evaluated 58 times by 2 testsEvaluated by:- tst_qquicktextedit
- tst_qquicktextinput
| FALSE | never 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()TRUE | evaluated 4 times by 1 test | FALSE | evaluated 249381 times by 24 testsEvaluated 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 == SelectedTRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) { | 0-4 |
833 | parentNode->addImage(node->boundingRect, node->image); | - |
834 | if (node->selectionState == SelectedTRUE | never evaluated | FALSE | never 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 | 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 | | - |
843 | void 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 == nullptrTRUE | never evaluated | FALSE | evaluated 249113 times by 24 testsEvaluated 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()TRUE | evaluated 188 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktext
| FALSE | evaluated 249113 times by 24 testsEvaluated 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)TRUE | evaluated 12 times by 1 test | FALSE | evaluated 176 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktext
|
| 12-176 |
853 | || additionalFormat.format.hasProperty(QTextFormat::BackgroundBrush)TRUE | never evaluated | FALSE | evaluated 176 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktext
|
| 0-176 |
854 | || additionalFormat.format.isAnchor()TRUE | never evaluated | FALSE | evaluated 176 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktext
|
) { | 0-176 |
855 | | - |
856 | if (!mergedFormats->isEmpty()TRUE | never evaluated | FALSE | evaluated 12 times by 1 test |
) { | 0-12 |
857 | QTextLayout::FormatRange *lastFormat = mergedFormats->data() + mergedFormats->size() - 1; | - |
858 | | - |
859 | if (additionalFormat.start < lastFormat->start + lastFormat->lengthTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
860 | QTextLayout::FormatRange *mergedRange = nullptr; | - |
861 | | - |
862 | int length = additionalFormat.length; | - |
863 | if (additionalFormat.start > lastFormat->startTRUE | never evaluated | FALSE | never 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 > 0TRUE | evaluated 12 times by 1 test | FALSE | never evaluated |
) | 0-12 |
890 | mergedFormats->append(additionalFormat);executed 12 times by 1 test: mergedFormats->append(additionalFormat); | 12 |
891 | }executed 12 times by 1 test: end of block | 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 | | - |
896 | void 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()TRUE | evaluated 670 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | never evaluated |
? block.layout()->preeditAreaText().length() : 0; | 0-670 |
901 | int preeditPosition = block.isValid()TRUE | evaluated 670 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | never 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()TRUE | evaluated 48 times by 1 test | FALSE | evaluated 622 times by 5 testsEvaluated 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() > 0TRUE | evaluated 48 times by 1 test | FALSE | never 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::RightToLeftTRUE | never evaluated | FALSE | evaluated 48 times by 1 test |
) | 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 | caseexecuted 4 times by 1 test: case QTextListFormat::ListSquare: QTextListFormat::ListSquare:executed 4 times by 1 test: case QTextListFormat::ListSquare: | 4 |
935 | listItemBullet = QChar(0x25AA); | - |
936 | break;executed 4 times by 1 test: break; | 4 |
937 | caseexecuted 12 times by 1 test: case QTextListFormat::ListDecimal: QTextListFormat::ListDecimal:executed 12 times by 1 test: case QTextListFormat::ListDecimal: | 12 |
938 | caseexecuted 4 times by 1 test: case QTextListFormat::ListLowerAlpha: QTextListFormat::ListLowerAlpha:executed 4 times by 1 test: case QTextListFormat::ListLowerAlpha: | 4 |
939 | caseexecuted 4 times by 1 test: case QTextListFormat::ListUpperAlpha: QTextListFormat::ListUpperAlpha:executed 4 times by 1 test: case QTextListFormat::ListUpperAlpha: | 4 |
940 | caseexecuted 4 times by 1 test: case QTextListFormat::ListLowerRoman: QTextListFormat::ListLowerRoman:executed 4 times by 1 test: case QTextListFormat::ListLowerRoman: | 4 |
941 | caseexecuted 4 times by 1 test: case QTextListFormat::ListUpperRoman: QTextListFormat::ListUpperRoman:executed 4 times by 1 test: case QTextListFormat::ListUpperRoman: | 4 |
942 | listItemBullet = textList->itemText(block); | - |
943 | break;executed 28 times by 1 test: break; | 28 |
944 | defaultexecuted 16 times by 1 test: default: :executed 16 times by 1 test: default: | 16 |
945 | listItemBullet = QChar(0x2022); | - |
946 | break;executed 16 times by 1 test: break; | 16 |
947 | }; | - |
948 | | - |
949 | QSizeF size(fontMetrics.width(listItemBullet), fontMetrics.height()); | - |
950 | qreal xoff = fontMetrics.width(QLatin1Char(' ')); | - |
951 | if (block.textDirection() == Qt::LeftToRightTRUE | evaluated 48 times by 1 test | FALSE | never evaluated |
) | 0-48 |
952 | xoff = -xoff - size.width();executed 48 times by 1 test: xoff = -xoff - size.width(); | 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()TRUE | evaluated 48 times by 1 test | FALSE | evaluated 48 times by 1 test |
; ++i) | 48 |
965 | addUnselectedGlyphs(glyphRuns.at(i));executed 48 times by 1 test: addUnselectedGlyphs(glyphRuns.at(i)); | 48 |
966 | }executed 48 times by 1 test: end of block | 48 |
967 | }executed 48 times by 1 test: end of block | 48 |
968 | | - |
969 | int textPos = block.position(); | - |
970 | QTextBlock::iterator blockIterator = block.begin(); | - |
971 | | - |
972 | while (!blockIterator.atEnd()TRUE | evaluated 576 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | evaluated 670 times by 5 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 576 times by 5 testsEvaluated 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::AlignSuperScriptTRUE | never evaluated | FALSE | evaluated 576 times by 5 testsEvaluated 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::AlignSubScriptTRUE | never evaluated | FALSE | evaluated 576 times by 5 testsEvaluated 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)TRUE | evaluated 6 times by 1 test | FALSE | evaluated 570 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
|
) { | 6-570 |
992 | QTextFrame *frame = qobject_cast<QTextFrame *>(textDocument->objectForFormat(charFormat)); | - |
993 | if (frameTRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
&& frame->frameFormat().position() == QTextFrameFormat::InFlowTRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
) { | 0-6 |
994 | int blockRelativePosition = textPos - block.position(); | - |
995 | QTextLine line = block.layout()->lineForTextPosition(blockRelativePosition); | - |
996 | if (!currentLine().isValid()TRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
| 0-6 |
997 | || line.lineNumber() != currentLine().lineNumber()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
998 | setCurrentLine(line); | - |
999 | }executed 6 times by 1 test: end of block | 6 |
1000 | | - |
1001 | QQuickTextNodeEngine::SelectionState selectionState = | - |
1002 | (selectionStart < textPos + text.length()TRUE | evaluated 6 times by 1 test | FALSE | never evaluated |
| 0-6 |
1003 | && selectionEnd >= textPosTRUE | never evaluated | FALSE | evaluated 6 times by 1 test |
) | 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 | 6 |
1009 | textPos += text.length(); | - |
1010 | }executed 6 times by 1 test: end of block else { | 6 |
1011 | if (charFormat.foreground().style() != Qt::NoBrushTRUE | evaluated 4 times by 2 testsEvaluated by:- tst_examples
- tst_qquicktextedit
| FALSE | evaluated 566 times by 5 testsEvaluated 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()TRUE | never evaluated | FALSE | evaluated 566 times by 5 testsEvaluated 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 >= 0TRUE | never evaluated | FALSE | evaluated 570 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
|
| 0-570 |
1021 | && (TRUE | never evaluated | FALSE | never evaluated |
preeditPosition + block.position()) >= textPosTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1022 | && (TRUE | never evaluated | FALSE | never evaluated |
preeditPosition + block.position()) <= fragmentEndTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
1023 | fragmentEnd += preeditLength; | - |
1024 | } never executed: end of block | 0 |
1025 | | - |
1026 | if (charFormat.background().style() != Qt::NoBrushTRUE | never evaluated | FALSE | evaluated 570 times by 5 testsEvaluated 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 >= 0TRUE | evaluated 670 times by 5 testsEvaluated by:- tst_examples
- tst_qquickfocusscope
- tst_qquickitem2
- tst_qquicktext
- tst_qquicktextedit
| FALSE | never evaluated |
&& textPos <= block.position() + preeditPositionTRUE | never evaluated | FALSE | evaluated 670 times by 5 testsEvaluated 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()TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1047 | || line.lineNumber() != currentLine().lineNumber()TRUE | never evaluated | FALSE | never 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 | | - |
| | |