From 41893b00fac8e1b18589694a35c20cf5251282fe Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 31 Jan 2020 09:43:35 +0100 Subject: Fix static builds due to name clashes When QtQuick and QtQuickParticles was linked into the same application then there was a name clash, so the classes in QtQuickParticles are renamed to avoid this clash. Change-Id: I8c2144ba7ad5838c95077a370ef400bd706fce8a Reviewed-by: Laszlo Agocs --- src/particles/qquickimageparticle.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/particles') diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index 4ce8186c7c..c6fe2f516d 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ @@ -389,10 +389,10 @@ private: QSGMaterialType DeformableMaterial::m_type; -class SpriteMaterialShader : public QSGMaterialShader +class ParticleSpriteMaterialShader : public QSGMaterialShader { public: - SpriteMaterialShader() + ParticleSpriteMaterialShader() { QSGShaderSourceBuilder builder; const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); @@ -478,10 +478,10 @@ public: QOpenGLFunctions* glFuncs; }; -class SpriteMaterialRhiShader : public QSGMaterialRhiShader +class ParticleSpriteMaterialRhiShader : public QSGMaterialRhiShader { public: - SpriteMaterialRhiShader() + ParticleSpriteMaterialRhiShader() { setShaderFileName(VertexStage, QStringLiteral(":/particles/shaders_ng/imageparticle_sprite.vert.qsb")); setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_sprite.frag.qsb")); @@ -544,9 +544,9 @@ public: SpriteMaterial() { setFlag(SupportsRhiShader, true); } QSGMaterialShader *createShader() const override { if (flags().testFlag(RhiShaderWanted)) - return new SpriteMaterialRhiShader; + return new ParticleSpriteMaterialRhiShader; else - return new SpriteMaterialShader; + return new ParticleSpriteMaterialShader; } QSGMaterialType *type() const override { return &m_type; } -- cgit v1.2.3 From ac46c9f6ce9ef757e0ccba8a283cb0efabaef56e Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 31 Jan 2020 16:05:52 +0100 Subject: Synthetically reference type registration functions Add unused volatile pointers to the type registration functions in each import plugin. We need to do this in order to prevent the linker from optimizing the registration away. There are two ways for this to happen: When linking statically, the linker will examine the referenced symbols on a per-object base and leave out all unreferenced objects. When linking dynamically, the linker may do the same on a per-library base and drop any unreferenced libraries from the dependencies. Forcing a reference to the type registration function prevents both. The volatile technique allows us to remove the previous qCDebug() hack. Having an unused volatile auto variable should only result in a single memory read as runtime overhead. The qCDebug() technique would generate a read and a block of mostly dead code (as no one would ever use that logging category). Fixes: QTBUG-81622 Change-Id: I255667276dfd355b19baa17b1aad3db406bf1954 Reviewed-by: Fabian Kosmale --- src/particles/qtquickparticlesglobal_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/particles') diff --git a/src/particles/qtquickparticlesglobal_p.h b/src/particles/qtquickparticlesglobal_p.h index d7647b3d97..927bc29050 100644 --- a/src/particles/qtquickparticlesglobal_p.h +++ b/src/particles/qtquickparticlesglobal_p.h @@ -65,4 +65,6 @@ # define Q_QUICKPARTICLES_PRIVATE_EXPORT #endif +void Q_QUICKPARTICLES_PRIVATE_EXPORT qml_register_types_QtQuick_Particles(); + #endif // QTQUICKPARTICLESGLOBAL_P_H -- cgit v1.2.3 From 6d0a453f41d304239285d64b06612c36922be701 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 25 Nov 2019 16:10:04 +0100 Subject: Use the extended QQmlListProperty interface in a few places Task-number: QTBUG-79263 Change-Id: If518f644b5b9eddbacfb1cb16fbb557127ffcfb2 Reviewed-by: Simon Hausmann Reviewed-by: Shawn Rutledge --- src/particles/qquickimageparticle.cpp | 4 +++- src/particles/qquickparticlegroup.cpp | 13 +++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/particles') diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index c6fe2f516d..4d67691771 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -1143,7 +1143,9 @@ QQuickImageParticle::~QQuickImageParticle() QQmlListProperty QQuickImageParticle::sprites() { - return QQmlListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); + return QQmlListProperty(this, &m_sprites, + spriteAppend, spriteCount, spriteAt, + spriteClear, spriteReplace, spriteRemoveLast); } void QQuickImageParticle::sceneGraphInvalidated() diff --git a/src/particles/qquickparticlegroup.cpp b/src/particles/qquickparticlegroup.cpp index 052fda6eff..902c23331d 100644 --- a/src/particles/qquickparticlegroup.cpp +++ b/src/particles/qquickparticlegroup.cpp @@ -106,10 +106,15 @@ void delayedRedirect(QQmlListProperty *prop, QObject *value) QQmlListProperty QQuickParticleGroup::particleChildren() { QQuickParticleSystem* system = qobject_cast(parent()); - if (system) - return QQmlListProperty(this, nullptr, &QQuickParticleSystem::statePropertyRedirect, nullptr, nullptr, nullptr); - else - return QQmlListProperty(this, nullptr, &delayedRedirect, nullptr, nullptr, nullptr); + if (system) { + return QQmlListProperty(this, nullptr, + &QQuickParticleSystem::statePropertyRedirect, nullptr, + nullptr, nullptr, nullptr, nullptr); + } else { + return QQmlListProperty(this, nullptr, + &delayedRedirect, nullptr, nullptr, + nullptr, nullptr, nullptr); + } } void QQuickParticleGroup::setSystem(QQuickParticleSystem* arg) -- cgit v1.2.3 From 872dc18e653b50c878699a78ca7cb9399cb47b62 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Mon, 3 Feb 2020 15:02:31 +0100 Subject: Quick: Don't qualify OpenGL includes (part two) 406f15ce0e only removed the "QtGui" prefix from some includes, but we are trying to move (almost) everything OpenGL related from QtGui. This removes prefixes for additional QOpenGL includes (QOpenGLShaderProgram, versioned opengl functions etc.). Task-number: QTBUG-74409 Change-Id: I91e1feac0676859f11de9b75301a0a4e81db50d9 Reviewed-by: Simon Hausmann --- src/particles/qquickcustomparticle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/particles') diff --git a/src/particles/qquickcustomparticle.cpp b/src/particles/qquickcustomparticle.cpp index 91fd63302a..ecb71cb913 100644 --- a/src/particles/qquickcustomparticle.cpp +++ b/src/particles/qquickcustomparticle.cpp @@ -39,7 +39,7 @@ #include "qquickcustomparticle_p.h" #include -#include +#include #include #include #include -- cgit v1.2.3 From ddde036f6a5781dc0481fae293bd387b3344171a Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 16 Jan 2020 13:42:11 +0100 Subject: Add major version to all Q_REVISIONs Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale --- src/particles/qquickage_p.h | 1 + src/particles/qquickangledirection_p.h | 1 + src/particles/qquickcumulativedirection_p.h | 1 + src/particles/qquickcustomaffector_p.h | 1 + src/particles/qquickcustomparticle_p.h | 1 + src/particles/qquickdirection_p.h | 1 + src/particles/qquickellipseextruder_p.h | 1 + src/particles/qquickfriction_p.h | 1 + src/particles/qquickgravity_p.h | 1 + src/particles/qquickgroupgoal_p.h | 1 + src/particles/qquickimageparticle_p.h | 1 + src/particles/qquickitemparticle_p.h | 1 + src/particles/qquicklineextruder_p.h | 1 + src/particles/qquickmaskextruder_p.h | 1 + src/particles/qquickparticleaffector_p.h | 1 + src/particles/qquickparticleemitter_p.h | 1 + src/particles/qquickparticleextruder_p.h | 1 + src/particles/qquickparticlegroup_p.h | 1 + src/particles/qquickparticlepainter_p.h | 1 + src/particles/qquickparticlesystem_p.h | 1 + src/particles/qquickpointattractor_p.h | 1 + src/particles/qquickpointdirection_p.h | 1 + src/particles/qquickrectangleextruder_p.h | 1 + src/particles/qquickspritegoal_p.h | 1 + src/particles/qquicktargetdirection_p.h | 1 + src/particles/qquicktrailemitter_p.h | 1 + src/particles/qquickturbulence_p.h | 1 + src/particles/qquickwander_p.h | 1 + 28 files changed, 28 insertions(+) (limited to 'src/particles') diff --git a/src/particles/qquickage_p.h b/src/particles/qquickage_p.h index 890c6a63c1..1730c25c28 100644 --- a/src/particles/qquickage_p.h +++ b/src/particles/qquickage_p.h @@ -60,6 +60,7 @@ class QQuickAgeAffector : public QQuickParticleAffector Q_PROPERTY(int lifeLeft READ lifeLeft WRITE setLifeLeft NOTIFY lifeLeftChanged) Q_PROPERTY(bool advancePosition READ advancePosition WRITE setAdvancePosition NOTIFY advancePositionChanged) QML_NAMED_ELEMENT(Age) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickAgeAffector(QQuickItem *parent = 0); diff --git a/src/particles/qquickangledirection_p.h b/src/particles/qquickangledirection_p.h index d0fdf5a68c..9ec9e49d1a 100644 --- a/src/particles/qquickangledirection_p.h +++ b/src/particles/qquickangledirection_p.h @@ -63,6 +63,7 @@ class QQuickAngleDirection : public QQuickDirection Q_PROPERTY(qreal angleVariation READ angleVariation WRITE setAngleVariation NOTIFY angleVariationChanged) Q_PROPERTY(qreal magnitudeVariation READ magnitudeVariation WRITE setMagnitudeVariation NOTIFY magnitudeVariationChanged) QML_NAMED_ELEMENT(AngleDirection) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickAngleDirection(QObject *parent = 0); QPointF sample(const QPointF &from) override; diff --git a/src/particles/qquickcumulativedirection_p.h b/src/particles/qquickcumulativedirection_p.h index 5160d8f09a..0a54d5dd22 100644 --- a/src/particles/qquickcumulativedirection_p.h +++ b/src/particles/qquickcumulativedirection_p.h @@ -62,6 +62,7 @@ class QQuickCumulativeDirection : public QQuickDirection Q_PROPERTY(QQmlListProperty directions READ directions) Q_CLASSINFO("DefaultProperty", "directions") QML_NAMED_ELEMENT(CumulativeDirection) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickCumulativeDirection(QObject *parent = 0); QQmlListProperty directions(); diff --git a/src/particles/qquickcustomaffector_p.h b/src/particles/qquickcustomaffector_p.h index 5e8671514d..4506ae9d62 100644 --- a/src/particles/qquickcustomaffector_p.h +++ b/src/particles/qquickcustomaffector_p.h @@ -68,6 +68,7 @@ class QQuickCustomAffector : public QQuickParticleAffector Q_PROPERTY(QQuickDirection *velocity READ velocity WRITE setVelocity NOTIFY velocityChanged RESET velocityReset) Q_PROPERTY(QQuickDirection *acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged RESET accelerationReset) QML_NAMED_ELEMENT(Affector) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickCustomAffector(QQuickItem *parent = 0); diff --git a/src/particles/qquickcustomparticle_p.h b/src/particles/qquickcustomparticle_p.h index 444f7ad215..90643fe3e4 100644 --- a/src/particles/qquickcustomparticle_p.h +++ b/src/particles/qquickcustomparticle_p.h @@ -68,6 +68,7 @@ class QQuickCustomParticle : public QQuickParticlePainter Q_PROPERTY(QByteArray fragmentShader READ fragmentShader WRITE setFragmentShader NOTIFY fragmentShaderChanged) Q_PROPERTY(QByteArray vertexShader READ vertexShader WRITE setVertexShader NOTIFY vertexShaderChanged) QML_NAMED_ELEMENT(CustomParticle) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickCustomParticle(QQuickItem* parent=0); diff --git a/src/particles/qquickdirection_p.h b/src/particles/qquickdirection_p.h index 60b4d8eb1d..e671868ed2 100644 --- a/src/particles/qquickdirection_p.h +++ b/src/particles/qquickdirection_p.h @@ -61,6 +61,7 @@ class QQuickDirection : public QObject { Q_OBJECT QML_NAMED_ELEMENT(NullVector) + QML_ADDED_IN_VERSION(2, 0) QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") public: diff --git a/src/particles/qquickellipseextruder_p.h b/src/particles/qquickellipseextruder_p.h index c92443fedf..3268923480 100644 --- a/src/particles/qquickellipseextruder_p.h +++ b/src/particles/qquickellipseextruder_p.h @@ -59,6 +59,7 @@ class QQuickEllipseExtruder : public QQuickParticleExtruder Q_OBJECT Q_PROPERTY(bool fill READ fill WRITE setFill NOTIFY fillChanged)//###Use base class? If it's still box QML_NAMED_ELEMENT(EllipseShape) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickEllipseExtruder(QObject *parent = 0); QPointF extrude(const QRectF &) override; diff --git a/src/particles/qquickfriction_p.h b/src/particles/qquickfriction_p.h index 5686bb37d5..952f47b141 100644 --- a/src/particles/qquickfriction_p.h +++ b/src/particles/qquickfriction_p.h @@ -60,6 +60,7 @@ class QQuickFrictionAffector : public QQuickParticleAffector Q_PROPERTY(qreal factor READ factor WRITE setFactor NOTIFY factorChanged) Q_PROPERTY(qreal threshold READ threshold WRITE setThreshold NOTIFY thresholdChanged) QML_NAMED_ELEMENT(Friction) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickFrictionAffector(QQuickItem *parent = 0); diff --git a/src/particles/qquickgravity_p.h b/src/particles/qquickgravity_p.h index ef7cc770b7..351cbb93b1 100644 --- a/src/particles/qquickgravity_p.h +++ b/src/particles/qquickgravity_p.h @@ -62,6 +62,7 @@ class QQuickGravityAffector : public QQuickParticleAffector Q_PROPERTY(qreal acceleration READ magnitude WRITE setAcceleration NOTIFY magnitudeChanged) Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) QML_NAMED_ELEMENT(Gravity) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickGravityAffector(QQuickItem *parent = 0); qreal magnitude() const; diff --git a/src/particles/qquickgroupgoal_p.h b/src/particles/qquickgroupgoal_p.h index 022b244ed7..5589483aa6 100644 --- a/src/particles/qquickgroupgoal_p.h +++ b/src/particles/qquickgroupgoal_p.h @@ -62,6 +62,7 @@ class QQuickGroupGoalAffector : public QQuickParticleAffector Q_PROPERTY(QString goalState READ goalState WRITE setGoalState NOTIFY goalStateChanged) Q_PROPERTY(bool jump READ jump WRITE setJump NOTIFY jumpChanged) QML_NAMED_ELEMENT(GroupGoal) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickGroupGoalAffector(QQuickItem *parent = 0); diff --git a/src/particles/qquickimageparticle_p.h b/src/particles/qquickimageparticle_p.h index fdb404861c..266054f28e 100644 --- a/src/particles/qquickimageparticle_p.h +++ b/src/particles/qquickimageparticle_p.h @@ -203,6 +203,7 @@ class QQuickImageParticle : public QQuickParticlePainter Q_PROPERTY(EntryEffect entryEffect READ entryEffect WRITE setEntryEffect NOTIFY entryEffectChanged) QML_NAMED_ELEMENT(ImageParticle) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickImageParticle(QQuickItem *parent = 0); virtual ~QQuickImageParticle(); diff --git a/src/particles/qquickitemparticle_p.h b/src/particles/qquickitemparticle_p.h index 32c9881691..fce9e95548 100644 --- a/src/particles/qquickitemparticle_p.h +++ b/src/particles/qquickitemparticle_p.h @@ -64,6 +64,7 @@ class QQuickItemParticle : public QQuickParticlePainter Q_PROPERTY(bool fade READ fade WRITE setFade NOTIFY fadeChanged) Q_PROPERTY(QQmlComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) QML_NAMED_ELEMENT(ItemParticle) + QML_ADDED_IN_VERSION(2, 0) QML_ATTACHED(QQuickItemParticleAttached) public: explicit QQuickItemParticle(QQuickItem *parent = 0); diff --git a/src/particles/qquicklineextruder_p.h b/src/particles/qquicklineextruder_p.h index 76ac5aaf11..a337324c6a 100644 --- a/src/particles/qquicklineextruder_p.h +++ b/src/particles/qquicklineextruder_p.h @@ -58,6 +58,7 @@ class QQuickLineExtruder : public QQuickParticleExtruder //Default is topleft to bottom right. Flipped makes it topright to bottom left Q_PROPERTY(bool mirrored READ mirrored WRITE setMirrored NOTIFY mirroredChanged) QML_NAMED_ELEMENT(LineShape) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickLineExtruder(QObject *parent = 0); diff --git a/src/particles/qquickmaskextruder_p.h b/src/particles/qquickmaskextruder_p.h index 419d162811..0d3fa9c15a 100644 --- a/src/particles/qquickmaskextruder_p.h +++ b/src/particles/qquickmaskextruder_p.h @@ -62,6 +62,7 @@ class QQuickMaskExtruder : public QQuickParticleExtruder Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) QML_NAMED_ELEMENT(MaskShape) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickMaskExtruder(QObject *parent = 0); QPointF extrude(const QRectF &) override; diff --git a/src/particles/qquickparticleaffector_p.h b/src/particles/qquickparticleaffector_p.h index fd4887333e..22cebbead1 100644 --- a/src/particles/qquickparticleaffector_p.h +++ b/src/particles/qquickparticleaffector_p.h @@ -69,6 +69,7 @@ class Q_QUICKPARTICLES_PRIVATE_EXPORT QQuickParticleAffector : public QQuickItem Q_PROPERTY(QQuickParticleExtruder* shape READ shape WRITE setShape NOTIFY shapeChanged) QML_NAMED_ELEMENT(ParticleAffector) + QML_ADDED_IN_VERSION(2, 0) QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") public: diff --git a/src/particles/qquickparticleemitter_p.h b/src/particles/qquickparticleemitter_p.h index b97d3f812a..8c9ca622fb 100644 --- a/src/particles/qquickparticleemitter_p.h +++ b/src/particles/qquickparticleemitter_p.h @@ -84,6 +84,7 @@ class Q_QUICKPARTICLES_PRIVATE_EXPORT QQuickParticleEmitter : public QQuickItem Q_PROPERTY(QQuickDirection *acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged) Q_PROPERTY(qreal velocityFromMovement READ velocityFromMovement WRITE setVelocityFromMovement NOTIFY velocityFromMovementChanged) QML_NAMED_ELEMENT(Emitter) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickParticleEmitter(QQuickItem *parent = 0); diff --git a/src/particles/qquickparticleextruder_p.h b/src/particles/qquickparticleextruder_p.h index 24f7a0a2fa..7be0ead245 100644 --- a/src/particles/qquickparticleextruder_p.h +++ b/src/particles/qquickparticleextruder_p.h @@ -63,6 +63,7 @@ class QQuickParticleExtruder : public QObject Q_OBJECT QML_NAMED_ELEMENT(ParticleExtruder) + QML_ADDED_IN_VERSION(2, 0) QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") public: diff --git a/src/particles/qquickparticlegroup_p.h b/src/particles/qquickparticlegroup_p.h index 8d068fbe9c..9b13153a95 100644 --- a/src/particles/qquickparticlegroup_p.h +++ b/src/particles/qquickparticlegroup_p.h @@ -67,6 +67,7 @@ class QQuickParticleGroup : public QQuickStochasticState, public QQmlParserStatu Q_PROPERTY(QQmlListProperty particleChildren READ particleChildren DESIGNABLE false)//### Hidden property for in-state system definitions - ought not to be used in actual "Sprite" states Q_CLASSINFO("DefaultProperty", "particleChildren") QML_NAMED_ELEMENT(ParticleGroup) + QML_ADDED_IN_VERSION(2, 0) Q_INTERFACES(QQmlParserStatus) public: diff --git a/src/particles/qquickparticlepainter_p.h b/src/particles/qquickparticlepainter_p.h index e3d13b8a21..5236bb6569 100644 --- a/src/particles/qquickparticlepainter_p.h +++ b/src/particles/qquickparticlepainter_p.h @@ -65,6 +65,7 @@ class QQuickParticlePainter : public QQuickItem Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged) QML_NAMED_ELEMENT(ParticlePainter) + QML_ADDED_IN_VERSION(2, 0) QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") public: // data diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h index 7c0a1ffd7d..b7812c6ea5 100644 --- a/src/particles/qquickparticlesystem_p.h +++ b/src/particles/qquickparticlesystem_p.h @@ -352,6 +352,7 @@ class Q_QUICKPARTICLES_PRIVATE_EXPORT QQuickParticleSystem : public QQuickItem Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged) QML_NAMED_ELEMENT(ParticleSystem) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickParticleSystem(QQuickItem *parent = nullptr); diff --git a/src/particles/qquickpointattractor_p.h b/src/particles/qquickpointattractor_p.h index 28bbaaa84f..b3314f1a96 100644 --- a/src/particles/qquickpointattractor_p.h +++ b/src/particles/qquickpointattractor_p.h @@ -63,6 +63,7 @@ class QQuickAttractorAffector : public QQuickParticleAffector Q_PROPERTY(AffectableParameters affectedParameter READ affectedParameter WRITE setAffectedParameter NOTIFY affectedParameterChanged) Q_PROPERTY(Proportion proportionalToDistance READ proportionalToDistance WRITE setProportionalToDistance NOTIFY proportionalToDistanceChanged) QML_NAMED_ELEMENT(Attractor) + QML_ADDED_IN_VERSION(2, 0) public: enum Proportion{ diff --git a/src/particles/qquickpointdirection_p.h b/src/particles/qquickpointdirection_p.h index 9103a570c9..39109d8331 100644 --- a/src/particles/qquickpointdirection_p.h +++ b/src/particles/qquickpointdirection_p.h @@ -62,6 +62,7 @@ class QQuickPointDirection : public QQuickDirection Q_PROPERTY(qreal xVariation READ xVariation WRITE setXVariation NOTIFY xVariationChanged) Q_PROPERTY(qreal yVariation READ yVariation WRITE setYVariation NOTIFY yVariationChanged) QML_NAMED_ELEMENT(PointDirection) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickPointDirection(QObject *parent = 0); QPointF sample(const QPointF &from) override; diff --git a/src/particles/qquickrectangleextruder_p.h b/src/particles/qquickrectangleextruder_p.h index 7c0a6c2bf1..f6f39579c4 100644 --- a/src/particles/qquickrectangleextruder_p.h +++ b/src/particles/qquickrectangleextruder_p.h @@ -60,6 +60,7 @@ class QQuickRectangleExtruder : public QQuickParticleExtruder Q_OBJECT Q_PROPERTY(bool fill READ fill WRITE setFill NOTIFY fillChanged) QML_NAMED_ELEMENT(RectangleShape) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickRectangleExtruder(QObject *parent = 0); diff --git a/src/particles/qquickspritegoal_p.h b/src/particles/qquickspritegoal_p.h index d5f9bb88ae..efd9b1ab39 100644 --- a/src/particles/qquickspritegoal_p.h +++ b/src/particles/qquickspritegoal_p.h @@ -64,6 +64,7 @@ class QQuickSpriteGoalAffector : public QQuickParticleAffector Q_PROPERTY(bool jump READ jump WRITE setJump NOTIFY jumpChanged) Q_PROPERTY(bool systemStates READ systemStates WRITE setSystemStates NOTIFY systemStatesChanged) QML_NAMED_ELEMENT(SpriteGoal) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickSpriteGoalAffector(QQuickItem *parent = 0); diff --git a/src/particles/qquicktargetdirection_p.h b/src/particles/qquicktargetdirection_p.h index 232d375d8c..ea6ac24893 100644 --- a/src/particles/qquicktargetdirection_p.h +++ b/src/particles/qquicktargetdirection_p.h @@ -71,6 +71,7 @@ class QQuickTargetDirection : public QQuickDirection Q_PROPERTY(qreal magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged) Q_PROPERTY(qreal magnitudeVariation READ magnitudeVariation WRITE setMagnitudeVariation NOTIFY magnitudeVariationChanged) QML_NAMED_ELEMENT(TargetDirection) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickTargetDirection(QObject *parent = 0); diff --git a/src/particles/qquicktrailemitter_p.h b/src/particles/qquicktrailemitter_p.h index 270bec52cf..bf21b66fb6 100644 --- a/src/particles/qquicktrailemitter_p.h +++ b/src/particles/qquicktrailemitter_p.h @@ -65,6 +65,7 @@ class QQuickTrailEmitter : public QQuickParticleEmitter Q_PROPERTY(qreal emitHeight READ emitterYVariation WRITE setEmitterYVariation NOTIFY emitterYVariationChanged) Q_PROPERTY(qreal emitWidth READ emitterXVariation WRITE setEmitterXVariation NOTIFY emitterXVariationChanged) QML_NAMED_ELEMENT(TrailEmitter) + QML_ADDED_IN_VERSION(2, 0) public: enum EmitSize { diff --git a/src/particles/qquickturbulence_p.h b/src/particles/qquickturbulence_p.h index 52011381e4..77239660d8 100644 --- a/src/particles/qquickturbulence_p.h +++ b/src/particles/qquickturbulence_p.h @@ -63,6 +63,7 @@ class QQuickTurbulenceAffector : public QQuickParticleAffector Q_PROPERTY(qreal strength READ strength WRITE setStrength NOTIFY strengthChanged) Q_PROPERTY(QUrl noiseSource READ noiseSource WRITE setNoiseSource NOTIFY noiseSourceChanged) QML_NAMED_ELEMENT(Turbulence) + QML_ADDED_IN_VERSION(2, 0) public: explicit QQuickTurbulenceAffector(QQuickItem *parent = 0); diff --git a/src/particles/qquickwander_p.h b/src/particles/qquickwander_p.h index bf7acdacfb..174b780562 100644 --- a/src/particles/qquickwander_p.h +++ b/src/particles/qquickwander_p.h @@ -72,6 +72,7 @@ class QQuickWanderAffector : public QQuickParticleAffector Q_PROPERTY(qreal yVariance READ yVariance WRITE setYVariance NOTIFY yVarianceChanged) Q_PROPERTY(AffectableParameters affectedParameter READ affectedParameter WRITE setAffectedParameter NOTIFY affectedParameterChanged) QML_NAMED_ELEMENT(Wander) + QML_ADDED_IN_VERSION(2, 0) public: enum AffectableParameters { -- cgit v1.2.3 From e33e250080dbbb01015daafc8a79b569806d9467 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 17 Jan 2020 10:46:54 +0100 Subject: Fix all import versions Bump all the *.15 versions to QT_VERSION and use QML_IMPORT_VERSION rather than IMPORT_VERSION. Change-Id: I5bfbc960d119a7386bdcedb9bdbfdbfa4486a187 Reviewed-by: Fabian Kosmale Reviewed-by: Mitch Curtis --- src/particles/particles.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/particles') diff --git a/src/particles/particles.pro b/src/particles/particles.pro index 83f6f1c83e..6a117c65fe 100644 --- a/src/particles/particles.pro +++ b/src/particles/particles.pro @@ -19,7 +19,7 @@ include(particles.pri) QMLTYPES_FILENAME = plugins.qmltypes QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Particles QML_IMPORT_NAME = QtQuick.Particles -IMPORT_VERSION = 2.15 +QML_IMPORT_VERSION = $$QT_VERSION CONFIG += qmltypes install_qmltypes install_metatypes load(qt_module) -- cgit v1.2.3