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), parent)-
1292{-
1293 Q_D(QQuickText);-
1294 d->init();-
1295}
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
1296-
1297QQuickText::QQuickText(QQuickTextPrivate &dd, QQuickItem *parent)-
1298: QQuickImplicitSizeItem(dd, parent)-
1299{-
1300 Q_D(QQuickText);-
1301 d->init();-
1302}
never executed: end of block
0
1303-
1304QQuickText::~QQuickText()-
1305{-
1306}-
1307-
1308/*!-
1309 \qmlproperty bool QtQuick::Text::clip-
1310 This property holds whether the text is clipped.-
1311-
1312 Note that if the text does not fit in the bounding rectangle it will be abruptly chopped.-
1313-
1314 If you want to display potentially long text in a limited space, you probably want to use \c elide instead.-
1315*/-
1316-
1317/*!-
1318 \qmlsignal QtQuick::Text::lineLaidOut(object line)-
1319-
1320 This signal is emitted for each line of text that is laid out during the layout-
1321 process. The specified \a line object provides more details about the line that-
1322 is currently being laid out.-
1323-
1324 This gives the opportunity to position and resize a line as it is being laid out.-
1325 It can for example be used to create columns or lay out text around objects.-
1326-
1327 The properties of the specified \a line object are:-
1328 \list-
1329 \li number (read-only)-
1330 \li x-
1331 \li y-
1332 \li width-
1333 \li height-
1334 \endlist-
1335-
1336 For example, this will move the first 5 lines of a Text item by 100 pixels to the right:-
1337 \code-
1338 onLineLaidOut: {-
1339 if (line.number < 5) {-
1340 line.x = line.x + 100-
1341 line.width = line.width - 100-
1342 }-
1343 }-
1344 \endcode-
1345-
1346 The corresponding handler is \c onLineLaidOut.-
1347*/-
1348-
1349/*!-
1350 \qmlsignal QtQuick::Text::linkActivated(string link)-
1351-
1352 This signal is emitted when the user clicks on a link embedded in the text.-
1353 The link must be in rich text or HTML format and the-
1354 \a link string provides access to the particular link.-
1355-
1356 \snippet qml/text/onLinkActivated.qml 0-
1357-
1358 The example code will display the text-
1359 "See the \l{http://qt-project.org}{Qt Project website}."-
1360-
1361 Clicking on the highlighted link will output-
1362 \tt{http://qt-project.org link activated} to the console.-
1363-
1364 The corresponding handler is \c onLinkActivated.-
1365*/-
1366-
1367/*!-
1368 \qmlproperty string QtQuick::Text::font.family-
1369-
1370 Sets the family name of the font.-
1371-
1372 The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]".-
1373 If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen.-
1374 If the family isn't available a family will be set using the font matching algorithm.-
1375*/-
1376-
1377/*!-
1378 \qmlproperty string QtQuick::Text::font.styleName-
1379 \since 5.6-
1380-
1381 Sets the style name of the font.-
1382-
1383 The style name is case insensitive. If set, the font will be matched against style name instead-
1384 of the font properties \l font.weight, \l font.bold and \l font.italic.-
1385*/-
1386-
1387/*!-
1388 \qmlproperty bool QtQuick::Text::font.bold-
1389-
1390 Sets whether the font weight is bold.-
1391*/-
1392-
1393/*!-
1394 \qmlproperty enumeration QtQuick::Text::font.weight-
1395-
1396 Sets the font's weight.-
1397-
1398 The weight can be one of:-
1399 \list-
1400 \li Font.Thin-
1401 \li Font.Light-
1402 \li Font.ExtraLight-
1403 \li Font.Normal - the default-
1404 \li Font.Medium-
1405 \li Font.DemiBold-
1406 \li Font.Bold-
1407 \li Font.ExtraBold-
1408 \li Font.Black-
1409 \endlist-
1410-
1411 \qml-
1412 Text { text: "Hello"; font.weight: Font.DemiBold }-
1413 \endqml-
1414*/-
1415-
1416/*!-
1417 \qmlproperty bool QtQuick::Text::font.italic-
1418-
1419 Sets whether the font has an italic style.-
1420*/-
1421-
1422/*!-
1423 \qmlproperty bool QtQuick::Text::font.underline-
1424-
1425 Sets whether the text is underlined.-
1426*/-
1427-
1428/*!-
1429 \qmlproperty bool QtQuick::Text::font.strikeout-
1430-
1431 Sets whether the font has a strikeout style.-
1432*/-
1433-
1434/*!-
1435 \qmlproperty real QtQuick::Text::font.pointSize-
1436-
1437 Sets the font size in points. The point size must be greater than zero.-
1438*/-
1439-
1440/*!-
1441 \qmlproperty int QtQuick::Text::font.pixelSize-
1442-
1443 Sets the font size in pixels.-
1444-
1445 Using this function makes the font device dependent.-
1446 Use \c pointSize to set the size of the font in a device independent manner.-
1447*/-
1448-
1449/*!-
1450 \qmlproperty real QtQuick::Text::font.letterSpacing-
1451-
1452 Sets the letter spacing for the font.-
1453-
1454 Letter spacing changes the default spacing between individual letters in the font.-
1455 A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.-
1456*/-
1457-
1458/*!-
1459 \qmlproperty real QtQuick::Text::font.wordSpacing-
1460-
1461 Sets the word spacing for the font.-
1462-
1463 Word spacing changes the default spacing between individual words.-
1464 A positive value increases the word spacing by a corresponding amount of pixels,-
1465 while a negative value decreases the inter-word spacing accordingly.-
1466*/-
1467-
1468/*!-
1469 \qmlproperty enumeration QtQuick::Text::font.capitalization-
1470-
1471 Sets the capitalization for the text.-
1472-
1473 \list-
1474 \li Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.-
1475 \li Font.AllUppercase - This alters the text to be rendered in all uppercase type.-
1476 \li Font.AllLowercase - This alters the text to be rendered in all lowercase type.-
1477 \li Font.SmallCaps - This alters the text to be rendered in small-caps type.-
1478 \li Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.-
1479 \endlist-
1480-
1481 \qml-
1482 Text { text: "Hello"; font.capitalization: Font.AllLowercase }-
1483 \endqml-
1484*/-
1485-
1486/*!-
1487 \qmlproperty enumeration QtQuick::Text::font.hintingPreference-
1488 \since 5.8-
1489-
1490 Sets the preferred hinting on the text. This is a hint to the underlying text rendering system-
1491 to use a certain level of hinting, and has varying support across platforms. See the table in-
1492 the documentation for QFont::HintingPreference for more details.-
1493-
1494 \note This property only has an effect when used together with render type Text.NativeRendering.-
1495-
1496 \list-
1497 \value Font.PreferDefaultHinting - Use the default hinting level for the target platform.-
1498 \value Font.PreferNoHinting - If possible, render text without hinting the outlines-
1499 of the glyphs. The text layout will be typographically accurate, using the same metrics-
1500 as are used e.g. when printing.-
1501 \value Font.PreferVerticalHinting - If possible, render text with no horizontal hinting,-
1502 but align glyphs to the pixel grid in the vertical direction. The text will appear-
1503 crisper on displays where the density is too low to give an accurate rendering-
1504 of the glyphs. But since the horizontal metrics of the glyphs are unhinted, the text's-
1505 layout will be scalable to higher density devices (such as printers) without impacting-
1506 details such as line breaks.-
1507 \value Font.PreferFullHinting - If possible, render text with hinting in both horizontal and-
1508 vertical directions. The text will be altered to optimize legibility on the target-
1509 device, but since the metrics will depend on the target size of the text, the positions-
1510 of glyphs, line breaks, and other typographical detail will not scale, meaning that a-
1511 text layout may look different on devices with different pixel densities.-
1512 \endlist-
1513-
1514 \qml-
1515 Text { text: "Hello"; renderType: Text.NativeRendering; font.hintingPreference: Font.PreferVerticalHinting }-
1516 \endqml-
1517*/-
1518-
1519/*!-
1520 \qmlproperty bool QtQuick::Text::font.kerning-
1521 \since 5.10-
1522-
1523 Enables or disables the kerning OpenType feature when shaping the text. Disabling this may-
1524 improve performance when creating or changing the text, at the expense of some cosmetic-
1525 features. The default value is true.-
1526-
1527 \qml-
1528 Text { text: "OATS FLAVOUR WAY"; font.kerning: false }-
1529 \endqml-
1530*/-
1531-
1532/*!-
1533 \qmlproperty bool QtQuick::Text::font.preferShaping-
1534 \since 5.10-
1535-
1536 Sometimes, a font will apply complex rules to a set of characters in order to-
1537 display them correctly. In some writing systems, such as Brahmic scripts, this is-
1538 required in order for the text to be legible, but in e.g. Latin script, it is merely-
1539 a cosmetic feature. Setting the \c preferShaping property to false will disable all-
1540 such features when they are not required, which will improve performance in most cases.-
1541-
1542 The default value is true.-
1543-
1544 \qml-
1545 Text { text: "Some text"; font.preferShaping: false }-
1546 \endqml-
1547*/-
1548QFont QQuickText::font() const-
1549{-
1550 Q_D(const QQuickText);-
1551 return d->sourceFont;
executed 40231 times by 18 tests: return d->sourceFont;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
40231
1552}-
1553-
1554void QQuickText::setFont(const QFont &font)-
1555{-
1556 Q_D(QQuickText);-
1557 if (d->sourceFont == font)
d->sourceFont == fontDescription
TRUEevaluated 360 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickfontloader_static
  • tst_qquicktext
FALSEevaluated 39386 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
360-39386
1558 return;
executed 360 times by 7 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickfontloader_static
  • tst_qquicktext
360
1559-
1560 d->sourceFont = font;-
1561 QFont oldFont = d->font;-
1562 d->font = font;-
1563-
1564 if (!antialiasing())
!antialiasing()Description
TRUEnever evaluated
FALSEevaluated 39386 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
0-39386
1565 d->font.setStyleStrategy(QFont::NoAntialias);
never executed: d->font.setStyleStrategy(QFont::NoAntialias);
0
1566-
1567 if (d->font.pointSizeF() != -1) {
d->font.pointSizeF() != -1Description
TRUEevaluated 2515 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 36871 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
2515-36871
1568 // 0.5pt resolution-
1569 qreal size = qRound(d->font.pointSizeF()*2.0);-
1570 d->font.setPointSizeF(size/2.0);-
1571 }
executed 2515 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
2515
1572-
1573 if (oldFont != d->font) {
oldFont != d->fontDescription
TRUEevaluated 39385 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qquickbehaviors
1-39385
1574 // if the format changes the size of the text-
1575 // with headings or <font> tag, we need to re-parse-
1576 if (d->formatModifiesFontSize)
d->formatModifiesFontSizeDescription
TRUEevaluated 1196 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 38189 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
1196-38189
1577 d->textHasChanged = true;
executed 1196 times by 1 test: d->textHasChanged = true;
Executed by:
  • tst_qquicktext
1196
1578 d->implicitWidthValid = false;-
1579 d->implicitHeightValid = false;-
1580 d->updateLayout();-
1581 }
executed 39385 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
39385
1582-
1583 emit fontChanged(d->sourceFont);-
1584}
executed 39386 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
39386
1585-
1586void QQuickText::itemChange(ItemChange change, const ItemChangeData &value)-
1587{-
1588 Q_D(QQuickText);-
1589 Q_UNUSED(value);-
1590 switch (change) {-
1591 case ItemAntialiasingHasChanged:
executed 2 times by 1 test: case ItemAntialiasingHasChanged:
Executed by:
  • tst_qquicktext
2
1592 if (!antialiasing())
!antialiasing()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-2
1593 d->font.setStyleStrategy(QFont::NoAntialias);
executed 2 times by 1 test: d->font.setStyleStrategy(QFont::NoAntialias);
Executed by:
  • tst_qquicktext
2
1594 else-
1595 d->font.setStyleStrategy(QFont::PreferAntialias);
never executed: d->font.setStyleStrategy(QFont::PreferAntialias);
0
1596 d->implicitWidthValid = false;-
1597 d->implicitHeightValid = false;-
1598 d->updateLayout();-
1599 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquicktext
2
1600-
1601 case ItemDevicePixelRatioHasChanged:
never executed: case ItemDevicePixelRatioHasChanged:
0
1602 if (d->renderType == NativeRendering) {
d->renderType ...ativeRenderingDescription
TRUEnever evaluated
FALSEnever evaluated
0
1603 // Native rendering optimizes for a given pixel grid, so its results must not be scaled.-
1604 // Text layout code respects the current device pixel ratio automatically, we only need-
1605 // to rerun layout after the ratio changed.-
1606 // Changes of implicit size should be minimal; they are hard to avoid.-
1607 d->implicitWidthValid = false;-
1608 d->implicitHeightValid = false;-
1609 d->updateLayout();-
1610 }
never executed: end of block
0
1611 break;
never executed: break;
0
1612-
1613 default:
executed 1054500 times by 32 tests: default:
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • 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
  • tst_qquickrepeater
  • ...
1054500
1614 break;
executed 1054500 times by 32 tests: break;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • 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
  • tst_qquickrepeater
  • ...
1054500
1615 }-
1616 QQuickItem::itemChange(change, value);-
1617}
executed 1054502 times by 32 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • 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
  • tst_qquickrepeater
  • ...
1054502
1618-
1619/*!-
1620 \qmlproperty string QtQuick::Text::text-
1621-
1622 The text to display. Text supports both plain and rich text strings.-
1623-
1624 The item will try to automatically determine whether the text should-
1625 be treated as styled text. This determination is made using Qt::mightBeRichText().-
1626*/-
1627QString QQuickText::text() const-
1628{-
1629 Q_D(const QQuickText);-
1630 return d->text;
executed 170280 times by 18 tests: return d->text;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquickvisualdatamodel
  • tst_scenegraph
170280
1631}-
1632-
1633void QQuickText::setText(const QString &n)-
1634{-
1635 Q_D(QQuickText);-
1636 if (d->text == n)
d->text == nDescription
TRUEevaluated 88385 times by 12 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qquickdraghandler
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
FALSEevaluated 421506 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
  • ...
88385-421506
1637 return;
executed 88385 times by 12 tests: return;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qqmlbinding
  • tst_qquickdraghandler
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
88385
1638-
1639 d->richText = d->format == RichText;-
1640 d->styledText = d->format == StyledText || (d->format == AutoText && Qt::mightBeRichText(n));
d->format == StyledTextDescription
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 421456 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
  • ...
d->format == AutoTextDescription
TRUEevaluated 421270 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 186 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
Qt::mightBeRichText(n)Description
TRUEevaluated 738 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 420532 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
  • ...
50-421456
1641 d->text = n;-
1642 if (isComponentComplete()) {
isComponentComplete()Description
TRUEevaluated 205093 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
FALSEevaluated 216413 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
  • ...
205093-216413
1643 if (d->richText) {
d->richTextDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 205047 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
46-205047
1644 d->ensureDoc();-
1645 d->extra->doc->setText(n);-
1646 d->rightToLeftText = d->extra->doc->toPlainText().isRightToLeft();-
1647 } else {
executed 46 times by 1 test: end of block
Executed by:
  • tst_qquicktext
46
1648 d->clearFormats();-
1649 d->rightToLeftText = d->text.isRightToLeft();-
1650 }
executed 205047 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
205047
1651 d->determineHorizontalAlignment();-
1652 }
executed 205093 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
205093
1653 d->textHasChanged = true;-
1654 d->implicitWidthValid = false;-
1655 d->implicitHeightValid = false;-
1656-
1657 if (d->extra.isAllocated()) {
d->extra.isAllocated()Description
TRUEevaluated 264 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 421242 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
  • ...
264-421242
1658 qDeleteAll(d->extra->imgTags);-
1659 d->extra->imgTags.clear();-
1660 }
executed 264 times by 1 test: end of block
Executed by:
  • tst_qquicktext
264
1661 d->updateLayout();-
1662 setAcceptHoverEvents(d->richText || d->styledText);-
1663 emit textChanged(d->text);-
1664}
executed 421506 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
  • ...
421506
1665-
1666/*!-
1667 \qmlproperty color QtQuick::Text::color-
1668-
1669 The text color.-
1670-
1671 An example of green text defined using hexadecimal notation:-
1672 \qml-
1673 Text {-
1674 color: "#00FF00"-
1675 text: "green text"-
1676 }-
1677 \endqml-
1678-
1679 An example of steel blue text defined using an SVG color name:-
1680 \qml-
1681 Text {-
1682 color: "steelblue"-
1683 text: "blue text"-
1684 }-
1685 \endqml-
1686*/-
1687QColor QQuickText::color() const-
1688{-
1689 Q_D(const QQuickText);-
1690 return QColor::fromRgba(d->color);
executed 432 times by 2 tests: return QColor::fromRgba(d->color);
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
432
1691}-
1692-
1693void QQuickText::setColor(const QColor &color)-
1694{-
1695 Q_D(QQuickText);-
1696 QRgb rgb = color.rgba();-
1697 if (d->color == rgb)
d->color == rgbDescription
TRUEevaluated 174 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfontloader
  • tst_qquickpathview
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 1870 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
174-1870
1698 return;
executed 174 times by 5 tests: return;
Executed by:
  • tst_examples
  • tst_qquickfontloader
  • tst_qquickpathview
  • tst_qquicktext
  • tst_scenegraph
174
1699-
1700 d->color = rgb;-
1701 if (isComponentComplete()) {
isComponentComplete()Description
TRUEevaluated 60 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquicktext
FALSEevaluated 1810 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquicklistview
  • tst_qquicktext
60-1810
1702 d->updateType = QQuickTextPrivate::UpdatePaintNode;-
1703 update();-
1704 }
executed 60 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquicktext
60
1705 emit colorChanged();-
1706}
executed 1870 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickdraghandler
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
1870
1707-
1708/*!-
1709 \qmlproperty color QtQuick::Text::linkColor-
1710-
1711 The color of links in the text.-
1712-
1713 This property works with the StyledText \l textFormat, but not with RichText.-
1714 Link color in RichText can be specified by including CSS style tags in the-
1715 text.-
1716*/-
1717-
1718QColor QQuickText::linkColor() const-
1719{-
1720 Q_D(const QQuickText);-
1721 return QColor::fromRgba(d->linkColor);
executed 430 times by 2 tests: return QColor::fromRgba(d->linkColor);
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
430
1722}-
1723-
1724void QQuickText::setLinkColor(const QColor &color)-
1725{-
1726 Q_D(QQuickText);-
1727 QRgb rgb = color.rgba();-
1728 if (d->linkColor == rgb)
d->linkColor == rgbDescription
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 364 times by 1 test
Evaluated by:
  • tst_qquicktext
26-364
1729 return;
executed 26 times by 1 test: return;
Executed by:
  • tst_qquicktext
26
1730-
1731 d->linkColor = rgb;-
1732 if (isComponentComplete()) {
isComponentComplete()Description
TRUEevaluated 50 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 314 times by 1 test
Evaluated by:
  • tst_qquicktext
50-314
1733 d->updateType = QQuickTextPrivate::UpdatePaintNode;-
1734 update();-
1735 }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquicktext
50
1736 emit linkColorChanged();-
1737}
executed 364 times by 1 test: end of block
Executed by:
  • tst_qquicktext
364
1738-
1739/*!-
1740 \qmlproperty enumeration QtQuick::Text::style-
1741-
1742 Set an additional text style.-
1743-
1744 Supported text styles are:-
1745 \list-
1746 \li Text.Normal - the default-
1747 \li Text.Outline-
1748 \li Text.Raised-
1749 \li Text.Sunken-
1750 \endlist-
1751-
1752 \qml-
1753 Row {-
1754 Text { font.pointSize: 24; text: "Normal" }-
1755 Text { font.pointSize: 24; text: "Raised"; style: Text.Raised; styleColor: "#AAAAAA" }-
1756 Text { font.pointSize: 24; text: "Outline";style: Text.Outline; styleColor: "red" }-
1757 Text { font.pointSize: 24; text: "Sunken"; style: Text.Sunken; styleColor: "#AAAAAA" }-
1758 }-
1759 \endqml-
1760-
1761 \image declarative-textstyle.png-
1762*/-
1763QQuickText::TextStyle QQuickText::style() const-
1764{-
1765 Q_D(const QQuickText);-
1766 return d->style;
executed 24 times by 2 tests: return d->style;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
24
1767}-
1768-
1769void QQuickText::setStyle(QQuickText::TextStyle style)-
1770{-
1771 Q_D(QQuickText);-
1772 if (d->style == style)
d->style == styleDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquicktext
2-80
1773 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquicktext
2
1774-
1775 d->style = style;-
1776 if (isComponentComplete()) {
isComponentComplete()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 76 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquicktext
4-76
1777 d->updateType = QQuickTextPrivate::UpdatePaintNode;-
1778 update();-
1779 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
1780 emit styleChanged(d->style);-
1781}
executed 80 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquicktext
80
1782-
1783/*!-
1784 \qmlproperty color QtQuick::Text::styleColor-
1785-
1786 Defines the secondary color used by text styles.-
1787-
1788 \c styleColor is used as the outline color for outlined text, and as the-
1789 shadow color for raised or sunken text. If no style has been set, it is not-
1790 used at all.-
1791-
1792 \qml-
1793 Text { font.pointSize: 18; text: "hello"; style: Text.Raised; styleColor: "gray" }-
1794 \endqml-
1795-
1796 \sa style-
1797 */-
1798QColor QQuickText::styleColor() const-
1799{-
1800 Q_D(const QQuickText);-
1801 return QColor::fromRgba(d->styleColor);
executed 390 times by 2 tests: return QColor::fromRgba(d->styleColor);
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
390
1802}-
1803-
1804void QQuickText::setStyleColor(const QColor &color)-
1805{-
1806 Q_D(QQuickText);-
1807 QRgb rgb = color.rgba();-
1808 if (d->styleColor == rgb)
d->styleColor == rgbDescription
TRUEevaluated 64 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquicktext
FALSEevaluated 332 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
64-332
1809 return;
executed 64 times by 3 tests: return;
Executed by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquicktext
64
1810-
1811 d->styleColor = rgb;-
1812 if (isComponentComplete()) {
isComponentComplete()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 330 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
2-330
1813 d->updateType = QQuickTextPrivate::UpdatePaintNode;-
1814 update();-
1815 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
1816 emit styleColorChanged();-
1817}
executed 332 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
332
1818-
1819/*!-
1820 \qmlproperty enumeration QtQuick::Text::horizontalAlignment-
1821 \qmlproperty enumeration QtQuick::Text::verticalAlignment-
1822 \qmlproperty enumeration QtQuick::Text::effectiveHorizontalAlignment-
1823-
1824 Sets the horizontal and vertical alignment of the text within the Text items-
1825 width and height. By default, the text is vertically aligned to the top. Horizontal-
1826 alignment follows the natural alignment of the text, for example text that is read-
1827 from left to right will be aligned to the left.-
1828-
1829 The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight, \c Text.AlignHCenter and-
1830 \c Text.AlignJustify. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom-
1831 and \c Text.AlignVCenter.-
1832-
1833 Note that for a single line of text, the size of the text is the area of the text. In this common case,-
1834 all alignments are equivalent. If you want the text to be, say, centered in its parent, then you will-
1835 need to either modify the Item::anchors, or set horizontalAlignment to Text.AlignHCenter and bind the width to-
1836 that of the parent.-
1837-
1838 When using the attached property LayoutMirroring::enabled to mirror application-
1839 layouts, the horizontal alignment of text will also be mirrored. However, the property-
1840 \c horizontalAlignment will remain unchanged. To query the effective horizontal alignment-
1841 of Text, use the read-only property \c effectiveHorizontalAlignment.-
1842*/-
1843QQuickText::HAlignment QQuickText::hAlign() const-
1844{-
1845 Q_D(const QQuickText);-
1846 return d->hAlign;
executed 164 times by 3 tests: return d->hAlign;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquicktext
164
1847}-
1848-
1849void QQuickText::setHAlign(HAlignment align)-
1850{-
1851 Q_D(QQuickText);-
1852 bool forceAlign = d->hAlignImplicit && d->effectiveLayoutMirror;
d->hAlignImplicitDescription
TRUEevaluated 481 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qquicktext
  • tst_qquicktextedit
d->effectiveLayoutMirrorDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 479 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
2-481
1853 d->hAlignImplicit = false;-
1854 if (d->setHAlign(align, forceAlign) && isComponentComplete())
d->setHAlign(a...n, forceAlign)Description
TRUEevaluated 477 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 46 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_qquicktextedit
isComponentComplete()Description
TRUEevaluated 48 times by 2 tests
Evaluated by:
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 429 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
46-477
1855 d->updateLayout();
executed 48 times by 2 tests: d->updateLayout();
Executed by:
  • tst_qquicktext
  • tst_qquicktextedit
48
1856}
executed 523 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
523
1857-
1858void QQuickText::resetHAlign()-
1859{-
1860 Q_D(QQuickText);-
1861 d->hAlignImplicit = true;-
1862 if (isComponentComplete() && d->determineHorizontalAlignment())
isComponentComplete()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_examples
d->determineHo...talAlignment()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-56
1863 d->updateLayout();
executed 4 times by 1 test: d->updateLayout();
Executed by:
  • tst_qquicktext
4
1864}
executed 62 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
62
1865-
1866QQuickText::HAlignment QQuickText::effectiveHAlign() const-
1867{-
1868 Q_D(const QQuickText);-
1869 QQuickText::HAlignment effectiveAlignment = d->hAlign;-
1870 if (!d->hAlignImplicit && d->effectiveLayoutMirror) {
!d->hAlignImplicitDescription
TRUEevaluated 3029 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 1311756 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
  • ...
d->effectiveLayoutMirrorDescription
TRUEevaluated 174 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2855 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
174-1311756
1871 switch (d->hAlign) {-
1872 case QQuickText::AlignLeft:
executed 122 times by 2 tests: case QQuickText::AlignLeft:
Executed by:
  • tst_examples
  • tst_qquicktext
122
1873 effectiveAlignment = QQuickText::AlignRight;-
1874 break;
executed 122 times by 2 tests: break;
Executed by:
  • tst_examples
  • tst_qquicktext
122
1875 case QQuickText::AlignRight:
executed 52 times by 1 test: case QQuickText::AlignRight:
Executed by:
  • tst_qquicktext
52
1876 effectiveAlignment = QQuickText::AlignLeft;-
1877 break;
executed 52 times by 1 test: break;
Executed by:
  • tst_qquicktext
52
1878 default:
never executed: default:
0
1879 break;
never executed: break;
0
1880 }-
1881 }-
1882 return effectiveAlignment;
executed 1314785 times by 33 tests: return effectiveAlignment;
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
  • ...
1314785
1883}-
1884-
1885bool QQuickTextPrivate::setHAlign(QQuickText::HAlignment alignment, bool forceAlign)-
1886{-
1887 Q_Q(QQuickText);-
1888 if (hAlign != alignment || forceAlign) {
hAlign != alignmentDescription
TRUEevaluated 511 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 469304 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
  • ...
forceAlignDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 469302 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
  • ...
2-469304
1889 QQuickText::HAlignment oldEffectiveHAlign = q->effectiveHAlign();-
1890 hAlign = alignment;-
1891-
1892 emit q->horizontalAlignmentChanged(hAlign);-
1893 if (oldEffectiveHAlign != q->effectiveHAlign())
oldEffectiveHA...ectiveHAlign()Description
TRUEevaluated 511 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-511
1894 emit q->effectiveHorizontalAlignmentChanged();
executed 511 times by 5 tests: q->effectiveHorizontalAlignmentChanged();
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
511
1895 return true;
executed 513 times by 5 tests: return true;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
513
1896 }-
1897 return false;
executed 469302 times by 34 tests: return false;
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_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • ...
469302
1898}-
1899-
1900bool QQuickTextPrivate::determineHorizontalAlignment()-
1901{-
1902 if (hAlignImplicit) {
hAlignImplicitDescription
TRUEevaluated 469292 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
  • ...
FALSEevaluated 503 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
503-469292
1903#if QT_CONFIG(im)-
1904 bool alignToRight = text.isEmpty() ? QGuiApplication::inputMethod()->inputDirection() == Qt::RightToLeft : rightToLeftText;
text.isEmpty()Description
TRUEevaluated 48613 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 420679 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
  • ...
48613-420679
1905#else-
1906 bool alignToRight = rightToLeftText;-
1907#endif-
1908 return setHAlign(alignToRight ? QQuickText::AlignRight : QQuickText::AlignLeft);
executed 469292 times by 34 tests: return setHAlign(alignToRight ? QQuickText::AlignRight : QQuickText::AlignLeft);
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_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • ...
469292
1909 }-
1910 return false;
executed 503 times by 5 tests: return false;
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
503
1911}-
1912-
1913void QQuickTextPrivate::mirrorChange()-
1914{-
1915 Q_Q(QQuickText);-
1916 if (q->isComponentComplete()) {
q->isComponentComplete()Description
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquickanchors
  • tst_qquicktext
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
14-20
1917 if (!hAlignImplicit && (hAlign == QQuickText::AlignRight || hAlign == QQuickText::AlignLeft)) {
!hAlignImplicitDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquickanchors
  • tst_qquicktext
hAlign == QQui...xt::AlignRightDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
hAlign == QQui...ext::AlignLeftDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-8
1918 updateLayout();-
1919 emit q->effectiveHorizontalAlignmentChanged();-
1920 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicktext
8
1921 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_qquickanchors
  • tst_qquicktext
14
1922}
executed 34 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquicktext
34
1923-
1924QQuickText::VAlignment QQuickText::vAlign() const-
1925{-
1926 Q_D(const QQuickText);-
1927 return d->vAlign;
executed 40 times by 2 tests: return d->vAlign;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
40
1928}-
1929-
1930void QQuickText::setVAlign(VAlignment align)-
1931{-
1932 Q_D(QQuickText);-
1933 if (d->vAlign == align)
d->vAlign == alignDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 435 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
20-435
1934 return;
executed 20 times by 1 test: return;
Executed by:
  • tst_qquicktext
20
1935-
1936 d->vAlign = align;-
1937-
1938 if (isComponentComplete())
isComponentComplete()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 429 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
6-429
1939 d->updateLayout();
executed 6 times by 1 test: d->updateLayout();
Executed by:
  • tst_qquicktext
6
1940-
1941 emit verticalAlignmentChanged(align);-
1942}
executed 435 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
435
1943-
1944/*!-
1945 \qmlproperty enumeration QtQuick::Text::wrapMode-
1946-
1947 Set this property to wrap the text to the Text item's width. The text will only-
1948 wrap if an explicit width has been set. wrapMode can be one of:-
1949-
1950 \list-
1951 \li Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then \l contentWidth will exceed a set width.-
1952 \li Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, \l contentWidth will exceed a set width.-
1953 \li Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.-
1954 \li Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.-
1955 \endlist-
1956*/-
1957QQuickText::WrapMode QQuickText::wrapMode() const-
1958{-
1959 Q_D(const QQuickText);-
1960 return d->wrapMode;
executed 246 times by 2 tests: return d->wrapMode;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
246
1961}-
1962-
1963void QQuickText::setWrapMode(WrapMode mode)-
1964{-
1965 Q_D(QQuickText);-
1966 if (mode == d->wrapMode)
mode == d->wrapModeDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 380 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
34-380
1967 return;
executed 34 times by 1 test: return;
Executed by:
  • tst_qquicktext
34
1968-
1969 d->wrapMode = mode;-
1970 d->updateLayout();-
1971-
1972 emit wrapModeChanged();-
1973}
executed 380 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
380
1974-
1975/*!-
1976 \qmlproperty int QtQuick::Text::lineCount-
1977-
1978 Returns the number of lines visible in the text item.-
1979-
1980 This property is not supported for rich text.-
1981-
1982 \sa maximumLineCount-
1983*/-
1984int QQuickText::lineCount() const-
1985{-
1986 Q_D(const QQuickText);-
1987 return d->lineCount;
executed 76 times by 2 tests: return d->lineCount;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
76
1988}-
1989-
1990/*!-
1991 \qmlproperty bool QtQuick::Text::truncated-
1992-
1993 Returns true if the text has been truncated due to \l maximumLineCount-
1994 or \l elide.-
1995-
1996 This property is not supported for rich text.-
1997-
1998 \sa maximumLineCount, elide-
1999*/-
2000bool QQuickText::truncated() const-
2001{-
2002 Q_D(const QQuickText);-
2003 return d->truncated;
executed 172 times by 2 tests: return d->truncated;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
172
2004}-
2005-
2006/*!-
2007 \qmlproperty int QtQuick::Text::maximumLineCount-
2008-
2009 Set this property to limit the number of lines that the text item will show.-
2010 If elide is set to Text.ElideRight, the text will be elided appropriately.-
2011 By default, this is the value of the largest possible integer.-
2012-
2013 This property is not supported for rich text.-
2014-
2015 \sa lineCount, elide-
2016*/-
2017int QQuickText::maximumLineCount() const-
2018{-
2019 Q_D(const QQuickText);-
2020 return d->maximumLineCount();
executed 24 times by 2 tests: return d->maximumLineCount();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
24
2021}-
2022-
2023void QQuickText::setMaximumLineCount(int lines)-
2024{-
2025 Q_D(QQuickText);-
2026-
2027 d->maximumLineCountValid = lines==INT_MAX ? false : true;
lines==0x7fffffffDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquicktext
8-58
2028 if (d->maximumLineCount() != lines) {
d->maximumLineCount() != linesDescription
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-64
2029 d->extra.value().maximumLineCount = lines;-
2030 d->implicitHeightValid = false;-
2031 d->updateLayout();-
2032 emit maximumLineCountChanged();-
2033 }
executed 64 times by 1 test: end of block
Executed by:
  • tst_qquicktext
64
2034}
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquicktext
66
2035-
2036void QQuickText::resetMaximumLineCount()-
2037{-
2038 Q_D(QQuickText);-
2039 setMaximumLineCount(INT_MAX);-
2040 if (d->truncated != false) {
d->truncated != falseDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
0-8
2041 d->truncated = false;-
2042 emit truncatedChanged();-
2043 }
never executed: end of block
0
2044}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicktext
8
2045-
2046/*!-
2047 \qmlproperty enumeration QtQuick::Text::textFormat-
2048-
2049 The way the text property should be displayed.-
2050-
2051 Supported text formats are:-
2052-
2053 \list-
2054 \li Text.AutoText (default)-
2055 \li Text.PlainText-
2056 \li Text.StyledText-
2057 \li Text.RichText-
2058 \endlist-
2059-
2060 If the text format is \c Text.AutoText the Text item-
2061 will automatically determine whether the text should be treated as-
2062 styled text. This determination is made using Qt::mightBeRichText()-
2063 which uses a fast and therefore simple heuristic. It mainly checks-
2064 whether there is something that looks like a tag before the first-
2065 line break. Although the result may be correct for common cases,-
2066 there is no guarantee.-
2067-
2068 Text.StyledText is an optimized format supporting some basic text-
2069 styling markup, in the style of HTML 3.2:-
2070-
2071 \code-
2072 <b></b> - bold-
2073 <strong></strong> - bold-
2074 <i></i> - italic-
2075 <br> - new line-
2076 <p> - paragraph-
2077 <u> - underlined text-
2078 <font color="color_name" size="1-7"></font>-
2079 <h1> to <h6> - headers-
2080 <a href=""> - anchor-
2081 <img src="" align="top,middle,bottom" width="" height=""> - inline images-
2082 <ol type="">, <ul type=""> and <li> - ordered and unordered lists-
2083 <pre></pre> - preformatted-
2084 &gt; &lt; &amp;-
2085 \endcode-
2086-
2087 \c Text.StyledText parser is strict, requiring tags to be correctly nested.-
2088-
2089 \table-
2090 \row-
2091 \li-
2092 \qml-
2093Column {-
2094 Text {-
2095 font.pointSize: 24-
2096 text: "<b>Hello</b> <i>World!</i>"-
2097 }-
2098 Text {-
2099 font.pointSize: 24-
2100 textFormat: Text.RichText-
2101 text: "<b>Hello</b> <i>World!</i>"-
2102 }-
2103 Text {-
2104 font.pointSize: 24-
2105 textFormat: Text.PlainText-
2106 text: "<b>Hello</b> <i>World!</i>"-
2107 }-
2108}-
2109 \endqml-
2110 \li \image declarative-textformat.png-
2111 \endtable-
2112-
2113 Text.RichText supports a larger subset of HTML 4, as described on the-
2114 \l {Supported HTML Subset} page. You should prefer using Text.PlainText-
2115 or Text.StyledText instead, as they offer better performance.-
2116*/-
2117QQuickText::TextFormat QQuickText::textFormat() const-
2118{-
2119 Q_D(const QQuickText);-
2120 return d->format;
executed 38 times by 2 tests: return d->format;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
38
2121}-
2122-
2123void QQuickText::setTextFormat(TextFormat format)-
2124{-
2125 Q_D(QQuickText);-
2126 if (format == d->format)
format == d->formatDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 256 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
4-256
2127 return;
executed 4 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquicktext
4
2128 d->format = format;-
2129 bool wasRich = d->richText;-
2130 d->richText = format == RichText;-
2131 d->styledText = format == StyledText || (format == AutoText && Qt::mightBeRichText(d->text));
format == StyledTextDescription
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 198 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
format == AutoTextDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 194 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
Qt::mightBeRichText(d->text)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-198
2132-
2133 if (isComponentComplete()) {
isComponentComplete()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 238 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
18-238
2134 if (!wasRich && d->richText) {
!wasRichDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
d->richTextDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
2-16
2135 d->ensureDoc();-
2136 d->extra->doc->setText(d->text);-
2137 d->rightToLeftText = d->extra->doc->toPlainText().isRightToLeft();-
2138 } else {
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
2139 d->clearFormats();-
2140 d->rightToLeftText = d->text.isRightToLeft();-
2141 d->textHasChanged = true;-
2142 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquicktext
16
2143 d->determineHorizontalAlignment();-
2144 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicktext
18
2145 d->updateLayout();-
2146 setAcceptHoverEvents(d->richText || d->styledText);-
2147 setAcceptedMouseButtons(d->richText || d->styledText ? Qt::LeftButton : Qt::NoButton);-
2148-
2149 emit textFormatChanged(d->format);-
2150}
executed 256 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickmousearea
  • tst_qquicktext
256
2151-
2152/*!-
2153 \qmlproperty enumeration QtQuick::Text::elide-
2154-
2155 Set this property to elide parts of the text fit to the Text item's width.-
2156 The text will only elide if an explicit width has been set.-
2157-
2158 This property cannot be used with rich text.-
2159-
2160 Eliding can be:-
2161 \list-
2162 \li Text.ElideNone - the default-
2163 \li Text.ElideLeft-
2164 \li Text.ElideMiddle-
2165 \li Text.ElideRight-
2166 \endlist-
2167-
2168 If this property is set to Text.ElideRight, it can be used with \l {wrapMode}{wrapped}-
2169 text. The text will only elide if \c maximumLineCount, or \c height has been set.-
2170 If both \c maximumLineCount and \c height are set, \c maximumLineCount will-
2171 apply unless the lines do not fit in the height allowed.-
2172-
2173 If the text is a multi-length string, and the mode is not \c Text.ElideNone,-
2174 the first string that fits will be used, otherwise the last will be elided.-
2175-
2176 Multi-length strings are ordered from longest to shortest, separated by the-
2177 Unicode "String Terminator" character \c U009C (write this in QML with \c{"\u009C"} or \c{"\x9C"}).-
2178*/-
2179QQuickText::TextElideMode QQuickText::elideMode() const-
2180{-
2181 Q_D(const QQuickText);-
2182 return d->elideMode;
executed 56 times by 2 tests: return d->elideMode;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
56
2183}-
2184-
2185void QQuickText::setElideMode(QQuickText::TextElideMode mode)-
2186{-
2187 Q_D(QQuickText);-
2188 if (mode == d->elideMode)
mode == d->elideModeDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 320 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
42-320
2189 return;
executed 42 times by 1 test: return;
Executed by:
  • tst_qquicktext
42
2190-
2191 d->elideMode = mode;-
2192 d->updateLayout();-
2193-
2194 emit elideModeChanged(mode);-
2195}
executed 320 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
320
2196-
2197/*!-
2198 \qmlproperty url QtQuick::Text::baseUrl-
2199-
2200 This property specifies a base URL which is used to resolve relative URLs-
2201 within the text.-
2202-
2203 Urls are resolved to be within the same directory as the target of the base-
2204 URL meaning any portion of the path after the last '/' will be ignored.-
2205-
2206 \table-
2207 \header \li Base URL \li Relative URL \li Resolved URL-
2208 \row \li http://qt-project.org/ \li images/logo.png \li http://qt-project.org/images/logo.png-
2209 \row \li http://qt-project.org/index.html \li images/logo.png \li http://qt-project.org/images/logo.png-
2210 \row \li http://qt-project.org/content \li images/logo.png \li http://qt-project.org/content/images/logo.png-
2211 \row \li http://qt-project.org/content/ \li images/logo.png \li http://qt-project.org/content/images/logo.png-
2212 \row \li http://qt-project.org/content/index.html \li images/logo.png \li http://qt-project.org/content/images/logo.png-
2213 \row \li http://qt-project.org/content/index.html \li ../images/logo.png \li http://qt-project.org/images/logo.png-
2214 \row \li http://qt-project.org/content/index.html \li /images/logo.png \li http://qt-project.org/images/logo.png-
2215 \endtable-
2216-
2217 The default value is the url of the QML file instantiating the Text item.-
2218*/-
2219-
2220QUrl QQuickText::baseUrl() const-
2221{-
2222 Q_D(const QQuickText);-
2223 if (!d->extra.isAllocated() || d->extra->baseUrl.isEmpty()) {
!d->extra.isAllocated()Description
TRUEevaluated 1970 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
d->extra->baseUrl.isEmpty()Description
TRUEevaluated 216 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquicktext
38-1970
2224 if (QQmlContext *context = qmlContext(this))
QQmlContext *c...lContext(this)Description
TRUEevaluated 2186 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
0-2186
2225 return context->baseUrl();
executed 2186 times by 7 tests: return context->baseUrl();
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktext
  • tst_qquicktextedit
2186
2226 else-
2227 return QUrl();
never executed: return QUrl();
0
2228 } else {-
2229 return d->extra->baseUrl;
executed 38 times by 1 test: return d->extra->baseUrl;
Executed by:
  • tst_qquicktext
38
2230 }-
2231}-
2232-
2233void QQuickText::setBaseUrl(const QUrl &url)-
2234{-
2235 Q_D(QQuickText);-
2236 if (baseUrl() != url) {
baseUrl() != urlDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-20
2237 d->extra.value().baseUrl = url;-
2238-
2239 if (d->richText) {
d->richTextDescription
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicktext
0-20
2240 d->ensureDoc();-
2241 d->extra->doc->setBaseUrl(url);-
2242 }
never executed: end of block
0
2243 if (d->styledText) {
d->styledTextDescription
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquicktext
0-20
2244 d->textHasChanged = true;-
2245 if (d->extra.isAllocated()) {
d->extra.isAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
0
2246 qDeleteAll(d->extra->imgTags);-
2247 d->extra->imgTags.clear();-
2248 }
never executed: end of block
0
2249 d->updateLayout();-
2250 }
never executed: end of block
0
2251 emit baseUrlChanged();-
2252 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquicktext
20
2253}
executed 22 times by 1 test: end of block
Executed by:
  • tst_qquicktext
22
2254-
2255void QQuickText::resetBaseUrl()-
2256{-
2257 if (QQmlContext *context = qmlContext(this))
QQmlContext *c...lContext(this)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-2
2258 setBaseUrl(context->baseUrl());
executed 2 times by 1 test: setBaseUrl(context->baseUrl());
Executed by:
  • tst_qquicktext
2
2259 else-
2260 setBaseUrl(QUrl());
never executed: setBaseUrl(QUrl());
0
2261}-
2262-
2263/*! \internal */-
2264QRectF QQuickText::boundingRect() const-
2265{-
2266 Q_D(const QQuickText);-
2267-
2268 QRectF rect = d->layedOutTextRect;-
2269 rect.moveLeft(QQuickTextUtil::alignedX(rect.width(), width(), effectiveHAlign()));-
2270 rect.moveTop(QQuickTextUtil::alignedY(rect.height() + d->lineHeightOffset(), height(), d->vAlign));-
2271-
2272 if (d->style != Normal)
d->style != NormalDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 222 times by 1 test
Evaluated by:
  • tst_qquicktext
2-222
2273 rect.adjust(-1, 0, 1, 2);
executed 2 times by 1 test: rect.adjust(-1, 0, 1, 2);
Executed by:
  • tst_qquicktext
2
2274 // Could include font max left/right bearings to either side of rectangle.-
2275-
2276 return rect;
executed 224 times by 1 test: return rect;
Executed by:
  • tst_qquicktext
224
2277}-
2278-
2279QRectF QQuickText::clipRect() const-
2280{-
2281 Q_D(const QQuickText);-
2282-
2283 QRectF rect = QQuickImplicitSizeItem::clipRect();-
2284 if (d->style != Normal)
d->style != NormalDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 38 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
8-38
2285 rect.adjust(-1, 0, 1, 2);
executed 8 times by 1 test: rect.adjust(-1, 0, 1, 2);
Executed by:
  • tst_qquicktext
8
2286 return rect;
executed 46 times by 2 tests: return rect;
Executed by:
  • tst_examples
  • tst_qquicktext
46
2287}-
2288-
2289/*! \internal */-
2290void QQuickText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)-
2291{-
2292 Q_D(QQuickText);-
2293 if (d->text.isEmpty()) {
d->text.isEmpty()Description
TRUEevaluated 215255 times by 20 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_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 386322 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
  • ...
215255-386322
2294 QQuickItem::geometryChanged(newGeometry, oldGeometry);-
2295 return;
executed 215255 times by 20 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_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
215255
2296 }-
2297-
2298 bool widthChanged = newGeometry.width() != oldGeometry.width();-
2299 bool heightChanged = newGeometry.height() != oldGeometry.height();-
2300 bool wrapped = d->wrapMode != QQuickText::NoWrap;-
2301 bool elide = d->elideMode != QQuickText::ElideNone;-
2302 bool scaleFont = d->fontSizeMode() != QQuickText::FixedSize && (widthValid() || heightValid());
d->fontSizeMod...ext::FixedSizeDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 386310 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
  • ...
widthValid()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
heightValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-386310
2303 bool verticalScale = (d->fontSizeMode() & QQuickText::VerticalFit) && heightValid();
(d->fontSizeMo...::VerticalFit)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 386318 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
  • ...
heightValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-386318
2304-
2305 bool widthMaximum = newGeometry.width() >= oldGeometry.width() && !d->widthExceeded;
newGeometry.wi...ometry.width()Description
TRUEevaluated 354949 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 31373 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
!d->widthExceededDescription
TRUEevaluated 354337 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 612 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
612-354949
2306 bool heightMaximum = newGeometry.height() >= oldGeometry.height() && !d->heightExceeded;
newGeometry.he...metry.height()Description
TRUEevaluated 386136 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 186 times by 4 tests
Evaluated by:
  • tst_qqmlvaluetypes
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktext
!d->heightExceededDescription
TRUEevaluated 386060 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 76 times by 1 test
Evaluated by:
  • tst_qquicktext
76-386136
2307-
2308 bool verticalPositionChanged = heightChanged && d->vAlign != AlignTop;
heightChangedDescription
TRUEevaluated 218262 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 168060 times by 28 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlenginedebugservice
  • 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
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • ...
d->vAlign != AlignTopDescription
TRUEevaluated 268 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
FALSEevaluated 217994 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_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • ...
268-218262
2309-
2310 if ((!widthChanged && !heightChanged) || d->internalWidthUpdate)
!widthChangedDescription
TRUEevaluated 35169 times by 25 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlenginedebugservice
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 351153 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
  • ...
!heightChangedDescription
TRUEevaluated 34371 times by 25 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlenginedebugservice
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 798 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktext
  • tst_scenegraph
d->internalWidthUpdateDescription
TRUEevaluated 350221 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 1730 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
798-351153
2311 goto geomChangeDone;
executed 384592 times by 32 tests: goto geomChangeDone;
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_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
384592
2312-
2313 if ((effectiveHAlign() != QQuickText::AlignLeft && widthChanged) || verticalPositionChanged) {
effectiveHAlig...ext::AlignLeftDescription
TRUEevaluated 320 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 1410 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_scenegraph
widthChangedDescription
TRUEevaluated 286 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
verticalPositionChangedDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 1426 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_scenegraph
18-1426
2314 // If the width has changed and we're not left aligned do an update so the text is-
2315 // repositioned even if a full layout isn't required. And the same for vertical.-
2316 d->updateType = QQuickTextPrivate::UpdatePaintNode;-
2317 update();-
2318 }
executed 304 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
304
2319-
2320 if (!wrapped && !elide && !scaleFont && !verticalPositionChanged)
!wrappedDescription
TRUEevaluated 1142 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 588 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
!elideDescription
TRUEevaluated 1084 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
!scaleFontDescription
TRUEevaluated 1080 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
!verticalPositionChangedDescription
TRUEevaluated 838 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 242 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
4-1142
2321 goto geomChangeDone; // left aligned unwrapped text without eliding never needs relayout
executed 838 times by 8 tests: goto geomChangeDone;
Executed by:
  • tst_examples
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquicktext
  • tst_qquicktextedit
838
2322-
2323 if (elide // eliding and dimensions were and remain invalid;
elideDescription
TRUEevaluated 108 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 784 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
  • tst_scenegraph
108-784
2324 && ((widthValid() && oldGeometry.width() <= 0 && newGeometry.width() <= 0)
widthValid()Description
TRUEevaluated 92 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
oldGeometry.width() <= 0Description
TRUEevaluated 26 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquicktext
newGeometry.width() <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
2-92
2325 || (heightValid() && oldGeometry.height() <= 0 && newGeometry.height() <= 0))) {
heightValid()Description
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
oldGeometry.height() <= 0Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquicktext
newGeometry.height() <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
2-82
2326 goto geomChangeDone;
executed 4 times by 1 test: goto geomChangeDone;
Executed by:
  • tst_qquicktext
4
2327 }-
2328-
2329 if (widthMaximum && heightMaximum && !d->isLineLaidOutConnected() && !verticalPositionChanged) // Size is sufficient and growing.
widthMaximumDescription
TRUEevaluated 628 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 260 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
heightMaximumDescription
TRUEevaluated 626 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
!d->isLineLaidOutConnected()Description
TRUEevaluated 624 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
!verticalPositionChangedDescription
TRUEevaluated 376 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
FALSEevaluated 248 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquicktext
2-628
2330 goto geomChangeDone;
executed 376 times by 3 tests: goto geomChangeDone;
Executed by:
  • tst_examples
  • tst_qquicktext
  • tst_scenegraph
376
2331-
2332 if (!(widthChanged || widthMaximum) && !d->isLineLaidOutConnected()) { // only height has changed
widthChangedDescription
TRUEevaluated 372 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
FALSEevaluated 140 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
widthMaximumDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 128 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
!d->isLineLaidOutConnected()Description
TRUEevaluated 126 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
2-372
2333 if (newGeometry.height() > oldGeometry.height()) {
newGeometry.he...metry.height()Description
TRUEevaluated 96 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
30-96
2334 if (!d->heightExceeded && !qFuzzyIsNull(oldGeometry.height())) {
!d->heightExceededDescription
TRUEevaluated 74 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
!qFuzzyIsNull(...etry.height())Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 64 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
10-74
2335 // Height is adequate and growing, and it wasn't 0 previously.-
2336 goto geomChangeDone;
executed 10 times by 1 test: goto geomChangeDone;
Executed by:
  • tst_qquicktext
10
2337 }-
2338 if (d->lineCount == d->maximumLineCount()) // Reached maximum line and height is growing.
d->lineCount =...mumLineCount()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 70 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
16-70
2339 goto geomChangeDone;
executed 16 times by 1 test: goto geomChangeDone;
Executed by:
  • tst_qquicktext
16
2340 } else if (newGeometry.height() < oldGeometry.height()) {
executed 70 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
newGeometry.he...metry.height()Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-70
2341 if (d->lineCount < 2 && !verticalScale && newGeometry.height() > 0) // A single line won't be truncated until the text is 0 height.
d->lineCount < 2Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
!verticalScaleDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
newGeometry.height() > 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-22
2342 goto geomChangeDone;
executed 8 times by 1 test: goto geomChangeDone;
Executed by:
  • tst_qquicktext
8
2343-
2344 if (!verticalScale // no scaling, no eliding, and either unwrapped, or no maximum line count.
!verticalScaleDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-22
2345 && d->elideMode != QQuickText::ElideRight
d->elideMode !...xt::ElideRightDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
8-14
2346 && !(d->maximumLineCountValid && d->widthExceeded)) {
d->maximumLineCountValidDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
d->widthExceededDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-4
2347 goto geomChangeDone;
executed 4 times by 1 test: goto geomChangeDone;
Executed by:
  • tst_qquicktext
4
2348 }-
2349 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicktext
18
2350 } else if (!heightChanged && widthMaximum) {
executed 88 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
!heightChangedDescription
TRUEevaluated 128 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 258 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
widthMaximumDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 126 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
2-258
2351 goto geomChangeDone;
executed 2 times by 1 test: goto geomChangeDone;
Executed by:
  • tst_qquicktext
2
2352 }-
2353-
2354 if (d->updateOnComponentComplete || d->textHasChanged) {
d->updateOnComponentCompleteDescription
TRUEevaluated 272 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquicktext
FALSEevaluated 200 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
d->textHasChangedDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 114 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
86-272
2355 // We need to re-elide-
2356 d->updateLayout();-
2357 } else {
executed 358 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquicktext
358
2358 // We just need to re-layout-
2359 d->updateSize();-
2360 }
executed 114 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicktext
114
2361-
2362geomChangeDone:
code before this statement executed 472 times by 4 tests: geomChangeDone:
Executed by:
  • tst_examples
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquicktext
472
2363 QQuickItem::geometryChanged(newGeometry, oldGeometry);-
2364}
executed 386322 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
  • ...
386322
2365-
2366void QQuickText::triggerPreprocess()-
2367{-
2368 Q_D(QQuickText);-
2369 if (d->updateType == QQuickTextPrivate::UpdateNone)
d->updateType ...te::UpdateNoneDescription
TRUEnever evaluated
FALSEnever evaluated
0
2370 d->updateType = QQuickTextPrivate::UpdatePreprocess;
never executed: d->updateType = QQuickTextPrivate::UpdatePreprocess;
0
2371 update();-
2372}
never executed: end of block
0
2373-
2374QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)-
2375{-
2376 Q_UNUSED(data);-
2377 Q_D(QQuickText);-
2378-
2379 if (d->text.isEmpty()) {
d->text.isEmpty()Description
TRUEevaluated 38737 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktextedit
FALSEevaluated 248380 times by 21 tests
Evaluated 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
38737-248380
2380 delete oldNode;-
2381 return nullptr;
executed 38737 times by 5 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktextedit
38737
2382 }-
2383-
2384 if (d->updateType != QQuickTextPrivate::UpdatePaintNode && oldNode != nullptr) {
d->updateType ...pdatePaintNodeDescription
TRUEnever evaluated
FALSEevaluated 248380 times by 21 tests
Evaluated 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
oldNode != nullptrDescription
TRUEnever evaluated
FALSEnever evaluated
0-248380
2385 // Update done in preprocess() in the nodes-
2386 d->updateType = QQuickTextPrivate::UpdateNone;-
2387 return oldNode;
never executed: return oldNode;
0
2388 }-
2389-
2390 d->updateType = QQuickTextPrivate::UpdateNone;-
2391-
2392 const qreal dy = QQuickTextUtil::alignedY(d->layedOutTextRect.height() + d->lineHeightOffset(), d->availableHeight(), d->vAlign) + topPadding();-
2393-
2394 QQuickTextNode *node = nullptr;-
2395 if (!oldNode)
!oldNodeDescription
TRUEevaluated 173985 times by 21 tests
Evaluated 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
FALSEevaluated 74395 times by 9 tests
Evaluated by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
74395-173985
2396 node = new QQuickTextNode(this);
executed 173985 times by 21 tests: node = new QQuickTextNode(this);
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
173985
2397 else-
2398 node = static_cast<QQuickTextNode *>(oldNode);
executed 74395 times by 9 tests: node = static_cast<QQuickTextNode *>(oldNode);
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
74395
2399-
2400 node->setUseNativeRenderer(d->renderType == NativeRendering);-
2401 node->deleteContent();-
2402 node->setMatrix(QMatrix4x4());-
2403-
2404 const QColor color = QColor::fromRgba(d->color);-
2405 const QColor styleColor = QColor::fromRgba(d->styleColor);-
2406 const QColor linkColor = QColor::fromRgba(d->linkColor);-
2407-
2408 if (d->richText) {
d->richTextDescription
TRUEevaluated 84 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 248296 times by 21 tests
Evaluated 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
84-248296
2409 const qreal dx = QQuickTextUtil::alignedX(d->layedOutTextRect.width(), d->availableWidth(), effectiveHAlign()) + leftPadding();-
2410 d->ensureDoc();-
2411 node->addTextDocument(QPointF(dx, dy), d->extra->doc, color, d->style, styleColor, linkColor);-
2412 } else if (d->layedOutTextRect.width() > 0) {
executed 84 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
d->layedOutTex...ct.width() > 0Description
TRUEevaluated 248296 times by 21 tests
Evaluated 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
FALSEnever evaluated
0-248296
2413 const qreal dx = QQuickTextUtil::alignedX(d->lineWidth, d->availableWidth(), effectiveHAlign()) + leftPadding();-
2414 int unelidedLineCount = d->lineCount;-
2415 if (d->elideLayout)
d->elideLayoutDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 248272 times by 21 tests
Evaluated 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
24-248272
2416 unelidedLineCount -= 1;
executed 24 times by 1 test: unelidedLineCount -= 1;
Executed by:
  • tst_qquicktext
24
2417 if (unelidedLineCount > 0) {
unelidedLineCount > 0Description
TRUEevaluated 248272 times by 21 tests
Evaluated 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
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
24-248272
2418 node->addTextLayout(-
2419 QPointF(dx, dy),-
2420 &d->layout,-
2421 color, d->style, styleColor, linkColor,-
2422 QColor(), QColor(), -1, -1,-
2423 0, unelidedLineCount);-
2424 }
executed 248272 times by 21 tests: end of block
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
248272
2425 if (d->elideLayout)
d->elideLayoutDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 248272 times by 21 tests
Evaluated 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
24-248272
2426 node->addTextLayout(QPointF(dx, dy), d->elideLayout, color, d->style, styleColor, linkColor);
executed 24 times by 1 test: node->addTextLayout(QPointF(dx, dy), d->elideLayout, color, d->style, styleColor, linkColor);
Executed by:
  • tst_qquicktext
24
2427-
2428 if (d->extra.isAllocated()) {
d->extra.isAllocated()Description
TRUEevaluated 308 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 247988 times by 21 tests
Evaluated 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
308-247988
2429 for (QQuickStyledTextImgTag *img : qAsConst(d->extra->visibleImgTags)) {-
2430 QQuickPixmap *pix = img->pix;-
2431 if (pix && pix->isReady())
pixDescription
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
pix->isReady()Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
0-30
2432 node->addImage(QRectF(img->pos.x() + dx, img->pos.y() + dy, pix->width(), pix->height()), pix->image());
executed 26 times by 1 test: node->addImage(QRectF(img->pos.x() + dx, img->pos.y() + dy, pix->width(), pix->height()), pix->image());
Executed by:
  • tst_examples
26
2433 }
executed 30 times by 1 test: end of block
Executed by:
  • tst_examples
30
2434 }
executed 308 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
308
2435 }
executed 248296 times by 21 tests: end of block
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
248296
2436-
2437 // The font caches have now been initialized on the render thread, so they have to be-
2438 // invalidated before we can use them from the main thread again.-
2439 invalidateFontCaches();-
2440-
2441 return node;
executed 248380 times by 21 tests: return node;
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
248380
2442}-
2443-
2444void QQuickText::updatePolish()-
2445{-
2446 Q_D(QQuickText);-
2447 // If the fonts used for rendering are different from the ones used in the GUI thread,-
2448 // it means we will get warnings and corrupted text. If this case is detected, we need-
2449 // to update the text layout before creating the scenegraph nodes.-
2450 if (!d->assignedFont.isEmpty() && QFontInfo(d->font).family() != d->assignedFont)
!d->assignedFont.isEmpty()Description
TRUEevaluated 253536 times by 21 tests
Evaluated 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
FALSEevaluated 39087 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktext
  • tst_qquicktextedit
QFontInfo(d->f...->assignedFontDescription
TRUEnever evaluated
FALSEevaluated 253536 times by 21 tests
Evaluated 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
0-253536
2451 d->polishSize = true;
never executed: d->polishSize = true;
0
2452-
2453 if (d->polishSize) {
d->polishSizeDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 292535 times by 21 tests
Evaluated 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
88-292535
2454 d->updateSize();-
2455 d->polishSize = false;-
2456 }
executed 88 times by 1 test: end of block
Executed by:
  • tst_qquicktext
88
2457 invalidateFontCaches();-
2458}
executed 292623 times by 21 tests: end of block
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
292623
2459-
2460/*!-
2461 \qmlproperty real QtQuick::Text::contentWidth-
2462-
2463 Returns the width of the text, including width past the width-
2464 which is covered due to insufficient wrapping if WrapMode is set.-
2465*/-
2466qreal QQuickText::contentWidth() const-
2467{-
2468 Q_D(const QQuickText);-
2469 return d->layedOutTextRect.width();
executed 434 times by 2 tests: return d->layedOutTextRect.width();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
434
2470}-
2471-
2472/*!-
2473 \qmlproperty real QtQuick::Text::contentHeight-
2474-
2475 Returns the height of the text, including height past the height-
2476 which is covered due to there being more text than fits in the set height.-
2477*/-
2478qreal QQuickText::contentHeight() const-
2479{-
2480 Q_D(const QQuickText);-
2481 return d->layedOutTextRect.height();
executed 410 times by 2 tests: return d->layedOutTextRect.height();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
410
2482}-
2483-
2484/*!-
2485 \qmlproperty real QtQuick::Text::lineHeight-
2486-
2487 Sets the line height for the text.-
2488 The value can be in pixels or a multiplier depending on lineHeightMode.-
2489-
2490 The default value is a multiplier of 1.0.-
2491 The line height must be a positive value.-
2492*/-
2493qreal QQuickText::lineHeight() const-
2494{-
2495 Q_D(const QQuickText);-
2496 return d->lineHeight();
executed 18 times by 2 tests: return d->lineHeight();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
18
2497}-
2498-
2499void QQuickText::setLineHeight(qreal lineHeight)-
2500{-
2501 Q_D(QQuickText);-
2502-
2503 if ((d->lineHeight() == lineHeight) || (lineHeight < 0.0))
(d->lineHeight...== lineHeight)Description
TRUEnever evaluated
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
(lineHeight < 0.0)Description
TRUEnever evaluated
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquicktext
0-30
2504 return;
never executed: return;
0
2505-
2506 d->extra.value().lineHeightValid = true;-
2507 d->extra.value().lineHeight = lineHeight;-
2508 d->implicitHeightValid = false;-
2509 d->updateLayout();-
2510 emit lineHeightChanged(lineHeight);-
2511}
executed 30 times by 1 test: end of block
Executed by:
  • tst_qquicktext
30
2512-
2513/*!-
2514 \qmlproperty enumeration QtQuick::Text::lineHeightMode-
2515-
2516 This property determines how the line height is specified.-
2517 The possible values are:-
2518-
2519 \list-
2520 \li Text.ProportionalHeight (default) - this sets the spacing proportional to the-
2521 line (as a multiplier). For example, set to 2 for double spacing.-
2522 \li Text.FixedHeight - this sets the line height to a fixed line height (in pixels).-
2523 \endlist-
2524*/-
2525QQuickText::LineHeightMode QQuickText::lineHeightMode() const-
2526{-
2527 Q_D(const QQuickText);-
2528 return d->lineHeightMode();
executed 18 times by 2 tests: return d->lineHeightMode();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
18
2529}-
2530-
2531void QQuickText::setLineHeightMode(LineHeightMode mode)-
2532{-
2533 Q_D(QQuickText);-
2534 if (mode == d->lineHeightMode())
mode == d->lineHeightMode()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquicktext
8-14
2535 return;
executed 8 times by 1 test: return;
Executed by:
  • tst_qquicktext
8
2536-
2537 d->implicitHeightValid = false;-
2538 d->extra.value().lineHeightValid = true;-
2539 d->extra.value().lineHeightMode = mode;-
2540 d->updateLayout();-
2541-
2542 emit lineHeightModeChanged(mode);-
2543}
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquicktext
14
2544-
2545/*!-
2546 \qmlproperty enumeration QtQuick::Text::fontSizeMode-
2547-
2548 This property specifies how the font size of the displayed text is determined.-
2549 The possible values are:-
2550-
2551 \list-
2552 \li Text.FixedSize (default) - The size specified by \l font.pixelSize-
2553 or \l font.pointSize is used.-
2554 \li Text.HorizontalFit - The largest size up to the size specified that fits-
2555 within the width of the item without wrapping is used.-
2556 \li Text.VerticalFit - The largest size up to the size specified that fits-
2557 the height of the item is used.-
2558 \li Text.Fit - The largest size up to the size specified that fits within the-
2559 width and height of the item is used.-
2560 \endlist-
2561-
2562 The font size of fitted text has a minimum bound specified by the-
2563 minimumPointSize or minimumPixelSize property and maximum bound specified-
2564 by either the \l font.pointSize or \l font.pixelSize properties.-
2565-
2566 \qml-
2567 Text { text: "Hello"; fontSizeMode: Text.Fit; minimumPixelSize: 10; font.pixelSize: 72 }-
2568 \endqml-
2569-
2570 If the text does not fit within the item bounds with the minimum font size-
2571 the text will be elided as per the \l elide property.-
2572*/-
2573-
2574QQuickText::FontSizeMode QQuickText::fontSizeMode() const-
2575{-
2576 Q_D(const QQuickText);-
2577 return d->fontSizeMode();
executed 16 times by 1 test: return d->fontSizeMode();
Executed by:
  • tst_qqmlenginedebugservice
16
2578}-
2579-
2580void QQuickText::setFontSizeMode(FontSizeMode mode)-
2581{-
2582 Q_D(QQuickText);-
2583 if (d->fontSizeMode() == mode)
d->fontSizeMode() == modeDescription
TRUEnever evaluated
FALSEevaluated 94 times by 1 test
Evaluated by:
  • tst_qquicktext
0-94
2584 return;
never executed: return;
0
2585-
2586 d->polishSize = true;-
2587 polish();-
2588-
2589 d->extra.value().fontSizeMode = mode;-
2590 emit fontSizeModeChanged();-
2591}
executed 94 times by 1 test: end of block
Executed by:
  • tst_qquicktext
94
2592-
2593/*!-
2594 \qmlproperty int QtQuick::Text::minimumPixelSize-
2595-
2596 This property specifies the minimum font pixel size of text scaled by the-
2597 fontSizeMode property.-
2598-
2599 If the fontSizeMode is Text.FixedSize or the \l font.pixelSize is -1 this-
2600 property is ignored.-
2601*/-
2602-
2603int QQuickText::minimumPixelSize() const-
2604{-
2605 Q_D(const QQuickText);-
2606 return d->minimumPixelSize();
executed 16 times by 1 test: return d->minimumPixelSize();
Executed by:
  • tst_qqmlenginedebugservice
16
2607}-
2608-
2609void QQuickText::setMinimumPixelSize(int size)-
2610{-
2611 Q_D(QQuickText);-
2612 if (d->minimumPixelSize() == size)
d->minimumPixelSize() == sizeDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
0-8
2613 return;
never executed: return;
0
2614-
2615 if (d->fontSizeMode() != FixedSize && (widthValid() || heightValid())) {
d->fontSizeMode() != FixedSizeDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
widthValid()Description
TRUEnever evaluated
FALSEnever evaluated
heightValid()Description
TRUEnever evaluated
FALSEnever evaluated
0-8
2616 d->polishSize = true;-
2617 polish();-
2618 }
never executed: end of block
0
2619 d->extra.value().minimumPixelSize = size;-
2620 emit minimumPixelSizeChanged();-
2621}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicktext
8
2622-
2623/*!-
2624 \qmlproperty int QtQuick::Text::minimumPointSize-
2625-
2626 This property specifies the minimum font point \l size of text scaled by-
2627 the fontSizeMode property.-
2628-
2629 If the fontSizeMode is Text.FixedSize or the \l font.pointSize is -1 this-
2630 property is ignored.-
2631*/-
2632-
2633int QQuickText::minimumPointSize() const-
2634{-
2635 Q_D(const QQuickText);-
2636 return d->minimumPointSize();
executed 16 times by 1 test: return d->minimumPointSize();
Executed by:
  • tst_qqmlenginedebugservice
16
2637}-
2638-
2639void QQuickText::setMinimumPointSize(int size)-
2640{-
2641 Q_D(QQuickText);-
2642 if (d->minimumPointSize() == size)
d->minimumPointSize() == sizeDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
0-12
2643 return;
never executed: return;
0
2644-
2645 if (d->fontSizeMode() != FixedSize && (widthValid() || heightValid())) {
d->fontSizeMode() != FixedSizeDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
widthValid()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
heightValid()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
0-8
2646 d->polishSize = true;-
2647 polish();-
2648 }
never executed: end of block
0
2649 d->extra.value().minimumPointSize = size;-
2650 emit minimumPointSizeChanged();-
2651}
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquicktext
12
2652-
2653/*!-
2654 Returns the number of resources (images) that are being loaded asynchronously.-
2655*/-
2656int QQuickText::resourcesLoading() const-
2657{-
2658 Q_D(const QQuickText);-
2659 if (d->richText && d->extra.isAllocated() && d->extra->doc)
d->richTextDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
d->extra.isAllocated()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
d->extra->docDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-24
2660 return d->extra->doc->resourcesLoading();
executed 24 times by 1 test: return d->extra->doc->resourcesLoading();
Executed by:
  • tst_qquicktext
24
2661 return 0;
never executed: return 0;
0
2662}-
2663-
2664/*! \internal */-
2665void QQuickText::componentComplete()-
2666{-
2667 Q_D(QQuickText);-
2668 if (d->updateOnComponentComplete) {
d->updateOnComponentCompleteDescription
TRUEevaluated 264678 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
  • ...
FALSEnever evaluated
0-264678
2669 if (d->richText) {
d->richTextDescription
TRUEevaluated 148 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 264530 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
  • ...
148-264530
2670 d->ensureDoc();-
2671 d->extra->doc->setText(d->text);-
2672 d->rightToLeftText = d->extra->doc->toPlainText().isRightToLeft();-
2673 } else {
executed 148 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
148
2674 d->rightToLeftText = d->text.isRightToLeft();-
2675 }
executed 264530 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
  • ...
264530
2676 d->determineHorizontalAlignment();-
2677 }
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
2678 QQuickItem::componentComplete();-
2679 if (d->updateOnComponentComplete)
d->updateOnComponentCompleteDescription
TRUEevaluated 264440 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 238 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
238-264440
2680 d->updateLayout();
executed 264440 times by 35 tests: d->updateLayout();
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
  • ...
264440
2681}
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
2682-
2683QString QQuickTextPrivate::anchorAt(const QTextLayout *layout, const QPointF &mousePos)-
2684{-
2685 for (int i = 0; i < layout->lineCount(); ++i) {
i < layout->lineCount()Description
TRUEevaluated 300 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 62 times by 1 test
Evaluated by:
  • tst_qquicktext
62-300
2686 QTextLine line = layout->lineAt(i);-
2687 if (line.naturalTextRect().contains(mousePos)) {
line.naturalTe...ains(mousePos)Description
TRUEevaluated 202 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquicktext
98-202
2688 int charPos = line.xToCursor(mousePos.x(), QTextLine::CursorOnCharacter);-
2689 const auto formats = layout->formats();-
2690 for (const QTextLayout::FormatRange &formatRange : formats) {-
2691 if (formatRange.format.isAnchor()
formatRange.format.isAnchor()Description
TRUEevaluated 278 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-278
2692 && charPos >= formatRange.start
charPos >= formatRange.startDescription
TRUEevaluated 256 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquicktext
22-256
2693 && charPos < formatRange.start + formatRange.length) {
charPos < form...atRange.lengthDescription
TRUEevaluated 180 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_qquicktext
76-180
2694 return formatRange.format.anchorHref();
executed 180 times by 1 test: return formatRange.format.anchorHref();
Executed by:
  • tst_qquicktext
180
2695 }-
2696 }
executed 98 times by 1 test: end of block
Executed by:
  • tst_qquicktext
98
2697 break;
executed 22 times by 1 test: break;
Executed by:
  • tst_qquicktext
22
2698 }-
2699 }
executed 98 times by 1 test: end of block
Executed by:
  • tst_qquicktext
98
2700 return QString();
executed 84 times by 1 test: return QString();
Executed by:
  • tst_qquicktext
84
2701}-
2702-
2703QString QQuickTextPrivate::anchorAt(const QPointF &mousePos) const-
2704{-
2705 Q_Q(const QQuickText);-
2706 QPointF translatedMousePos = mousePos;-
2707 translatedMousePos.rx() -= q->leftPadding();-
2708 translatedMousePos.ry() -= q->topPadding() + QQuickTextUtil::alignedY(layedOutTextRect.height() + lineHeightOffset(), availableHeight(), vAlign);-
2709 if (styledText) {
styledTextDescription
TRUEevaluated 240 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 162 times by 1 test
Evaluated by:
  • tst_qquicktext
162-240
2710 QString link = anchorAt(&layout, translatedMousePos);-
2711 if (link.isEmpty() && elideLayout)
link.isEmpty()Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 160 times by 1 test
Evaluated by:
  • tst_qquicktext
elideLayoutDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquicktext
24-160
2712 link = anchorAt(elideLayout, translatedMousePos);
executed 24 times by 1 test: link = anchorAt(elideLayout, translatedMousePos);
Executed by:
  • tst_qquicktext
24
2713 return link;
executed 240 times by 1 test: return link;
Executed by:
  • tst_qquicktext
240
2714 } else if (richText && extra.isAllocated() && extra->doc) {
richTextDescription
TRUEevaluated 162 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
extra.isAllocated()Description
TRUEevaluated 162 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
extra->docDescription
TRUEevaluated 162 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-162
2715 translatedMousePos.rx() -= QQuickTextUtil::alignedX(layedOutTextRect.width(), availableWidth(), q->effectiveHAlign());-
2716 return extra->doc->documentLayout()->anchorAt(translatedMousePos);
executed 162 times by 1 test: return extra->doc->documentLayout()->anchorAt(translatedMousePos);
Executed by:
  • tst_qquicktext
162
2717 }-
2718 return QString();
never executed: return QString();
0
2719}-
2720-
2721bool QQuickTextPrivate::isLinkActivatedConnected()-
2722{-
2723 Q_Q(QQuickText);-
2724 IS_SIGNAL_CONNECTED(q, QQuickText, linkActivated, (const QString &));
executed 360 times by 6 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktaphandler
  • tst_qquicktext
360
2725}-
2726-
2727/*! \internal */-
2728void QQuickText::mousePressEvent(QMouseEvent *event)-
2729{-
2730 Q_D(QQuickText);-
2731-
2732 QString link;-
2733 if (d->isLinkActivatedConnected())
d->isLinkActivatedConnected()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 230 times by 4 tests
Evaluated by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktaphandler
64-230
2734 link = d->anchorAt(event->localPos());
executed 64 times by 1 test: link = d->anchorAt(event->localPos());
Executed by:
  • tst_qquicktext
64
2735-
2736 if (link.isEmpty()) {
link.isEmpty()Description
TRUEevaluated 236 times by 5 tests
Evaluated by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquicktext
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquicktext
58-236
2737 event->setAccepted(false);-
2738 } else {
executed 236 times by 5 tests: end of block
Executed by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquicktext
236
2739 d->extra.value().activeLink = link;-
2740 }
executed 58 times by 1 test: end of block
Executed by:
  • tst_qquicktext
58
2741-
2742 // ### may malfunction if two of the same links are clicked & dragged onto each other)-
2743-
2744 if (!event->isAccepted())
!event->isAccepted()Description
TRUEevaluated 236 times by 5 tests
Evaluated by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquicktext
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquicktext
58-236
2745 QQuickItem::mousePressEvent(event);
executed 236 times by 5 tests: QQuickItem::mousePressEvent(event);
Executed by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquicktext
236
2746}
executed 294 times by 5 tests: end of block
Executed by:
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquicktext
294
2747-
2748-
2749/*! \internal */-
2750void QQuickText::mouseReleaseEvent(QMouseEvent *event)-
2751{-
2752 Q_D(QQuickText);-
2753-
2754 // ### confirm the link, and send a signal out-
2755-
2756 QString link;-
2757 if (d->isLinkActivatedConnected())
d->isLinkActivatedConnected()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpathview
2-64
2758 link = d->anchorAt(event->localPos());
executed 64 times by 1 test: link = d->anchorAt(event->localPos());
Executed by:
  • tst_qquicktext
64
2759-
2760 if (!link.isEmpty() && d->extra.isAllocated() && d->extra->activeLink == link)
!link.isEmpty()Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickpathview
  • tst_qquicktext
d->extra.isAllocated()Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
d->extra->activeLink == linkDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquicktext
0-58
2761 emit linkActivated(d->extra->activeLink);
executed 48 times by 1 test: linkActivated(d->extra->activeLink);
Executed by:
  • tst_qquicktext
48
2762 else-
2763 event->setAccepted(false);
executed 18 times by 2 tests: event->setAccepted(false);
Executed by:
  • tst_qquickpathview
  • tst_qquicktext
18
2764-
2765 if (!event->isAccepted())
!event->isAccepted()Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquickpathview
  • tst_qquicktext
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qquicktext
18-48
2766 QQuickItem::mouseReleaseEvent(event);
executed 18 times by 2 tests: QQuickItem::mouseReleaseEvent(event);
Executed by:
  • tst_qquickpathview
  • tst_qquicktext
18
2767}
executed 66 times by 2 tests: end of block
Executed by:
  • tst_qquickpathview
  • tst_qquicktext
66
2768-
2769bool QQuickTextPrivate::isLinkHoveredConnected()-
2770{-
2771 Q_Q(QQuickText);-
2772 IS_SIGNAL_CONNECTED(q, QQuickText, linkHovered, (const QString &));
executed 354 times by 2 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
354
2773}-
2774-
2775/*!-
2776 \qmlsignal QtQuick::Text::linkHovered(string link)-
2777 \since 5.2-
2778-
2779 This signal is emitted when the user hovers a link embedded in the-
2780 text. The link must be in rich text or HTML format and the \a link-
2781 string provides access to the particular link.-
2782-
2783 The corresponding handler is \c onLinkHovered.-
2784-
2785 \sa hoveredLink, linkAt()-
2786*/-
2787-
2788/*!-
2789 \qmlproperty string QtQuick::Text::hoveredLink-
2790 \since 5.2-
2791-
2792 This property contains the link string when the user hovers a link-
2793 embedded in the text. The link must be in rich text or HTML format-
2794 and the \a hoveredLink string provides access to the particular link.-
2795-
2796 \sa linkHovered, linkAt()-
2797*/-
2798-
2799QString QQuickText::hoveredLink() const-
2800{-
2801 Q_D(const QQuickText);-
2802 if (const_cast<QQuickTextPrivate *>(d)->isLinkHoveredConnected()) {
const_cast<QQu...redConnected()Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
16-192
2803 if (d->extra.isAllocated())
d->extra.isAllocated()Description
TRUEevaluated 184 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
8-184
2804 return d->extra->hoveredLink;
executed 184 times by 1 test: return d->extra->hoveredLink;
Executed by:
  • tst_qquicktext
184
2805 } else {
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicktext
8
2806#if QT_CONFIG(cursor)-
2807 if (QQuickWindow *wnd = window()) {
QQuickWindow *wnd = window()Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
0-16
2808 QPointF pos = QCursor::pos(wnd->screen()) - wnd->position() - mapToScene(QPointF(0, 0));-
2809 return d->anchorAt(pos);
never executed: return d->anchorAt(pos);
0
2810 }-
2811#endif // cursor-
2812 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
16
2813 return QString();
executed 24 times by 2 tests: return QString();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
24
2814}-
2815-
2816void QQuickTextPrivate::processHoverEvent(QHoverEvent *event)-
2817{-
2818 Q_Q(QQuickText);-
2819 qCDebug(DBG_HOVER_TRACE) << q;
never executed: QMessageLogger(__FILE__, 2819, __PRETTY_FUNCTION__, DBG_HOVER_TRACE().categoryName()).debug() << q;
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 146 times by 1 test
Evaluated by:
  • tst_qquicktext
0-146
2820 QString link;-
2821 if (isLinkHoveredConnected()) {
isLinkHoveredConnected()Description
TRUEevaluated 146 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEnever evaluated
0-146
2822 if (event->type() != QEvent::HoverLeave)
event->type() ...nt::HoverLeaveDescription
TRUEevaluated 82 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_qquicktext
64-82
2823 link = anchorAt(event->posF());
executed 82 times by 1 test: link = anchorAt(event->posF());
Executed by:
  • tst_qquicktext
82
2824-
2825 if ((!extra.isAllocated() && !link.isEmpty()) || (extra.isAllocated() && extra->hoveredLink != link)) {
!extra.isAllocated()Description
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 104 times by 1 test
Evaluated by:
  • tst_qquicktext
!link.isEmpty()Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
extra.isAllocated()Description
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktext
extra->hoveredLink != linkDescription
TRUEevaluated 92 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquicktext
6-104
2826 extra.value().hoveredLink = link;-
2827 emit q->linkHovered(extra->hoveredLink);-
2828 }
executed 128 times by 1 test: end of block
Executed by:
  • tst_qquicktext
128
2829 }
executed 146 times by 1 test: end of block
Executed by:
  • tst_qquicktext
146
2830 event->setAccepted(!link.isEmpty());-
2831}
executed 146 times by 1 test: end of block
Executed by:
  • tst_qquicktext
146
2832-
2833void QQuickText::hoverEnterEvent(QHoverEvent *event)-
2834{-
2835 Q_D(QQuickText);-
2836 d->processHoverEvent(event);-
2837}
executed 64 times by 1 test: end of block
Executed by:
  • tst_qquicktext
64
2838-
2839void QQuickText::hoverMoveEvent(QHoverEvent *event)-
2840{-
2841 Q_D(QQuickText);-
2842 d->processHoverEvent(event);-
2843}
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicktext
18
2844-
2845void QQuickText::hoverLeaveEvent(QHoverEvent *event)-
2846{-
2847 Q_D(QQuickText);-
2848 d->processHoverEvent(event);-
2849}
executed 64 times by 1 test: end of block
Executed by:
  • tst_qquicktext
64
2850-
2851/*!-
2852 \qmlproperty enumeration QtQuick::Text::renderType-
2853-
2854 Override the default rendering type for this component.-
2855-
2856 Supported render types are:-
2857 \list-
2858 \li Text.QtRendering-
2859 \li Text.NativeRendering-
2860 \endlist-
2861-
2862 Select Text.NativeRendering if you prefer text to look native on the target platform and do-
2863 not require advanced features such as transformation of the text. Using such features in-
2864 combination with the NativeRendering render type will lend poor and sometimes pixelated-
2865 results.-
2866-
2867 The default rendering type is determined by \l QQuickWindow::textRenderType().-
2868*/-
2869QQuickText::RenderType QQuickText::renderType() const-
2870{-
2871 Q_D(const QQuickText);-
2872 return d->renderType;
executed 22 times by 2 tests: return d->renderType;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
22
2873}-
2874-
2875void QQuickText::setRenderType(QQuickText::RenderType renderType)-
2876{-
2877 Q_D(QQuickText);-
2878 if (d->renderType == renderType)
d->renderType == renderTypeDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquicklayouts
  • tst_qquicktext
FALSEevaluated 76 times by 2 tests
Evaluated by:
  • tst_qquicktext
  • tst_scenegraph
4-76
2879 return;
executed 4 times by 2 tests: return;
Executed by:
  • tst_qquicklayouts
  • tst_qquicktext
4
2880-
2881 d->renderType = renderType;-
2882 emit renderTypeChanged();-
2883-
2884 if (isComponentComplete())
isComponentComplete()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_scenegraph
4-72
2885 d->updateLayout();
executed 4 times by 1 test: d->updateLayout();
Executed by:
  • tst_qquicktext
4
2886}
executed 76 times by 2 tests: end of block
Executed by:
  • tst_qquicktext
  • tst_scenegraph
76
2887-
2888/*!-
2889 \qmlmethod QtQuick::Text::doLayout()-
2890 \deprecated-
2891-
2892 Use \l forceLayout() instead.-
2893*/-
2894void QQuickText::doLayout()-
2895{-
2896 forceLayout();-
2897}
never executed: end of block
0
2898-
2899/*!-
2900 \qmlmethod QtQuick::Text::forceLayout()-
2901 \since 5.9-
2902-
2903 Triggers a re-layout of the displayed text.-
2904*/-
2905void QQuickText::forceLayout()-
2906{-
2907 Q_D(QQuickText);-
2908 d->updateSize();-
2909}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
2910-
2911/*!-
2912 \qmlmethod QtQuick::Text::linkAt(real x, real y)-
2913 \since 5.3-
2914-
2915 Returns the link string at point \a x, \a y in content coordinates,-
2916 or an empty string if no link exists at that point.-
2917-
2918 \sa hoveredLink-
2919*/-
2920QString QQuickText::linkAt(qreal x, qreal y) const-
2921{-
2922 Q_D(const QQuickText);-
2923 return d->anchorAt(QPointF(x, y));
executed 192 times by 1 test: return d->anchorAt(QPointF(x, y));
Executed by:
  • tst_qquicktext
192
2924}-
2925-
2926/*!-
2927 * \internal-
2928 *-
2929 * Invalidates font caches owned by the text objects owned by the element-
2930 * to work around the fact that text objects cannot be used from multiple threads.-
2931 */-
2932void QQuickText::invalidateFontCaches()-
2933{-
2934 Q_D(QQuickText);-
2935-
2936 if (d->richText && d->extra.isAllocated() && d->extra->doc != nullptr) {
d->richTextDescription
TRUEevaluated 174 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 540829 times by 21 tests
Evaluated 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
d->extra.isAllocated()Description
TRUEevaluated 174 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
d->extra->doc != nullptrDescription
TRUEevaluated 174 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-540829
2937 QTextBlock block;-
2938 for (block = d->extra->doc->firstBlock(); block.isValid(); block = block.next()) {
block.isValid()Description
TRUEevaluated 222 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 174 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
174-222
2939 if (block.layout() != nullptr && block.layout()->engine() != nullptr)
block.layout() != nullptrDescription
TRUEevaluated 222 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
block.layout()...e() != nullptrDescription
TRUEevaluated 222 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEnever evaluated
0-222
2940 block.layout()->engine()->resetFontEngineCache();
executed 222 times by 2 tests: block.layout()->engine()->resetFontEngineCache();
Executed by:
  • tst_examples
  • tst_qquicktext
222
2941 }
executed 222 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
222
2942 } else {
executed 174 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
174
2943 if (d->layout.engine() != nullptr)
d->layout.engine() != nullptrDescription
TRUEevaluated 540829 times by 21 tests
Evaluated 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
FALSEnever evaluated
0-540829
2944 d->layout.engine()->resetFontEngineCache();
executed 540829 times by 21 tests: d->layout.engine()->resetFontEngineCache();
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
540829
2945 }
executed 540829 times by 21 tests: end of block
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
540829
2946}-
2947-
2948/*!-
2949 \since 5.6-
2950 \qmlproperty real QtQuick::Text::padding-
2951 \qmlproperty real QtQuick::Text::topPadding-
2952 \qmlproperty real QtQuick::Text::leftPadding-
2953 \qmlproperty real QtQuick::Text::bottomPadding-
2954 \qmlproperty real QtQuick::Text::rightPadding-
2955-
2956 These properties hold the padding around the content. This space is reserved-
2957 in addition to the contentWidth and contentHeight.-
2958*/-
2959qreal QQuickText::padding() const-
2960{-
2961 Q_D(const QQuickText);-
2962 return d->padding();
executed 18 times by 2 tests: return d->padding();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
18
2963}-
2964-
2965void QQuickText::setPadding(qreal padding)-
2966{-
2967 Q_D(QQuickText);-
2968 if (qFuzzyCompare(d->padding(), padding))
qFuzzyCompare(...ng(), padding)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
0-4
2969 return;
never executed: return;
0
2970-
2971 d->extra.value().padding = padding;-
2972 d->updateSize();-
2973 emit paddingChanged();-
2974 if (!d->extra.isAllocated() || !d->extra->explicitTopPadding)
!d->extra.isAllocated()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
!d->extra->explicitTopPaddingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
0-4
2975 emit topPaddingChanged();
executed 2 times by 1 test: topPaddingChanged();
Executed by:
  • tst_qquicktext
2
2976 if (!d->extra.isAllocated() || !d->extra->explicitLeftPadding)
!d->extra.isAllocated()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
!d->extra->explicitLeftPaddingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
0-4
2977 emit leftPaddingChanged();
executed 2 times by 1 test: leftPaddingChanged();
Executed by:
  • tst_qquicktext
2
2978 if (!d->extra.isAllocated() || !d->extra->explicitRightPadding)
!d->extra.isAllocated()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
!d->extra->exp...itRightPaddingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
0-4
2979 emit rightPaddingChanged();
executed 2 times by 1 test: rightPaddingChanged();
Executed by:
  • tst_qquicktext
2
2980 if (!d->extra.isAllocated() || !d->extra->explicitBottomPadding)
!d->extra.isAllocated()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicktext
!d->extra->exp...tBottomPaddingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
0-4
2981 emit bottomPaddingChanged();
executed 2 times by 1 test: bottomPaddingChanged();
Executed by:
  • tst_qquicktext
2
2982}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
2983-
2984void QQuickText::resetPadding()-
2985{-
2986 setPadding(0);-
2987}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
2988-
2989qreal QQuickText::topPadding() const-
2990{-
2991 Q_D(const QQuickText);-
2992 if (d->extra.isAllocated() && d->extra->explicitTopPadding)
d->extra.isAllocated()Description
TRUEevaluated 6520 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2713358 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
  • ...
d->extra->explicitTopPaddingDescription
TRUEevaluated 896 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 5624 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
896-2713358
2993 return d->extra->topPadding;
executed 896 times by 1 test: return d->extra->topPadding;
Executed by:
  • tst_qquicktext
896
2994 return d->padding();
executed 2718982 times by 35 tests: return d->padding();
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
  • ...
2718982
2995}-
2996-
2997void QQuickText::setTopPadding(qreal padding)-
2998{-
2999 Q_D(QQuickText);-
3000 d->setTopPadding(padding);-
3001}
executed 32 times by 1 test: end of block
Executed by:
  • tst_qquicktext
32
3002-
3003void QQuickText::resetTopPadding()-
3004{-
3005 Q_D(QQuickText);-
3006 d->setTopPadding(0, true);-
3007}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
3008-
3009qreal QQuickText::leftPadding() const-
3010{-
3011 Q_D(const QQuickText);-
3012 if (d->extra.isAllocated() && d->extra->explicitLeftPadding)
d->extra.isAllocated()Description
TRUEevaluated 4824 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 2238461 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
  • ...
d->extra->explicitLeftPaddingDescription
TRUEevaluated 132 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 4692 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
132-2238461
3013 return d->extra->leftPadding;
executed 132 times by 1 test: return d->extra->leftPadding;
Executed by:
  • tst_qquicktext
132
3014 return d->padding();
executed 2243153 times by 35 tests: return d->padding();
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
  • ...
2243153
3015}-
3016-
3017void QQuickText::setLeftPadding(qreal padding)-
3018{-
3019 Q_D(QQuickText);-
3020 d->setLeftPadding(padding);-
3021}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
3022-
3023void QQuickText::resetLeftPadding()-
3024{-
3025 Q_D(QQuickText);-
3026 d->setLeftPadding(0, true);-
3027}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
3028-
3029qreal QQuickText::rightPadding() const-
3030{-
3031 Q_D(const QQuickText);-
3032 if (d->extra.isAllocated() && d->extra->explicitRightPadding)
d->extra.isAllocated()Description
TRUEevaluated 4084 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 1990419 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
  • ...
d->extra->explicitRightPaddingDescription
TRUEevaluated 138 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 3946 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
138-1990419
3033 return d->extra->rightPadding;
executed 138 times by 1 test: return d->extra->rightPadding;
Executed by:
  • tst_qquicktext
138
3034 return d->padding();
executed 1994365 times by 35 tests: return d->padding();
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
  • ...
1994365
3035}-
3036-
3037void QQuickText::setRightPadding(qreal padding)-
3038{-
3039 Q_D(QQuickText);-
3040 d->setRightPadding(padding);-
3041}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicktext
4
3042-
3043void QQuickText::resetRightPadding()-
3044{-
3045 Q_D(QQuickText);-
3046 d->setRightPadding(0, true);-
3047}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
3048-
3049qreal QQuickText::bottomPadding() const-
3050{-
3051 Q_D(const QQuickText);-
3052 if (d->extra.isAllocated() && d->extra->explicitBottomPadding)
d->extra.isAllocated()Description
TRUEevaluated 4578 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
FALSEevaluated 1993371 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
  • ...
d->extra->expl...tBottomPaddingDescription
TRUEevaluated 694 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 3884 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquicktext
694-1993371
3053 return d->extra->bottomPadding;
executed 694 times by 1 test: return d->extra->bottomPadding;
Executed by:
  • tst_qquicktext
694
3054 return d->padding();
executed 1997255 times by 35 tests: return d->padding();
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
  • ...
1997255
3055}-
3056-
3057void QQuickText::setBottomPadding(qreal padding)-
3058{-
3059 Q_D(QQuickText);-
3060 d->setBottomPadding(padding);-
3061}
executed 32 times by 1 test: end of block
Executed by:
  • tst_qquicktext
32
3062-
3063void QQuickText::resetBottomPadding()-
3064{-
3065 Q_D(QQuickText);-
3066 d->setBottomPadding(0, true);-
3067}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquicktext
2
3068-
3069/*!-
3070 \qmlproperty string QtQuick::Text::fontInfo.family-
3071 \since 5.9-
3072-
3073 The family name of the font that has been resolved for the current font-
3074 and fontSizeMode.-
3075*/-
3076-
3077/*!-
3078 \qmlproperty string QtQuick::Text::fontInfo.styleName-
3079 \since 5.9-
3080-
3081 The style name of the font info that has been resolved for the current font-
3082 and fontSizeMode.-
3083*/-
3084-
3085/*!-
3086 \qmlproperty bool QtQuick::Text::fontInfo.bold-
3087 \since 5.9-
3088-
3089 The bold state of the font info that has been resolved for the current font-
3090 and fontSizeMode. This is true if the weight of the resolved font is bold or higher.-
3091*/-
3092-
3093/*!-
3094 \qmlproperty int QtQuick::Text::fontInfo.weight-
3095 \since 5.9-
3096-
3097 The weight of the font info that has been resolved for the current font-
3098 and fontSizeMode.-
3099*/-
3100-
3101/*!-
3102 \qmlproperty bool QtQuick::Text::fontInfo.italic-
3103 \since 5.9-
3104-
3105 The italic state of the font info that has been resolved for the current font-
3106 and fontSizeMode.-
3107*/-
3108-
3109/*!-
3110 \qmlproperty real QtQuick::Text::fontInfo.pointSize-
3111 \since 5.9-
3112-
3113 The pointSize of the font info that has been resolved for the current font-
3114 and fontSizeMode.-
3115*/-
3116-
3117/*!-
3118 \qmlproperty string QtQuick::Text::fontInfo.pixelSize-
3119 \since 5.9-
3120-
3121 The pixel size of the font info that has been resolved for the current font-
3122 and fontSizeMode.-
3123*/-
3124QJSValue QQuickText::fontInfo() const-
3125{-
3126 Q_D(const QQuickText);-
3127-
3128 QJSEngine *engine = qjsEngine(this);-
3129 if (!engine) {
!engineDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquicktext
0-8
3130 qmlWarning(this) << "fontInfo: item has no JS engine";-
3131 return QJSValue();
never executed: return QJSValue();
0
3132 }-
3133-
3134 QJSValue value = engine->newObject();-
3135 value.setProperty(QStringLiteral("family"), d->fontInfo.family());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3136 value.setProperty(QStringLiteral("styleName"), d->fontInfo.styleName());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3137 value.setProperty(QStringLiteral("bold"), d->fontInfo.bold());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3138 value.setProperty(QStringLiteral("weight"), d->fontInfo.weight());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3139 value.setProperty(QStringLiteral("italic"), d->fontInfo.italic());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3140 value.setProperty(QStringLiteral("pointSize"), d->fontInfo.pointSizeF());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3141 value.setProperty(QStringLiteral("pixelSize"), d->fontInfo.pixelSize());
executed 8 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qquicktext
8
3142 return value;
executed 8 times by 1 test: return value;
Executed by:
  • tst_qquicktext
8
3143}-
3144-
3145/*!-
3146 \qmlproperty size QtQuick::Text::advance-
3147 \since 5.10-
3148-
3149 The distance, in pixels, from the baseline origin of the first-
3150 character of the text item, to the baseline origin of the first-
3151 character in a text item occurring directly after this one-
3152 in a text flow.-
3153-
3154 Note that the advance can be negative if the text flows from-
3155 the right to the left.-
3156*/-
3157QSizeF QQuickText::advance() const-
3158{-
3159 Q_D(const QQuickText);-
3160 return d->advance;
executed 16 times by 1 test: return d->advance;
Executed by:
  • tst_qqmlenginedebugservice
16
3161}-
3162-
3163QT_END_NAMESPACE-
3164-
3165#include "moc_qquicktext_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0