aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-09-22 17:29:47 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-23 03:50:16 +0200
commit100c9cec71b5f751acd202d5181bdef3a80eb140 (patch)
tree7a5705752887aee53c65e6ec63f04de797a9fc7a
parent3af0f98a79f223988854e313c198f5fdf3ff5e3b (diff)
Use m_pleaseReset more consistently
Everyone had their own, and so they could conflict or be randomly un-initialized. Change-Id: Ife2c5d9972b881235e4d3a5e2a33979174de2fbc Reviewed-on: http://codereview.qt-project.org/5370 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
-rw-r--r--src/declarative/particles/qsgcustomparticle.cpp1
-rw-r--r--src/declarative/particles/qsgcustomparticle_p.h2
-rw-r--r--src/declarative/particles/qsgimageparticle.cpp1
-rw-r--r--src/declarative/particles/qsgimageparticle_p.h2
-rw-r--r--src/declarative/particles/qsgparticlepainter.cpp4
-rw-r--r--src/declarative/particles/qsgparticlepainter_p.h2
6 files changed, 2 insertions, 10 deletions
diff --git a/src/declarative/particles/qsgcustomparticle.cpp b/src/declarative/particles/qsgcustomparticle.cpp
index 174942d7ff..5d1c605122 100644
--- a/src/declarative/particles/qsgcustomparticle.cpp
+++ b/src/declarative/particles/qsgcustomparticle.cpp
@@ -130,7 +130,6 @@ struct PlainVertices {
QSGCustomParticle::QSGCustomParticle(QSGItem* parent)
: QSGParticlePainter(parent)
- , m_pleaseReset(true)
, m_dirtyData(true)
, m_material(0)
, m_rootNode(0)
diff --git a/src/declarative/particles/qsgcustomparticle_p.h b/src/declarative/particles/qsgcustomparticle_p.h
index f51e576d34..db3a78831b 100644
--- a/src/declarative/particles/qsgcustomparticle_p.h
+++ b/src/declarative/particles/qsgcustomparticle_p.h
@@ -98,8 +98,6 @@ protected:
private:
void buildData();
-
- bool m_pleaseReset;
bool m_dirtyData;
QSGShaderEffectProgram m_source;
struct SourceData
diff --git a/src/declarative/particles/qsgimageparticle.cpp b/src/declarative/particles/qsgimageparticle.cpp
index 872624ee51..8579bfb302 100644
--- a/src/declarative/particles/qsgimageparticle.cpp
+++ b/src/declarative/particles/qsgimageparticle.cpp
@@ -634,7 +634,6 @@ void fillUniformArrayFromImage(float* array, const QImage& img, int size)
QSGImageParticle::QSGImageParticle(QSGItem* parent)
: QSGParticlePainter(parent)
- , m_do_reset(false)
, m_color_variation(0.0)
, m_rootNode(0)
, m_material(0)
diff --git a/src/declarative/particles/qsgimageparticle_p.h b/src/declarative/particles/qsgimageparticle_p.h
index ccf5cf7702..274ff42b58 100644
--- a/src/declarative/particles/qsgimageparticle_p.h
+++ b/src/declarative/particles/qsgimageparticle_p.h
@@ -338,8 +338,6 @@ private slots:
void createEngine(); //### method invoked by sprite list changing (in engine.h) - pretty nasty
private:
- bool m_do_reset;
-
QUrl m_image_name;
QUrl m_colortable_name;
QUrl m_sizetable_name;
diff --git a/src/declarative/particles/qsgparticlepainter.cpp b/src/declarative/particles/qsgparticlepainter.cpp
index 1b3453afe6..53f2421b9c 100644
--- a/src/declarative/particles/qsgparticlepainter.cpp
+++ b/src/declarative/particles/qsgparticlepainter.cpp
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
*/
QSGParticlePainter::QSGParticlePainter(QSGItem *parent) :
QSGItem(parent),
- m_system(0), m_count(0), m_sentinel(new QSGParticleData(0))
+ m_system(0), m_count(0), m_sentinel(new QSGParticleData(0)), m_pleaseReset(true)
{
}
@@ -73,8 +73,6 @@ void QSGParticlePainter::componentComplete()
{
if (!m_system && qobject_cast<QSGParticleSystem*>(parentItem()))
setSystem(qobject_cast<QSGParticleSystem*>(parentItem()));
- if (!m_system)
- qWarning() << "ParticlePainter created without a particle system specified";//TODO: useful QML warnings, like line number?
QSGItem::componentComplete();
}
diff --git a/src/declarative/particles/qsgparticlepainter_p.h b/src/declarative/particles/qsgparticlepainter_p.h
index 4b627e9457..78e0127eac 100644
--- a/src/declarative/particles/qsgparticlepainter_p.h
+++ b/src/declarative/particles/qsgparticlepainter_p.h
@@ -119,7 +119,7 @@ protected:
QSGParticleSystem* m_system;
friend class QSGParticleSystem;
int m_count;
- bool m_pleaseReset;
+ bool m_pleaseReset;//Used by subclasses, but it's a nice optimization to know when stuff isn't going to matter.
QStringList m_groups;
QPointF m_systemOffset;