OpenCoverage

qquickparticlesmodule.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickparticlesmodule.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 <private/qtquickglobal_p.h>-
41-
42#include "qquickangledirection_p.h"-
43#if QT_CONFIG(quick_shadereffect)-
44#include "qquickcustomparticle_p.h"-
45#endif-
46#include "qquickellipseextruder_p.h"-
47#include "qquicktrailemitter_p.h"-
48#include "qquickfriction_p.h"-
49#include "qquickgravity_p.h"-
50#include "qquickimageparticle_p.h"-
51#include "qquickitemparticle_p.h"-
52#include "qquickage_p.h"-
53#include "qquicklineextruder_p.h"-
54#include "qquickmaskextruder_p.h"-
55#include "qquickparticleaffector_p.h"-
56#include "qquickparticleemitter_p.h"-
57#include "qquickparticleextruder_p.h"-
58#include "qquickparticlepainter_p.h"-
59#include "qquickparticlesmodule_p.h"-
60#include "qquickparticlesystem_p.h"-
61#include "qquickpointattractor_p.h"-
62#include "qquickpointdirection_p.h"-
63#include "qquickspritegoal_p.h"-
64#include "qquickdirection_p.h"-
65#include "qquicktargetdirection_p.h"-
66#include "qquickturbulence_p.h"-
67#include "qquickwander_p.h"-
68#include "qquickcumulativedirection_p.h"-
69#include "qquickcustomaffector_p.h"-
70#include "qquickrectangleextruder_p.h"-
71#include "qquickparticlegroup_p.h"-
72#include "qquickgroupgoal_p.h"-
73-
74static void initResources()-
75{-
76 Q_INIT_RESOURCE(particles);-
77}
executed 50 times by 25 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
50
78-
79QT_BEGIN_NAMESPACE-
80-
81void QQuickParticlesModule::defineModule()-
82{-
83 initResources();-
84-
85 const char* uri = "QtQuick.Particles";-
86-
87 qmlRegisterType<QQuickParticleSystem>(uri, 2, 0, "ParticleSystem");-
88 qmlRegisterType<QQuickParticleGroup>(uri, 2, 0, "ParticleGroup");-
89-
90 qmlRegisterType<QQuickImageParticle>(uri, 2, 0, "ImageParticle");-
91#if QT_CONFIG(quick_shadereffect)-
92 qmlRegisterType<QQuickCustomParticle>(uri, 2, 0, "CustomParticle");-
93#endif-
94 qmlRegisterType<QQuickItemParticle>(uri, 2, 0, "ItemParticle");-
95-
96 qmlRegisterType<QQuickParticleEmitter>(uri, 2, 0, "Emitter");-
97 qmlRegisterType<QQuickTrailEmitter>(uri, 2, 0, "TrailEmitter");-
98-
99 qmlRegisterType<QQuickEllipseExtruder>(uri, 2, 0, "EllipseShape");-
100 qmlRegisterType<QQuickRectangleExtruder>(uri, 2, 0, "RectangleShape");-
101 qmlRegisterType<QQuickLineExtruder>(uri, 2, 0, "LineShape");-
102 qmlRegisterType<QQuickMaskExtruder>(uri, 2, 0, "MaskShape");-
103-
104 qmlRegisterType<QQuickPointDirection>(uri, 2, 0, "PointDirection");-
105 qmlRegisterType<QQuickAngleDirection>(uri, 2, 0, "AngleDirection");-
106 qmlRegisterType<QQuickTargetDirection>(uri, 2, 0, "TargetDirection");-
107 qmlRegisterType<QQuickCumulativeDirection>(uri, 2, 0, "CumulativeDirection");-
108-
109 qmlRegisterType<QQuickCustomAffector>(uri, 2, 0, "Affector");-
110 qmlRegisterType<QQuickWanderAffector>(uri, 2, 0, "Wander");-
111 qmlRegisterType<QQuickFrictionAffector>(uri, 2, 0, "Friction");-
112 qmlRegisterType<QQuickAttractorAffector>(uri, 2, 0, "Attractor");-
113 qmlRegisterType<QQuickGravityAffector>(uri, 2, 0, "Gravity");-
114 qmlRegisterType<QQuickAgeAffector>(uri, 2, 0, "Age");-
115 qmlRegisterType<QQuickSpriteGoalAffector>(uri, 2, 0, "SpriteGoal");-
116 qmlRegisterType<QQuickGroupGoalAffector>(uri, 2, 0, "GroupGoal");-
117 qmlRegisterType<QQuickTurbulenceAffector>(uri, 2, 0 , "Turbulence");-
118-
119 //Exposed just for completeness-
120 qmlRegisterUncreatableType<QQuickParticleAffector>(uri, 2, 0, "ParticleAffector",-
121 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
executed 50 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
50
122 qmlRegisterUncreatableType<QQuickParticlePainter>(uri, 2, 0, "ParticlePainter",-
123 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
executed 50 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
50
124 qmlRegisterUncreatableType<QQuickParticleExtruder>(uri, 2, 0, "ParticleExtruder",-
125 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
executed 50 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
50
126 qmlRegisterUncreatableType<QQuickDirection>(uri, 2, 0, "NullVector",-
127 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
executed 50 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
50
128}
executed 50 times by 25 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
50
129-
130QT_END_NAMESPACE-
131-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0