OpenCoverage

qqmldirparser.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmldirparser.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 "qqmldirparser_p.h"-
41#include "qqmlerror.h"-
42-
43#include <QtCore/QtDebug>-
44-
45QT_BEGIN_NAMESPACE-
46-
47static int parseInt(const QStringRef &str, bool *ok)-
48{-
49 int pos = 0;-
50 int number = 0;-
51 while (pos < str.length() && str.at(pos).isDigit()) {
pos < str.length()Description
TRUEevaluated 728 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 720 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
str.at(pos).isDigit()Description
TRUEevaluated 728 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEnever evaluated
0-728
52 if (pos != 0)
pos != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmldirparser
FALSEevaluated 720 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
8-720
53 number *= 10;
executed 8 times by 1 test: number *= 10;
Executed by:
  • tst_qqmldirparser
8
54 number += str.at(pos).unicode() - '0';-
55 ++pos;-
56 }
executed 728 times by 16 tests: end of block
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
728
57 if (pos != str.length())
pos != str.length()Description
TRUEnever evaluated
FALSEevaluated 720 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
0-720
58 *ok = false;
never executed: *ok = false;
0
59 else-
60 *ok = true;
executed 720 times by 16 tests: *ok = true;
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
720
61 return number;
executed 720 times by 16 tests: return number;
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
720
62}-
63-
64static bool parseVersion(const QString &str, int *major, int *minor)-
65{-
66 const int dotIndex = str.indexOf(QLatin1Char('.'));-
67 if (dotIndex != -1 && str.indexOf(QLatin1Char('.'), dotIndex + 1) == -1) {
dotIndex != -1Description
TRUEevaluated 360 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmldirparser
str.indexOf(QL...dex + 1) == -1Description
TRUEevaluated 360 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEnever evaluated
0-360
68 bool ok = false;-
69 *major = parseInt(QStringRef(&str, 0, dotIndex), &ok);-
70 if (ok)
okDescription
TRUEevaluated 360 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEnever evaluated
0-360
71 *minor = parseInt(QStringRef(&str, dotIndex + 1, str.length() - dotIndex - 1), &ok);
executed 360 times by 16 tests: *minor = parseInt(QStringRef(&str, dotIndex + 1, str.length() - dotIndex - 1), &ok);
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
360
72 return ok;
executed 360 times by 16 tests: return ok;
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
360
73 }-
74 return false;
executed 6 times by 1 test: return false;
Executed by:
  • tst_qqmldirparser
6
75}-
76-
77QQmlDirParser::QQmlDirParser() : _designerSupported(false)-
78{-
79}
executed 66354 times by 142 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
66354
80-
81QQmlDirParser::~QQmlDirParser()-
82{-
83}-
84-
85inline static void scanSpace(const QChar *&ch) {-
86 while (ch->isSpace() && !ch->isNull() && *ch != QLatin1Char('\n'))
ch->isSpace()Description
TRUEevaluated 69809 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 69605 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
!ch->isNull()Description
TRUEevaluated 69809 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEnever evaluated
*ch != QLatin1Char('\n')Description
TRUEevaluated 31434 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 38375 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
0-69809
87 ++ch;
executed 31434 times by 141 tests: ++ch;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
31434
88}
executed 107980 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
107980
89-
90inline static void scanToEnd(const QChar *&ch) {-
91 while (*ch != QLatin1Char('\n') && !ch->isNull())
*ch != QLatin1Char('\n')Description
TRUEevaluated 646 times by 3 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
FALSEevaluated 46 times by 3 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
!ch->isNull()Description
TRUEevaluated 646 times by 3 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
FALSEnever evaluated
0-646
92 ++ch;
executed 646 times by 3 tests: ++ch;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
646
93}
executed 46 times by 3 tests: end of block
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
46
94-
95inline static void scanWord(const QChar *&ch) {-
96 while (!ch->isSpace() && !ch->isNull())
!ch->isSpace()Description
TRUEevaluated 752031 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 69551 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
!ch->isNull()Description
TRUEevaluated 752027 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qmldiskcache
4-752031
97 ++ch;
executed 752027 times by 141 tests: ++ch;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
752027
98}
executed 69555 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
69555
99-
100/*!-
101\a url is used for generating errors.-
102*/-
103bool QQmlDirParser::parse(const QString &source)-
104{-
105 _errors.clear();-
106 _plugins.clear();-
107 _components.clear();-
108 _scripts.clear();-
109 _designerSupported = false;-
110 _className.clear();-
111-
112 quint16 lineNumber = 0;-
113 bool firstLine = true;-
114-
115 const QChar *ch = source.constData();-
116 while (!ch->isNull()) {
!ch->isNull()Description
TRUEevaluated 38425 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 7981 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
7981-38425
117 ++lineNumber;-
118-
119 bool invalidLine = false;-
120 const QChar *lineStart = ch;-
121-
122 scanSpace(ch);-
123 if (*ch == QLatin1Char('\n')) {
*ch == QLatin1Char('\n')Description
TRUEevaluated 242 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickdraghandler
  • tst_qquicktableview
  • tst_qquicktaphandler
FALSEevaluated 38183 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
242-38183
124 ++ch;-
125 continue;
executed 242 times by 8 tests: continue;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickdraghandler
  • tst_qquicktableview
  • tst_qquicktaphandler
242
126 }-
127 if (ch->isNull())
ch->isNull()Description
TRUEnever evaluated
FALSEevaluated 38183 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
0-38183
128 break;
never executed: break;
0
129-
130 QString sections[4];-
131 int sectionCount = 0;-
132-
133 do {-
134 if (*ch == QLatin1Char('#')) {
*ch == QLatin1Char('#')Description
TRUEevaluated 46 times by 3 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
FALSEevaluated 69555 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
46-69555
135 scanToEnd(ch);-
136 break;
executed 46 times by 3 tests: break;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
46
137 }-
138 const QChar *start = ch;-
139 scanWord(ch);-
140 if (sectionCount < 4) {
sectionCount < 4Description
TRUEevaluated 69555 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEnever evaluated
0-69555
141 sections[sectionCount++] = source.mid(start-source.constData(), ch-start);-
142 } else {
executed 69555 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
69555
143 reportError(lineNumber, start-lineStart, QLatin1String("unexpected token"));-
144 scanToEnd(ch);-
145 invalidLine = true;-
146 break;
never executed: break;
0
147 }-
148 scanSpace(ch);-
149 } while (*ch != QLatin1Char('\n') && !ch->isNull());
executed 69555 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
*ch != QLatin1Char('\n')Description
TRUEevaluated 31422 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 38133 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
!ch->isNull()Description
TRUEevaluated 31418 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qmldiskcache
4-69555
150-
151 if (!ch->isNull())
!ch->isNull()Description
TRUEevaluated 38179 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qmldiskcache
4-38179
152 ++ch;
executed 38179 times by 141 tests: ++ch;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
38179
153-
154 if (invalidLine) {
invalidLineDescription
TRUEnever evaluated
FALSEevaluated 38183 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
0-38183
155 reportError(lineNumber, 0,-
156 QStringLiteral("invalid qmldir directive contains too many tokens"));
never executed: return qstring_literal_temp;
0
157 continue;
never executed: continue;
0
158 } else if (sectionCount == 0) {
sectionCount == 0Description
TRUEevaluated 44 times by 3 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
FALSEevaluated 38139 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
44-38139
159 continue; // no sections, no party.
executed 44 times by 3 tests: continue;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
  • tst_qquickanimatedimage
44
160-
161 } else if (sections[0] == QLatin1String("module")) {
sections[0] ==...ring("module")Description
TRUEevaluated 7789 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 30350 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
7789-30350
162 if (sectionCount != 2) {
sectionCount != 2Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmldirparser
FALSEevaluated 7785 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
4-7785
163 reportError(lineNumber, 0,-
164 QStringLiteral("module identifier directive requires one argument, but %1 were provided").arg(sectionCount - 1));
executed 4 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
4
165 continue;
executed 4 times by 1 test: continue;
Executed by:
  • tst_qqmldirparser
4
166 }-
167 if (!_typeNamespace.isEmpty()) {
!_typeNamespace.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmldirparser
FALSEevaluated 7783 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
2-7783
168 reportError(lineNumber, 0,-
169 QStringLiteral("only one module identifier directive may be defined in a qmldir file"));
executed 2 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
2
170 continue;
executed 2 times by 1 test: continue;
Executed by:
  • tst_qqmldirparser
2
171 }-
172 if (!firstLine) {
!firstLineDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
FALSEevaluated 7779 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
4-7779
173 reportError(lineNumber, 0,-
174 QStringLiteral("module identifier directive must be the first directive in a qmldir file"));
executed 4 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
4
175 continue;
executed 4 times by 2 tests: continue;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
4
176 }-
177-
178 _typeNamespace = sections[1];-
179-
180 } else if (sections[0] == QLatin1String("plugin")) {
executed 7779 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
sections[0] ==...ring("plugin")Description
TRUEevaluated 7577 times by 136 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 22773 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
7577-22773
181 if (sectionCount < 2 || sectionCount > 3) {
sectionCount < 2Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmldirparser
FALSEevaluated 7575 times by 136 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
sectionCount > 3Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmldirparser
FALSEevaluated 7573 times by 136 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
2-7575
182 reportError(lineNumber, 0,-
183 QStringLiteral("plugin directive requires one or two arguments, but %1 were provided").arg(sectionCount - 1));
executed 4 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
4
184-
185 continue;
executed 4 times by 1 test: continue;
Executed by:
  • tst_qqmldirparser
4
186 }-
187-
188 const Plugin entry(sections[1], sections[2]);-
189-
190 _plugins.append(entry);-
191-
192 } else if (sections[0] == QLatin1String("classname")) {
executed 7573 times by 136 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
sections[0] ==...g("classname")Description
TRUEevaluated 7493 times by 136 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 15280 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
7493-15280
193 if (sectionCount < 2) {
sectionCount < 2Description
TRUEnever evaluated
FALSEevaluated 7493 times by 136 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
0-7493
194 reportError(lineNumber, 0,-
195 QStringLiteral("classname directive requires an argument, but %1 were provided").arg(sectionCount - 1));
never executed: return qstring_literal_temp;
0
196-
197 continue;
never executed: continue;
0
198 }-
199-
200 _className = sections[1];-
201-
202 } else if (sections[0] == QLatin1String("internal")) {
executed 7493 times by 136 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
sections[0] ==...ng("internal")Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlmoduleplugin
FALSEevaluated 15278 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
2-15278
203 if (sectionCount != 3) {
sectionCount != 3Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlmoduleplugin
FALSEnever evaluated
0-2
204 reportError(lineNumber, 0,-
205 QStringLiteral("internal types require 2 arguments, but %1 were provided").arg(sectionCount - 1));
executed 2 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmlmoduleplugin
2
206 continue;
executed 2 times by 1 test: continue;
Executed by:
  • tst_qqmlmoduleplugin
2
207 }-
208 Component entry(sections[1], sections[2], -1, -1);-
209 entry.internal = true;-
210 _components.insertMulti(entry.typeName, entry);-
211 } else if (sections[0] == QLatin1String("singleton")) {
never executed: end of block
sections[0] ==...g("singleton")Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
FALSEevaluated 15272 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
0-15272
212 if (sectionCount < 3 || sectionCount > 4) {
sectionCount < 3Description
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
sectionCount > 4Description
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
0-6
213 reportError(lineNumber, 0,-
214 QStringLiteral("singleton types require 2 or 3 arguments, but %1 were provided").arg(sectionCount - 1));
never executed: return qstring_literal_temp;
0
215 continue;
never executed: continue;
0
216 } else if (sectionCount == 3) {
sectionCount == 3Description
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
0-6
217 // handle qmldir directory listing case where singleton is defined in the following pattern:-
218 // singleton TestSingletonType TestSingletonType.qml-
219 Component entry(sections[1], sections[2], -1, -1);-
220 entry.singleton = true;-
221 _components.insertMulti(entry.typeName, entry);-
222 } else {
never executed: end of block
0
223 // handle qmldir module listing case where singleton is defined in the following pattern:-
224 // singleton TestSingletonType 2.0 TestSingletonType20.qml-
225 int major, minor;-
226 if (parseVersion(sections[2], &major, &minor)) {
parseVersion(s...major, &minor)Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
FALSEnever evaluated
0-6
227 const QString &fileName = sections[3];-
228 Component entry(sections[1], fileName, major, minor);-
229 entry.singleton = true;-
230 _components.insertMulti(entry.typeName, entry);-
231 } else {
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qmldiskcache
6
232 reportError(lineNumber, 0, QStringLiteral("invalid version %1, expected <major>.<minor>").arg(sections[2]));
never executed: return qstring_literal_temp;
0
233 }
never executed: end of block
0
234 }-
235 } else if (sections[0] == QLatin1String("typeinfo")) {
sections[0] ==...ng("typeinfo")Description
TRUEevaluated 7701 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
FALSEevaluated 7571 times by 134 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
7571-7701
236 if (sectionCount != 2) {
sectionCount != 2Description
TRUEnever evaluated
FALSEevaluated 7701 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
0-7701
237 reportError(lineNumber, 0,-
238 QStringLiteral("typeinfo requires 1 argument, but %1 were provided").arg(sectionCount - 1));
never executed: return qstring_literal_temp;
0
239 continue;
never executed: continue;
0
240 }-
241#ifdef QT_CREATOR-
242 TypeInfo typeInfo(sections[1]);-
243 _typeInfos.append(typeInfo);-
244#endif-
245-
246 } else if (sections[0] == QLatin1String("designersupported")) {
executed 7701 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
sections[0] ==...nersupported")Description
TRUEevaluated 7115 times by 134 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
FALSEevaluated 456 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquicktextedit
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
456-7701
247 if (sectionCount != 1)
sectionCount != 1Description
TRUEnever evaluated
FALSEevaluated 7115 times by 134 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
0-7115
248 reportError(lineNumber, 0, QStringLiteral("designersupported does not expect any argument"));
never executed: reportError(lineNumber, 0, ([]() noexcept -> QString { enum { Size = sizeof(u"" "designersupported does not expect any argument")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "designersupported does not expect any argument" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
never executed: return qstring_literal_temp;
0
249 else-
250 _designerSupported = true;
executed 7115 times by 134 tests: _designerSupported = true;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
7115
251 } else if (sections[0] == QLatin1String("depends")) {
sections[0] ==...ing("depends")Description
TRUEevaluated 54 times by 8 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 402 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquicktextedit
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
54-402
252 if (sectionCount != 3) {
sectionCount != 3Description
TRUEnever evaluated
FALSEevaluated 54 times by 8 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
0-54
253 reportError(lineNumber, 0,-
254 QStringLiteral("depends requires 2 arguments, but %1 were provided").arg(sectionCount - 1));
never executed: return qstring_literal_temp;
0
255 continue;
never executed: continue;
0
256 }-
257-
258 int major, minor;-
259 if (parseVersion(sections[2], &major, &minor)) {
parseVersion(s...major, &minor)Description
TRUEevaluated 52 times by 8 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmldirparser
2-52
260 Component entry(sections[1], QString(), major, minor);-
261 entry.internal = true;-
262 _dependencies.insert(entry.typeName, entry);-
263 } else {
executed 52 times by 8 tests: end of block
Executed by:
  • tst_qqmldirparser
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
52
264 reportError(lineNumber, 0, QStringLiteral("invalid version %1, expected <major>.<minor>").arg(sections[2]));
executed 2 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
2
265 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmldirparser
2
266 } else if (sectionCount == 2) {
sectionCount == 2Description
TRUEevaluated 90 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmldirparser
  • tst_qquicktextedit
FALSEevaluated 312 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
90-312
267 // No version specified (should only be used for relative qmldir files)-
268 const Component entry(sections[0], sections[1], -1, -1);-
269 _components.insertMulti(entry.typeName, entry);-
270 } else if (sectionCount == 3) {
executed 90 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmldirparser
  • tst_qquicktextedit
sectionCount == 3Description
TRUEevaluated 306 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
6-306
271 int major, minor;-
272 if (parseVersion(sections[1], &major, &minor)) {
parseVersion(s...major, &minor)Description
TRUEevaluated 302 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmldirparser
4-302
273 const QString &fileName = sections[2];-
274-
275 if (fileName.endsWith(QLatin1String(".js"))) {
fileName.endsW...String(".js"))Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlecmascript
FALSEevaluated 292 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
10-292
276 // A 'js' extension indicates a namespaced script import-
277 const Script entry(sections[0], fileName, major, minor);-
278 _scripts.append(entry);-
279 } else {
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qqmldirparser
  • tst_qqmlecmascript
10
280 const Component entry(sections[0], fileName, major, minor);-
281 _components.insertMulti(entry.typeName, entry);-
282 }
executed 292 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmldirparser
  • tst_qqmlimport
  • tst_qqmllistmodel
  • tst_qqmlmoduleplugin
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qrcqml
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
292
283 } else {-
284 reportError(lineNumber, 0, QStringLiteral("invalid version %1, expected <major>.<minor>").arg(sections[1]));
executed 4 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
4
285 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmldirparser
4
286 } else {-
287 reportError(lineNumber, 0,-
288 QStringLiteral("a component declaration requires two or three arguments, but %1 were provided").arg(sectionCount));
executed 6 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
6
289 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
6
290-
291 firstLine = false;-
292 }
executed 38123 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
38123
293-
294 return hasError();
executed 7981 times by 141 tests: return hasError();
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
7981
295}-
296-
297void QQmlDirParser::reportError(quint16 line, quint16 column, const QString &description)-
298{-
299 QQmlJS::DiagnosticMessage error;-
300 error.loc.startLine = line;-
301 error.loc.startColumn = column;-
302 error.message = description;-
303 _errors.append(error);-
304}
executed 28 times by 2 tests: end of block
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
28
305-
306bool QQmlDirParser::hasError() const-
307{-
308 if (! _errors.isEmpty())
! _errors.isEmpty()Description
TRUEevaluated 52 times by 2 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
FALSEevaluated 64992 times by 141 tests
Evaluated 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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
52-64992
309 return true;
executed 52 times by 2 tests: return true;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
52
310-
311 return false;
executed 64992 times by 141 tests: return false;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
64992
312}-
313-
314void QQmlDirParser::setError(const QQmlError &e)-
315{-
316 _errors.clear();-
317 reportError(e.line(), e.column(), e.description());-
318}
never executed: end of block
0
319-
320QList<QQmlError> QQmlDirParser::errors(const QString &uri) const-
321{-
322 QUrl url(uri);-
323 QList<QQmlError> errors;-
324 const int numErrors = _errors.size();-
325 errors.reserve(numErrors);-
326 for (int i = 0; i < numErrors; ++i) {
i < numErrorsDescription
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
26-28
327 const QQmlJS::DiagnosticMessage &msg = _errors.at(i);-
328 QQmlError e;-
329 QString description = msg.message;-
330 description.replace(QLatin1String("$$URI$$"), uri);-
331 e.setDescription(description);-
332 e.setUrl(url);-
333 e.setLine(msg.loc.startLine);-
334 e.setColumn(msg.loc.startColumn);-
335 errors << e;-
336 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
28
337 return errors;
executed 26 times by 2 tests: return errors;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlmoduleplugin
26
338}-
339-
340QString QQmlDirParser::typeNamespace() const-
341{-
342 return _typeNamespace;
executed 7401 times by 135 tests: return _typeNamespace;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
7401
343}-
344-
345void QQmlDirParser::setTypeNamespace(const QString &s)-
346{-
347 _typeNamespace = s;-
348}
never executed: end of block
0
349-
350QList<QQmlDirParser::Plugin> QQmlDirParser::plugins() const-
351{-
352 return _plugins;
executed 64460 times by 141 tests: return _plugins;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
64460
353}-
354-
355QHash<QString, QQmlDirParser::Component> QQmlDirParser::components() const-
356{-
357 return _components;
executed 57081 times by 141 tests: return _components;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
57081
358}-
359-
360QHash<QString, QQmlDirParser::Component> QQmlDirParser::dependencies() const-
361{-
362 return _dependencies;
executed 46 times by 1 test: return _dependencies;
Executed by:
  • tst_qqmldirparser
46
363}-
364-
365QList<QQmlDirParser::Script> QQmlDirParser::scripts() const-
366{-
367 return _scripts;
executed 58107 times by 141 tests: return _scripts;
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_qqmldirparser
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
58107
368}-
369-
370#ifdef QT_CREATOR-
371QList<QQmlDirParser::TypeInfo> QQmlDirParser::typeInfos() const-
372{-
373 return _typeInfos;-
374}-
375#endif-
376-
377bool QQmlDirParser::designerSupported() const-
378{-
379 return _designerSupported;
executed 54 times by 2 tests: return _designerSupported;
Executed by:
  • tst_qqmldirparser
  • tst_qqmlimport
54
380}-
381-
382QString QQmlDirParser::className() const-
383{-
384 return _className;-
385}-
386-
387QDebug &operator<< (QDebug &debug, const QQmlDirParser::Component &component)-
388{-
389 const QString output = QStringLiteral("{%1 %2.%3}").-
390 arg(component.typeName).arg(component.majorVersion).arg(component.minorVersion);-
391 return debug << qPrintable(output);
never executed: return debug << QtPrivate::asString(output).toLocal8Bit().constData();
0
392}-
393-
394QDebug &operator<< (QDebug &debug, const QQmlDirParser::Script &script)-
395{-
396 const QString output = QStringLiteral("{%1 %2.%3}").-
397 arg(script.nameSpace).arg(script.majorVersion).arg(script.minorVersion);-
398 return debug << qPrintable(output);
never executed: return debug << QtPrivate::asString(output).toLocal8Bit().constData();
0
399}-
400-
401QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0