OpenCoverage

qquicktext.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktext.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQuick module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qquicktext_p.h"-
41#include "qquicktext_p_p.h"-
42-
43#include <QtQuick/private/qsgcontext_p.h>-
44#include <private/qqmlglobal_p.h>-
45#include <private/qsgadaptationlayer_p.h>-
46#include "qquicktextnode_p.h"-
47#include "qquickimage_p_p.h"-
48#include "qquicktextutil_p.h"-
49#include "qquicktextdocument_p.h"-
50-
51#include <QtQuick/private/qsgtexture_p.h>-
52-
53#include <QtQml/qqmlinfo.h>-
54#include <QtGui/qevent.h>-
55#include <QtGui/qabstracttextdocumentlayout.h>-
56#include <QtGui/qpainter.h>-
57#include <QtGui/qtextdocument.h>-
58#include <QtGui/qtextobject.h>-
59#include <QtGui/qtextcursor.h>-
60#include <QtGui/qguiapplication.h>-
61#include <QtGui/qinputmethod.h>-
62-
63#include <private/qtextengine_p.h>-
64#include <private/qquickstyledtext_p.h>-
65#include <QtQuick/private/qquickpixmapcache_p.h>-
66-
67#include <qmath.h>-
68#include <limits.h>-
69-
70QT_BEGIN_NAMESPACE-
71-
72Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)-
73-
74const QChar QQuickTextPrivate::elideChar = QChar(0x2026);-
75-
76QQuickTextPrivate::QQuickTextPrivate()-
77 : fontInfo(font), elideLayout(nullptr), textLine(nullptr), lineWidth(0)-
78 , color(0xFF000000), linkColor(0xFF0000FF), styleColor(0xFF000000)-
79 , lineCount(1), multilengthEos(-1)-
80 , elideMode(QQuickText::ElideNone), hAlign(QQuickText::AlignLeft), vAlign(QQuickText::AlignTop)-
81 , format(QQuickText::AutoText), wrapMode(QQuickText::NoWrap)-
82 , style(QQuickText::Normal)-
83 , renderType(QQuickTextUtil::textRenderType<QQuickText>())-
84 , updateType(UpdatePaintNode)-
85 , maximumLineCountValid(false), updateOnComponentComplete(true), richText(false)-
86 , styledText(false), widthExceeded(false), heightExceeded(false), internalWidthUpdate(false)-
87 , requireImplicitSize(false), implicitWidthValid(false), implicitHeightValid(false)-
88 , truncated(false), hAlignImplicit(true), rightToLeftText(false)-
89 , layoutTextElided(false), textHasChanged(true), needToUpdateLayout(false), formatModifiesFontSize(false)-
90 , polishSize(false)-
91 , updateSizeRecursionGuard(false)-
92{-
93 implicitAntialiasing = true;-
94}
executed 264678 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
264678
95-
96QQuickTextPrivate::ExtraData::ExtraData()-
97 : padding(0)-
98 , topPadding(0)-
99 , leftPadding(0)-
100 , rightPadding(0)-
101 , bottomPadding(0)-
102 , explicitTopPadding(false)-
103 , explicitLeftPadding(false)-
104 , explicitRightPadding(false)-
105 , explicitBottomPadding(false)-
106 , lineHeight(1.0)-
107 , doc(nullptr)-
108 , minimumPixelSize(12)-
109 , minimumPointSize(12)-
110 , nbActiveDownloads(0)-
111 , maximumLineCount(INT_MAX)-
112 , lineHeightValid(false)-
113 , lineHeightMode(QQuickText::ProportionalHeight)-
114 , fontSizeMode(QQuickText::FixedSize)-
115{-
116}
executed 330 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
330
117-
118void QQuickTextPrivate::init()-
119{-
120 Q_Q(QQuickText);-
121 q->setAcceptedMouseButtons(Qt::LeftButton);-
122 q->setFlag(QQuickItem::ItemHasContents);-
123}
executed 264678 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
264678
124-
125QQuickTextPrivate::~QQuickTextPrivate()-
126{-
127 delete elideLayout;-
128 delete textLine; textLine = nullptr;-
129-
130 if (extra.isAllocated()) {
extra.isAllocated()Description
TRUEevaluated 328 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 264286 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
328-264286
131 qDeleteAll(extra->imgTags);-
132 extra->imgTags.clear();-
133 }
executed 328 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
328
134}
executed 264614 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
264614
135-
136qreal QQuickTextPrivate::getImplicitWidth() const-
137{-
138 if (!requireImplicitSize) {
!requireImplicitSizeDescription
TRUEevaluated 148 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 1012 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
148-1012
139 // We don't calculate implicitWidth unless it is required.-
140 // We need to force a size update now to ensure implicitWidth is calculated-
141 QQuickTextPrivate *me = const_cast<QQuickTextPrivate*>(this);-
142 me->requireImplicitSize = true;-
143 me->updateSize();-
144 }
executed 148 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
148
145 return implicitWidth;
executed 1160 times by 6 tests: return implicitWidth;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
1160
146}-
147-
148qreal QQuickTextPrivate::getImplicitHeight() const-
149{-
150 if (!requireImplicitSize) {
!requireImplicitSizeDescription
TRUEevaluated 190 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicktext
FALSEevaluated 750 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
190-750
151 QQuickTextPrivate *me = const_cast<QQuickTextPrivate*>(this);-
152 me->requireImplicitSize = true;-
153 me->updateSize();-
154 }
executed 190 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicktext
190
155 return implicitHeight;
executed 940 times by 5 tests: return implicitHeight;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
940
156}-
157-
158qreal QQuickTextPrivate::availableWidth() const-
159{-
160 Q_Q(const QQuickText);-
161 return q->width() - q->leftPadding() - q->rightPadding();
executed 1097384 times by 33 tests: return q->width() - q->leftPadding() - q->rightPadding();
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
1097384
162}-
163-
164qreal QQuickTextPrivate::availableHeight() const-
165{-
166 Q_Q(const QQuickText);-
167 return q->height() - q->topPadding() - q->bottomPadding();
executed 1100576 times by 33 tests: return q->height() - q->topPadding() - q->bottomPadding();
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
1100576
168}-
169-
170void QQuickTextPrivate::setTopPadding(qreal value, bool reset)-
171{-
172 Q_Q(QQuickText);-
173 qreal oldPadding = q->topPadding();-
174 if (!reset || extra.isAllocated()) {
!resetDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
extra.isAllocated()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-32
175 extra.value().topPadding = value;-
176 extra.value().explicitTopPadding = !reset;-
177 }
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicktext
34
178 if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
!resetDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
!qFuzzyCompare...adding, value)Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
resetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
!qFuzzyCompare...ng, padding())Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-32
179 updateSize();-
180 emit q->topPaddingChanged();-
181 }
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicktext
34
182}
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicktext
34
183-
184void QQuickTextPrivate::setLeftPadding(qreal value, bool reset)-
185{-
186 Q_Q(QQuickText);-
187 qreal oldPadding = q->leftPadding();-
188 if (!reset || extra.isAllocated()) {
!resetDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
extra.isAllocated()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-4
189 extra.value().leftPadding = value;-
190 extra.value().explicitLeftPadding = !reset;-
191 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
192 if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
!resetDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
!qFuzzyCompare...adding, value)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
resetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
!qFuzzyCompare...ng, padding())Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-4
193 updateSize();-
194 emit q->leftPaddingChanged();-
195 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
196}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
197-
198void QQuickTextPrivate::setRightPadding(qreal value, bool reset)-
199{-
200 Q_Q(QQuickText);-
201 qreal oldPadding = q->rightPadding();-
202 if (!reset || extra.isAllocated()) {
!resetDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
extra.isAllocated()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-4
203 extra.value().rightPadding = value;-
204 extra.value().explicitRightPadding = !reset;-
205 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
206 if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
!resetDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
!qFuzzyCompare...adding, value)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
resetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
!qFuzzyCompare...ng, padding())Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-4
207 updateSize();-
208 emit q->rightPaddingChanged();-
209 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
210}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
211-
212void QQuickTextPrivate::setBottomPadding(qreal value, bool reset)-
213{-
214 Q_Q(QQuickText);-
215 qreal oldPadding = q->bottomPadding();-
216 if (!reset || extra.isAllocated()) {
!resetDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
extra.isAllocated()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-32
217 extra.value().bottomPadding = value;-
218 extra.value().explicitBottomPadding = !reset;-
219 }
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicktext
34
220 if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
!resetDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
!qFuzzyCompare...adding, value)Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
resetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
!qFuzzyCompare...ng, padding())Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-32
221 updateSize();-
222 emit q->bottomPaddingChanged();-
223 }
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicktext
34
224}
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquicktext
34
225-
226/*!-
227 \qmlproperty bool QtQuick::Text::antialiasing-
228-
229 Used to decide if the Text should use antialiasing or not. Only Text-
230 with renderType of Text.NativeRendering can disable antialiasing.-
231-
232 The default is true.-
233*/-
234-
235void QQuickText::q_updateLayout()-
236{-
237 Q_D(QQuickText);-
238 d->updateLayout();-
239}
never executed: end of block
0
240-
241void QQuickTextPrivate::updateLayout()-
242{-
243 Q_Q(QQuickText);-
244 if (!q->isComponentComplete()) {
!q->isComponentComplete()Description
TRUEevaluated 254122 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 472713 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
254122-472713
245 updateOnComponentComplete = true;-
246 return;
executed 254122 times by 33 tests: return;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
254122
247 }-
248 updateOnComponentComplete = false;-
249 layoutTextElided = false;-
250-
251 if (extra.isAllocated())
extra.isAllocated()Description
TRUEevaluated 840 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 471873 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
840-471873
252 extra->visibleImgTags.clear();
executed 840 times by 2 tests: extra->visibleImgTags.clear();
Executed by:
  • tst_examples
  • tst_qquicktext
840
253 needToUpdateLayout = false;-
254-
255 // Setup instance of QTextLayout for all cases other than richtext-
256 if (!richText) {
!richTextDescription
TRUEevaluated 472429 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
FALSEevaluated 284 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
284-472429
257 if (textHasChanged) {
textHasChangedDescription
TRUEevaluated 470811 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
FALSEevaluated 1618 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquicktext
  • tst_qquicktextedit
1618-470811
258 if (styledText && !text.isEmpty()) {
styledTextDescription
TRUEevaluated 1992 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 468819 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
!text.isEmpty()Description
TRUEevaluated 1988 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
4-468819
259 layout.setFont(font);-
260 // needs temporary bool because formatModifiesFontSize is in a bit-field-
261 bool fontSizeModified = false;-
262 QList<QQuickStyledTextImgTag*> someImgTags = extra.isAllocated() ? extra->imgTags : QList<QQuickStyledTextImgTag*>();
extra.isAllocated()Description
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 1930 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
58-1930
263 QQuickStyledText::parse(text, layout, someImgTags, q->baseUrl(), qmlContext(q), !maximumLineCountValid, &fontSizeModified);-
264 if (someImgTags.size() || extra.isAllocated())
someImgTags.size()Description
TRUEevaluated 80 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 1908 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
extra.isAllocated()Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 1886 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
22-1908
265 extra.value().imgTags = someImgTags;
executed 102 times by 2 tests: extra.value().imgTags = someImgTags;
Executed by:
  • tst_examples
  • tst_qquicktext
102
266 formatModifiesFontSize = fontSizeModified;-
267 multilengthEos = -1;-
268 } else {
executed 1988 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
1988
269 QString tmp = text;-
270 multilengthEos = tmp.indexOf(QLatin1Char('\x9c'));-
271 if (multilengthEos != -1)
multilengthEos != -1Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 468811 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
12-468811
272 tmp = tmp.mid(0, multilengthEos);
executed 12 times by 1 test: tmp = tmp.mid(0, multilengthEos);
Executed by:
  • tst_qquicktext
12
273 tmp.replace(QLatin1Char('\n'), QChar::LineSeparator);-
274 layout.setText(tmp);-
275 }
executed 468823 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
468823
276 textHasChanged = false;-
277 }
executed 470811 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
470811
278 } else if (extra.isAllocated() && extra->lineHeightValid) {
executed 472429 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
extra.isAllocated()Description
TRUEevaluated 284 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
extra->lineHeightValidDescription
TRUEnever evaluated
FALSEevaluated 284 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
0-472429
279 ensureDoc();-
280 QTextBlockFormat::LineHeightTypes type;-
281 type = lineHeightMode() == QQuickText::FixedHeight ? QTextBlockFormat::FixedHeight : QTextBlockFormat::ProportionalHeight;
lineHeightMode...t::FixedHeightDescription
TRUEnever evaluated
FALSEnever evaluated
0
282 QTextBlockFormat blockFormat;-
283 blockFormat.setLineHeight((lineHeightMode() == QQuickText::FixedHeight ? lineHeight() : lineHeight() * 100), type);-
284 for (QTextBlock it = extra->doc->begin(); it != extra->doc->end(); it = it.next()) {
it != extra->doc->end()Description
TRUEnever evaluated
FALSEnever evaluated
0
285 QTextCursor cursor(it);-
286 cursor.mergeBlockFormat(blockFormat);-
287 }
never executed: end of block
0
288 }
never executed: end of block
0
289-
290 updateSize();-
291-
292 if (needToUpdateLayout) {
needToUpdateLayoutDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 472711 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
2-472711
293 needToUpdateLayout = false;-
294 textHasChanged = true;-
295 updateLayout();-
296 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
297-
298 q->polish();-
299}
executed 472713 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
472713
300-
301void QQuickText::imageDownloadFinished()-
302{-
303 Q_D(QQuickText);-
304-
305 (d->extra->nbActiveDownloads)--;-
306-
307 // when all the remote images have been downloaded,-
308 // if one of the sizes was not specified at parsing time-
309 // we use the implicit size from pixmapcache and re-layout.-
310-
311 if (d->extra.isAllocated() && d->extra->nbActiveDownloads == 0) {
d->extra.isAllocated()Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
d->extra->nbAc...Downloads == 0Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-10
312 bool needToUpdateLayout = false;-
313 for (QQuickStyledTextImgTag *img : qAsConst(d->extra->visibleImgTags)) {-
314 if (!img->size.isValid()) {
!img->size.isValid()Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
2-8
315 img->size = img->pix->implicitSize();-
316 needToUpdateLayout = true;-
317 }
executed 8 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
8
318 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
10
319-
320 if (needToUpdateLayout) {
needToUpdateLayoutDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
2-8
321 d->textHasChanged = true;-
322 d->updateLayout();-
323 } else {
executed 8 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
8
324 d->updateType = QQuickTextPrivate::UpdatePaintNode;-
325 update();-
326 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
327 }-
328}
executed 10 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
10
329-
330void QQuickTextPrivate::updateBaseline(qreal baseline, qreal dy)-
331{-
332 Q_Q(QQuickText);-
333-
334 qreal yoff = 0;-
335-
336 if (q->heightValid()) {
q->heightValid()Description
TRUEevaluated 3660 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 469367 times by 34 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • ...
3660-469367
337 if (vAlign == QQuickText::AlignBottom)
vAlign == QQui...t::AlignBottomDescription
TRUEevaluated 90 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 3570 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
90-3570
338 yoff = dy;
executed 90 times by 1 test: yoff = dy;
Executed by:
  • tst_qquicktext
90
339 else if (vAlign == QQuickText::AlignVCenter)
vAlign == QQui...::AlignVCenterDescription
TRUEevaluated 409 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
FALSEevaluated 3161 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
409-3161
340 yoff = dy/2;
executed 409 times by 4 tests: yoff = dy/2;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
409
341 }
executed 3660 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
3660
342-
343 q->setBaselineOffset(baseline + yoff + q->topPadding());-
344}
executed 473027 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
473027
345-
346void QQuickTextPrivate::updateSize()-
347{-
348 Q_Q(QQuickText);-
349-
350 if (!q->isComponentComplete()) {
!q->isComponentComplete()Description
TRUEevaluated 366 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicklayouts
  • tst_qquicktext
FALSEevaluated 473027 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
366-473027
351 updateOnComponentComplete = true;-
352 return;
executed 366 times by 4 tests: return;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicklayouts
  • tst_qquicktext
366
353 }-
354-
355 if (!requireImplicitSize) {
!requireImplicitSizeDescription
TRUEevaluated 472501 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
FALSEevaluated 526 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
526-472501
356 implicitWidthChanged();-
357 implicitHeightChanged();-
358 // if the implicitWidth is used, then updateSize() has already been called (recursively)-
359 if (requireImplicitSize)
requireImplicitSizeDescription
TRUEnever evaluated
FALSEevaluated 472501 times by 35 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
0-472501
360 return;
never executed: return;
0
361 }
executed 472501 times by 35 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
472501
362-
363 qreal hPadding = q->leftPadding() + q->rightPadding();-
364 qreal vPadding = q->topPadding() + q->bottomPadding();-
365-
366 if (text.isEmpty() && !isLineLaidOutConnected() && fontSizeMode() == QQuickText::FixedSize) {
text.isEmpty()Description
TRUEevaluated 48685 times by 18 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 424342 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
!isLineLaidOutConnected()Description
TRUEevaluated 48677 times by 18 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
fontSizeMode()...ext::FixedSizeDescription
TRUEevaluated 48669 times by 18 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
8-424342
367 // How much more expensive is it to just do a full layout on an empty string here?-
368 // There may be subtle differences in the height and baseline calculations between-
369 // QTextLayout and QFontMetrics and the number of variables that can affect the size-
370 // and position of a line is increasing.-
371 QFontMetricsF fm(font);-
372 qreal fontHeight = qCeil(fm.height()); // QScriptLine and therefore QTextLine rounds up-
373 if (!richText) { // line height, so we will as well.
!richTextDescription
TRUEevaluated 48625 times by 18 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 44 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
44-48625
374 fontHeight = lineHeightMode() == QQuickText::FixedHeight
lineHeightMode...t::FixedHeightDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 48609 times by 18 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
16-48609
375 ? lineHeight()-
376 : fontHeight * lineHeight();-
377 }
executed 48625 times by 18 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
48625
378 updateBaseline(fm.ascent(), q->height() - fontHeight - vPadding);-
379 q->setImplicitSize(hPadding, fontHeight + vPadding);-
380 layedOutTextRect = QRectF(0, 0, 0, fontHeight);-
381 advance = QSizeF();-
382 emit q->contentSizeChanged();-
383 updateType = UpdatePaintNode;-
384 q->update();-
385 return;
executed 48669 times by 18 tests: return;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
48669
386 }-
387-
388 QSizeF size(0, 0);-
389 QSizeF previousSize = layedOutTextRect.size();-
390-
391 //setup instance of QTextLayout for all cases other than richtext-
392 if (!richText) {
!richTextDescription
TRUEevaluated 424062 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 296 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
296-424062
393 qreal baseline = 0;-
394 QRectF textRect = setupTextLayout(&baseline);-
395-
396 if (internalWidthUpdate) // probably the result of a binding loop, but by letting it
internalWidthUpdateDescription
TRUEnever evaluated
FALSEevaluated 424062 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
0-424062
397 return; // get this far we'll get a warning to that effect if it is.
never executed: return;
0
398-
399 layedOutTextRect = textRect;-
400 size = textRect.size();-
401 updateBaseline(baseline, q->height() - size.height() - vPadding);-
402 } else {
executed 424062 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
424062
403 widthExceeded = true; // always relayout rich text on width changes..-
404 heightExceeded = false; // rich text layout isn't affected by height changes.-
405 ensureDoc();-
406 extra->doc->setDefaultFont(font);-
407 QQuickText::HAlignment horizontalAlignment = q->effectiveHAlign();-
408 if (rightToLeftText) {
rightToLeftTextDescription
TRUEevaluated 56 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 240 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
56-240
409 if (horizontalAlignment == QQuickText::AlignLeft)
horizontalAlig...ext::AlignLeftDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 54 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
2-54
410 horizontalAlignment = QQuickText::AlignRight;
executed 2 times by 1 test: horizontalAlignment = QQuickText::AlignRight;
Executed by:
  • tst_qquicktext
2
411 else if (horizontalAlignment == QQuickText::AlignRight)
horizontalAlig...xt::AlignRightDescription
TRUEevaluated 54 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-54
412 horizontalAlignment = QQuickText::AlignLeft;
executed 54 times by 2 tests: horizontalAlignment = QQuickText::AlignLeft;
Executed by:
  • tst_examples
  • tst_qquicktext
54
413 }
executed 56 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
56
414 QTextOption option;-
415 option.setAlignment((Qt::Alignment)int(horizontalAlignment | vAlign));-
416 option.setWrapMode(QTextOption::WrapMode(wrapMode));-
417 option.setUseDesignMetrics(renderType != QQuickText::NativeRendering);-
418 extra->doc->setDefaultTextOption(option);-
419 qreal naturalWidth = 0;-
420 if (requireImplicitSize && q->widthValid()) {
requireImplicitSizeDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 264 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
q->widthValid()Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
6-264
421 extra->doc->setTextWidth(-1);-
422 naturalWidth = extra->doc->idealWidth();-
423 const bool wasInLayout = internalWidthUpdate;-
424 internalWidthUpdate = true;-
425 q->setImplicitWidth(naturalWidth + hPadding);-
426 internalWidthUpdate = wasInLayout;-
427 }
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquicktext
26
428 if (internalWidthUpdate)
internalWidthUpdateDescription
TRUEnever evaluated
FALSEevaluated 296 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
0-296
429 return;
never executed: return;
0
430-
431 extra->doc->setPageSize(QSizeF());-
432 if (q->widthValid() && (wrapMode != QQuickText::NoWrap || extra->doc->idealWidth() < availableWidth()))
q->widthValid()Description
TRUEevaluated 186 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 110 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
wrapMode != QQuickText::NoWrapDescription
TRUEevaluated 138 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
extra->doc->id...ailableWidth()Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
14-186
433 extra->doc->setTextWidth(availableWidth());
executed 172 times by 2 tests: extra->doc->setTextWidth(availableWidth());
Executed by:
  • tst_examples
  • tst_qquicktext
172
434 else-
435 extra->doc->setTextWidth(extra->doc->idealWidth()); // ### Text does not align if width is not set (QTextDoc bug)
executed 124 times by 2 tests: extra->doc->setTextWidth(extra->doc->idealWidth());
Executed by:
  • tst_examples
  • tst_qquicktext
124
436-
437 QSizeF dsize = extra->doc->size();-
438 layedOutTextRect = QRectF(QPointF(0,0), dsize);-
439 size = QSizeF(extra->doc->idealWidth(),dsize.height());-
440-
441 QFontMetricsF fm(font);-
442 updateBaseline(fm.ascent(), q->height() - size.height() - vPadding);-
443-
444 //### need to confirm cost of always setting these for richText-
445 internalWidthUpdate = true;-
446 qreal oldWidth = q->width();-
447 qreal iWidth = -1;-
448 if (!q->widthValid())
!q->widthValid()Description
TRUEevaluated 110 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 186 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
110-186
449 iWidth = size.width();
executed 110 times by 2 tests: iWidth = size.width();
Executed by:
  • tst_examples
  • tst_qquicktext
110
450 if (iWidth > -1)
iWidth > -1Description
TRUEevaluated 110 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 186 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
110-186
451 q->setImplicitSize(iWidth + hPadding, size.height() + vPadding);
executed 110 times by 2 tests: q->setImplicitSize(iWidth + hPadding, size.height() + vPadding);
Executed by:
  • tst_examples
  • tst_qquicktext
110
452 internalWidthUpdate = false;-
453-
454 // If the implicit width update caused a recursive change of the width,-
455 // we will have skipped integral parts of the layout due to the-
456 // internalWidthUpdate recursion guard. To make sure everything is up-
457 // to date, we need to run a second pass over the layout when updateSize()-
458 // is done.-
459 if (!qFuzzyCompare(q->width(), oldWidth) && !updateSizeRecursionGuard) {
!qFuzzyCompare...h(), oldWidth)Description
TRUEevaluated 54 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 242 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
!updateSizeRecursionGuardDescription
TRUEevaluated 54 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-242
460 updateSizeRecursionGuard = true;-
461 updateSize();-
462 updateSizeRecursionGuard = false;-
463 } else {
executed 54 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
54
464 if (iWidth == -1)
iWidth == -1Description
TRUEevaluated 186 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 56 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
56-186
465 q->setImplicitHeight(size.height() + vPadding);
executed 186 times by 2 tests: q->setImplicitHeight(size.height() + vPadding);
Executed by:
  • tst_examples
  • tst_qquicktext
186
466-
467 QTextBlock firstBlock = extra->doc->firstBlock();-
468 while (firstBlock.layout()->lineCount() == 0)
firstBlock.lay...neCount() == 0Description
TRUEnever evaluated
FALSEevaluated 242 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
0-242
469 firstBlock = firstBlock.next();
never executed: firstBlock = firstBlock.next();
0
470-
471 QTextBlock lastBlock = extra->doc->lastBlock();-
472 while (lastBlock.layout()->lineCount() == 0)
lastBlock.layo...neCount() == 0Description
TRUEnever evaluated
FALSEevaluated 242 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
0-242
473 lastBlock = lastBlock.previous();
never executed: lastBlock = lastBlock.previous();
0
474-
475 if (firstBlock.lineCount() > 0 && lastBlock.lineCount() > 0) {
firstBlock.lineCount() > 0Description
TRUEevaluated 242 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
lastBlock.lineCount() > 0Description
TRUEevaluated 242 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-242
476 QTextLine firstLine = firstBlock.layout()->lineAt(0);-
477 QTextLine lastLine = lastBlock.layout()->lineAt(lastBlock.layout()->lineCount() - 1);-
478 advance = QSizeF(lastLine.horizontalAdvance(),-
479 (lastLine.y() + lastBlock.layout()->position().y()) - (firstLine.y() + firstBlock.layout()->position().y()));-
480 } else {
executed 242 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
242
481 advance = QSizeF();-
482 }
never executed: end of block
0
483 }-
484 }-
485-
486-
487 if (layedOutTextRect.size() != previousSize)
layedOutTextRe...= previousSizeDescription
TRUEevaluated 352163 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 72195 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
72195-352163
488 emit q->contentSizeChanged();
executed 352163 times by 33 tests: q->contentSizeChanged();
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
352163
489 updateType = UpdatePaintNode;-
490 q->update();-
491}
executed 424358 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
424358
492-
493QQuickTextLine::QQuickTextLine()-
494 : QObject(), m_line(nullptr), m_height(0), m_lineOffset(0)-
495{-
496}
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquicktext
10
497-
498void QQuickTextLine::setLine(QTextLine *line)-
499{-
500 m_line = line;-
501}
executed 336 times by 1 test: end of block
Executed by:
  • tst_qquicktext
336
502-
503void QQuickTextLine::setLineOffset(int offset)-
504{-
505 m_lineOffset = offset;-
506}
executed 336 times by 1 test: end of block
Executed by:
  • tst_qquicktext
336
507-
508int QQuickTextLine::number() const-
509{-
510 if (m_line)
m_lineDescription
TRUEevaluated 448 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-448
511 return m_line->lineNumber() + m_lineOffset;
executed 448 times by 1 test: return m_line->lineNumber() + m_lineOffset;
Executed by:
  • tst_qquicktext
448
512 return 0;
never executed: return 0;
0
513}-
514-
515qreal QQuickTextLine::width() const-
516{-
517 if (m_line)
m_lineDescription
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-30
518 return m_line->width();
executed 30 times by 1 test: return m_line->width();
Executed by:
  • tst_qquicktext
30
519 return 0;
never executed: return 0;
0
520}-
521-
522void QQuickTextLine::setWidth(qreal width)-
523{-
524 if (m_line)
m_lineDescription
TRUEevaluated 646 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-646
525 m_line->setLineWidth(width);
executed 646 times by 1 test: m_line->setLineWidth(width);
Executed by:
  • tst_qquicktext
646
526}
executed 646 times by 1 test: end of block
Executed by:
  • tst_qquicktext
646
527-
528qreal QQuickTextLine::height() const-
529{-
530 if (m_height)
m_heightDescription
TRUEnever evaluated
FALSEevaluated 556 times by 1 test
Evaluated by:
  • tst_qquicktext
0-556
531 return m_height;
never executed: return m_height;
0
532 if (m_line)
m_lineDescription
TRUEevaluated 556 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-556
533 return m_line->height();
executed 556 times by 1 test: return m_line->height();
Executed by:
  • tst_qquicktext
556
534 return 0;
never executed: return 0;
0
535}-
536-
537void QQuickTextLine::setHeight(qreal height)-
538{-
539 if (m_line)
m_lineDescription
TRUEevaluated 336 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-336
540 m_line->setPosition(QPointF(m_line->x(), m_line->y() - m_line->height() + height));
executed 336 times by 1 test: m_line->setPosition(QPointF(m_line->x(), m_line->y() - m_line->height() + height));
Executed by:
  • tst_qquicktext
336
541 m_height = height;-
542}
executed 336 times by 1 test: end of block
Executed by:
  • tst_qquicktext
336
543-
544qreal QQuickTextLine::x() const-
545{-
546 if (m_line)
m_lineDescription
TRUEnever evaluated
FALSEnever evaluated
0
547 return m_line->x();
never executed: return m_line->x();
0
548 return 0;
never executed: return 0;
0
549}-
550-
551void QQuickTextLine::setX(qreal x)-
552{-
553 if (m_line)
m_lineDescription
TRUEevaluated 214 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-214
554 m_line->setPosition(QPointF(x, m_line->y()));
executed 214 times by 1 test: m_line->setPosition(QPointF(x, m_line->y()));
Executed by:
  • tst_qquicktext
214
555}
executed 214 times by 1 test: end of block
Executed by:
  • tst_qquicktext
214
556-
557qreal QQuickTextLine::y() const-
558{-
559 if (m_line)
m_lineDescription
TRUEevaluated 466 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-466
560 return m_line->y();
executed 466 times by 1 test: return m_line->y();
Executed by:
  • tst_qquicktext
466
561 return 0;
never executed: return 0;
0
562}-
563-
564void QQuickTextLine::setY(qreal y)-
565{-
566 if (m_line)
m_lineDescription
TRUEevaluated 574 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-574
567 m_line->setPosition(QPointF(m_line->x(), y));
executed 574 times by 1 test: m_line->setPosition(QPointF(m_line->x(), y));
Executed by:
  • tst_qquicktext
574
568}
executed 574 times by 1 test: end of block
Executed by:
  • tst_qquicktext
574
569-
570bool QQuickTextPrivate::isLineLaidOutConnected()-
571{-
572 Q_Q(QQuickText);-
573 IS_SIGNAL_CONNECTED(q, QQuickText, lineLaidOut, (QQuickTextLine *));
executed 473487 times by 35 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
473487
574}-
575-
576void QQuickTextPrivate::setupCustomLineGeometry(QTextLine &line, qreal &height, int lineOffset)-
577{-
578 Q_Q(QQuickText);-
579-
580 if (!textLine)
!textLineDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 326 times by 1 test
Evaluated by:
  • tst_qquicktext
10-326
581 textLine = new QQuickTextLine;
executed 10 times by 1 test: textLine = new QQuickTextLine;
Executed by:
  • tst_qquicktext
10
582 textLine->setLine(&line);-
583 textLine->setY(height);-
584 textLine->setHeight(0);-
585 textLine->setLineOffset(lineOffset);-
586-
587 // use the text item's width by default if it has one and wrap is on or text must be aligned-
588 if (q->widthValid() && (q->wrapMode() != QQuickText::NoWrap ||
q->widthValid()Description
TRUEevaluated 222 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 114 times by 1 test
Evaluated by:
  • tst_qquicktext
q->wrapMode() ...ckText::NoWrapDescription
TRUEevaluated 220 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-222
589 q->effectiveHAlign() != QQuickText::AlignLeft))
q->effectiveHA...ext::AlignLeftDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-2
590 textLine->setWidth(availableWidth());
executed 222 times by 1 test: textLine->setWidth(availableWidth());
Executed by:
  • tst_qquicktext
222
591 else-
592 textLine->setWidth(INT_MAX);
executed 114 times by 1 test: textLine->setWidth(0x7fffffff);
Executed by:
  • tst_qquicktext
114
593 if (lineHeight() != 1.0)
lineHeight() != 1.0Description
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qquicktext
0-336
594 textLine->setHeight((lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : line.height() * lineHeight());
never executed: textLine->setHeight((lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : line.height() * lineHeight());
0
595-
596 emit q->lineLaidOut(textLine);-
597-
598 height += textLine->height();-
599}
executed 336 times by 1 test: end of block
Executed by:
  • tst_qquicktext
336
600-
601void QQuickTextPrivate::elideFormats(-
602 const int start, const int length, int offset, QVector<QTextLayout::FormatRange> *elidedFormats)-
603{-
604 const int end = start + length;-
605 const QVector<QTextLayout::FormatRange> formats = layout.formats();-
606 for (int i = 0; i < formats.count(); ++i) {
i < formats.count()Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicktext
28-76
607 QTextLayout::FormatRange format = formats.at(i);-
608 const int formatLength = qMin(format.start + format.length, end) - qMax(format.start, start);-
609 if (formatLength > 0) {
formatLength > 0Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qquicktext
36-40
610 format.start = qMax(offset, format.start - start + offset);-
611 format.length = formatLength;-
612 elidedFormats->append(format);-
613 }
executed 40 times by 1 test: end of block
Executed by:
  • tst_qquicktext
40
614 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_qquicktext
76
615}
executed 28 times by 1 test: end of block
Executed by:
  • tst_qquicktext
28
616-
617QString QQuickTextPrivate::elidedText(qreal lineWidth, const QTextLine &line, QTextLine *nextLine) const-
618{-
619 if (nextLine) {
nextLineDescription
TRUEevaluated 226 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_qquicktext
124-226
620 return layout.engine()->elidedText(
executed 226 times by 1 test: return layout.engine()->elidedText( Qt::TextElideMode(elideMode), QFixed::fromReal(lineWidth), 0, line.textStart(), line.textLength() + nextLine->textLength());
Executed by:
  • tst_qquicktext
226
621 Qt::TextElideMode(elideMode),
executed 226 times by 1 test: return layout.engine()->elidedText( Qt::TextElideMode(elideMode), QFixed::fromReal(lineWidth), 0, line.textStart(), line.textLength() + nextLine->textLength());
Executed by:
  • tst_qquicktext
226
622 QFixed::fromReal(lineWidth),
executed 226 times by 1 test: return layout.engine()->elidedText( Qt::TextElideMode(elideMode), QFixed::fromReal(lineWidth), 0, line.textStart(), line.textLength() + nextLine->textLength());
Executed by:
  • tst_qquicktext
226
623 0,
executed 226 times by 1 test: return layout.engine()->elidedText( Qt::TextElideMode(elideMode), QFixed::fromReal(lineWidth), 0, line.textStart(), line.textLength() + nextLine->textLength());
Executed by:
  • tst_qquicktext
226
624 line.textStart(),
executed 226 times by 1 test: return layout.engine()->elidedText( Qt::TextElideMode(elideMode), QFixed::fromReal(lineWidth), 0, line.textStart(), line.textLength() + nextLine->textLength());
Executed by:
  • tst_qquicktext
226
625 line.textLength() + nextLine->textLength());
executed 226 times by 1 test: return layout.engine()->elidedText( Qt::TextElideMode(elideMode), QFixed::fromReal(lineWidth), 0, line.textStart(), line.textLength() + nextLine->textLength());
Executed by:
  • tst_qquicktext
226
626 } else {-
627 QString elideText = layout.text().mid(line.textStart(), line.textLength());-
628 if (!styledText) {
!styledTextDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 54 times by 1 test
Evaluated by:
  • tst_qquicktext
54-70
629 // QFontMetrics won't help eliding styled text.-
630 elideText[elideText.length() - 1] = elideChar;-
631 // Appending the elide character may push the line over the maximum width-
632 // in which case the elided text will need to be elided.-
633 QFontMetricsF metrics(layout.font());-
634 if (metrics.width(elideChar) + line.naturalTextWidth() >= lineWidth)
metrics.width(...) >= lineWidthDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
18-52
635 elideText = metrics.elidedText(elideText, Qt::TextElideMode(elideMode), lineWidth);
executed 52 times by 1 test: elideText = metrics.elidedText(elideText, Qt::TextElideMode(elideMode), lineWidth);
Executed by:
  • tst_qquicktext
52
636 }
executed 70 times by 1 test: end of block
Executed by:
  • tst_qquicktext
70
637 return elideText;
executed 124 times by 1 test: return elideText;
Executed by:
  • tst_qquicktext
124
638 }-
639}-
640-
641void QQuickTextPrivate::clearFormats()-
642{-
643 layout.clearFormats();-
644 if (elideLayout)
elideLayoutDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 205041 times by 18 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
22-205041
645 elideLayout->clearFormats();
executed 22 times by 1 test: elideLayout->clearFormats();
Executed by:
  • tst_qquicktext
22
646}
executed 205063 times by 18 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
205063
647-
648/*!-
649 Lays out the QQuickTextPrivate::layout QTextLayout in the constraints of the QQuickText.-
650-
651 Returns the size of the final text. This can be used to position the text vertically (the text is-
652 already absolutely positioned horizontally).-
653*/-
654-
655QRectF QQuickTextPrivate::setupTextLayout(qreal *const baseline)-
656{-
657 Q_Q(QQuickText);-
658-
659 bool singlelineElide = elideMode != QQuickText::ElideNone && q->widthValid();
elideMode != Q...ext::ElideNoneDescription
TRUEevaluated 358 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423704 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->widthValid()Description
TRUEevaluated 328 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
30-423704
660 bool multilineElide = elideMode == QQuickText::ElideRight
elideMode == Q...xt::ElideRightDescription
TRUEevaluated 292 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423770 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
292-423770
661 && q->widthValid()
q->widthValid()Description
TRUEevaluated 262 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
30-262
662 && (q->heightValid() || maximumLineCountValid);
q->heightValid()Description
TRUEevaluated 198 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_qquicktext
maximumLineCountValidDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquicktext
22-198
663-
664 if ((!requireImplicitSize || (implicitWidthValid && implicitHeightValid))
!requireImplicitSizeDescription
TRUEevaluated 423582 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 480 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
implicitWidthValidDescription
TRUEevaluated 150 times by 3 tests
Evaluated by:
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 330 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicklayouts
  • tst_qquicktext
implicitHeightValidDescription
TRUEevaluated 148 times by 3 tests
Evaluated by:
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-423582
665 && ((singlelineElide && availableWidth() <= 0.)
singlelineElideDescription
TRUEevaluated 290 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423440 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
availableWidth() <= 0.Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 284 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
6-423440
666 || (multilineElide && q->heightValid() && availableHeight() <= 0.))) {
multilineElideDescription
TRUEevaluated 192 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423532 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->heightValid()Description
TRUEevaluated 178 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
availableHeight() <= 0.Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 170 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
8-423532
667 // we are elided and we have a zero width or height-
668 widthExceeded = q->widthValid() && availableWidth() <= 0.;
q->widthValid()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
availableWidth() <= 0.Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
0-14
669 heightExceeded = q->heightValid() && availableHeight() <= 0.;
q->heightValid()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
availableHeight() <= 0.Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
2-12
670-
671 if (!truncated) {
!truncatedDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
4-10
672 truncated = true;-
673 emit q->truncatedChanged();-
674 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquicktext
10
675 if (lineCount) {
lineCountDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
4-10
676 lineCount = 0;-
677 emit q->lineCountChanged();-
678 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquicktext
10
679-
680 if (qFuzzyIsNull(q->width())) {
qFuzzyIsNull(q->width())Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
4-10
681 layout.setText(QString());-
682 textHasChanged = true;-
683 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
684-
685 QFontMetricsF fm(font);-
686 qreal height = (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : qCeil(fm.height()) * lineHeight();
(lineHeightMod...::FixedHeight)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
0-14
687 *baseline = fm.ascent();-
688 return QRectF(0, 0, 0, height);
executed 14 times by 1 test: return QRectF(0, 0, 0, height);
Executed by:
  • tst_qquicktext
14
689 }-
690-
691 bool shouldUseDesignMetrics = renderType != QQuickText::NativeRendering;-
692 if (extra.isAllocated())
extra.isAllocated()Description
TRUEevaluated 670 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423378 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
670-423378
693 extra->visibleImgTags.clear();
executed 670 times by 2 tests: extra->visibleImgTags.clear();
Executed by:
  • tst_examples
  • tst_qquicktext
670
694 layout.setCacheEnabled(true);-
695 QTextOption textOption = layout.textOption();-
696 if (textOption.alignment() != q->effectiveHAlign()
textOption.ali...ectiveHAlign()Description
TRUEevaluated 479 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 423569 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
479-423569
697 || textOption.wrapMode() != QTextOption::WrapMode(wrapMode)
textOption.wra...Mode(wrapMode)Description
TRUEevaluated 216178 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 207391 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
207391-216178
698 || textOption.useDesignMetrics() != shouldUseDesignMetrics) {
textOption.use...eDesignMetricsDescription
TRUEevaluated 84 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 207307 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
84-207307
699 textOption.setAlignment(Qt::Alignment(q->effectiveHAlign()));-
700 textOption.setWrapMode(QTextOption::WrapMode(wrapMode));-
701 textOption.setUseDesignMetrics(shouldUseDesignMetrics);-
702 layout.setTextOption(textOption);-
703 }
executed 216741 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
216741
704 if (layout.font() != font)
layout.font() != fontDescription
TRUEevaluated 38097 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 385951 times by 30 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • ...
38097-385951
705 layout.setFont(font);
executed 38097 times by 13 tests: layout.setFont(font);
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
38097
706-
707 lineWidth = (q->widthValid() || implicitWidthValid) && q->width() > 0
q->widthValid()Description
TRUEevaluated 3346 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 420702 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
implicitWidthValidDescription
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 420624 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
q->width() > 0Description
TRUEevaluated 3314 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 110 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
78-420702
708 ? q->width()-
709 : FLT_MAX;-
710 qreal maxHeight = q->heightValid() ? availableHeight() : FLT_MAX;
q->heightValid()Description
TRUEevaluated 3452 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 420596 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
3452-420596
711-
712 const bool customLayout = isLineLaidOutConnected();-
713 const bool wasTruncated = truncated;-
714-
715 bool canWrap = wrapMode != QQuickText::NoWrap && q->widthValid();
wrapMode != QQuickText::NoWrapDescription
TRUEevaluated 646 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 423402 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->widthValid()Description
TRUEevaluated 622 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
24-423402
716-
717 bool horizontalFit = fontSizeMode() & QQuickText::HorizontalFit && q->widthValid();
fontSizeMode()...:HorizontalFitDescription
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423850 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->widthValid()Description
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-423850
718 bool verticalFit = fontSizeMode() & QQuickText::VerticalFit
fontSizeMode()...t::VerticalFitDescription
TRUEevaluated 178 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423870 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
178-423870
719 && (q->heightValid() || (maximumLineCountValid && canWrap));
q->heightValid()Description
TRUEevaluated 178 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
maximumLineCountValidDescription
TRUEnever evaluated
FALSEnever evaluated
canWrapDescription
TRUEnever evaluated
FALSEnever evaluated
0-178
720-
721 const bool pixelSize = font.pixelSize() != -1;-
722 QString layoutText = layout.text();-
723-
724 int largeFont = pixelSize ? font.pixelSize() : font.pointSize();
pixelSizeDescription
TRUEevaluated 92078 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
FALSEevaluated 331970 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
92078-331970
725 int smallFont = fontSizeMode() != QQuickText::FixedSize
fontSizeMode()...ext::FixedSizeDescription
TRUEevaluated 286 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423762 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
286-423762
726 ? qMin(pixelSize ? minimumPixelSize() : minimumPointSize(), largeFont)-
727 : largeFont;-
728 int scaledFontSize = largeFont;-
729-
730 bool widthChanged = false;-
731 widthExceeded = availableWidth() <= 0 && (singlelineElide || canWrap || horizontalFit);
availableWidth() <= 0Description
TRUEevaluated 215258 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 208790 times by 21 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
singlelineElideDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 215242 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
canWrapDescription
TRUEevaluated 48 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 215194 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
horizontalFitDescription
TRUEnever evaluated
FALSEevaluated 215194 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
0-215258
732 heightExceeded = availableHeight() <= 0 && (multilineElide || verticalFit);
availableHeight() <= 0Description
TRUEevaluated 214642 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 209406 times by 22 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
multilineElideDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 214622 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
verticalFitDescription
TRUEnever evaluated
FALSEevaluated 214622 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
0-214642
733-
734 QRectF br;-
735-
736 QFont scaledFont = font;-
737-
738 int visibleCount = 0;-
739 bool elide;-
740 qreal height = 0;-
741 QString elideText;-
742 bool once = true;-
743 int elideStart = 0;-
744 int elideEnd = 0;-
745-
746 int eos = multilengthEos;-
747-
748 // Repeated layouts with reduced font sizes or abbreviated strings may be required if the text-
749 // doesn't fit within the item dimensions, or a binding to implicitWidth/Height changes-
750 // the item dimensions.-
751 for (;;) {-
752 if (!once) {
!onceDescription
TRUEevaluated 1992 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
FALSEevaluated 424048 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
1992-424048
753 if (pixelSize)
pixelSizeDescription
TRUEevaluated 1784 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 208 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
208-1784
754 scaledFont.setPixelSize(scaledFontSize);
executed 1784 times by 2 tests: scaledFont.setPixelSize(scaledFontSize);
Executed by:
  • tst_examples
  • tst_qquicktext
1784
755 else-
756 scaledFont.setPointSize(scaledFontSize);
executed 208 times by 3 tests: scaledFont.setPointSize(scaledFontSize);
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
208
757 if (layout.font() != scaledFont)
layout.font() != scaledFontDescription
TRUEevaluated 1824 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 168 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
168-1824
758 layout.setFont(scaledFont);
executed 1824 times by 1 test: layout.setFont(scaledFont);
Executed by:
  • tst_qquicktext
1824
759 }
executed 1992 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
1992
760-
761 layout.beginLayout();-
762-
763 bool wrapped = false;-
764 bool truncateHeight = false;-
765 truncated = false;-
766 elide = false;-
767 int unwrappedLineCount = 1;-
768 int maxLineCount = maximumLineCount();-
769 height = 0;-
770 qreal naturalHeight = 0;-
771 qreal previousHeight = 0;-
772 br = QRectF();-
773-
774 QRectF unelidedRect;-
775 QTextLine line = layout.createLine();-
776 for (visibleCount = 1; ; ++visibleCount) {-
777 if (customLayout) {
customLayoutDescription
TRUEevaluated 336 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 432692 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
336-432692
778 setupCustomLineGeometry(line, naturalHeight);-
779 } else {
executed 336 times by 1 test: end of block
Executed by:
  • tst_qquicktext
336
780 setLineGeometry(line, lineWidth, naturalHeight);-
781 }
executed 432692 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
432692
782-
783 unelidedRect = br.united(line.naturalTextRect());-
784-
785 // Elide the previous line if the accumulated height of the text exceeds the height-
786 // of the element.-
787 if (multilineElide && naturalHeight > maxHeight && visibleCount > 1) {
multilineElideDescription
TRUEevaluated 1380 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 431648 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
naturalHeight > maxHeightDescription
TRUEevaluated 510 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 870 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
visibleCount > 1Description
TRUEevaluated 342 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 168 times by 1 test
Evaluated by:
  • tst_qquicktext
168-431648
788 elide = true;-
789 heightExceeded = true;-
790 if (eos != -1) // There's an abbreviated string available, skip the rest as it's
eos != -1Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 332 times by 1 test
Evaluated by:
  • tst_qquicktext
10-332
791 break; // all going to be discarded.
executed 10 times by 1 test: break;
Executed by:
  • tst_qquicktext
10
792-
793 truncated = true;-
794 truncateHeight = true;-
795-
796 visibleCount -= 1;-
797-
798 QTextLine previousLine = layout.lineAt(visibleCount - 1);-
799 elideText = layoutText.at(line.textStart() - 1) != QChar::LineSeparator
layoutText.at(...:LineSeparatorDescription
TRUEevaluated 208 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_qquicktext
124-208
800 ? elidedText(line.width(), previousLine, &line)-
801 : elidedText(line.width(), previousLine);-
802 elideStart = previousLine.textStart();-
803 // elideEnd isn't required for right eliding.-
804-
805 height = previousHeight;-
806 break;
executed 332 times by 1 test: break;
Executed by:
  • tst_qquicktext
332
807 }-
808-
809 const QTextLine previousLine = line;-
810 line = layout.createLine();-
811 if (!line.isValid()) {
!line.isValid()Description
TRUEevaluated 425516 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 7170 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
7170-425516
812 if (singlelineElide && visibleCount == 1 && previousLine.naturalTextWidth() > previousLine.width()) {
singlelineElideDescription
TRUEevaluated 794 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 424722 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
visibleCount == 1Description
TRUEevaluated 470 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 324 times by 1 test
Evaluated by:
  • tst_qquicktext
previousLine.n...usLine.width()Description
TRUEevaluated 300 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 170 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
170-424722
813 // Elide a single previousLine of text if its width exceeds the element width.-
814 elide = true;-
815 widthExceeded = true;-
816 if (eos != -1) // There's an abbreviated string available.
eos != -1Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 290 times by 1 test
Evaluated by:
  • tst_qquicktext
10-290
817 break;
executed 10 times by 1 test: break;
Executed by:
  • tst_qquicktext
10
818-
819 truncated = true;-
820 elideText = layout.engine()->elidedText(-
821 Qt::TextElideMode(elideMode),-
822 QFixed::fromReal(previousLine.width()),-
823 0,-
824 previousLine.textStart(),-
825 previousLine.textLength());-
826 elideStart = previousLine.textStart();-
827 elideEnd = elideStart + previousLine.textLength();-
828 } else {
executed 290 times by 1 test: end of block
Executed by:
  • tst_qquicktext
290
829 br = unelidedRect;-
830 height = naturalHeight;-
831 }
executed 425216 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
425216
832 break;
executed 425506 times by 33 tests: break;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
425506
833 } else {-
834 const bool wrappedLine = layoutText.at(line.textStart() - 1) != QChar::LineSeparator;-
835 wrapped |= wrappedLine;-
836-
837 if (!wrappedLine)
!wrappedLineDescription
TRUEevaluated 4064 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 3106 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
3106-4064
838 ++unwrappedLineCount;
executed 4064 times by 5 tests: ++unwrappedLineCount;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
4064
839-
840 // Stop if the maximum number of lines has been reached and elide the last line-
841 // if enabled.-
842 if (visibleCount == maxLineCount) {
visibleCount == maxLineCountDescription
TRUEevaluated 182 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 6988 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
182-6988
843 truncated = true;-
844 heightExceeded |= wrapped;-
845-
846 if (multilineElide) {
multilineElideDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 164 times by 1 test
Evaluated by:
  • tst_qquicktext
18-164
847 elide = true;-
848 if (eos != -1) // There's an abbreviated string available
eos != -1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
0-18
849 break;
never executed: break;
0
850 elideText = wrappedLine
wrappedLineDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-18
851 ? elidedText(previousLine.width(), previousLine, &line)-
852 : elidedText(previousLine.width(), previousLine);-
853 elideStart = previousLine.textStart();-
854 // elideEnd isn't required for right eliding.-
855 } else {
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicktext
18
856 br = unelidedRect;-
857 height = naturalHeight;-
858 }
executed 164 times by 1 test: end of block
Executed by:
  • tst_qquicktext
164
859 break;
executed 182 times by 1 test: break;
Executed by:
  • tst_qquicktext
182
860 }-
861 }
executed 6988 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
6988
862 br = unelidedRect;-
863 previousHeight = height;-
864 height = naturalHeight;-
865 }
executed 6988 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
6988
866 widthExceeded |= wrapped;-
867-
868 // Save the implicit size of the text on the first layout only.-
869 if (once) {
onceDescription
TRUEevaluated 424048 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 1992 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
1992-424048
870 once = false;-
871-
872 // If implicit sizes are required layout any additional lines up to the maximum line-
873 // count.-
874 if ((requireImplicitSize) && line.isValid() && unwrappedLineCount < maxLineCount) {
(requireImplicitSize)Description
TRUEevaluated 476 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 423572 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
line.isValid()Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 446 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
unwrappedLineC...< maxLineCountDescription
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-423572
875 // Layout the remainder of the wrapped lines up to maxLineCount to get the implicit-
876 // height.-
877 for (int lineCount = layout.lineCount(); lineCount < maxLineCount; ++lineCount) {
lineCount < maxLineCountDescription
TRUEevaluated 248 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
18-248
878 line = layout.createLine();-
879 if (!line.isValid())
!line.isValid()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 236 times by 1 test
Evaluated by:
  • tst_qquicktext
12-236
880 break;
executed 12 times by 1 test: break;
Executed by:
  • tst_qquicktext
12
881 if (layoutText.at(line.textStart() - 1) == QChar::LineSeparator)
layoutText.at(...:LineSeparatorDescription
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 178 times by 1 test
Evaluated by:
  • tst_qquicktext
58-178
882 ++unwrappedLineCount;
executed 58 times by 1 test: ++unwrappedLineCount;
Executed by:
  • tst_qquicktext
58
883 setLineGeometry(line, lineWidth, naturalHeight);-
884 }
executed 236 times by 1 test: end of block
Executed by:
  • tst_qquicktext
236
885-
886 // Create the remainder of the unwrapped lines up to maxLineCount to get the-
887 // implicit width.-
888 const int eol = line.isValid()
line.isValid()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
12-18
889 ? line.textStart() + line.textLength()-
890 : layoutText.length();-
891 if (eol < layoutText.length() && layoutText.at(eol) != QChar::LineSeparator)
eol < layoutText.length()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
layoutText.at(...:LineSeparatorDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-16
892 line = layout.createLine();
executed 16 times by 1 test: line = layout.createLine();
Executed by:
  • tst_qquicktext
16
893 for (; line.isValid() && unwrappedLineCount <= maxLineCount; ++unwrappedLineCount)
line.isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
unwrappedLineC...= maxLineCountDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-30
894 line = layout.createLine();
executed 2 times by 1 test: line = layout.createLine();
Executed by:
  • tst_qquicktext
2
895 }
executed 30 times by 1 test: end of block
Executed by:
  • tst_qquicktext
30
896 layout.endLayout();-
897-
898 const qreal naturalWidth = layout.maximumWidth();-
899-
900 bool wasInLayout = internalWidthUpdate;-
901 internalWidthUpdate = true;-
902 q->setImplicitSize(naturalWidth + q->leftPadding() + q->rightPadding(), naturalHeight + q->topPadding() + q->bottomPadding());-
903 internalWidthUpdate = wasInLayout;-
904-
905 // Update any variables that are dependent on the validity of the width or height.-
906 singlelineElide = elideMode != QQuickText::ElideNone && q->widthValid();
elideMode != Q...ext::ElideNoneDescription
TRUEevaluated 344 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423704 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->widthValid()Description
TRUEevaluated 320 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
24-423704
907 multilineElide = elideMode == QQuickText::ElideRight
elideMode == Q...xt::ElideRightDescription
TRUEevaluated 278 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 423770 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
278-423770
908 && q->widthValid()
q->widthValid()Description
TRUEevaluated 254 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
24-254
909 && (q->heightValid() || maximumLineCountValid);
q->heightValid()Description
TRUEevaluated 186 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_qquicktext
maximumLineCountValidDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquicktext
22-186
910 canWrap = wrapMode != QQuickText::NoWrap && q->widthValid();
wrapMode != QQuickText::NoWrapDescription
TRUEevaluated 646 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 423402 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->widthValid()Description
TRUEevaluated 622 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
24-423402
911-
912 horizontalFit = fontSizeMode() & QQuickText::HorizontalFit && q->widthValid();
fontSizeMode()...:HorizontalFitDescription
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423850 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
q->widthValid()Description
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-423850
913 verticalFit = fontSizeMode() & QQuickText::VerticalFit
fontSizeMode()...t::VerticalFitDescription
TRUEevaluated 178 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423870 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
178-423870
914 && (q->heightValid() || (maximumLineCountValid && canWrap));
q->heightValid()Description
TRUEevaluated 178 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
maximumLineCountValidDescription
TRUEnever evaluated
FALSEnever evaluated
canWrapDescription
TRUEnever evaluated
FALSEnever evaluated
0-178
915-
916 const qreal oldWidth = lineWidth;-
917 const qreal oldHeight = maxHeight;-
918-
919 const qreal availWidth = availableWidth();-
920 const qreal availHeight = availableHeight();-
921-
922 lineWidth = q->widthValid() && availWidth > 0 ? availWidth : naturalWidth;
q->widthValid()Description
TRUEevaluated 3352 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 420696 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
availWidth > 0Description
TRUEevaluated 3294 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 58 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
58-420696
923 maxHeight = q->heightValid() ? availHeight : FLT_MAX;
q->heightValid()Description
TRUEevaluated 3452 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 420596 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
3452-420596
924-
925 // If the width of the item has changed and it's possible the result of wrapping,-
926 // eliding, scaling has changed, or the text is not left aligned do another layout.-
927 if ((!qFuzzyCompare(lineWidth, oldWidth) || (widthExceeded && lineWidth > oldWidth))
!qFuzzyCompare...dth, oldWidth)Description
TRUEevaluated 420794 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 3254 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
widthExceededDescription
TRUEevaluated 612 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 2642 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
lineWidth > oldWidthDescription
TRUEnever evaluated
FALSEevaluated 612 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
0-420794
928 && (singlelineElide || multilineElide || canWrap || horizontalFit
singlelineElideDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 420760 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
multilineElideDescription
TRUEnever evaluated
FALSEevaluated 420760 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
canWrapDescription
TRUEevaluated 48 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 420712 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
horizontalFitDescription
TRUEnever evaluated
FALSEevaluated 420712 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
0-420760
929 || q->effectiveHAlign() != QQuickText::AlignLeft)) {
q->effectiveHA...ext::AlignLeftDescription
TRUEevaluated 64 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
FALSEevaluated 420648 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
64-420648
930 widthChanged = true;-
931 widthExceeded = lineWidth >= qMin(oldWidth, naturalWidth);-
932 heightExceeded = false;-
933 continue;
executed 146 times by 3 tests: continue;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
146
934 }-
935-
936 // If the height of the item has changed and it's possible the result of eliding,-
937 // line count truncation or scaling has changed, do another layout.-
938 if ((maxHeight < qMin(oldHeight, naturalHeight) || (heightExceeded && maxHeight > oldHeight))
maxHeight < qM...naturalHeight)Description
TRUEnever evaluated
FALSEevaluated 423902 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
heightExceededDescription
TRUEevaluated 200 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423702 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
maxHeight > oldHeightDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquicktext
0-423902
939 && (multilineElide || (canWrap && maximumLineCountValid))) {
multilineElideDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
canWrapDescription
TRUEnever evaluated
FALSEnever evaluated
maximumLineCountValidDescription
TRUEnever evaluated
FALSEnever evaluated
0-2
940 widthExceeded = false;-
941 heightExceeded = false;-
942 continue;
executed 2 times by 1 test: continue;
Executed by:
  • tst_qquicktext
2
943 }-
944-
945 // If the horizontal alignment is not left and the width was not valid we need to relayout-
946 // now that we know the maximum line width.-
947 if (!q->widthValid() && !implicitWidthValid && unwrappedLineCount > 1 && q->effectiveHAlign() != QQuickText::AlignLeft) {
!q->widthValid()Description
TRUEevaluated 420658 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 3242 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
!implicitWidthValidDescription
TRUEevaluated 420580 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 78 times by 3 tests
Evaluated by:
  • tst_qquicklayouts
  • tst_qquicktext
  • tst_qquicktextedit
unwrappedLineCount > 1Description
TRUEevaluated 1428 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 419152 times by 31 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
q->effectiveHA...ext::AlignLeftDescription
TRUEnever evaluated
FALSEevaluated 1428 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
0-420658
948 widthExceeded = false;-
949 heightExceeded = false;-
950 continue;
never executed: continue;
0
951 }-
952 } else if (widthChanged) {
executed 423900 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
widthChangedDescription
TRUEevaluated 146 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
FALSEevaluated 1846 times by 1 test
Evaluated by:
  • tst_qquicktext
146-423900
953 widthChanged = false;-
954 if (line.isValid()) {
line.isValid()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 140 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
6-140
955 for (int lineCount = layout.lineCount(); lineCount < maxLineCount; ++lineCount) {
lineCount < maxLineCountDescription
TRUEevaluated 190 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-190
956 line = layout.createLine();-
957 if (!line.isValid())
!line.isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 186 times by 1 test
Evaluated by:
  • tst_qquicktext
4-186
958 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquicktext
4
959 setLineGeometry(line, lineWidth, naturalHeight);-
960 }
executed 186 times by 1 test: end of block
Executed by:
  • tst_qquicktext
186
961 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktext
6
962 layout.endLayout();-
963-
964 bool wasInLayout = internalWidthUpdate;-
965 internalWidthUpdate = true;-
966 q->setImplicitHeight(naturalHeight + q->topPadding() + q->bottomPadding());-
967 internalWidthUpdate = wasInLayout;-
968-
969 multilineElide = elideMode == QQuickText::ElideRight
elideMode == Q...xt::ElideRightDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 112 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
34-112
970 && q->widthValid()
q->widthValid()Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-34
971 && (q->heightValid() || maximumLineCountValid);
q->heightValid()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
maximumLineCountValidDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
4-18
972 verticalFit = fontSizeMode() & QQuickText::VerticalFit
fontSizeMode()...t::VerticalFitDescription
TRUEnever evaluated
FALSEevaluated 146 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
0-146
973 && (q->heightValid() || (maximumLineCountValid && canWrap));
q->heightValid()Description
TRUEnever evaluated
FALSEnever evaluated
maximumLineCountValidDescription
TRUEnever evaluated
FALSEnever evaluated
canWrapDescription
TRUEnever evaluated
FALSEnever evaluated
0
974-
975 const qreal oldHeight = maxHeight;-
976 maxHeight = q->heightValid() ? availableHeight() : FLT_MAX;
q->heightValid()Description
TRUEevaluated 56 times by 2 tests
Evaluated by:
  • tst_qquickflickable
  • tst_qquicktext
FALSEevaluated 90 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
56-90
977 // If the height of the item has changed and it's possible the result of eliding,-
978 // line count truncation or scaling has changed, do another layout.-
979 if ((maxHeight < qMin(oldHeight, naturalHeight) || (heightExceeded && maxHeight > oldHeight))
maxHeight < qM...naturalHeight)Description
TRUEnever evaluated
FALSEevaluated 146 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
heightExceededDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 140 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
maxHeight > oldHeightDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
0-146
980 && (multilineElide || (canWrap && maximumLineCountValid))) {
multilineElideDescription
TRUEnever evaluated
FALSEnever evaluated
canWrapDescription
TRUEnever evaluated
FALSEnever evaluated
maximumLineCountValidDescription
TRUEnever evaluated
FALSEnever evaluated
0
981 widthExceeded = false;-
982 heightExceeded = false;-
983 continue;
never executed: continue;
0
984 }-
985 } else {
executed 146 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
146
986 layout.endLayout();-
987 }
executed 1846 times by 1 test: end of block
Executed by:
  • tst_qquicktext
1846
988-
989 // If the next needs to be elided and there's an abbreviated string available-
990 // go back and do another layout with the abbreviated string.-
991 if (eos != -1 && elide) {
eos != -1Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 425864 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
elideDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
8-425864
992 int start = eos + 1;-
993 eos = text.indexOf(QLatin1Char('\x9c'), start);-
994 layoutText = text.mid(start, eos != -1 ? eos - start : -1);-
995 layoutText.replace(QLatin1Char('\n'), QChar::LineSeparator);-
996 layout.setText(layoutText);-
997 textHasChanged = true;-
998 continue;
executed 20 times by 1 test: continue;
Executed by:
  • tst_qquicktext
20
999 }-
1000-
1001 br.moveTop(0);-
1002-
1003 // Find the advance of the text layout-
1004 if (layout.lineCount() > 0) {
layout.lineCount() > 0Description
TRUEevaluated 425872 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEnever evaluated
0-425872
1005 QTextLine firstLine = layout.lineAt(0);-
1006 QTextLine lastLine = layout.lineAt(layout.lineCount() - 1);-
1007 advance = QSizeF(lastLine.horizontalAdvance(),-
1008 lastLine.y() - firstLine.y());-
1009 } else {
executed 425872 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
425872
1010 advance = QSizeF();-
1011 }
never executed: end of block
0
1012-
1013 if (!horizontalFit && !verticalFit)
!horizontalFitDescription
TRUEevaluated 424388 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 1484 times by 1 test
Evaluated by:
  • tst_qquicktext
!verticalFitDescription
TRUEevaluated 423762 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 626 times by 1 test
Evaluated by:
  • tst_qquicktext
626-424388
1014 break;
executed 423762 times by 33 tests: break;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
423762
1015-
1016 // Try and find a font size that better fits the dimensions of the element.-
1017 if (horizontalFit) {
horizontalFitDescription
TRUEevaluated 1484 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 626 times by 1 test
Evaluated by:
  • tst_qquicktext
626-1484
1018 if (unelidedRect.width() > lineWidth || (!verticalFit && wrapped)) {
unelidedRect.w...() > lineWidthDescription
TRUEevaluated 402 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 1082 times by 1 test
Evaluated by:
  • tst_qquicktext
!verticalFitDescription
TRUEevaluated 586 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 496 times by 1 test
Evaluated by:
  • tst_qquicktext
wrappedDescription
TRUEevaluated 228 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 358 times by 1 test
Evaluated by:
  • tst_qquicktext
228-1082
1019 widthExceeded = true;-
1020 largeFont = scaledFontSize - 1;-
1021 if (smallFont > largeFont)
smallFont > largeFontDescription
TRUEnever evaluated
FALSEevaluated 630 times by 1 test
Evaluated by:
  • tst_qquicktext
0-630
1022 break;
never executed: break;
0
1023 scaledFontSize = (smallFont + largeFont) / 2;-
1024 if (pixelSize)
pixelSizeDescription
TRUEevaluated 594 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qquicktext
36-594
1025 scaledFont.setPixelSize(scaledFontSize);
executed 594 times by 1 test: scaledFont.setPixelSize(scaledFontSize);
Executed by:
  • tst_qquicktext
594
1026 else-
1027 scaledFont.setPointSize(scaledFontSize);
executed 36 times by 1 test: scaledFont.setPointSize(scaledFontSize);
Executed by:
  • tst_qquicktext
36
1028 continue;
executed 630 times by 1 test: continue;
Executed by:
  • tst_qquicktext
630
1029 } else if (!verticalFit) {
!verticalFitDescription
TRUEevaluated 358 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 496 times by 1 test
Evaluated by:
  • tst_qquicktext
358-496
1030 smallFont = scaledFontSize;-
1031 if (smallFont == largeFont)
smallFont == largeFontDescription
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250 times by 1 test
Evaluated by:
  • tst_qquicktext
108-250
1032 break;
executed 108 times by 1 test: break;
Executed by:
  • tst_qquicktext
108
1033 scaledFontSize = (smallFont + largeFont + 1) / 2;-
1034 }
executed 250 times by 1 test: end of block
Executed by:
  • tst_qquicktext
250
1035 }
executed 746 times by 1 test: end of block
Executed by:
  • tst_qquicktext
746
1036-
1037 if (verticalFit) {
verticalFitDescription
TRUEevaluated 1122 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 250 times by 1 test
Evaluated by:
  • tst_qquicktext
250-1122
1038 if (truncateHeight || unelidedRect.height() > maxHeight) {
truncateHeightDescription
TRUEevaluated 150 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 972 times by 1 test
Evaluated by:
  • tst_qquicktext
unelidedRect.h...() > maxHeightDescription
TRUEevaluated 424 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 548 times by 1 test
Evaluated by:
  • tst_qquicktext
150-972
1039 heightExceeded = true;-
1040 largeFont = scaledFontSize - 1;-
1041 if (smallFont > largeFont)
smallFont > largeFontDescription
TRUEnever evaluated
FALSEevaluated 574 times by 1 test
Evaluated by:
  • tst_qquicktext
0-574
1042 break;
never executed: break;
0
1043 scaledFontSize = (smallFont + largeFont) / 2;-
1044-
1045 } else {
executed 574 times by 1 test: end of block
Executed by:
  • tst_qquicktext
574
1046 smallFont = scaledFontSize;-
1047 if (smallFont == largeFont)
smallFont == largeFontDescription
TRUEevaluated 178 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 370 times by 1 test
Evaluated by:
  • tst_qquicktext
178-370
1048 break;
executed 178 times by 1 test: break;
Executed by:
  • tst_qquicktext
178
1049 scaledFontSize = (smallFont + largeFont + 1) / 2;-
1050 }
executed 370 times by 1 test: end of block
Executed by:
  • tst_qquicktext
370
1051 }-
1052 }
executed 1194 times by 1 test: end of block
Executed by:
  • tst_qquicktext
1194
1053-
1054 implicitWidthValid = true;-
1055 implicitHeightValid = true;-
1056-
1057 QFontInfo scaledFontInfo(scaledFont);-
1058 if (fontInfo.weight() != scaledFontInfo.weight()
fontInfo.weigh...tInfo.weight()Description
TRUEevaluated 216 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktext
FALSEevaluated 423832 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
216-423832
1059 || fontInfo.pixelSize() != scaledFontInfo.pixelSize()
fontInfo.pixel...fo.pixelSize()Description
TRUEevaluated 4530 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 419302 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
4530-419302
1060 || fontInfo.italic() != scaledFontInfo.italic()
fontInfo.itali...tInfo.italic()Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 419294 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
8-419294
1061 || !qFuzzyCompare(fontInfo.pointSizeF(), scaledFontInfo.pointSizeF())
!qFuzzyCompare....pointSizeF())Description
TRUEnever evaluated
FALSEevaluated 419294 times by 32 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
0-419294
1062 || fontInfo.family() != scaledFontInfo.family()
fontInfo.famil...tInfo.family()Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickfontloader_static
  • tst_qquicktext
FALSEevaluated 419284 times by 31 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
10-419284
1063 || fontInfo.styleName() != scaledFontInfo.styleName()) {
fontInfo.style...fo.styleName()Description
TRUEnever evaluated
FALSEevaluated 419284 times by 31 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
0-419284
1064 fontInfo = scaledFontInfo;-
1065 emit q->fontInfoChanged();-
1066 }
executed 4764 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
4764
1067-
1068 if (eos != multilengthEos)
eos != multilengthEosDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 424036 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
12-424036
1069 truncated = true;
executed 12 times by 1 test: truncated = true;
Executed by:
  • tst_qquicktext
12
1070-
1071 assignedFont = QFontInfo(font).family();-
1072-
1073 if (elide) {
elideDescription
TRUEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423908 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
140-423908
1074 if (!elideLayout) {
!elideLayoutDescription
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquicktext
46-94
1075 elideLayout = new QTextLayout;-
1076 elideLayout->setCacheEnabled(true);-
1077 }
executed 94 times by 1 test: end of block
Executed by:
  • tst_qquicktext
94
1078 QTextEngine *engine = layout.engine();-
1079 if (engine && engine->hasFormats()) {
engineDescription
TRUEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
engine->hasFormats()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 116 times by 1 test
Evaluated by:
  • tst_qquicktext
0-140
1080 QVector<QTextLayout::FormatRange> formats;-
1081 switch (elideMode) {-
1082 case QQuickText::ElideRight:
executed 14 times by 1 test: case QQuickText::ElideRight:
Executed by:
  • tst_qquicktext
14
1083 elideFormats(elideStart, elideText.length() - 1, 0, &formats);-
1084 break;
executed 14 times by 1 test: break;
Executed by:
  • tst_qquicktext
14
1085 case QQuickText::ElideLeft:
executed 6 times by 1 test: case QQuickText::ElideLeft:
Executed by:
  • tst_qquicktext
6
1086 elideFormats(elideEnd - elideText.length() + 1, elideText.length() - 1, 1, &formats);-
1087 break;
executed 6 times by 1 test: break;
Executed by:
  • tst_qquicktext
6
1088 case QQuickText::ElideMiddle: {
executed 4 times by 1 test: case QQuickText::ElideMiddle:
Executed by:
  • tst_qquicktext
4
1089 const int index = elideText.indexOf(elideChar);-
1090 if (index != -1) {
index != -1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-4
1091 elideFormats(elideStart, index, 0, &formats);-
1092 elideFormats(-
1093 elideEnd - elideText.length() + index + 1,-
1094 elideText.length() - index - 1,-
1095 index + 1,-
1096 &formats);-
1097 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
1098 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquicktext
4
1099 }-
1100 default:
never executed: default:
0
1101 break;
never executed: break;
0
1102 }-
1103 elideLayout->setFormats(formats);-
1104 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_qquicktext
24
1105-
1106 elideLayout->setFont(layout.font());-
1107 elideLayout->setTextOption(layout.textOption());-
1108 elideLayout->setText(elideText);-
1109 elideLayout->beginLayout();-
1110-
1111 QTextLine elidedLine = elideLayout->createLine();-
1112 elidedLine.setPosition(QPointF(0, height));-
1113 if (customLayout) {
customLayoutDescription
TRUEnever evaluated
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_qquicktext
0-140
1114 setupCustomLineGeometry(elidedLine, height, visibleCount - 1);-
1115 } else {
never executed: end of block
0
1116 setLineGeometry(elidedLine, lineWidth, height);-
1117 }
executed 140 times by 1 test: end of block
Executed by:
  • tst_qquicktext
140
1118 elideLayout->endLayout();-
1119-
1120 br = br.united(elidedLine.naturalTextRect());-
1121-
1122 if (visibleCount == 1)
visibleCount == 1Description
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquicktext
38-102
1123 layout.clearLayout();
executed 102 times by 1 test: layout.clearLayout();
Executed by:
  • tst_qquicktext
102
1124 } else {
executed 140 times by 1 test: end of block
Executed by:
  • tst_qquicktext
140
1125 delete elideLayout;-
1126 elideLayout = nullptr;-
1127 }
executed 423908 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
423908
1128-
1129 QTextLine firstLine = visibleCount == 1 && elideLayout
visibleCount == 1Description
TRUEevaluated 422000 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 2048 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
elideLayoutDescription
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 421898 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
102-422000
1130 ? elideLayout->lineAt(0)-
1131 : layout.lineAt(0);-
1132 Q_ASSERT(firstLine.isValid());-
1133 *baseline = firstLine.y() + firstLine.ascent();-
1134-
1135 if (!customLayout)
!customLayoutDescription
TRUEevaluated 424020 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquicktext
28-424020
1136 br.setHeight(height);
executed 424020 times by 33 tests: br.setHeight(height);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
424020
1137-
1138 //Update the number of visible lines-
1139 if (lineCount != visibleCount) {
lineCount != visibleCountDescription
TRUEevaluated 844 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 423204 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
844-423204
1140 lineCount = visibleCount;-
1141 emit q->lineCountChanged();-
1142 }
executed 844 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickfocusscope
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
844
1143-
1144 if (truncated != wasTruncated)
truncated != wasTruncatedDescription
TRUEevaluated 170 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 423878 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
170-423878
1145 emit q->truncatedChanged();
executed 170 times by 1 test: q->truncatedChanged();
Executed by:
  • tst_qquicktext
170
1146-
1147 return br;
executed 424048 times by 33 tests: return br;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
424048
1148}-
1149-
1150void QQuickTextPrivate::setLineGeometry(QTextLine &line, qreal lineWidth, qreal &height)-
1151{-
1152 Q_Q(QQuickText);-
1153 line.setLineWidth(lineWidth);-
1154-
1155 if (extra.isAllocated() && extra->imgTags.isEmpty()) {
extra.isAllocated()Description
TRUEevaluated 4816 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 428438 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
extra->imgTags.isEmpty()Description
TRUEevaluated 4678 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 138 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
138-428438
1156 line.setPosition(QPointF(line.position().x(), height));-
1157 height += (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : line.height() * lineHeight();
(lineHeightMod...::FixedHeight)Description
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4586 times by 1 test
Evaluated by:
  • tst_qquicktext
92-4586
1158 return;
executed 4678 times by 1 test: return;
Executed by:
  • tst_qquicktext
4678
1159 }-
1160-
1161 qreal textTop = 0;-
1162 qreal textHeight = line.height();-
1163 qreal totalLineHeight = textHeight;-
1164-
1165 QList<QQuickStyledTextImgTag *> imagesInLine;-
1166-
1167 if (extra.isAllocated()) {
extra.isAllocated()Description
TRUEevaluated 138 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 428438 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
138-428438
1168 for (QQuickStyledTextImgTag *image : qAsConst(extra->imgTags)) {-
1169 if (image->position >= line.textStart() &&
image->positio...ne.textStart()Description
TRUEevaluated 112 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
58-112
1170 image->position < line.textStart() + line.textLength()) {
image->positio...e.textLength()Description
TRUEevaluated 96 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
16-96
1171-
1172 if (!image->pix) {
!image->pixDescription
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 56 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
40-56
1173 QUrl url = q->baseUrl().resolved(image->url);-
1174 image->pix = new QQuickPixmap(qmlEngine(q), url, image->size);-
1175 if (image->pix->isLoading()) {
image->pix->isLoading()Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
10-30
1176 image->pix->connectFinished(q, SLOT(imageDownloadFinished()));-
1177 if (!extra.isAllocated() || !extra->nbActiveDownloads)
!extra.isAllocated()Description
TRUEnever evaluated
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
!extra->nbActiveDownloadsDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-10
1178 extra.value().nbActiveDownloads = 0;
executed 10 times by 2 tests: extra.value().nbActiveDownloads = 0;
Executed by:
  • tst_examples
  • tst_qquicktext
10
1179 extra->nbActiveDownloads++;-
1180 } else if (image->pix->isReady()) {
executed 10 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
image->pix->isReady()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-28
1181 if (!image->size.isValid()) {
!image->size.isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
2-26
1182 image->size = image->pix->implicitSize();-
1183 // if the size of the image was not explicitly set, we need to-
1184 // call updateLayout() once again.-
1185 needToUpdateLayout = true;-
1186 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
1187 } else if (image->pix->isError()) {
executed 28 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
image->pix->isError()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-28
1188 qmlWarning(q) << image->pix->error();-
1189 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
1190 }
executed 40 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
40
1191-
1192 qreal ih = qreal(image->size.height());-
1193 if (image->align == QQuickStyledTextImgTag::Top)
image->align =...extImgTag::TopDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 88 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
8-88
1194 image->pos.setY(0);
executed 8 times by 2 tests: image->pos.setY(0);
Executed by:
  • tst_examples
  • tst_qquicktext
8
1195 else if (image->align == QQuickStyledTextImgTag::Middle)
image->align =...ImgTag::MiddleDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 70 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
18-70
1196 image->pos.setY((textHeight / 2.0) - (ih / 2.0));
executed 18 times by 2 tests: image->pos.setY((textHeight / 2.0) - (ih / 2.0));
Executed by:
  • tst_examples
  • tst_qquicktext
18
1197 else-
1198 image->pos.setY(textHeight - ih);
executed 70 times by 2 tests: image->pos.setY(textHeight - ih);
Executed by:
  • tst_examples
  • tst_qquicktext
70
1199 imagesInLine << image;-
1200 textTop = qMax(textTop, qAbs(image->pos.y()));-
1201 }
executed 96 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
96
1202 }
executed 170 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
170
1203 }
executed 138 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
138
1204-
1205 for (QQuickStyledTextImgTag *image : qAsConst(imagesInLine)) {-
1206 totalLineHeight = qMax(totalLineHeight, textTop + image->pos.y() + image->size.height());-
1207 const int leadX = line.cursorToX(image->position);-
1208 const int trailX = line.cursorToX(image->position, QTextLine::Trailing);-
1209 const bool rtl = trailX < leadX;-
1210 image->pos.setX(leadX + (rtl ? (-image->offset - image->size.width()) : image->offset));-
1211 image->pos.setY(image->pos.y() + height + textTop);-
1212 extra->visibleImgTags << image;-
1213 }
executed 96 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
96
1214-
1215 line.setPosition(QPointF(line.position().x(), height + textTop));-
1216 height += (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : totalLineHeight * lineHeight();
(lineHeightMod...::FixedHeight)Description
TRUEnever evaluated
FALSEevaluated 428576 times by 33 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
0-428576
1217}
executed 428576 times by 33 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
428576
1218-
1219/*!-
1220 Returns the y offset when aligning text with a non-1.0 lineHeight-
1221*/-
1222int QQuickTextPrivate::lineHeightOffset() const-
1223{-
1224 QFontMetricsF fm(font);-
1225 qreal fontHeight = qCeil(fm.height()); // QScriptLine and therefore QTextLine rounds up-
1226 return lineHeightMode() == QQuickText::FixedHeight ? fontHeight - lineHeight()
executed 249006 times by 21 tests: return lineHeightMode() == QQuickText::FixedHeight ? fontHeight - lineHeight() : (1.0 - lineHeight()) * fontHeight;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
  • tst_touchmouse
249006
1227 : (1.0 - lineHeight()) * fontHeight;
executed 249006 times by 21 tests: return lineHeightMode() == QQuickText::FixedHeight ? fontHeight - lineHeight() : (1.0 - lineHeight()) * fontHeight;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
  • tst_touchmouse
249006
1228}-
1229-
1230/*!-
1231 Ensures the QQuickTextPrivate::doc variable is set to a valid text document-
1232*/-
1233void QQuickTextPrivate::ensureDoc()-
1234{-
1235 if (!extra.isAllocated() || !extra->doc) {
!extra.isAllocated()Description
TRUEevaluated 138 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 438 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
!extra->docDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 426 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
12-438
1236 Q_Q(QQuickText);-
1237 extra.value().doc = new QQuickTextDocumentWithImageResources(q);-
1238 extra->doc->setPageSize(QSizeF(0, 0));-
1239 extra->doc->setDocumentMargin(0);-
1240 extra->doc->setBaseUrl(q->baseUrl());-
1241 qmlobject_connect(extra->doc, QQuickTextDocumentWithImageResources, SIGNAL(imagesLoaded()),
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
executed 4 times by 2 tests: methodIdx = QQuickText::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qquicktext
never executed: methodIdx = QQuickText::staticMetaObject.indexOfSignal(method+1);
signalIdx < 0Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 146 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
methodIdx < 0Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 146 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
code == 1Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-146
1242 q, QQuickText, SLOT(q_updateLayout()));-
1243 }
executed 150 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
150
1244}
executed 576 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
576
1245-
1246/*!-
1247 \qmltype Text-
1248 \instantiates QQuickText-
1249 \inqmlmodule QtQuick-
1250 \ingroup qtquick-visual-
1251 \inherits Item-
1252 \brief Specifies how to add formatted text to a scene.-
1253-
1254 Text items can display both plain and rich text. For example, red text with-
1255 a specific font and size can be defined like this:-
1256-
1257 \qml-
1258 Text {-
1259 text: "Hello World!"-
1260 font.family: "Helvetica"-
1261 font.pointSize: 24-
1262 color: "red"-
1263 }-
1264 \endqml-
1265-
1266 Rich text is defined using HTML-style markup:-
1267-
1268 \qml-
1269 Text {-
1270 text: "<b>Hello</b> <i>World!</i>"-
1271 }-
1272 \endqml-
1273-
1274 \image declarative-text.png-
1275-
1276 If height and width are not explicitly set, Text will attempt to determine how-
1277 much room is needed and set it accordingly. Unless \l wrapMode is set, it will always-
1278 prefer width to height (all text will be placed on a single line).-
1279-
1280 The \l elide property can alternatively be used to fit a single line of-
1281 plain text to a set width.-
1282-
1283 Note that the \l{Supported HTML Subset} is limited. Also, if the text contains-
1284 HTML img tags that load remote images, the text is reloaded.-
1285-
1286 Text provides read-only text. For editable text, see \l TextEdit.-
1287-
1288 \sa {Qt Quick Examples - Text#Fonts}{Fonts example}-
1289*/-
1290QQuickText::QQuickText(QQuickItem *parent)-
1291: QQuickImplicitSizeItem(*(new QQuickTextPrivate