OpenCoverage

qqmltypenamecache.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmltypenamecache.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 "qqmltypenamecache_p.h"-
41-
42#include "qqmlengine_p.h"-
43-
44QT_BEGIN_NAMESPACE-
45-
46QQmlTypeNameCache::QQmlTypeNameCache(const QQmlImports &importCache)-
47 : m_imports(importCache)-
48{-
49}
executed 55249 times by 141 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
55249
50-
51QQmlTypeNameCache::~QQmlTypeNameCache()-
52{-
53}-
54-
55void QQmlTypeNameCache::add(const QHashedString &name, const QUrl &url, const QHashedString &nameSpace)-
56{-
57 if (nameSpace.length() != 0) {
nameSpace.length() != 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmltypeloader
0-24
58 QQmlImportRef *i = m_namedImports.value(nameSpace);-
59 Q_ASSERT(i != nullptr);-
60 i->compositeSingletons.insert(name, url);-
61 return;
never executed: return;
0
62 }-
63-
64 if (m_anonymousCompositeSingletons.contains(name))
m_anonymousCom...contains(name)Description
TRUEnever evaluated
FALSEevaluated 24 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmltypeloader
0-24
65 return;
never executed: return;
0
66-
67 m_anonymousCompositeSingletons.insert(name, url);-
68}
executed 24 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmltypeloader
24
69-
70void QQmlTypeNameCache::add(const QHashedString &name, int importedScriptIndex, const QHashedString &nameSpace)-
71{-
72 QQmlImportRef import;-
73 import.scriptIndex = importedScriptIndex;-
74 import.m_qualifier = name;-
75-
76 if (nameSpace.length() != 0) {
nameSpace.length() != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 292 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
8-292
77 QQmlImportRef *i = m_namedImports.value(nameSpace);-
78 Q_ASSERT(i != nullptr);-
79 m_namespacedImports[i].insert(name, import);-
80 return;
executed 8 times by 1 test: return;
Executed by:
  • tst_qqmlecmascript
8
81 }-
82-
83 if (m_namedImports.contains(name))
m_namedImports.contains(name)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 288 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
4-288
84 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qqmlecmascript
4
85-
86 m_namedImports.insert(name, import);-
87}
executed 288 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
288
88-
89QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name) const-
90{-
91 Result result = query(m_namedImports, name);-
92-
93 if (!result.isValid())
!result.isValid()Description
TRUEevaluated 71337 times by 85 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
FALSEevaluated 96 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickscreen
96-71337
94 result = typeSearch(m_anonymousImports, name);
executed 71337 times by 85 tests: result = typeSearch(m_anonymousImports, name);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
71337
95-
96 if (!result.isValid())
!result.isValid()Description
TRUEevaluated 69047 times by 61 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • ...
FALSEevaluated 2386 times by 60 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • ...
2386-69047
97 result = query(m_anonymousCompositeSingletons, name);
executed 69047 times by 61 tests: result = query(m_anonymousCompositeSingletons, name);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • ...
69047
98-
99 if (!result.isValid()) {
!result.isValid()Description
TRUEevaluated 68981 times by 61 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • ...
FALSEevaluated 2452 times by 60 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlmetatype
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickdrag
  • ...
2452-68981
100 // Look up anonymous types from the imports of this document-
101 QQmlImportNamespace *typeNamespace = nullptr;-
102 QList<QQmlError> errors;-
103 QQmlType t;-
104 bool typeFound = m_imports.resolveType(name, &t, nullptr, nullptr, &typeNamespace, &errors);-
105 if (typeFound) {
typeFoundDescription
TRUEevaluated 430 times by 4 tests
Evaluated by:
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 68551 times by 61 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • ...
430-68551
106 return Result(t);
executed 430 times by 4 tests: return Result(t);
Executed by:
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
430
107 }-
108-
109 }
executed 68551 times by 61 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • ...
68551
110-
111 return result;
executed 71003 times by 86 tests: return result;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_parserstress
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • ...
71003
112}-
113-
114QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name,-
115 const QQmlImportRef *importNamespace) const-
116{-
117 Q_ASSERT(importNamespace && importNamespace->scriptIndex == -1);-
118-
119 Result result = typeSearch(importNamespace->modules, name);-
120-
121 if (!result.isValid())
!result.isValid()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlproperty
0-6
122 result = query(importNamespace->compositeSingletons, name);
never executed: result = query(importNamespace->compositeSingletons, name);
0
123-
124 if (!result.isValid()) {
!result.isValid()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlproperty
0-6
125 // Look up types from the imports of this document-
126 // ### it would be nice if QQmlImports allowed us to resolve a namespace-
127 // first, and then types on it.-
128 QString qualifiedTypeName = importNamespace->m_qualifier + QLatin1Char('.') + name.toString();-
129 QQmlImportNamespace *typeNamespace = nullptr;-
130 QList<QQmlError> errors;-
131 QQmlType t;-
132 bool typeFound = m_imports.resolveType(qualifiedTypeName, &t, nullptr, nullptr, &typeNamespace, &errors);-
133 if (typeFound) {
typeFoundDescription
TRUEnever evaluated
FALSEnever evaluated
0
134 return Result(t);
never executed: return Result(t);
0
135 }-
136 }
never executed: end of block
0
137-
138 return result;
executed 6 times by 1 test: return result;
Executed by:
  • tst_qqmlproperty
6
139}-
140-
141QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name, QQmlImport::RecursionRestriction recursionRestriction) const-
142{-
143 Result result = query(m_namedImports, name);-
144-
145 if (!result.isValid())
!result.isValid()Description
TRUEevaluated 370189 times by 66 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • ...
FALSEevaluated 746 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickscreen
  • tst_quicktestmainwithsetup
  • tst_testfiltering
746-370189
146 result = typeSearch(m_anonymousImports, name);
executed 370189 times by 66 tests: result = typeSearch(m_anonymousImports, name);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • ...
370189
147-
148 if (!result.isValid())
!result.isValid()Description
TRUEevaluated 221087 times by 55 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • ...
FALSEevaluated 149848 times by 44 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • ...
149848-221087
149 result = query(m_anonymousCompositeSingletons, name);
executed 221087 times by 55 tests: result = query(m_anonymousCompositeSingletons, name);
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • ...
221087
150-
151 if (!result.isValid()) {
!result.isValid()Description
TRUEevaluated 220993 times by 54 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • ...
FALSEevaluated 149942 times by 44 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • ...
149942-220993
152 // Look up anonymous types from the imports of this document-
153 QString typeName = name->toQStringNoThrow();-
154 QQmlImportNamespace *typeNamespace = nullptr;-
155 QList<QQmlError> errors;-
156 QQmlType t;-
157 bool typeFound = m_imports.resolveType(typeName, &t, nullptr, nullptr, &typeNamespace, &errors,-
158 QQmlType::AnyRegistrationType, recursionRestriction);-
159 if (typeFound) {
typeFoundDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qmlcachegen
FALSEevaluated 220991 times by 54 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • ...
2-220991
160 return Result(t);
executed 2 times by 1 test: return Result(t);
Executed by:
  • tst_qmlcachegen
2
161 }-
162-
163 }
executed 220991 times by 54 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • ...
220991
164-
165 return result;
executed 370933 times by 67 tests: return result;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlitemmodels
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • ...
370933
166}-
167-
168QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name, const QQmlImportRef *importNamespace) const-
169{-
170 Q_ASSERT(importNamespace && importNamespace->scriptIndex == -1);-
171-
172 QMap<const QQmlImportRef *, QStringHash<QQmlImportRef> >::const_iterator it = m_namespacedImports.constFind(importNamespace);-
173 if (it != m_namespacedImports.constEnd()) {
it != m_namesp...rts.constEnd()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 316 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
8-316
174 Result r = query(*it, name);-
175 if (r.isValid())
r.isValid()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
0-8
176 return r;
executed 8 times by 1 test: return r;
Executed by:
  • tst_qqmlecmascript
8
177 }
never executed: end of block
0
178-
179 Result r = typeSearch(importNamespace->modules, name);-
180-
181 if (!r.isValid())
!r.isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 314 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
2-314
182 r = query(importNamespace->compositeSingletons, name);
executed 2 times by 1 test: r = query(importNamespace->compositeSingletons, name);
Executed by:
  • tst_qqmlecmascript
2
183-
184 if (!r.isValid()) {
!r.isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 314 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
2-314
185 // Look up types from the imports of this document-
186 // ### it would be nice if QQmlImports allowed us to resolve a namespace-
187 // first, and then types on it.-
188 QString qualifiedTypeName = importNamespace->m_qualifier + QLatin1Char('.') + name->toQStringNoThrow();-
189 QQmlImportNamespace *typeNamespace = nullptr;-
190 QList<QQmlError> errors;-
191 QQmlType t;-
192 bool typeFound = m_imports.resolveType(qualifiedTypeName, &t, nullptr, nullptr, &typeNamespace, &errors);-
193 if (typeFound) {
typeFoundDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
0-2
194 return Result(t);
never executed: return Result(t);
0
195 }-
196 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
2
197-
198 return r;
executed 316 times by 5 tests: return r;
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
316
199}-
200-
201QT_END_NAMESPACE-
202-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0