OpenCoverage

qqmlerror.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlerror.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 QtQml 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 "qqmlerror.h"-
41#include "qqmlglobal_p.h"-
42-
43#include <QtCore/qdebug.h>-
44#include <QtCore/qfile.h>-
45#include <QtCore/qstringlist.h>-
46#include <QtCore/qvector.h>-
47#include <QtCore/qpointer.h>-
48-
49#include <private/qv4errorobject_p.h>-
50-
51QT_BEGIN_NAMESPACE-
52-
53/*!-
54 \class QQmlError-
55 \since 5.0-
56 \inmodule QtQml-
57 \brief The QQmlError class encapsulates a QML error.-
58-
59 QQmlError includes a textual description of the error, as well-
60 as location information (the file, line, and column). The toString()-
61 method creates a single-line, human-readable string containing all of-
62 this information, for example:-
63 \code-
64 file:///home/user/test.qml:7:8: Invalid property assignment: double expected-
65 \endcode-
66-
67 You can use qDebug(), qInfo(), or qWarning() to output errors to the console.-
68 This method will attempt to open the file indicated by the error-
69 and include additional contextual information.-
70 \code-
71 file:///home/user/test.qml:7:8: Invalid property assignment: double expected-
72 y: "hello"-
73 ^-
74 \endcode-
75-
76 Note that the \l {Qt Quick 1} version is named QDeclarativeError-
77-
78 \sa QQuickView::errors(), QQmlComponent::errors()-
79*/-
80class QQmlErrorPrivate-
81{-
82public:-
83 QQmlErrorPrivate();-
84-
85 QUrl url;-
86 QString description;-
87 quint16 line;-
88 quint16 column;-
89 QtMsgType messageType;-
90 QPointer<QObject> object;-
91};-
92-
93QQmlErrorPrivate::QQmlErrorPrivate()-
94: line(0), column(0), messageType(QtMsgType::QtWarningMsg), object()-
95{-
96}
executed 586834 times by 92 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • ...
586834
97-
98/*!-
99 Creates an empty error object.-
100*/-
101QQmlError::QQmlError()-
102: d(nullptr)-
103{-
104}
executed 293524 times by 92 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • ...
293524
105-
106/*!-
107 Creates a copy of \a other.-
108*/-
109QQmlError::QQmlError(const QQmlError &other)-
110: d(nullptr)-
111{-
112 *this = other;-
113}
executed 293838 times by 91 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
293838
114-
115/*!-
116 Assigns \a other to this error object.-
117*/-
118QQmlError &QQmlError::operator=(const QQmlError &other)-
119{-
120 if (!other.d) {
!other.dDescription
TRUEevaluated 364 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlpropertymap
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquicktextinput
FALSEevaluated 294384 times by 91 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
364-294384
121 delete d;-
122 d = nullptr;-
123 } else {
executed 364 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlpropertymap
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquicktextinput
364
124 if (!d)
!dDescription
TRUEevaluated 294380 times by 91 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlcontext
  • tst_qqmltypeloader
4-294380
125 d = new QQmlErrorPrivate;
executed 294380 times by 91 tests: d = new QQmlErrorPrivate;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
294380
126 d->url = other.d->url;-
127 d->description = other.d->description;-
128 d->line = other.d->line;-
129 d->column = other.d->column;-
130 d->object = other.d->object;-
131 d->messageType = other.d->messageType;-
132 }
executed 294384 times by 91 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
294384
133 return *this;
executed 294748 times by 91 tests: return *this;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
294748
134}-
135-
136/*!-
137 \internal-
138*/-
139QQmlError::~QQmlError()-
140{-
141 delete d; d = nullptr;-
142}
executed 587358 times by 92 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • ...
587358
143-
144/*!-
145 Returns true if this error is valid, otherwise false.-
146*/-
147bool QQmlError::isValid() const-
148{-
149 return d != nullptr;
executed 2518 times by 22 tests: return d != nullptr;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
2518
150}-
151-
152/*!-
153 Returns the url for the file that caused this error.-
154*/-
155QUrl QQmlError::url() const-
156{-
157 if (d)
dDescription
TRUEevaluated 3526 times by 52 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • ...
FALSEevaluated 170 times by 4 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
170-3526
158 return d->url;
executed 3526 times by 52 tests: return d->url;
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • ...
3526
159 return QUrl();
executed 170 times by 4 tests: return QUrl();
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
170
160}-
161-
162/*!-
163 Sets the \a url for the file that caused this error.-
164*/-
165void QQmlError::setUrl(const QUrl &url)-
166{-
167 if (!d)
!dDescription
TRUEevaluated 1030 times by 28 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquicktextedit
  • tst_qquicktextinput
  • ...
FALSEevaluated 792 times by 44 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • ...
792-1030
168 d = new QQmlErrorPrivate;
executed 1030 times by 28 tests: d = new QQmlErrorPrivate;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquicktextedit
  • tst_qquicktextinput
  • ...
1030
169 d->url = url;-
170}
executed 1822 times by 55 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • ...
1822
171-
172/*!-
173 Returns the error description.-
174*/-
175QString QQmlError::description() const-
176{-
177 if (d)
dDescription
TRUEevaluated 1949 times by 53 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
FALSEevaluated 170 times by 4 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
170-1949
178 return d->description;
executed 1949 times by 53 tests: return d->description;
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
1949
179 return QString();
executed 170 times by 4 tests: return QString();
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
170
180}-
181-
182/*!-
183 Sets the error \a description.-
184*/-
185void QQmlError::setDescription(const QString &description)-
186{-
187 if (!d)
!dDescription
TRUEevaluated 290376 times by 76 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
FALSEevaluated 2106 times by 52 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • ...
2106-290376
188 d = new QQmlErrorPrivate;
executed 290376 times by 76 tests: d = new QQmlErrorPrivate;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • ...
290376
189 d->description = description;-
190}
executed 292482 times by 92 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • ...
292482
191-
192/*!-
193 Returns the error line number.-
194*/-
195int QQmlError::line() const-
196{-
197 if (d)
dDescription
TRUEevaluated 3566 times by 53 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
FALSEevaluated 170 times by 4 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
170-3566
198 return qmlSourceCoordinate(d->line);
executed 3566 times by 53 tests: return qmlSourceCoordinate(d->line);
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • ...
3566
199 return -1;
executed 170 times by 4 tests: return -1;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
170
200}-
201-
202/*!-
203 Sets the error \a line number.-
204*/-
205void QQmlError::setLine(int line)-
206{-
207 if (!d)
!dDescription
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlpropertymap
FALSEevaluated 1637 times by 53 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • ...
8-1637
208 d = new QQmlErrorPrivate;
executed 8 times by 3 tests: d = new QQmlErrorPrivate;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlpropertymap
8
209 d->line = qmlSourceCoordinate(line);-
210}
executed 1645 times by 53 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • ...
1645
211-
212/*!-
213 Returns the error column number.-
214*/-
215int QQmlError::column() const-
216{-
217 if (d)
dDescription
TRUEevaluated 1219 times by 47 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlerror
2-1219
218 return qmlSourceCoordinate(d->column);
executed 1219 times by 47 tests: return qmlSourceCoordinate(d->column);
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • ...
1219
219 return -1;
executed 2 times by 1 test: return -1;
Executed by:
  • tst_qqmlerror
2
220}-
221-
222/*!-
223 Sets the error \a column number.-
224*/-
225void QQmlError::setColumn(int column)-
226{-
227 if (!d)
!dDescription
TRUEevaluated 64 times by 11 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmlvaluetypes
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickstates
  • tst_qquicktextedit
  • tst_qquickview
  • tst_qquickwidget
FALSEevaluated 1571 times by 51 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • ...
64-1571
228 d = new QQmlErrorPrivate;
executed 64 times by 11 tests: d = new QQmlErrorPrivate;
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmllistmodel
  • tst_qqmlvaluetypes
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickstates
  • tst_qquicktextedit
  • tst_qquickview
  • tst_qquickwidget
64
229 d->column = qmlSourceCoordinate(column);-
230}
executed 1635 times by 53 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • ...
1635
231-
232/*!-
233 Returns the nearest object where this error occurred.-
234 Exceptions in bound property expressions set this to the object-
235 to which the property belongs. It will be 0 for all-
236 other exceptions.-
237 */-
238QObject *QQmlError::object() const-
239{-
240 if (d)
dDescription
TRUEnever evaluated
FALSEnever evaluated
0
241 return d->object;
never executed: return d->object;
0
242 return nullptr;
never executed: return nullptr;
0
243}-
244-
245/*!-
246 Sets the nearest \a object where this error occurred.-
247 */-
248void QQmlError::setObject(QObject *object)-
249{-
250 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 94 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlvaluetypes
  • tst_qquickpathview
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
0-94
251 d = new QQmlErrorPrivate;
never executed: d = new QQmlErrorPrivate;
0
252 d->object = object;-
253}
executed 94 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlvaluetypes
  • tst_qquickpathview
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
94
254-
255/*!-
256 \since 5.9-
257-
258 Returns the message type.-
259 */-
260QtMsgType QQmlError::messageType() const-
261{-
262 if (d)
dDescription
TRUEevaluated 1649 times by 40 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • ...
FALSEnever evaluated
0-1649
263 return d->messageType;
executed 1649 times by 40 tests: return d->messageType;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • ...
1649
264 return QtMsgType::QtWarningMsg;
never executed: return QtMsgType::QtWarningMsg;
0
265}-
266-
267/*!-
268 \since 5.9-
269-
270 Sets the \a messageType for this message. The message type determines which-
271 QDebug handlers are responsible for receiving the message.-
272 */-
273void QQmlError::setMessageType(QtMsgType messageType)-
274{-
275 if (!d)
!dDescription
TRUEevaluated 976 times by 30 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • ...
FALSEnever evaluated
0-976
276 d = new QQmlErrorPrivate;
executed 976 times by 30 tests: d = new QQmlErrorPrivate;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • ...
976
277 d->messageType = messageType;-
278}
executed 976 times by 30 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • ...
976
279-
280/*!-
281 Returns the error as a human readable string.-
282*/-
283QString QQmlError::toString() const-
284{-
285 QString rv;-
286-
287 QUrl u(url());-
288 int l(line());-
289-
290 if (u.isEmpty() || (u.isLocalFile() && u.path().isEmpty()))
u.isEmpty()Description
TRUEevaluated 898 times by 23 tests
Evaluated by:
  • tst_qjsengine
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qquickanchors
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickfontloader
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickpositioners
  • tst_qquickstates
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
FALSEevaluated 1045 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickgridview
  • ...
u.isLocalFile()Description
TRUEevaluated 999 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickitem2
  • ...
FALSEevaluated 46 times by 6 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmltypeloader
  • tst_qquickloader
  • tst_qquicktextedit
u.path().isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktext
FALSEevaluated 997 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickitem2
  • ...
2-1045
291 rv += QLatin1String("<Unknown File>");
executed 900 times by 24 tests: rv += QLatin1String("<Unknown File>");
Executed by:
  • tst_qjsengine
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qquickanchors
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickfontloader
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickpositioners
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
900
292 else-
293 rv += u.toString();
executed 1043 times by 39 tests: rv += u.toString();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickgridview
  • ...
1043
294-
295 if (l != -1) {
l != -1Description
TRUEevaluated 1135 times by 45 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickflipable
  • ...
FALSEevaluated 808 times by 15 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlexpression
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qquickanchors
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickloader
  • tst_qquickstates
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
808-1135
296 rv += QLatin1Char(':') + QString::number(l);-
297-
298 int c(column());-
299 if (c != -1)
c != -1Description
TRUEevaluated 516 times by 40 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickimage
  • tst_qquickimageprovider
  • ...
FALSEevaluated 619 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
516-619
300 rv += QLatin1Char(':') + QString::number(c);
executed 516 times by 40 tests: rv += QLatin1Char(':') + QString::number(c);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgravity
  • tst_qquickimage
  • tst_qquickimageprovider
  • ...
516
301 }
executed 1135 times by 45 tests: end of block
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickflipable
  • ...
1135
302-
303 rv += QLatin1String(": ") + description();-
304-
305 return rv;
executed 1943 times by 49 tests: return rv;
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qqmlbinding
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlerror
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • ...
1943
306}-
307-
308/*!-
309 \relates QQmlError-
310 \fn QDebug operator<<(QDebug debug, const QQmlError &error)-
311-
312 Outputs a human readable version of \a error to \a debug.-
313*/-
314-
315QDebug operator<<(QDebug debug, const QQmlError &error)-
316{-
317 debug << qPrintable(error.toString());-
318-
319 QUrl url = error.url();-
320-
321 if (error.line() > 0 && url.scheme() == QLatin1String("file")) {
error.line() > 0Description
TRUEevaluated 20 times by 6 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquicktextedit
  • tst_qquickview
  • tst_qquickwidget
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicktextedit
url.scheme() =...String("file")Description
TRUEevaluated 12 times by 5 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qquicktextedit
2-20
322 QString file = url.toLocalFile();-
323 QFile f(file);-
324 if (f.open(QIODevice::ReadOnly)) {
f.open(QIODevice::ReadOnly)Description
TRUEevaluated 10 times by 5 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlerror
2-10
325 QByteArray data = f.readAll();-
326 QTextStream stream(data, QIODevice::ReadOnly);-
327#if QT_CONFIG(textcodec)-
328 stream.setCodec("UTF-8");-
329#endif-
330 const QString code = stream.readAll();-
331 const auto lines = code.splitRef(QLatin1Char('\n'));-
332-
333 if (lines.count() >= error.line()) {
lines.count() >= error.line()Description
TRUEevaluated 10 times by 5 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
FALSEnever evaluated
0-10
334 const QStringRef &line = lines.at(error.line() - 1);-
335 debug << "\n " << line.toLocal8Bit().constData();-
336-
337 if(error.column() > 0) {
error.column() > 0Description
TRUEevaluated 10 times by 5 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
FALSEnever evaluated
0-10
338 int column = qMax(0, error.column() - 1);-
339 column = qMin(column, line.length());-
340-
341 QByteArray ind;-
342 ind.reserve(column);-
343 for (int i = 0; i < column; ++i) {
i < columnDescription
TRUEevaluated 48 times by 4 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
FALSEevaluated 10 times by 5 tests
Evaluated by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
10-48
344 const QChar ch = line.at(i);-
345 if (ch.isSpace())
ch.isSpace()Description
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlerror
8-40
346 ind.append(ch.unicode());
executed 40 times by 3 tests: ind.append(ch.unicode());
Executed by:
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
40
347 else-
348 ind.append(' ');
executed 8 times by 1 test: ind.append(' ');
Executed by:
  • tst_qqmlerror
8
349 }-
350 ind.append('^');-
351 debug << "\n " << ind.constData();-
352 }
executed 10 times by 5 tests: end of block
Executed by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
10
353 }
executed 10 times by 5 tests: end of block
Executed by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
10
354 }
executed 10 times by 5 tests: end of block
Executed by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
10
355 }
executed 12 times by 5 tests: end of block
Executed by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquickview
  • tst_qquickwidget
12
356 return debug;
executed 22 times by 6 tests: return debug;
Executed by:
  • tst_qqmlerror
  • tst_qqmlimport
  • tst_qquickitem2
  • tst_qquicktextedit
  • tst_qquickview
  • tst_qquickwidget
22
357}-
358-
359QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0