OpenCoverage

qquickview.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickview.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQuick module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qquickview.h"-
41#include "qquickview_p.h"-
42-
43#include "qquickwindow_p.h"-
44#include "qquickitem_p.h"-
45#include "qquickitemchangelistener_p.h"-
46-
47#include <private/qqmlmemoryprofiler_p.h>-
48-
49#include <QtQml/qqmlengine.h>-
50#include <private/qqmlengine_p.h>-
51#include <private/qv4qobjectwrapper_p.h>-
52#include <QtCore/qbasictimer.h>-
53-
54QT_BEGIN_NAMESPACE-
55-
56void QQuickViewPrivate::init(QQmlEngine* e)-
57{-
58 Q_Q(QQuickView);-
59-
60 engine = e;-
61-
62 if (engine.isNull())
engine.isNull()Description
TRUEevaluated 3158 times by 78 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEevaluated 46 times by 6 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickview
  • tst_quicktestmainwithsetup
  • tst_testfiltering
46-3158
63 engine = new QQmlEngine(q);
executed 3158 times by 78 tests: engine = new QQmlEngine(q);
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
3158
64-
65 QQmlEngine::setContextForObject(contentItem, engine.data()->rootContext());-
66-
67 if (!engine.data()->incubationController())
!engine.data()...onController()Description
TRUEevaluated 3200 times by 83 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • ...
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickview
4-3200
68 engine.data()->setIncubationController(q->incubationController());
executed 3200 times by 83 tests: engine.data()->setIncubationController(q->incubationController());
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • ...
3200
69-
70 {-
71 // The content item has CppOwnership policy (set in QQuickWindow). Ensure the presence of a JS-
72 // wrapper so that the garbage collector can see the policy.-
73 QV4::ExecutionEngine *v4 = engine.data()->handle();-
74 QV4::QObjectWrapper::wrap(v4, contentItem);-
75 }-
76}
executed 3204 times by 83 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • ...
3204
77-
78QQuickViewPrivate::QQuickViewPrivate()-
79 : root(nullptr), component(nullptr), resizeMode(QQuickView::SizeViewToRootObject), initialSize(0,0)-
80{-
81}
executed 3204 times by 83 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • ...
3204
82-
83QQuickViewPrivate::~QQuickViewPrivate()-
84{-
85}-
86-
87void QQuickViewPrivate::execute()-
88{-
89 Q_Q(QQuickView);-
90 if (!engine) {
!engineDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 10688 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
2-10688
91 qWarning() << "QQuickView: invalid qml engine.";-
92 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickview
2
93 }-
94-
95 if (root) {
rootDescription
TRUEevaluated 2666 times by 6 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickborderimage
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquicktext
FALSEevaluated 8022 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
2666-8022
96 delete root;-
97 root = nullptr;-
98 }
executed 2666 times by 6 tests: end of block
Executed by:
  • tst_qqmlimport
  • tst_qquickborderimage
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquicktext
2666
99 if (component) {
componentDescription
TRUEevaluated 2666 times by 6 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickborderimage
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquicktext
FALSEevaluated 8022 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
2666-8022
100 delete component;-
101 component = nullptr;-
102 }
executed 2666 times by 6 tests: end of block
Executed by:
  • tst_qqmlimport
  • tst_qquickborderimage
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquicktext
2666
103 if (!source.isEmpty()) {
!source.isEmpty()Description
TRUEevaluated 5628 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEevaluated 5060 times by 2 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
5060-5628
104 QML_MEMORY_SCOPE_URL(engine.data()->baseUrl().resolved(source));-
105 component = new QQmlComponent(engine.data(), source, q);-
106 if (!component->isLoading()) {
!component->isLoading()Description
TRUEevaluated 5622 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquicktextedit
6-5622
107 q->continueExecute();-
108 } else {
executed 5622 times by 80 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
5622
109 QObject::connect(component, SIGNAL(statusChanged(QQmlComponent::Status)),-
110 q, SLOT(continueExecute()));-
111 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquicktextedit
6
112 }-
113}
executed 10688 times by 80 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
10688
114-
115void QQuickViewPrivate::itemGeometryChanged(QQuickItem *resizeItem, QQuickGeometryChange change,-
116 const QRectF &oldGeometry)-
117{-
118 Q_Q(QQuickView);-
119 if (resizeItem == root && resizeMode == QQuickView::SizeViewToRootObject) {
resizeItem == rootDescription
TRUEevaluated 188 times by 10 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
FALSEnever evaluated
resizeMode == ...ewToRootObjectDescription
TRUEevaluated 188 times by 10 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
FALSEnever evaluated
0-188
120 // wait for both width and height to be changed-
121 resizetimer.start(0,q);-
122 }
executed 188 times by 10 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
188
123 QQuickItemChangeListener::itemGeometryChanged(resizeItem, change, oldGeometry);-
124}
executed 188 times by 10 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
188
125-
126/*!-
127 \class QQuickView-
128 \since 5.0-
129 \brief The QQuickView class provides a window for displaying a Qt Quick user interface.-
130-
131 \inmodule QtQuick-
132-
133 This is a convenience subclass of QQuickWindow which-
134 will automatically load and display a QML scene when given the URL of the main source file. Alternatively,-
135 you can instantiate your own objects using QQmlComponent and place them in a manually setup QQuickWindow.-
136-
137 Typical usage:-
138-
139 \snippet qquickview-ex.cpp 0-
140-
141 To receive errors related to loading and executing QML with QQuickView,-
142 you can connect to the statusChanged() signal and monitor for QQuickView::Error.-
143 The errors are available via QQuickView::errors().-
144-
145 QQuickView also manages sizing of the view and root object. By default, the \l resizeMode-
146 is SizeViewToRootObject, which will load the component and resize it to the-
147 size of the view. Alternatively the resizeMode may be set to SizeRootObjectToView which-
148 will resize the view to the size of the root object.-
149-
150 \sa {Exposing Attributes of C++ Types to QML}, QQuickWidget-
151*/-
152-
153-
154/*! \fn void QQuickView::statusChanged(QQuickView::Status status)-
155 This signal is emitted when the component's current \a status changes.-
156*/-
157-
158/*!-
159 Constructs a QQuickView with the given \a parent.-
160 The default value of \a parent is 0.-
161-
162*/-
163QQuickView::QQuickView(QWindow *parent)-
164: QQuickWindow(*(new QQuickViewPrivate), parent)-
165{-
166 d_func()->init();-
167}
executed 3158 times by 78 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
3158
168-
169/*!-
170 Constructs a QQuickView with the given QML \a source and \a parent.-
171 The default value of \a parent is 0.-
172-
173*/-
174QQuickView::QQuickView(const QUrl &source, QWindow *parent)-
175 : QQuickView(parent)-
176{-
177 setSource(source);-
178}
executed 306 times by 8 tests: end of block
Executed by:
  • tst_qquickanchors
  • tst_qquickdynamicpropertyanimation
  • tst_qquickfontloader
  • tst_qquickimage
  • tst_qquickspringanimation
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
306
179-
180/*!-
181 Constructs a QQuickView with the given QML \a engine and \a parent.-
182-
183 Note: In this case, the QQuickView does not own the given \a engine object;-
184 it is the caller's responsibility to destroy the engine. If the \a engine is deleted-
185 before the view, status() will return QQuickView::Error.-
186-
187 \sa Status, status(), errors()-
188*/-
189QQuickView::QQuickView(QQmlEngine* engine, QWindow *parent)-
190 : QQuickWindow(*(new QQuickViewPrivate), parent)-
191{-
192 Q_ASSERT(engine);-
193 d_func()->init(engine);-
194}
executed 46 times by 6 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquickview
  • tst_quicktestmainwithsetup
  • tst_testfiltering
46
195-
196/*!-
197 \internal-
198*/-
199QQuickView::QQuickView(const QUrl &source, QQuickRenderControl *control)-
200 : QQuickWindow(*(new QQuickViewPrivate), control)-
201{-
202 d_func()->init();-
203 setSource(source);-
204}
never executed: end of block
0
205-
206/*!-
207 Destroys the QQuickView.-
208*/-
209QQuickView::~QQuickView()-
210{-
211 // Ensure that the component is destroyed before the engine; the engine may-
212 // be a child of the QQuickViewPrivate, and will be destroyed by its dtor-
213 Q_D(QQuickView);-
214 delete d->root;-
215 d->root = nullptr;-
216}
executed 3192 times by 83 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • ...
3192
217-
218/*!-
219 \property QQuickView::source-
220 \brief The URL of the source of the QML component.-
221-
222 Ensure that the URL provided is full and correct, in particular, use-
223 \l QUrl::fromLocalFile() when loading a file from the local filesystem.-
224-
225 Note that setting a source URL will result in the QML component being-
226 instantiated, even if the URL is unchanged from the current value.-
227*/-
228-
229/*!-
230 Sets the source to the \a url, loads the QML component and instantiates it.-
231-
232 Ensure that the URL provided is full and correct, in particular, use-
233 \l QUrl::fromLocalFile() when loading a file from the local filesystem.-
234-
235 Calling this method multiple times with the same url will result-
236 in the QML component being reinstantiated.-
237 */-
238void QQuickView::setSource(const QUrl& url)-
239{-
240 Q_D(QQuickView);-
241 d->source = url;-
242 d->execute();-
243}
executed 10690 times by 80 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
10690
244-
245/*!-
246 \internal-
247-
248 Set the source \a url, \a component and content \a item (root of the QML object hierarchy) directly.-
249 */-
250void QQuickView::setContent(const QUrl& url, QQmlComponent *component, QObject* item)-
251{-
252 Q_D(QQuickView);-
253 d->source = url;-
254 d->component = component;-
255-
256 if (d->component && d->component->isError()) {
d->componentDescription
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquickfontloader_static
  • tst_qquicklistview
FALSEnever evaluated
d->component->isError()Description
TRUEnever evaluated
FALSEevaluated 16 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquickfontloader_static
  • tst_qquicklistview
0-16
257 const QList<QQmlError> errorList = d->component->errors();-
258 for (const QQmlError &error : errorList) {-
259 QMessageLogger(error.url().toString().toLatin1().constData(), error.line(), nullptr).warning()-
260 << error;-
261 }
never executed: end of block
0
262 emit statusChanged(status());-
263 return;
never executed: return;
0
264 }-
265-
266 d->setRootObject(item);-
267 emit statusChanged(status());-
268}
executed 16 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qquickfontloader_static
  • tst_qquicklistview
16
269-
270/*!-
271 Returns the source URL, if set.-
272-
273 \sa setSource()-
274 */-
275QUrl QQuickView::source() const-
276{-
277 Q_D(const QQuickView);-
278 return d->source;
never executed: return d->source;
0
279}-
280-
281/*!-
282 Returns a pointer to the QQmlEngine used for instantiating-
283 QML Components.-
284 */-
285QQmlEngine* QQuickView::engine() const-
286{-
287 Q_D(const QQuickView);-
288 return d->engine ? const_cast<QQmlEngine *>(d->engine.data()) : nullptr;
executed 200 times by 16 tests: return d->engine ? const_cast<QQmlEngine *>(d->engine.data()) : nullptr;
Executed by:
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
  • tst_quicktestmainwithsetup
  • tst_testfiltering
200
289}-
290-
291/*!-
292 This function returns the root of the context hierarchy. Each QML-
293 component is instantiated in a QQmlContext. QQmlContext's are-
294 essential for passing data to QML components. In QML, contexts are-
295 arranged hierarchically and this hierarchy is managed by the-
296 QQmlEngine.-
297 */-
298QQmlContext* QQuickView::rootContext() const-
299{-
300 Q_D(const QQuickView);-
301 return d->engine ? d->engine.data()->rootContext() : nullptr;
executed 3666 times by 19 tests: return d->engine ? d->engine.data()->rootContext() : nullptr;
Executed by:
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_scenegraph
  • tst_testfiltering
3666
302}-
303-
304/*!-
305 \enum QQuickView::Status-
306 Specifies the loading status of the QQuickView.-
307-
308 \value Null This QQuickView has no source set.-
309 \value Ready This QQuickView has loaded and created the QML component.-
310 \value Loading This QQuickView is loading network data.-
311 \value Error One or more errors has occurred. Call errors() to retrieve a list-
312 of errors.-
313*/-
314-
315/*! \enum QQuickView::ResizeMode-
316-
317 This enum specifies how to resize the view.-
318-
319 \value SizeViewToRootObject The view resizes with the root item in the QML.-
320 \value SizeRootObjectToView The view will automatically resize the root item to the size of the view.-
321*/-
322-
323/*!-
324 \property QQuickView::status-
325 The component's current \l{QQuickView::Status} {status}.-
326*/-
327-
328QQuickView::Status QQuickView::status() const-
329{-
330 Q_D(const QQuickView);-
331 if (!d->engine)
!d->engineDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 7124 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
2-7124
332 return QQuickView::Error;
executed 2 times by 1 test: return QQuickView::Error;
Executed by:
  • tst_qquickview
2
333-
334 if (!d->component)
!d->componentDescription
TRUEnever evaluated
FALSEevaluated 7124 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
0-7124
335 return QQuickView::Null;
never executed: return QQuickView::Null;
0
336-
337 if (d->component->status() == QQmlComponent::Ready && !d->root)
d->component->...mponent::ReadyDescription
TRUEevaluated 7054 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquicktextedit
  • tst_qquickview
!d->rootDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 7050 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
4-7054
338 return QQuickView::Error;
executed 4 times by 1 test: return QQuickView::Error;
Executed by:
  • tst_qquickview
4
339-
340 return QQuickView::Status(d->component->status());
executed 7120 times by 82 tests: return QQuickView::Status(d->component->status());
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
7120
341}-
342-
343/*!-
344 Return the list of errors that occurred during the last compile or create-
345 operation. When the status is not Error, an empty list is returned.-
346*/-
347QList<QQmlError> QQuickView::errors() const-
348{-
349 Q_D(const QQuickView);-
350 QList<QQmlError> errs;-
351-
352 if (d->component)
d->componentDescription
TRUEevaluated 30 times by 3 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
  • tst_qquickview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickview
6-30
353 errs = d->component->errors();
executed 30 times by 3 tests: errs = d->component->errors();
Executed by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
  • tst_qquickview
30
354-
355 if (!d->engine) {
!d->engineDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 32 times by 3 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
  • tst_qquickview
4-32
356 QQmlError error;-
357 error.setDescription(QLatin1String("QQuickView: invalid qml engine."));-
358 errs << error;-
359 } else if (d->component && d->component->status() == QQmlComponent::Ready && !d->root) {
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickview
d->componentDescription
TRUEevaluated 30 times by 3 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
  • tst_qquickview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
d->component->...mponent::ReadyDescription
TRUEevaluated 26 times by 3 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
  • tst_qquickview
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickview
!d->rootDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
2-30
360 QQmlError error;-
361 error.setDescription(QLatin1String("QQuickView: invalid root object."));-
362 errs << error;-
363 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickview
2
364-
365 return errs;
executed 36 times by 3 tests: return errs;
Executed by:
  • tst_qqmlimport
  • tst_qquickdesignersupport
  • tst_qquickview
36
366}-
367-
368/*!-
369 \property QQuickView::resizeMode-
370 \brief whether the view should resize the window contents-
371-
372 If this property is set to SizeViewToRootObject (the default), the view-
373 resizes to the size of the root item in the QML.-
374-
375 If this property is set to SizeRootObjectToView, the view will-
376 automatically resize the root item to the size of the view.-
377-
378 \sa initialSize()-
379*/-
380-
381void QQuickView::setResizeMode(ResizeMode mode)-
382{-
383 Q_D(QQuickView);-
384 if (d->resizeMode == mode)
d->resizeMode == modeDescription
TRUEevaluated 44 times by 4 tests
Evaluated by:
  • tst_drawingmodes
  • tst_qquickview
  • tst_rendernode
  • tst_scenegraph
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
18-44
385 return;
executed 44 times by 4 tests: return;
Executed by:
  • tst_drawingmodes
  • tst_qquickview
  • tst_rendernode
  • tst_scenegraph
44
386-
387 if (d->root) {
d->rootDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
4-14
388 if (d->resizeMode == SizeViewToRootObject) {
d->resizeMode ...ewToRootObjectDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
2
389 QQuickItemPrivate *p = QQuickItemPrivate::get(d->root);-
390 p->removeItemChangeListener(d, QQuickItemPrivate::Geometry);-
391 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickview
2
392 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickview
4
393-
394 d->resizeMode = mode;-
395 if (d->root) {
d->rootDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
4-14
396 d->initResize();-
397 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickview
4
398}
executed 18 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
18
399-
400void QQuickViewPrivate::initResize()-
401{-
402 if (root) {
rootDescription
TRUEevaluated 5638 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
FALSEnever evaluated
0-5638
403 if (resizeMode == QQuickView::SizeViewToRootObject) {
resizeMode == ...ewToRootObjectDescription
TRUEevaluated 5622 times by 81 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEevaluated 16 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
16-5622
404 QQuickItemPrivate *p = QQuickItemPrivate::get(root);-
405 p->addItemChangeListener(this, QQuickItemPrivate::Geometry);-
406 }
executed 5622 times by 81 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
5622
407 }
executed 5638 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5638
408 updateSize();-
409}
executed 5638 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5638
410-
411void QQuickViewPrivate::updateSize()-
412{-
413 Q_Q(QQuickView);-
414 if (!root)
!rootDescription
TRUEnever evaluated
FALSEevaluated 5711 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
0-5711
415 return;
never executed: return;
0
416-
417 if (resizeMode == QQuickView::SizeViewToRootObject) {
resizeMode == ...ewToRootObjectDescription
TRUEevaluated 5674 times by 81 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEevaluated 37 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
37-5674
418 QSize newSize = QSize(root->width(), root->height());-
419 if (newSize.isValid() && newSize != q->size()) {
newSize.isValid()Description
TRUEevaluated 5674 times by 81 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEnever evaluated
newSize != q->size()Description
TRUEevaluated 44 times by 5 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquickpositioners
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
FALSEevaluated 5630 times by 81 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
0-5674
420 q->resize(newSize);-
421 }
executed 44 times by 5 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquickpositioners
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
44
422 } else if (resizeMode == QQuickView::SizeRootObjectToView) {
executed 5674 times by 81 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
resizeMode == ...otObjectToViewDescription
TRUEevaluated 37 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
FALSEnever evaluated
0-5674
423 bool needToUpdateWidth = !qFuzzyCompare(q->width(), root->width());-
424 bool needToUpdateHeight = !qFuzzyCompare(q->height(), root->height());-
425-
426 if (needToUpdateWidth && needToUpdateHeight)
needToUpdateWidthDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickview
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
needToUpdateHeightDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
2-25
427 root->setSize(QSizeF(q->width(), q->height()));
executed 10 times by 2 tests: root->setSize(QSizeF(q->width(), q->height()));
Executed by:
  • tst_qquicklistview
  • tst_qquickview
10
428 else if (needToUpdateWidth)
needToUpdateWidthDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
2-25
429 root->setWidth(q->width());
executed 2 times by 1 test: root->setWidth(q->width());
Executed by:
  • tst_qquicklistview
2
430 else if (needToUpdateHeight)
needToUpdateHeightDescription
TRUEnever evaluated
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
0-25
431 root->setHeight(q->height());
never executed: root->setHeight(q->height());
0
432 }
executed 37 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
37
433}
executed 5711 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5711
434-
435QSize QQuickViewPrivate::rootObjectSize() const-
436{-
437 QSize rootObjectSize(0,0);-
438 int widthCandidate = -1;-
439 int heightCandidate = -1;-
440 if (root) {
rootDescription
TRUEevaluated 5650 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
FALSEnever evaluated
0-5650
441 widthCandidate = root->width();-
442 heightCandidate = root->height();-
443 }
executed 5650 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5650
444 if (widthCandidate > 0) {
widthCandidate > 0Description
TRUEevaluated 5460 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • ...
FALSEevaluated 190 times by 19 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquickaccessible
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickopenglinfo
  • tst_qquickparticlesystem
  • tst_qquickpathview
  • tst_qquickrectangle
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_testfiltering
190-5460
445 rootObjectSize.setWidth(widthCandidate);-
446 }
executed 5460 times by 75 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • ...
5460
447 if (heightCandidate > 0) {
heightCandidate > 0Description
TRUEevaluated 5460 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • ...
FALSEevaluated 190 times by 19 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquickaccessible
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickopenglinfo
  • tst_qquickparticlesystem
  • tst_qquickpathview
  • tst_qquickrectangle
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_testfiltering
190-5460
448 rootObjectSize.setHeight(heightCandidate);-
449 }
executed 5460 times by 75 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • ...
5460
450 return rootObjectSize;
executed 5650 times by 82 tests: return rootObjectSize;
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5650
451}-
452-
453QQuickView::ResizeMode QQuickView::resizeMode() const-
454{-
455 Q_D(const QQuickView);-
456 return d->resizeMode;
never executed: return d->resizeMode;
0
457}-
458-
459/*!-
460 \internal-
461 */-
462void QQuickView::continueExecute()-
463{-
464 Q_D(QQuickView);-
465 disconnect(d->component, SIGNAL(statusChanged(QQmlComponent::Status)), this, SLOT(continueExecute()));-
466-
467 if (d->component->isError()) {
d->component->isError()Description
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_qqmlimport
  • tst_qquicktextedit
  • tst_qquickview
FALSEevaluated 5620 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
8-5620
468 const QList<QQmlError> errorList = d->component->errors();-
469 for (const QQmlError &error : errorList) {-
470 QMessageLogger(error.url().toString().toLatin1().constData(), error.line(), nullptr).warning()-
471 << error;-
472 }
executed 12 times by 3 tests: end of block
Executed by:
  • tst_qqmlimport
  • tst_qquicktextedit
  • tst_qquickview
12
473 emit statusChanged(status());-
474 return;
executed 8 times by 3 tests: return;
Executed by:
  • tst_qqmlimport
  • tst_qquicktextedit
  • tst_qquickview
8
475 }-
476-
477 QObject *obj = d->component->create();-
478-
479 if (d->component->isError()) {
d->component->isError()Description
TRUEnever evaluated
FALSEevaluated 5620 times by 80 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
0-5620
480 const QList<QQmlError> errorList = d->component->errors();-
481 for (const QQmlError &error : errorList) {-
482 QMessageLogger(error.url().toString().toLatin1().constData(), error.line(), nullptr).warning()-
483 << error;-
484 }
never executed: end of block
0
485 emit statusChanged(status());-
486 return;
never executed: return;
0
487 }-
488-
489 d->setRootObject(obj);-
490 emit statusChanged(status());-
491}
executed 5620 times by 80 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
5620
492-
493-
494/*!-
495 \internal-
496*/-
497void QQuickViewPrivate::setRootObject(QObject *obj)-
498{-
499 Q_Q(QQuickView);-
500 if (root == obj)
root == objDescription
TRUEnever evaluated
FALSEevaluated 5636 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
0-5636
501 return;
never executed: return;
0
502 if (QQuickItem *sgItem = qobject_cast<QQuickItem *>(obj)) {
QQuickItem *sg...ckItem *>(obj)Description
TRUEevaluated 5634 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
2-5634
503 root = sgItem;-
504 sgItem->setParentItem(q->QQuickWindow::contentItem());-
505 QQml_setParent_noEvent(sgItem, q->QQuickWindow::contentItem());-
506 } else if (qobject_cast<QWindow *>(obj)) {
executed 5634 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
qobject_cast<QWindow *>(obj)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
FALSEnever evaluated
0-5634
507 qWarning() << "QQuickView does not support using windows as a root item." << endl-
508 << endl-
509 << "If you wish to create your root window from QML, consider using QQmlApplicationEngine instead." << endl;-
510 } else {
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickview
2
511 qWarning() << "QQuickView only supports loading of root objects that derive from QQuickItem." << endl-
512 << endl-
513 << "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << endl-
514 << "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << endl;-
515 delete obj;-
516 root = nullptr;-
517 }
never executed: end of block
0
518 if (root) {
rootDescription
TRUEevaluated 5634 times by 82 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickview
2-5634
519 initialSize = rootObjectSize();-
520 if ((resizeMode == QQuickView::SizeViewToRootObject || q->width() <= 1 || q->height() <= 1) &&
resizeMode == ...ewToRootObjectDescription
TRUEevaluated 5620 times by 81 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • ...
FALSEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
q->width() <= 1Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquickview
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickview
q->height() <= 1Description
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickview
0-5620
521 initialSize != q->size()) {
initialSize != q->size()Description
TRUEevaluated 2578 times by 75 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • ...
FALSEevaluated 3052 times by 25 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qquickaccessible
  • tst_qquickborderimage
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickopenglinfo
  • tst_qquickparticlesystem
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickrectangle
  • tst_qquickrepeater
  • tst_qquicktext
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
2578-3052
522 q->resize(initialSize);-
523 }
executed 2578 times by 75 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • ...
2578
524 initResize();-
525 }
executed 5634 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5634
526}
executed 5636 times by 82 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • ...
5636
527-
528/*!-
529 \internal-
530 If the \l {QTimerEvent} {timer event} \a e is this-
531 view's resize timer, sceneResized() is emitted.-
532 */-
533void QQuickView::timerEvent(QTimerEvent* e)-
534{-
535 Q_D(QQuickView);-
536 if (!e || e->timerId() == d->resizetimer.timerId()) {
!eDescription
TRUEnever evaluated
FALSEevaluated 52 times by 6 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
e->timerId() =...imer.timerId()Description
TRUEevaluated 52 times by 6 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
FALSEnever evaluated
0-52
537 d->updateSize();-
538 d->resizetimer.stop();-
539 }
executed 52 times by 6 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
52
540}
executed 52 times by 6 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextedit
  • tst_qquicktextinput
  • tst_qquickview
52
541-
542/*!-
543 \internal-
544 Preferred size follows the root object geometry.-
545*/-
546QSize QQuickView::sizeHint() const-
547{-
548 Q_D(const QQuickView);-
549 QSize rootObjectSize = d->rootObjectSize();-
550 if (rootObjectSize.isEmpty()) {
rootObjectSize.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickview
0-16
551 return size();
never executed: return size();
0
552 } else {-
553 return rootObjectSize;
executed 16 times by 1 test: return rootObjectSize;
Executed by:
  • tst_qquickview
16
554 }-
555}-
556-
557/*!-
558 Returns the initial size of the root object.-
559-
560 If \l resizeMode is QQuickItem::SizeRootObjectToView the root object will be-
561 resized to the size of the view. initialSize contains the size of the-
562 root object before it was resized.-
563*/-
564QSize QQuickView::initialSize() const-
565{-
566 Q_D(const QQuickView);-
567 return d->initialSize;
executed 10 times by 1 test: return d->initialSize;
Executed by:
  • tst_qquickview
10
568}-
569-
570/*!-
571 Returns the view's root \l {QQuickItem} {item}.-
572 */-
573QQuickItem *QQuickView::rootObject() const-
574{-
575 Q_D(const QQuickView);-
576 return d->root;
executed 16939 times by 68 tests: return d->root;
Executed by:
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdraghandler
  • tst_qquickdynamicpropertyanimation
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickflipable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgraphicsinfo
  • ...
16939
577}-
578-
579/*!-
580 \internal-
581 This function handles the \l {QResizeEvent} {resize event}-
582 \a e.-
583 */-
584void QQuickView::resizeEvent(QResizeEvent *e)-
585{-
586 Q_D(QQuickView);-
587 if (d->resizeMode == SizeRootObjectToView)
d->resizeMode ...otObjectToViewDescription
TRUEevaluated 21 times by 3 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
FALSEevaluated 2765 times by 72 tests
Evaluated by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgraphicsinfo
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
21-2765
588 d->updateSize();
executed 21 times by 3 tests: d->updateSize();
Executed by:
  • tst_qqmldebugjs
  • tst_qquicklistview
  • tst_qquickview
21
589-
590 QQuickWindow::resizeEvent(e);-
591}
executed 2786 times by 73 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgraphicsinfo
  • tst_qquickgravity
  • tst_qquickgridview
  • ...
2786
592-
593/*! \reimp */-
594void QQuickView::keyPressEvent(QKeyEvent *e)-
595{-
596 QQuickWindow::keyPressEvent(e);-
597}
executed 1072 times by 7 tests: end of block
Executed by:
  • tst_qquickfocusscope
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquicktextedit
  • tst_qquicktextinput
1072
598-
599/*! \reimp */-
600void QQuickView::keyReleaseEvent(QKeyEvent *e)-
601{-
602 QQuickWindow::keyReleaseEvent(e);-
603}
executed 786 times by 7 tests: end of block
Executed by:
  • tst_qquickfocusscope
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquicktextedit
  • tst_qquicktextinput
786
604-
605/*! \reimp */-
606void QQuickView::mouseMoveEvent(QMouseEvent *e)-
607{-
608 QQuickWindow::mouseMoveEvent(e);-
609}
executed 6326 times by 14 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickpointerhandler
  • tst_qquicktaphandler
  • tst_qquicktextedit
  • tst_qquicktextinput
6326
610-
611/*! \reimp */-
612void QQuickView::mousePressEvent(QMouseEvent *e)-
613{-
614 QQuickWindow::mousePressEvent(e);-
615}
executed 1752 times by 14 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickpointerhandler
  • tst_qquicktaphandler
  • tst_qquicktextedit
  • tst_qquicktextinput
1752
616-
617/*! \reimp */-
618void QQuickView::mouseReleaseEvent(QMouseEvent *e)-
619{-
620 QQuickWindow::mouseReleaseEvent(e);-
621}
executed 1740 times by 14 tests: end of block
Executed by:
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickpointerhandler
  • tst_qquicktaphandler
  • tst_qquicktextedit
  • tst_qquicktextinput
1740
622-
623-
624QT_END_NAMESPACE-
625-
626#include "moc_qquickview.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0