OpenCoverage

qquickitemsmodule.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickitemsmodule.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 "qquickitemsmodule_p.h"-
41-
42#include "qquickitem.h"-
43#include "qquickitem_p.h"-
44#include "qquickevents_p_p.h"-
45#include "qquickrectangle_p.h"-
46#include "qquickfocusscope_p.h"-
47#include "qquicktext_p.h"-
48#include "qquicktextinput_p.h"-
49#include "qquicktextedit_p.h"-
50#include "qquicktextdocument.h"-
51#include "qquickimage_p.h"-
52#include "qquickborderimage_p.h"-
53#include "qquickscalegrid_p_p.h"-
54#include "qquickmousearea_p.h"-
55#include "qquickpincharea_p.h"-
56#include "qquickflickable_p.h"-
57#include "qquickflickable_p_p.h"-
58#if QT_CONFIG(quick_listview)-
59#include "qquicklistview_p.h"-
60#endif-
61#if QT_CONFIG(quick_gridview)-
62#include "qquickgridview_p.h"-
63#endif-
64#if QT_CONFIG(quick_pathview)-
65#include "qquickpathview_p.h"-
66#endif-
67#if QT_CONFIG(quick_viewtransitions)-
68#include "qquickitemviewtransition_p.h"-
69#endif-
70#if QT_CONFIG(quick_path)-
71#include <private/qquickpath_p.h>-
72#include <private/qquickpathinterpolator_p.h>-
73#endif-
74#if QT_CONFIG(quick_positioners)-
75#include "qquickpositioners_p.h"-
76#endif-
77#if QT_CONFIG(quick_repeater)-
78#include "qquickrepeater_p.h"-
79#endif-
80#include "qquickloader_p.h"-
81#if QT_CONFIG(quick_animatedimage)-
82#include "qquickanimatedimage_p.h"-
83#endif-
84#if QT_CONFIG(quick_flipable)-
85#include "qquickflipable_p.h"-
86#endif-
87#include "qquicktranslate_p.h"-
88#include "qquickstateoperations_p.h"-
89#include "qquickitemanimation_p.h"-
90//#include <private/qquickpincharea_p.h>-
91#if QT_CONFIG(quick_canvas)-
92#include <QtQuick/private/qquickcanvasitem_p.h>-
93#include <QtQuick/private/qquickcontext2d_p.h>-
94#endif-
95#include "qquickitemgrabresult.h"-
96#if QT_CONFIG(quick_sprite)-
97#include "qquicksprite_p.h"-
98#include "qquickspritesequence_p.h"-
99#include "qquickanimatedsprite_p.h"-
100#endif-
101#if QT_CONFIG(opengl)-
102# include "qquickopenglinfo_p.h"-
103#endif-
104#include "qquickgraphicsinfo_p.h"-
105#if QT_CONFIG(quick_shadereffect)-
106#include <QtQuick/private/qquickshadereffectsource_p.h>-
107#include "qquickshadereffect_p.h"-
108#include "qquickshadereffectmesh_p.h"-
109#endif-
110#include "qquickdrag_p.h"-
111#include "qquickdroparea_p.h"-
112#include "qquickmultipointtoucharea_p.h"-
113#include <private/qqmlmetatype_p.h>-
114#include <QtQuick/private/qquickaccessibleattached_p.h>-
115-
116QT_BEGIN_NAMESPACE-
117Q_DECLARE_LOGGING_CATEGORY(lcTransient)-
118QT_END_NAMESPACE-
119-
120static QQmlPrivate::AutoParentResult qquickitem_autoParent(QObject *obj, QObject *parent)-
121{-
122 // When setting a parent (especially during dynamic object creation) in QML,-
123 // also try to set up the analogous item/window relationship.-
124 if (QQuickItem *parentItem = qmlobject_cast<QQuickItem *>(parent)) {
QQuickItem *pa...tem *>(parent)Description
TRUEevaluated 2515 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
FALSEevaluated 40 times by 4 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
40-2515
125 QQuickItem *item = qmlobject_cast<QQuickItem *>(obj);-
126 if (item) {
itemDescription
TRUEevaluated 2493 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickbehaviors
  • tst_qquicklayouts
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
FALSEevaluated 22 times by 6 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquicklistview
22-2493
127 // An Item has another Item-
128 item->setParentItem(parentItem);-
129 return QQmlPrivate::Parented;
executed 2493 times by 13 tests: return QQmlPrivate::Parented;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickbehaviors
  • tst_qquicklayouts
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
2493
130 } else if (parentItem->window()) {
parentItem->window()Description
TRUEnever evaluated
FALSEevaluated 22 times by 6 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquicklistview
0-22
131 QQuickWindow *win = qmlobject_cast<QQuickWindow *>(obj);-
132 if (win) {
winDescription
TRUEnever evaluated
FALSEnever evaluated
0
133 // A Window inside an Item should be transient for that item's window-
134 qCDebug(lcTransient) << win << "is transient for" << parentItem->window();
never executed: QMessageLogger(__FILE__, 134, __PRETTY_FUNCTION__, lcTransient().categoryName()).debug() << win << "is transient for" << parentItem->window();
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
0
135 win->setTransientParent(parentItem->window());-
136 return QQmlPrivate::Parented;
never executed: return QQmlPrivate::Parented;
0
137 }-
138 }
never executed: end of block
0
139 return QQmlPrivate::IncompatibleObject;
executed 22 times by 6 tests: return QQmlPrivate::IncompatibleObject;
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquicklistview
22
140 } else if (QQuickWindow *parentWindow = qmlobject_cast<QQuickWindow *>(parent)) {
QQuickWindow *...dow *>(parent)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
FALSEevaluated 28 times by 4 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
12-28
141 QQuickWindow *win = qmlobject_cast<QQuickWindow *>(obj);-
142 if (win) {
winDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
4-8
143 // A Window inside a Window should be transient for it-
144 qCDebug(lcTransient) << win << "is transient for" << parentWindow;
never executed: QMessageLogger(__FILE__, 144, __PRETTY_FUNCTION__, lcTransient().categoryName()).debug() << win << "is transient for" << parentWindow;
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
0-4
145 win->setTransientParent(parentWindow);-
146 return QQmlPrivate::Parented;
executed 4 times by 1 test: return QQmlPrivate::Parented;
Executed by:
  • tst_qqmlcomponent
4
147 } else {-
148 QQuickItem *item = qmlobject_cast<QQuickItem *>(obj);-
149 if (item) {
itemDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
4
150 // The parent of an Item inside a Window is actually the implicit content Item-
151 item->setParentItem(parentWindow->contentItem());-
152 return QQmlPrivate::Parented;
executed 4 times by 1 test: return QQmlPrivate::Parented;
Executed by:
  • tst_qqmlcomponent
4
153 }-
154 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmlcomponent
4
155 return QQmlPrivate::IncompatibleObject;
executed 4 times by 1 test: return QQmlPrivate::IncompatibleObject;
Executed by:
  • tst_qqmlcomponent
4
156 } else if (qmlobject_cast<QQuickItem *>(obj)) {
qmlobject_cast...ckItem *>(obj)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlcomponent
FALSEevaluated 24 times by 4 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
4-24
157 return QQmlPrivate::IncompatibleParent;
executed 4 times by 1 test: return QQmlPrivate::IncompatibleParent;
Executed by:
  • tst_qqmlcomponent
4
158 }-
159 return QQmlPrivate::IncompatibleObject;
executed 24 times by 4 tests: return QQmlPrivate::IncompatibleObject;
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
24
160}-
161-
162static void qt_quickitems_defineModule(const char *uri, int major, int minor)-
163{-
164 QQmlPrivate::RegisterAutoParent autoparent = { 0, &qquickitem_autoParent };-
165 QQmlPrivate::qmlregister(QQmlPrivate::AutoParentRegistration, &autoparent);-
166-
167 // Register the latest version, even if there are no new types or new revisions for existing types yet.-
168 qmlRegisterModule(uri, 2, QT_VERSION_MINOR);-
169-
170#if !QT_CONFIG(quick_animatedimage)-
171 qmlRegisterTypeNotAvailable(uri,major,minor,"AnimatedImage", QCoreApplication::translate("QQuickAnimatedImage","Qt was built without support for QMovie"));-
172#else-
173 qmlRegisterType<QQuickAnimatedImage>(uri,major,minor,"AnimatedImage");-
174#endif-
175 qmlRegisterType<QQuickBorderImage>(uri,major,minor,"BorderImage");-
176 qmlRegisterType<QQuickFlickable>(uri,major,minor,"Flickable");-
177#if QT_CONFIG(quick_flipable)-
178 qmlRegisterType<QQuickFlipable>(uri,major,minor,"Flipable");-
179#endif-
180// qmlRegisterType<QQuickFocusPanel>(uri,major,minor,"FocusPanel");-
181 qmlRegisterType<QQuickFocusScope>(uri,major,minor,"FocusScope");-
182 qmlRegisterType<QQuickGradient>(uri,major,minor,"Gradient");-
183 qmlRegisterType<QQuickGradientStop>(uri,major,minor,"GradientStop");-
184#if QT_CONFIG(quick_positioners)-
185 qmlRegisterType<QQuickColumn>(uri,major,minor,"Column");-
186 qmlRegisterType<QQuickFlow>(uri,major,minor,"Flow");-
187 qmlRegisterType<QQuickGrid>(uri,major,minor,"Grid");-
188 qmlRegisterUncreatableType<QQuickBasePositioner>(uri,major,minor,"Positioner",-
189 QStringLiteral("Positioner is an abstract type that is only available as an attached property."));
executed 374 times by 132 tests: return qstring_literal_temp;
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
  • ...
374
190 qmlRegisterType<QQuickRow>(uri,major,minor,"Row");-
191#endif-
192#if QT_CONFIG(quick_gridview)-
193 qmlRegisterType<QQuickGridView>(uri,major,minor,"GridView");-
194#endif-
195 qmlRegisterType<QQuickImage>(uri,major,minor,"Image");-
196 qmlRegisterType<QQuickItem>(uri,major,minor,"Item");-
197#if QT_CONFIG(quick_listview)-
198 qmlRegisterType<QQuickListView>(uri,major,minor,"ListView");-
199 qmlRegisterType<QQuickViewSection>(uri,major,minor,"ViewSection");-
200#endif-
201 qmlRegisterType<QQuickLoader>(uri,major,minor,"Loader");-
202 qmlRegisterType<QQuickMouseArea>(uri,major,minor,"MouseArea");-
203#if QT_CONFIG(quick_path)-
204 qmlRegisterType<QQuickPath>(uri,major,minor,"Path");-
205 qmlRegisterType<QQuickPathAttribute>(uri,major,minor,"PathAttribute");-
206 qmlRegisterType<QQuickPathCubic>(uri,major,minor,"PathCubic");-
207 qmlRegisterType<QQuickPathLine>(uri,major,minor,"PathLine");-
208 qmlRegisterType<QQuickPathPercent>(uri,major,minor,"PathPercent");-
209 qmlRegisterType<QQuickPathQuad>(uri,major,minor,"PathQuad");-
210 qmlRegisterType<QQuickPathCatmullRomCurve>("QtQuick",2,0,"PathCurve");-
211 qmlRegisterType<QQuickPathArc>("QtQuick",2,0,"PathArc");-
212 qmlRegisterType<QQuickPathSvg>("QtQuick",2,0,"PathSvg");-
213#endif-
214#if QT_CONFIG(quick_pathview)-
215 qmlRegisterType<QQuickPathView>(uri,major,minor,"PathView");-
216#endif-
217 qmlRegisterType<QQuickRectangle>(uri,major,minor,"Rectangle");-
218#if QT_CONFIG(quick_repeater)-
219 qmlRegisterType<QQuickRepeater>(uri,major,minor,"Repeater");-
220#endif-
221 qmlRegisterType<QQuickTranslate>(uri,major,minor,"Translate");-
222 qmlRegisterType<QQuickRotation>(uri,major,minor,"Rotation");-
223 qmlRegisterType<QQuickScale>(uri,major,minor,"Scale");-
224 qmlRegisterType<QQuickMatrix4x4>(uri,2,3,"Matrix4x4");-
225 qmlRegisterType<QQuickText>(uri,major,minor,"Text");-
226 qmlRegisterType<QQuickTextEdit>(uri,major,minor,"TextEdit");-
227 qmlRegisterType<QQuickTextEdit,1>(uri,2,1,"TextEdit");-
228 qmlRegisterType<QQuickTextInput>(uri,major,minor,"TextInput");-
229 qmlRegisterType<QQuickTextInput,2>(uri,2,2,"TextInput");-
230 qmlRegisterType<QQuickTextInput,3>(uri,2,4,"TextInput");-
231 qmlRegisterType<QQuickItemGrabResult>();-
232#if QT_CONFIG(quick_shadereffect)-
233 qmlRegisterType<QQuickItemLayer>();-
234#endif-
235 qmlRegisterType<QQuickAnchors>();-
236 qmlRegisterType<QQuickKeyEvent>();-
237 qmlRegisterType<QQuickMouseEvent>();-
238 qmlRegisterType<QQuickWheelEvent>();-
239 qmlRegisterType<QQuickCloseEvent>();-
240 qmlRegisterType<QQuickTransform>();-
241#if QT_CONFIG(quick_path)-
242 qmlRegisterType<QQuickPathElement>();-
243 qmlRegisterType<QQuickCurve>();-
244#endif-
245 qmlRegisterType<QQuickScaleGrid>();-
246 qmlRegisterType<QQuickTextLine>();-
247 qmlRegisterType<QQuickPen>();-
248 qmlRegisterType<QQuickFlickableVisibleArea>();-
249 qRegisterMetaType<QQuickAnchorLine>("QQuickAnchorLine");-
250-
251 qmlRegisterType<QQuickTextDocument>();-
252-
253-
254 qmlRegisterUncreatableType<QQuickKeyNavigationAttached>(uri,major,minor,"KeyNavigation",QQuickKeyNavigationAttached::tr("KeyNavigation is only available via attached properties"));-
255 qmlRegisterUncreatableType<QQuickKeysAttached>(uri,major,minor,"Keys",QQuickKeysAttached::tr("Keys is only available via attached properties"));-
256 qmlRegisterUncreatableType<QQuickLayoutMirroringAttached>(uri,major,minor,"LayoutMirroring", QQuickLayoutMirroringAttached::tr("LayoutMirroring is only available via attached properties"));-
257#if QT_CONFIG(quick_viewtransitions)-
258 qmlRegisterUncreatableType<QQuickViewTransitionAttached>(uri,major,minor,"ViewTransition",QQuickViewTransitionAttached::tr("ViewTransition is only available via attached properties"));-
259#endif-
260-
261 qmlRegisterType<QQuickPinchArea>(uri,major,minor,"PinchArea");-
262 qmlRegisterType<QQuickPinch>(uri,major,minor,"Pinch");-
263 qmlRegisterType<QQuickPinchEvent>();-
264-
265#if QT_CONFIG(quick_shadereffect)-
266 qmlRegisterType<QQuickShaderEffectSource>("QtQuick", 2, 0, "ShaderEffectSource");-
267 qmlRegisterUncreatableType<QQuickShaderEffectMesh>("QtQuick", 2, 0, "ShaderEffectMesh", QQuickShaderEffectMesh::tr("Cannot create instance of abstract class ShaderEffectMesh."));-
268 qmlRegisterType<QQuickGridMesh>("QtQuick", 2, 0, "GridMesh");-
269 qmlRegisterType<QQuickShaderEffect>("QtQuick", 2, 0, "ShaderEffect");-
270#endif-
271-
272 qmlRegisterUncreatableType<QQuickPaintedItem>("QtQuick", 2, 0, "PaintedItem", QQuickPaintedItem::tr("Cannot create instance of abstract class PaintedItem"));-
273-
274#if QT_CONFIG(quick_canvas)-
275 qmlRegisterType<QQuickCanvasItem>("QtQuick", 2, 0, "Canvas");-
276#endif-
277-
278#if QT_CONFIG(quick_sprite)-
279 qmlRegisterType<QQuickSprite>("QtQuick", 2, 0, "Sprite");-
280 qmlRegisterType<QQuickAnimatedSprite>("QtQuick", 2, 0, "AnimatedSprite");-
281 qmlRegisterType<QQuickSpriteSequence>("QtQuick", 2, 0, "SpriteSequence");-
282#endif-
283-
284 qmlRegisterType<QQuickParentChange>(uri, major, minor,"ParentChange");-
285 qmlRegisterType<QQuickAnchorChanges>(uri, major, minor,"AnchorChanges");-
286 qmlRegisterType<QQuickAnchorSet>();-
287 qmlRegisterType<QQuickAnchorAnimation>(uri, major, minor,"AnchorAnimation");-
288 qmlRegisterType<QQuickParentAnimation>(uri, major, minor,"ParentAnimation");-
289#if QT_CONFIG(quick_path)-
290 qmlRegisterType<QQuickPathAnimation>("QtQuick",2,0,"PathAnimation");-
291 qmlRegisterType<QQuickPathInterpolator>("QtQuick",2,0,"PathInterpolator");-
292#endif-
293-
294#if QT_CONFIG(draganddrop)-
295 qmlRegisterType<QQuickDropArea>("QtQuick", 2, 0, "DropArea");-
296 qmlRegisterType<QQuickDropEvent>();-
297 qmlRegisterType<QQuickDropAreaDrag>();-
298 qmlRegisterUncreatableType<QQuickDrag>("QtQuick", 2, 0, "Drag", QQuickDragAttached::tr("Drag is only available via attached properties"));-
299#endif-
300-
301 qmlRegisterType<QQuickMultiPointTouchArea>("QtQuick", 2, 0, "MultiPointTouchArea");-
302 qmlRegisterType<QQuickTouchPoint>("QtQuick", 2, 0, "TouchPoint");-
303 qmlRegisterUncreatableType<QQuickGrabGestureEvent>(uri,major,minor, "GestureEvent",-
304 QQuickMouseEvent::tr("GestureEvent is only available in the context of handling the gestureStarted signal from MultiPointTouchArea"));-
305-
306#if QT_CONFIG(accessibility)-
307 qmlRegisterUncreatableType<QQuickAccessibleAttached>("QtQuick", 2, 0, "Accessible",QQuickAccessibleAttached::tr("Accessible is only available via attached properties"));-
308#endif-
309-
310 qmlRegisterType<QQuickItem, 1>(uri, 2, 1,"Item");-
311#if QT_CONFIG(quick_positioners)-
312 qmlRegisterType<QQuickGrid, 1>(uri, 2, 1, "Grid");-
313#endif-
314#if QT_CONFIG(quick_itemview)-
315 const char *itemViewName = "ItemView";-
316 const QString itemViewMessage = QQuickItemView::tr("ItemView is an abstract base class");-
317 qmlRegisterUncreatableType<QQuickItemView, 1>(uri, 2, 1, itemViewName, itemViewMessage);-
318 qmlRegisterUncreatableType<QQuickItemView, 2>(uri, 2, 3, itemViewName, itemViewMessage);-
319#endif-
320#if QT_CONFIG(quick_listview)-
321 qmlRegisterType<QQuickListView, 1>(uri, 2, 1, "ListView");-
322#endif-
323#if QT_CONFIG(quick_gridview)-
324 qmlRegisterType<QQuickGridView, 1>(uri, 2, 1, "GridView");-
325#endif-
326 qmlRegisterType<QQuickTextEdit, 1>(uri, 2, 1, "TextEdit");-
327-
328 qmlRegisterType<QQuickText, 2>(uri, 2, 2, "Text");-
329 qmlRegisterType<QQuickTextEdit, 2>(uri, 2, 2, "TextEdit");-
330-
331 qmlRegisterType<QQuickText, 3>(uri, 2, 3, "Text");-
332 qmlRegisterType<QQuickTextEdit, 3>(uri, 2, 3, "TextEdit");-
333 qmlRegisterType<QQuickImage, 1>(uri, 2, 3,"Image");-
334-
335 qmlRegisterType<QQuickItem, 2>(uri, 2, 4, "Item");-
336#if QT_CONFIG(quick_listview)-
337 qmlRegisterType<QQuickListView, 2>(uri, 2, 4, "ListView");-
338#endif-
339 qmlRegisterType<QQuickMouseArea, 1>(uri, 2, 4, "MouseArea");-
340#if QT_CONFIG(quick_shadereffect)-
341 qmlRegisterType<QQuickShaderEffect, 1>(uri, 2, 4, "ShaderEffect");-
342#endif-
343-
344#if QT_CONFIG(opengl)-
345 qmlRegisterUncreatableType<QQuickOpenGLInfo>(uri, 2, 4,"OpenGLInfo", QQuickOpenGLInfo::tr("OpenGLInfo is only available via attached properties"));-
346#endif-
347 qmlRegisterType<QQuickPinchArea, 1>(uri, 2, 5,"PinchArea");-
348 qmlRegisterType<QQuickImage, 2>(uri, 2, 5,"Image");-
349 qmlRegisterType<QQuickMouseArea, 2>(uri, 2, 5, "MouseArea");-
350-
351 qmlRegisterType<QQuickText, 6>(uri, 2, 6, "Text");-
352 qmlRegisterType<QQuickTextEdit, 6>(uri, 2, 6, "TextEdit");-
353 qmlRegisterType<QQuickTextInput, 6>(uri, 2, 6, "TextInput");-
354#if QT_CONFIG(quick_positioners)-
355 qmlRegisterUncreatableType<QQuickBasePositioner, 6>(uri, 2, 6, "Positioner",-
356 QStringLiteral("Positioner is an abstract type that is only available as an attached property."));
executed 374 times by 132 tests: return qstring_literal_temp;
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
  • ...
374
357 qmlRegisterType<QQuickColumn, 6>(uri, 2, 6, "Column");-
358 qmlRegisterType<QQuickRow, 6>(uri, 2, 6, "Row");-
359 qmlRegisterType<QQuickGrid, 6>(uri, 2, 6, "Grid");-
360 qmlRegisterType<QQuickFlow, 6>(uri, 2, 6, "Flow");-
361#endif-
362 qmlRegisterUncreatableType<QQuickEnterKeyAttached, 6>(uri, 2, 6, "EnterKey",-
363 QQuickEnterKeyAttached::tr("EnterKey is only available via attached properties"));-
364#if QT_CONFIG(quick_shadereffect)-
365 qmlRegisterType<QQuickShaderEffectSource, 1>(uri, 2, 6, "ShaderEffectSource");-
366#endif-
367-
368 qmlRegisterType<QQuickItem, 7>(uri, 2, 7, "Item");-
369#if QT_CONFIG(quick_listview)-
370 qmlRegisterType<QQuickListView, 7>(uri, 2, 7, "ListView");-
371#endif-
372#if QT_CONFIG(quick_gridview)-
373 qmlRegisterType<QQuickGridView, 7>(uri, 2, 7, "GridView");-
374#endif-
375 qmlRegisterType<QQuickTextInput, 7>(uri, 2, 7, "TextInput");-
376 qmlRegisterType<QQuickTextEdit, 7>(uri, 2, 7, "TextEdit");-
377#if QT_CONFIG(quick_pathview)-
378 qmlRegisterType<QQuickPathView, 7>(uri, 2, 7, "PathView");-
379#endif-
380#if QT_CONFIG(quick_itemview)-
381 qmlRegisterUncreatableType<QQuickItemView, 7>(uri, 2, 7, itemViewName, itemViewMessage);-
382#endif-
383-
384 qmlRegisterUncreatableType<QQuickMouseEvent, 7>(uri, 2, 7, nullptr, QQuickMouseEvent::tr("MouseEvent is only available within handlers in MouseArea"));-
385-
386 qmlRegisterUncreatableType<QQuickGraphicsInfo>(uri, 2, 8,"GraphicsInfo", QQuickGraphicsInfo::tr("GraphicsInfo is only available via attached properties"));-
387#if QT_CONFIG(quick_shadereffect)-
388 qmlRegisterType<QQuickBorderImageMesh>("QtQuick", 2, 8, "BorderImageMesh");-
389#endif-
390-
391 qmlRegisterType<QQuickFlickable, 9>(uri, 2, 9, "Flickable");-
392 qmlRegisterType<QQuickMouseArea, 9>(uri, 2, 9, "MouseArea");-
393-
394#if QT_CONFIG(quick_path)-
395 qmlRegisterType<QQuickPathArc, 2>(uri, 2, 9, "PathArc");-
396 qmlRegisterType<QQuickPathMove>(uri, 2, 9, "PathMove");-
397#endif-
398-
399 qmlRegisterType<QQuickText, 9>(uri, 2, 9, "Text");-
400 qmlRegisterType<QQuickTextInput, 9>(uri, 2, 9, "TextInput");-
401 qmlRegisterType<QQuickTouchPoint>(uri, 2, 9, "TouchPoint");-
402 qRegisterMetaType<QPointingDeviceUniqueId>("QPointingDeviceUniqueId");-
403 qmlRegisterUncreatableType<QPointingDeviceUniqueId>(uri, 2, 9, "PointingDeviceUniqueId", QQuickTouchPoint::tr("PointingDeviceUniqueId is only available via read-only properties"));-
404#if QT_CONFIG(quick_positioners)-
405 qmlRegisterUncreatableType<QQuickBasePositioner, 9>(uri, 2, 9, "Positioner",-
406 QStringLiteral("Positioner is an abstract type that is only available as an attached property."));
executed 374 times by 132 tests: return qstring_literal_temp;
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
  • ...
374
407#endif-
408-
409#if QT_CONFIG(quick_shadereffect)-
410 qmlRegisterType<QQuickShaderEffectSource, 2>(uri, 2, 9, "ShaderEffectSource");-
411#endif-
412-
413 qmlRegisterType<QQuickFlickable, 10>(uri, 2, 10, "Flickable");-
414 qmlRegisterType<QQuickTextEdit, 10>(uri, 2, 10, "TextEdit");-
415 qmlRegisterType<QQuickText, 10>(uri, 2, 10, "Text");-
416-
417#if QT_CONFIG(quick_path)-
418 qmlRegisterType<QQuickPathAngleArc>(uri, 2, 11, "PathAngleArc");-
419#endif-
420-
421#if QT_CONFIG(quick_animatedimage)-
422 qmlRegisterType<QQuickAnimatedImage, 11>(uri, 2, 11,"AnimatedImage");-
423#endif-
424 qmlRegisterType<QQuickItem, 11>(uri, 2, 11,"Item");-
425-
426 qmlRegisterType<QQuickAnimatedSprite, 12>("QtQuick", 2, 12, "AnimatedSprite");-
427 qmlRegisterType<QQuickGradient, 12>(uri, 2, 12, "Gradient");-
428}
executed 374 times by 132 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_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
429-
430static void initResources()-
431{-
432 Q_INIT_RESOURCE(items);-
433}
executed 374 times by 132 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_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
434-
435QT_BEGIN_NAMESPACE-
436-
437void QQuickItemsModule::defineModule()-
438{-
439 initResources();-
440-
441 QByteArray name = "QtQuick";-
442 int majorVersion = 2;-
443 int minorVersion = 0;-
444-
445 qt_quickitems_defineModule(name, majorVersion, minorVersion);-
446}
executed 374 times by 132 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_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
447-
448QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0