aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-15 16:09:09 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-18 12:39:28 +0200
commit72c3befaa24e7e6021898061b5bc5389554e7126 (patch)
tree5aedde3f9e942a5fbb4b25ac03138d4ede5dceea
parente7618dba5b4e4b59331693e7b3a38601822b6ffb (diff)
Replace 0 pointer constants with nullptr
Replaced in most common patterns. Change-Id: Idcaff1f2e915f29922702d3600a2e5f1e2418a7a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--examples/quick/models/abstractitemmodel/model.h2
-rw-r--r--examples/quick/scenegraph/custommaterial/customitem.h2
-rw-r--r--examples/quick/scenegraph/twotextureproviders/xorblender.h2
-rw-r--r--examples/quickcontrols2/chattutorial/chapter4-models/sqlcontactmodel.h2
-rw-r--r--examples/quickcontrols2/chattutorial/chapter4-models/sqlconversationmodel.h2
-rw-r--r--examples/quickcontrols2/chattutorial/chapter5-styling/sqlcontactmodel.h2
-rw-r--r--examples/quickcontrols2/chattutorial/chapter5-styling/sqlconversationmodel.h2
-rw-r--r--src/3rdparty/masm/yarr/YarrPattern.h18
-rw-r--r--src/labs/folderlistmodel/fileinfothread_p.h2
-rw-r--r--src/labs/settings/qqmlsettings_p.h2
-rw-r--r--src/particles/qquickage_p.h2
-rw-r--r--src/particles/qquickangledirection_p.h2
-rw-r--r--src/particles/qquickcumulativedirection_p.h2
-rw-r--r--src/particles/qquickcustomaffector_p.h2
-rw-r--r--src/particles/qquickellipseextruder_p.h2
-rw-r--r--src/particles/qquickfriction_p.h2
-rw-r--r--src/particles/qquickgravity_p.h2
-rw-r--r--src/particles/qquickgroupgoal_p.h2
-rw-r--r--src/particles/qquickimageparticle_p.h2
-rw-r--r--src/particles/qquickitemparticle_p.h2
-rw-r--r--src/particles/qquicklineextruder_p.h2
-rw-r--r--src/particles/qquickparticleaffector_p.h2
-rw-r--r--src/particles/qquickparticleemitter_p.h2
-rw-r--r--src/particles/qquickparticleextruder_p.h2
-rw-r--r--src/particles/qquickparticlegroup_p.h2
-rw-r--r--src/particles/qquickparticlepainter_p.h2
-rw-r--r--src/particles/qquickpointattractor_p.h2
-rw-r--r--src/particles/qquickpointdirection_p.h2
-rw-r--r--src/particles/qquickrectangleextruder_p.h2
-rw-r--r--src/particles/qquickspritegoal_p.h2
-rw-r--r--src/particles/qquicktargetdirection_p.h2
-rw-r--r--src/particles/qquicktrailemitter_p.h2
-rw-r--r--src/particles/qquickturbulence_p.h2
-rw-r--r--src/particles/qquickwander_p.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/globalinspector.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_preview/qqmldebugtranslationservice.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.h2
-rw-r--r--src/qml/doc/snippets/code/src_qml_qqmlparserstatus.cpp2
-rw-r--r--src/qml/doc/snippets/qml/integrating-javascript/scarceresources/avatarExample.h2
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc2
-rw-r--r--src/quick/items/qquickdroparea_p.h2
-rw-r--r--src/quick/util/qquicktextmetrics_p.h2
-rw-r--r--src/quicklayouts/qquicklinearlayout.cpp6
-rw-r--r--src/quicktestutils/qml/qmlutils.cpp8
-rw-r--r--src/quicktestutils/quick/visualtestutils.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp2
-rw-r--r--tests/auto/qml/debugger/shared/debugutil_p.h2
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugprocess_p.h2
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugtestservice.h2
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h28
-rw-r--r--tests/auto/qml/qqmlitemmodels/qtestmodel.h4
-rw-r--r--tests/auto/qml/qqmlitemmodels/testtypes.h2
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h12
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp2
-rw-r--r--tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp2
-rw-r--r--tests/auto/quick/qquicklistview/incrementalmodel.h2
-rw-r--r--tests/auto/quick/qquicklistview/randomsortmodel.h2
-rw-r--r--tests/benchmarks/qml/creation/tst_creation.cpp2
-rw-r--r--tests/benchmarks/qml/holistic/testtypes.h6
-rw-r--r--tests/benchmarks/qml/holistic/tst_holistic.cpp2
-rw-r--r--tests/benchmarks/qml/painting/paintbenchmark.cpp2
-rw-r--r--tests/benchmarks/qml/script/tst_script.cpp4
-rw-r--r--tests/benchmarks/qml/typeimports/tst_typeimports.cpp8
-rw-r--r--tests/manual/quickcontrols2/gifs/eventcapturer.h2
-rw-r--r--tools/qml/conf.h2
-rw-r--r--tools/qmleasing/mainwindow.h2
-rw-r--r--tools/qmleasing/segmentproperties.h2
-rw-r--r--tools/qmleasing/splineeditor.h2
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.h2
75 files changed, 113 insertions, 113 deletions
diff --git a/examples/quick/models/abstractitemmodel/model.h b/examples/quick/models/abstractitemmodel/model.h
index 186388c96f..d9abff7ce9 100644
--- a/examples/quick/models/abstractitemmodel/model.h
+++ b/examples/quick/models/abstractitemmodel/model.h
@@ -75,7 +75,7 @@ public:
SizeRole
};
- AnimalModel(QObject *parent = 0);
+ AnimalModel(QObject *parent = nullptr);
//![1]
void addAnimal(const Animal &animal);
diff --git a/examples/quick/scenegraph/custommaterial/customitem.h b/examples/quick/scenegraph/custommaterial/customitem.h
index 5cc1fa09f4..800f5a041f 100644
--- a/examples/quick/scenegraph/custommaterial/customitem.h
+++ b/examples/quick/scenegraph/custommaterial/customitem.h
@@ -65,7 +65,7 @@ class CustomItem : public QQuickItem
QML_ELEMENT
public:
- explicit CustomItem(QQuickItem *parent = 0);
+ explicit CustomItem(QQuickItem *parent = nullptr);
qreal zoom() const
{
diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.h b/examples/quick/scenegraph/twotextureproviders/xorblender.h
index 17557b8efd..0f45e7f7fa 100644
--- a/examples/quick/scenegraph/twotextureproviders/xorblender.h
+++ b/examples/quick/scenegraph/twotextureproviders/xorblender.h
@@ -61,7 +61,7 @@ class XorBlender : public QQuickItem
QML_ELEMENT
public:
- explicit XorBlender(QQuickItem *parent = 0);
+ explicit XorBlender(QQuickItem *parent = nullptr);
QQuickItem *source1() const { return m_source1; }
QQuickItem *source2() const { return m_source2; }
diff --git a/examples/quickcontrols2/chattutorial/chapter4-models/sqlcontactmodel.h b/examples/quickcontrols2/chattutorial/chapter4-models/sqlcontactmodel.h
index fdbe5f1e70..5953c76258 100644
--- a/examples/quickcontrols2/chattutorial/chapter4-models/sqlcontactmodel.h
+++ b/examples/quickcontrols2/chattutorial/chapter4-models/sqlcontactmodel.h
@@ -56,7 +56,7 @@
class SqlContactModel : public QSqlQueryModel
{
public:
- SqlContactModel(QObject *parent = 0);
+ SqlContactModel(QObject *parent = nullptr);
};
#endif // SQLCONTACTMODEL_H
diff --git a/examples/quickcontrols2/chattutorial/chapter4-models/sqlconversationmodel.h b/examples/quickcontrols2/chattutorial/chapter4-models/sqlconversationmodel.h
index 14ab12e262..9c65d64a84 100644
--- a/examples/quickcontrols2/chattutorial/chapter4-models/sqlconversationmodel.h
+++ b/examples/quickcontrols2/chattutorial/chapter4-models/sqlconversationmodel.h
@@ -59,7 +59,7 @@ class SqlConversationModel : public QSqlTableModel
Q_PROPERTY(QString recipient READ recipient WRITE setRecipient NOTIFY recipientChanged)
public:
- SqlConversationModel(QObject *parent = 0);
+ SqlConversationModel(QObject *parent = nullptr);
QString recipient() const;
void setRecipient(const QString &recipient);
diff --git a/examples/quickcontrols2/chattutorial/chapter5-styling/sqlcontactmodel.h b/examples/quickcontrols2/chattutorial/chapter5-styling/sqlcontactmodel.h
index fdbe5f1e70..5953c76258 100644
--- a/examples/quickcontrols2/chattutorial/chapter5-styling/sqlcontactmodel.h
+++ b/examples/quickcontrols2/chattutorial/chapter5-styling/sqlcontactmodel.h
@@ -56,7 +56,7 @@
class SqlContactModel : public QSqlQueryModel
{
public:
- SqlContactModel(QObject *parent = 0);
+ SqlContactModel(QObject *parent = nullptr);
};
#endif // SQLCONTACTMODEL_H
diff --git a/examples/quickcontrols2/chattutorial/chapter5-styling/sqlconversationmodel.h b/examples/quickcontrols2/chattutorial/chapter5-styling/sqlconversationmodel.h
index 14ab12e262..9c65d64a84 100644
--- a/examples/quickcontrols2/chattutorial/chapter5-styling/sqlconversationmodel.h
+++ b/examples/quickcontrols2/chattutorial/chapter5-styling/sqlconversationmodel.h
@@ -59,7 +59,7 @@ class SqlConversationModel : public QSqlTableModel
Q_PROPERTY(QString recipient READ recipient WRITE setRecipient NOTIFY recipientChanged)
public:
- SqlConversationModel(QObject *parent = 0);
+ SqlConversationModel(QObject *parent = nullptr);
QString recipient() const;
void setRecipient(const QString &recipient);
diff --git a/src/3rdparty/masm/yarr/YarrPattern.h b/src/3rdparty/masm/yarr/YarrPattern.h
index 10ea2c5b94..ce2fe6ec00 100644
--- a/src/3rdparty/masm/yarr/YarrPattern.h
+++ b/src/3rdparty/masm/yarr/YarrPattern.h
@@ -21,7 +21,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
@@ -169,7 +169,7 @@ struct PatternTerm {
quantityType = QuantifierFixedCount;
quantityMinCount = quantityMaxCount = 1;
}
-
+
PatternTerm(Type type, bool invert = false)
: type(type)
, m_capture(false)
@@ -199,7 +199,7 @@ struct PatternTerm {
quantityType = QuantifierFixedCount;
quantityMinCount = quantityMaxCount = 1;
}
-
+
static PatternTerm ForwardReference()
{
return PatternTerm(TypeForwardReference);
@@ -219,7 +219,7 @@ struct PatternTerm {
{
return PatternTerm(TypeAssertionWordBoundary, invert);
}
-
+
bool invert()
{
return m_invert;
@@ -274,18 +274,18 @@ public:
ASSERT(m_terms.size());
return m_terms[m_terms.size() - 1];
}
-
+
void removeLastTerm()
{
ASSERT(m_terms.size());
m_terms.shrink(m_terms.size() - 1);
}
-
+
void setOnceThrough()
{
m_onceThrough = true;
}
-
+
bool onceThrough()
{
return m_onceThrough;
@@ -305,12 +305,12 @@ public:
struct PatternDisjunction {
WTF_MAKE_FAST_ALLOCATED;
public:
- PatternDisjunction(PatternAlternative* parent = 0)
+ PatternDisjunction(PatternAlternative *parent = nullptr)
: m_parent(parent)
, m_hasFixedSize(false)
{
}
-
+
PatternAlternative* addNewAlternative()
{
m_alternatives.append(std::make_unique<PatternAlternative>(this));
diff --git a/src/labs/folderlistmodel/fileinfothread_p.h b/src/labs/folderlistmodel/fileinfothread_p.h
index 1ed3a9904b..9c8286f1cd 100644
--- a/src/labs/folderlistmodel/fileinfothread_p.h
+++ b/src/labs/folderlistmodel/fileinfothread_p.h
@@ -74,7 +74,7 @@ Q_SIGNALS:
void statusChanged(QQuickFolderListModel::Status status) const;
public:
- FileInfoThread(QObject *parent = 0);
+ FileInfoThread(QObject *parent = nullptr);
~FileInfoThread();
void clear();
diff --git a/src/labs/settings/qqmlsettings_p.h b/src/labs/settings/qqmlsettings_p.h
index 1739f3934a..9cc4b6571b 100644
--- a/src/labs/settings/qqmlsettings_p.h
+++ b/src/labs/settings/qqmlsettings_p.h
@@ -72,7 +72,7 @@ class Q_LABSSETTINGS_PRIVATE_EXPORT QQmlSettings : public QObject, public QQmlPa
QML_ADDED_IN_VERSION(1, 0)
public:
- explicit QQmlSettings(QObject *parent = 0);
+ explicit QQmlSettings(QObject *parent = nullptr);
~QQmlSettings();
QString category() const;
diff --git a/src/particles/qquickage_p.h b/src/particles/qquickage_p.h
index 1730c25c28..491c2b0aff 100644
--- a/src/particles/qquickage_p.h
+++ b/src/particles/qquickage_p.h
@@ -63,7 +63,7 @@ class QQuickAgeAffector : public QQuickParticleAffector
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickAgeAffector(QQuickItem *parent = 0);
+ explicit QQuickAgeAffector(QQuickItem *parent = nullptr);
int lifeLeft() const
{
diff --git a/src/particles/qquickangledirection_p.h b/src/particles/qquickangledirection_p.h
index 9ec9e49d1a..a152782ae2 100644
--- a/src/particles/qquickangledirection_p.h
+++ b/src/particles/qquickangledirection_p.h
@@ -65,7 +65,7 @@ class QQuickAngleDirection : public QQuickDirection
QML_NAMED_ELEMENT(AngleDirection)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickAngleDirection(QObject *parent = 0);
+ explicit QQuickAngleDirection(QObject *parent = nullptr);
QPointF sample(const QPointF &from) override;
qreal angle() const
{
diff --git a/src/particles/qquickcumulativedirection_p.h b/src/particles/qquickcumulativedirection_p.h
index 0a54d5dd22..ca93315250 100644
--- a/src/particles/qquickcumulativedirection_p.h
+++ b/src/particles/qquickcumulativedirection_p.h
@@ -64,7 +64,7 @@ class QQuickCumulativeDirection : public QQuickDirection
QML_NAMED_ELEMENT(CumulativeDirection)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickCumulativeDirection(QObject *parent = 0);
+ explicit QQuickCumulativeDirection(QObject *parent = nullptr);
QQmlListProperty<QQuickDirection> directions();
QPointF sample(const QPointF &from) override;
private:
diff --git a/src/particles/qquickcustomaffector_p.h b/src/particles/qquickcustomaffector_p.h
index 4506ae9d62..9cc1b7cfdb 100644
--- a/src/particles/qquickcustomaffector_p.h
+++ b/src/particles/qquickcustomaffector_p.h
@@ -71,7 +71,7 @@ class QQuickCustomAffector : public QQuickParticleAffector
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickCustomAffector(QQuickItem *parent = 0);
+ explicit QQuickCustomAffector(QQuickItem *parent = nullptr);
void affectSystem(qreal dt) override;
QQuickDirection * position() const
diff --git a/src/particles/qquickellipseextruder_p.h b/src/particles/qquickellipseextruder_p.h
index 3268923480..25a3aedb89 100644
--- a/src/particles/qquickellipseextruder_p.h
+++ b/src/particles/qquickellipseextruder_p.h
@@ -61,7 +61,7 @@ class QQuickEllipseExtruder : public QQuickParticleExtruder
QML_NAMED_ELEMENT(EllipseShape)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickEllipseExtruder(QObject *parent = 0);
+ explicit QQuickEllipseExtruder(QObject *parent = nullptr);
QPointF extrude(const QRectF &) override;
bool contains(const QRectF &bounds, const QPointF &point) override;
diff --git a/src/particles/qquickfriction_p.h b/src/particles/qquickfriction_p.h
index 952f47b141..ae77562611 100644
--- a/src/particles/qquickfriction_p.h
+++ b/src/particles/qquickfriction_p.h
@@ -62,7 +62,7 @@ class QQuickFrictionAffector : public QQuickParticleAffector
QML_NAMED_ELEMENT(Friction)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickFrictionAffector(QQuickItem *parent = 0);
+ explicit QQuickFrictionAffector(QQuickItem *parent = nullptr);
qreal factor() const
{
diff --git a/src/particles/qquickgravity_p.h b/src/particles/qquickgravity_p.h
index 351cbb93b1..c84f5086ef 100644
--- a/src/particles/qquickgravity_p.h
+++ b/src/particles/qquickgravity_p.h
@@ -64,7 +64,7 @@ class QQuickGravityAffector : public QQuickParticleAffector
QML_NAMED_ELEMENT(Gravity)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickGravityAffector(QQuickItem *parent = 0);
+ explicit QQuickGravityAffector(QQuickItem *parent = nullptr);
qreal magnitude() const;
qreal angle() const;
diff --git a/src/particles/qquickgroupgoal_p.h b/src/particles/qquickgroupgoal_p.h
index 5589483aa6..d0c0e52163 100644
--- a/src/particles/qquickgroupgoal_p.h
+++ b/src/particles/qquickgroupgoal_p.h
@@ -64,7 +64,7 @@ class QQuickGroupGoalAffector : public QQuickParticleAffector
QML_NAMED_ELEMENT(GroupGoal)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickGroupGoalAffector(QQuickItem *parent = 0);
+ explicit QQuickGroupGoalAffector(QQuickItem *parent = nullptr);
QString goalState() const
{
diff --git a/src/particles/qquickimageparticle_p.h b/src/particles/qquickimageparticle_p.h
index 19000f6c9b..40f7f04998 100644
--- a/src/particles/qquickimageparticle_p.h
+++ b/src/particles/qquickimageparticle_p.h
@@ -224,7 +224,7 @@ class QQuickImageParticle : public QQuickParticlePainter
QML_NAMED_ELEMENT(ImageParticle)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickImageParticle(QQuickItem *parent = 0);
+ explicit QQuickImageParticle(QQuickItem *parent = nullptr);
virtual ~QQuickImageParticle();
enum Status { Null, Ready, Loading, Error };
diff --git a/src/particles/qquickitemparticle_p.h b/src/particles/qquickitemparticle_p.h
index 4fe5f9c031..1664873226 100644
--- a/src/particles/qquickitemparticle_p.h
+++ b/src/particles/qquickitemparticle_p.h
@@ -67,7 +67,7 @@ class QQuickItemParticle : public QQuickParticlePainter
QML_ADDED_IN_VERSION(2, 0)
QML_ATTACHED(QQuickItemParticleAttached)
public:
- explicit QQuickItemParticle(QQuickItem *parent = 0);
+ explicit QQuickItemParticle(QQuickItem *parent = nullptr);
~QQuickItemParticle();
bool fade() const { return m_fade; }
diff --git a/src/particles/qquicklineextruder_p.h b/src/particles/qquicklineextruder_p.h
index a337324c6a..2a2134bd3f 100644
--- a/src/particles/qquicklineextruder_p.h
+++ b/src/particles/qquicklineextruder_p.h
@@ -61,7 +61,7 @@ class QQuickLineExtruder : public QQuickParticleExtruder
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickLineExtruder(QObject *parent = 0);
+ explicit QQuickLineExtruder(QObject *parent = nullptr);
QPointF extrude(const QRectF &) override;
bool mirrored() const
{
diff --git a/src/particles/qquickparticleaffector_p.h b/src/particles/qquickparticleaffector_p.h
index 79446a23a1..4e6089c814 100644
--- a/src/particles/qquickparticleaffector_p.h
+++ b/src/particles/qquickparticleaffector_p.h
@@ -73,7 +73,7 @@ class Q_QUICKPARTICLES_PRIVATE_EXPORT QQuickParticleAffector : public QQuickItem
QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.")
public:
- explicit QQuickParticleAffector(QQuickItem *parent = 0);
+ explicit QQuickParticleAffector(QQuickItem *parent = nullptr);
virtual void affectSystem(qreal dt);
virtual void reset(QQuickParticleData*);//As some store their own data per particle?
QQuickParticleSystem* system() const
diff --git a/src/particles/qquickparticleemitter_p.h b/src/particles/qquickparticleemitter_p.h
index 0455b97d3e..7e51a560df 100644
--- a/src/particles/qquickparticleemitter_p.h
+++ b/src/particles/qquickparticleemitter_p.h
@@ -87,7 +87,7 @@ class Q_QUICKPARTICLES_PRIVATE_EXPORT QQuickParticleEmitter : public QQuickItem
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickParticleEmitter(QQuickItem *parent = 0);
+ explicit QQuickParticleEmitter(QQuickItem *parent = nullptr);
virtual ~QQuickParticleEmitter();
virtual void emitWindow(int timeStamp);
diff --git a/src/particles/qquickparticleextruder_p.h b/src/particles/qquickparticleextruder_p.h
index 0249ecd3aa..7e84dba50c 100644
--- a/src/particles/qquickparticleextruder_p.h
+++ b/src/particles/qquickparticleextruder_p.h
@@ -67,7 +67,7 @@ class QQuickParticleExtruder : public QObject
QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.")
public:
- explicit QQuickParticleExtruder(QObject *parent = 0);
+ explicit QQuickParticleExtruder(QObject *parent = nullptr);
virtual QPointF extrude(const QRectF &);
virtual bool contains(const QRectF &bounds, const QPointF &point);
};
diff --git a/src/particles/qquickparticlegroup_p.h b/src/particles/qquickparticlegroup_p.h
index 6df1e61563..ce13b85d99 100644
--- a/src/particles/qquickparticlegroup_p.h
+++ b/src/particles/qquickparticlegroup_p.h
@@ -68,7 +68,7 @@ class QQuickParticleGroup : public QQuickStochasticState, public QQmlParserStatu
Q_INTERFACES(QQmlParserStatus)
public:
- explicit QQuickParticleGroup(QObject* parent = 0);
+ explicit QQuickParticleGroup(QObject *parent = nullptr);
QQmlListProperty<QObject> particleChildren();
diff --git a/src/particles/qquickparticlepainter_p.h b/src/particles/qquickparticlepainter_p.h
index 5236bb6569..cecf04e4b0 100644
--- a/src/particles/qquickparticlepainter_p.h
+++ b/src/particles/qquickparticlepainter_p.h
@@ -72,7 +72,7 @@ public: // data
typedef QQuickParticleVarLengthArray<QQuickParticleGroupData::ID, 4> GroupIDs;
public:
- explicit QQuickParticlePainter(QQuickItem *parent = 0);
+ explicit QQuickParticlePainter(QQuickItem *parent = nullptr);
//Data Interface to system
void load(QQuickParticleData*);
void reload(QQuickParticleData*);
diff --git a/src/particles/qquickpointattractor_p.h b/src/particles/qquickpointattractor_p.h
index b3314f1a96..e20e1b4535 100644
--- a/src/particles/qquickpointattractor_p.h
+++ b/src/particles/qquickpointattractor_p.h
@@ -82,7 +82,7 @@ public:
};
Q_ENUM(AffectableParameters)
- explicit QQuickAttractorAffector(QQuickItem *parent = 0);
+ explicit QQuickAttractorAffector(QQuickItem *parent = nullptr);
qreal strength() const
{
diff --git a/src/particles/qquickpointdirection_p.h b/src/particles/qquickpointdirection_p.h
index 39109d8331..9bcabcaf20 100644
--- a/src/particles/qquickpointdirection_p.h
+++ b/src/particles/qquickpointdirection_p.h
@@ -64,7 +64,7 @@ class QQuickPointDirection : public QQuickDirection
QML_NAMED_ELEMENT(PointDirection)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickPointDirection(QObject *parent = 0);
+ explicit QQuickPointDirection(QObject *parent = nullptr);
QPointF sample(const QPointF &from) override;
qreal x() const
{
diff --git a/src/particles/qquickrectangleextruder_p.h b/src/particles/qquickrectangleextruder_p.h
index f6f39579c4..61ac88e9d3 100644
--- a/src/particles/qquickrectangleextruder_p.h
+++ b/src/particles/qquickrectangleextruder_p.h
@@ -63,7 +63,7 @@ class QQuickRectangleExtruder : public QQuickParticleExtruder
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickRectangleExtruder(QObject *parent = 0);
+ explicit QQuickRectangleExtruder(QObject *parent = nullptr);
QPointF extrude(const QRectF &) override;
bool contains(const QRectF &bounds, const QPointF &point) override;
bool fill() const
diff --git a/src/particles/qquickspritegoal_p.h b/src/particles/qquickspritegoal_p.h
index efd9b1ab39..93be75c3cc 100644
--- a/src/particles/qquickspritegoal_p.h
+++ b/src/particles/qquickspritegoal_p.h
@@ -66,7 +66,7 @@ class QQuickSpriteGoalAffector : public QQuickParticleAffector
QML_NAMED_ELEMENT(SpriteGoal)
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickSpriteGoalAffector(QQuickItem *parent = 0);
+ explicit QQuickSpriteGoalAffector(QQuickItem *parent = nullptr);
QString goalState() const
{
diff --git a/src/particles/qquicktargetdirection_p.h b/src/particles/qquicktargetdirection_p.h
index ea6ac24893..b02a497e9a 100644
--- a/src/particles/qquicktargetdirection_p.h
+++ b/src/particles/qquicktargetdirection_p.h
@@ -74,7 +74,7 @@ class QQuickTargetDirection : public QQuickDirection
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickTargetDirection(QObject *parent = 0);
+ explicit QQuickTargetDirection(QObject *parent = nullptr);
QPointF sample(const QPointF &from) override;
qreal targetX() const
diff --git a/src/particles/qquicktrailemitter_p.h b/src/particles/qquicktrailemitter_p.h
index 6cf2dc0c98..aa4686ddea 100644
--- a/src/particles/qquicktrailemitter_p.h
+++ b/src/particles/qquicktrailemitter_p.h
@@ -72,7 +72,7 @@ public:
ParticleSize = -2//Anything less than 0 will do
};
Q_ENUM(EmitSize)
- explicit QQuickTrailEmitter(QQuickItem *parent = 0);
+ explicit QQuickTrailEmitter(QQuickItem *parent = nullptr);
void emitWindow(int timeStamp) override;
void reset() override;
diff --git a/src/particles/qquickturbulence_p.h b/src/particles/qquickturbulence_p.h
index c7a31bb8ae..dca946e39e 100644
--- a/src/particles/qquickturbulence_p.h
+++ b/src/particles/qquickturbulence_p.h
@@ -66,7 +66,7 @@ class QQuickTurbulenceAffector : public QQuickParticleAffector
QML_ADDED_IN_VERSION(2, 0)
public:
- explicit QQuickTurbulenceAffector(QQuickItem *parent = 0);
+ explicit QQuickTurbulenceAffector(QQuickItem *parent = nullptr);
~QQuickTurbulenceAffector();
void affectSystem(qreal dt) override;
diff --git a/src/particles/qquickwander_p.h b/src/particles/qquickwander_p.h
index 174b780562..29458d926c 100644
--- a/src/particles/qquickwander_p.h
+++ b/src/particles/qquickwander_p.h
@@ -82,7 +82,7 @@ public:
};
Q_ENUM(AffectableParameters)
- explicit QQuickWanderAffector(QQuickItem *parent = 0);
+ explicit QQuickWanderAffector(QQuickItem *parent = nullptr);
~QQuickWanderAffector();
// virtual void reset(int systemIdx);
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h
index a18ff942b6..f9cc27b060 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h
@@ -70,7 +70,7 @@ class QQmlEngineDebugServiceImpl : public QQmlEngineDebugService
{
Q_OBJECT
public:
- QQmlEngineDebugServiceImpl(QObject * = 0);
+ QQmlEngineDebugServiceImpl(QObject * = nullptr);
~QQmlEngineDebugServiceImpl();
struct QQmlObjectData {
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h b/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h
index 4b304a6087..ec5bd58523 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h
@@ -69,7 +69,7 @@ class QQmlWatcher : public QObject
{
Q_OBJECT
public:
- QQmlWatcher(QObject * = 0);
+ QQmlWatcher(QObject * = nullptr);
bool addWatch(int id, quint32 objectId);
bool addWatch(int id, quint32 objectId, const QByteArray &property);
diff --git a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h
index f7b325c454..9980fd8a26 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h
@@ -57,7 +57,7 @@ class GlobalInspector : public QObject
{
Q_OBJECT
public:
- GlobalInspector(QObject *parent = 0) : QObject(parent), m_eventId(0) {}
+ GlobalInspector(QObject *parent = nullptr) : QObject(parent), m_eventId(0) {}
~GlobalInspector();
void setSelectedItems(const QList<QQuickItem *> &items);
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.h b/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.h
index fc18f33ad3..f2bc9ccb85 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.h
@@ -63,7 +63,7 @@ class QQuickWindowInspector : public QObject
Q_OBJECT
public:
- explicit QQuickWindowInspector(QQuickWindow *quickWindow, QObject *parent = 0);
+ explicit QQuickWindowInspector(QQuickWindow *quickWindow, QObject *parent = nullptr);
QQuickItem *overlay() const { return m_overlay; }
QQuickItem *topVisibleItemAt(const QPointF &pos) const;
diff --git a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.h b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.h
index eb78afe900..8c2256b3fe 100644
--- a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.h
+++ b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.h
@@ -63,7 +63,7 @@ class QDebugMessageServiceImpl : public QDebugMessageService
{
Q_OBJECT
public:
- QDebugMessageServiceImpl(QObject *parent = 0);
+ QDebugMessageServiceImpl(QObject *parent = nullptr);
void sendDebugMessage(QtMsgType type, const QMessageLogContext &ctxt, const QString &buf);
void synchronizeTime(const QElapsedTimer &otherTimer) override;
diff --git a/src/plugins/qmltooling/qmldbg_preview/qqmldebugtranslationservice.h b/src/plugins/qmltooling/qmldbg_preview/qqmldebugtranslationservice.h
index e0d1b2d9a8..44b102fd46 100644
--- a/src/plugins/qmltooling/qmldbg_preview/qqmldebugtranslationservice.h
+++ b/src/plugins/qmltooling/qmldbg_preview/qqmldebugtranslationservice.h
@@ -65,7 +65,7 @@ class QQmlDebugTranslationServiceImpl : public QQmlDebugTranslationService
{
Q_OBJECT
public:
- QQmlDebugTranslationServiceImpl(QObject *parent = 0);
+ QQmlDebugTranslationServiceImpl(QObject *parent = nullptr);
~QQmlDebugTranslationServiceImpl();
void foundTranslationBinding(const TranslationBindingInformation &translationBindingInformation) override;
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
index 3c5daa0f4f..45922c7a4f 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
@@ -71,7 +71,7 @@ public:
StopWaitingEngine
};
- QQmlEngineControlServiceImpl(QObject *parent = 0);
+ QQmlEngineControlServiceImpl(QObject *parent = nullptr);
protected:
friend class QQmlProfilerServiceFactory;
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h
index 3791ab29ae..bff337d35a 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h
@@ -93,7 +93,7 @@ public:
quint64 features = std::numeric_limits<quint64>::max()) override;
void stopProfiling(QJSEngine *engine) override;
- QQmlProfilerServiceImpl(QObject *parent = 0);
+ QQmlProfilerServiceImpl(QObject *parent = nullptr);
~QQmlProfilerServiceImpl() override;
void dataReady(QQmlAbstractProfilerAdapter *profiler) override;
diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.h b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.h
index 1f3467c1d0..ecbcede4d2 100644
--- a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.h
+++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
class QQuickProfilerAdapter : public QQmlAbstractProfilerAdapter {
Q_OBJECT
public:
- QQuickProfilerAdapter(QObject *parent = 0);
+ QQuickProfilerAdapter(QObject *parent = nullptr);
~QQuickProfilerAdapter();
qint64 sendMessages(qint64 until, QList<QByteArray> &messages) override;
void receiveData(const QVector<QQuickProfilerData> &new_data);
diff --git a/src/qml/doc/snippets/code/src_qml_qqmlparserstatus.cpp b/src/qml/doc/snippets/code/src_qml_qqmlparserstatus.cpp
index f5d6f824f2..58a290c4ae 100644
--- a/src/qml/doc/snippets/code/src_qml_qqmlparserstatus.cpp
+++ b/src/qml/doc/snippets/code/src_qml_qqmlparserstatus.cpp
@@ -58,7 +58,7 @@ class MyObject : public QObject, public QQmlParserStatus
Q_INTERFACES(QQmlParserStatus)
public:
- MyObject(QObject *parent = 0);
+ MyObject(QObject *parent = nullptr);
// ...
void classBegin() override;
void componentComplete() override;
diff --git a/src/qml/doc/snippets/qml/integrating-javascript/scarceresources/avatarExample.h b/src/qml/doc/snippets/qml/integrating-javascript/scarceresources/avatarExample.h
index 1acc3a1c2f..58e75d02ae 100644
--- a/src/qml/doc/snippets/qml/integrating-javascript/scarceresources/avatarExample.h
+++ b/src/qml/doc/snippets/qml/integrating-javascript/scarceresources/avatarExample.h
@@ -64,7 +64,7 @@ class AvatarExample : public QObject
QML_ELEMENT
public:
- AvatarExample(QObject *parent = 0)
+ AvatarExample(QObject *parent = nullptr)
: QObject(parent), m_value(100, 100)
{
m_value.fill(Qt::blue);
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 53af637510..b8524b3e93 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -1022,7 +1022,7 @@
Q_PROPERTY (int someProperty READ someProperty WRITE setSomeProperty NOTIFY somePropertyChanged)
public:
- SingletonTypeExample(QObject* parent = 0)
+ SingletonTypeExample(QObject *parent = nullptr)
: QObject(parent), m_someProperty(0)
{
}
diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h
index e3075c70ec..0a62ec61bc 100644
--- a/src/quick/items/qquickdroparea_p.h
+++ b/src/quick/items/qquickdroparea_p.h
@@ -134,7 +134,7 @@ class QQuickDropAreaDrag : public QObject
QML_ANONYMOUS
QML_ADDED_IN_VERSION(2, 0)
public:
- QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent = 0);
+ QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent = nullptr);
~QQuickDropAreaDrag();
qreal x() const;
diff --git a/src/quick/util/qquicktextmetrics_p.h b/src/quick/util/qquicktextmetrics_p.h
index 8fd0d84648..50036bb1f4 100644
--- a/src/quick/util/qquicktextmetrics_p.h
+++ b/src/quick/util/qquicktextmetrics_p.h
@@ -81,7 +81,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTextMetrics : public QObject
QML_ADDED_IN_VERSION(2, 4)
public:
- explicit QQuickTextMetrics(QObject *parent = 0);
+ explicit QQuickTextMetrics(QObject *parent = nullptr);
QFont font() const;
void setFont(const QFont &font);
diff --git a/src/quicklayouts/qquicklinearlayout.cpp b/src/quicklayouts/qquicklinearlayout.cpp
index 2f97708b52..fc00691820 100644
--- a/src/quicklayouts/qquicklinearlayout.cpp
+++ b/src/quicklayouts/qquicklinearlayout.cpp
@@ -227,7 +227,7 @@ QQuickGridLayoutBase::QQuickGridLayoutBase()
QQuickGridLayoutBase::QQuickGridLayoutBase(QQuickGridLayoutBasePrivate &dd,
Qt::Orientation orientation,
- QQuickItem *parent /*= 0*/)
+ QQuickItem *parent /*= nullptr */)
: QQuickLayout(dd, parent)
{
Q_D(QQuickGridLayoutBase);
@@ -516,7 +516,7 @@ void QQuickGridLayoutBase::rearrange(const QSizeF &size)
** QQuickGridLayout
**
**/
-QQuickGridLayout::QQuickGridLayout(QQuickItem *parent /* = 0*/)
+QQuickGridLayout::QQuickGridLayout(QQuickItem *parent /* = nullptr*/)
: QQuickGridLayoutBase(*new QQuickGridLayoutPrivate, Qt::Horizontal, parent)
{
}
@@ -781,7 +781,7 @@ void QQuickGridLayout::insertLayoutItems()
**
**/
QQuickLinearLayout::QQuickLinearLayout(Qt::Orientation orientation,
- QQuickItem *parent /*= 0*/)
+ QQuickItem *parent /*= nullptr*/)
: QQuickGridLayoutBase(*new QQuickLinearLayoutPrivate, orientation, parent)
{
}
diff --git a/src/quicktestutils/qml/qmlutils.cpp b/src/quicktestutils/qml/qmlutils.cpp
index 130dd4e0cb..af100ad4bf 100644
--- a/src/quicktestutils/qml/qmlutils.cpp
+++ b/src/quicktestutils/qml/qmlutils.cpp
@@ -35,7 +35,7 @@
QT_BEGIN_NAMESPACE
-QQmlDataTest *QQmlDataTest::m_instance = 0;
+QQmlDataTest *QQmlDataTest::m_instance = nullptr;
QQmlDataTest::QQmlDataTest(const char *qmlTestDataDir) :
m_qmlTestDataDir(qmlTestDataDir),
@@ -54,7 +54,7 @@ QQmlDataTest::QQmlDataTest(const char *qmlTestDataDir) :
QQmlDataTest::~QQmlDataTest()
{
- m_instance = 0;
+ m_instance = nullptr;
}
void QQmlDataTest::initTestCase()
@@ -86,7 +86,7 @@ bool QQmlDataTest::canImportModule(const QString &importTestQmlSource) const
Q_GLOBAL_STATIC(QMutex, qQmlTestMessageHandlerMutex)
-QQmlTestMessageHandler *QQmlTestMessageHandler::m_instance = 0;
+QQmlTestMessageHandler *QQmlTestMessageHandler::m_instance = nullptr;
void QQmlTestMessageHandler::messageHandler(QtMsgType, const QMessageLogContext &context, const QString &message)
{
@@ -115,7 +115,7 @@ QQmlTestMessageHandler::~QQmlTestMessageHandler()
QMutexLocker locker(qQmlTestMessageHandlerMutex());
Q_ASSERT(QQmlTestMessageHandler::m_instance);
qInstallMessageHandler(m_oldHandler);
- QQmlTestMessageHandler::m_instance = 0;
+ QQmlTestMessageHandler::m_instance = nullptr;
}
QT_END_NAMESPACE
diff --git a/src/quicktestutils/quick/visualtestutils.cpp b/src/quicktestutils/quick/visualtestutils.cpp
index c94484d189..9447c91513 100644
--- a/src/quicktestutils/quick/visualtestutils.cpp
+++ b/src/quicktestutils/quick/visualtestutils.cpp
@@ -38,7 +38,7 @@ QT_BEGIN_NAMESPACE
QQuickItem *QQuickVisualTestUtils::findVisibleChild(QQuickItem *parent, const QString &objectName)
{
- QQuickItem *item = 0;
+ QQuickItem *item = nullptr;
QList<QQuickItem*> items = parent->findChildren<QQuickItem*>(objectName);
for (int i = 0; i < items.count(); ++i) {
if (items.at(i)->isVisible() && !QQuickItemPrivate::get(items.at(i))->culled) {
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
index 461c49c7cc..9f96f2ca72 100644
--- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
@@ -91,7 +91,7 @@ class JsonTest : public QObject
Q_PROPERTY(QJsonObject data READ data WRITE setData NOTIFY dataChanged)
public:
- JsonTest(QObject *parent = 0) : QObject(parent)
+ JsonTest(QObject *parent = nullptr) : QObject(parent)
{
m_data["foo"] = QJsonValue(12);
m_data["ttt"] = QJsonArray({4, 5, 4, 3, 2});
diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h
index e19f59d3f2..3ef2c56414 100644
--- a/tests/auto/qml/debugger/shared/debugutil_p.h
+++ b/tests/auto/qml/debugger/shared/debugutil_p.h
@@ -105,7 +105,7 @@ class QQmlInspectorResultRecipient : public QObject
{
Q_OBJECT
public:
- QQmlInspectorResultRecipient(QObject *parent = 0) :
+ QQmlInspectorResultRecipient(QObject *parent = nullptr) :
QObject(parent), lastResponseId(-1), lastResult(false) {}
int lastResponseId;
diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h b/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h
index 945cc58c85..69f9beea2f 100644
--- a/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h
+++ b/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h
@@ -49,7 +49,7 @@ class QQmlDebugProcess : public QObject
{
Q_OBJECT
public:
- QQmlDebugProcess(const QString &executable, QObject *parent = 0);
+ QQmlDebugProcess(const QString &executable, QObject *parent = nullptr);
~QQmlDebugProcess();
QString stateString() const;
diff --git a/tests/auto/qml/debugger/shared/qqmldebugtestservice.h b/tests/auto/qml/debugger/shared/qqmldebugtestservice.h
index cd42ca5379..96c1d2042d 100644
--- a/tests/auto/qml/debugger/shared/qqmldebugtestservice.h
+++ b/tests/auto/qml/debugger/shared/qqmldebugtestservice.h
@@ -36,7 +36,7 @@ class QQmlDebugTestService : public QQmlDebugService
{
Q_OBJECT
public:
- QQmlDebugTestService(const QString &s, float version = 1, QObject *parent = 0);
+ QQmlDebugTestService(const QString &s, float version = 1, QObject *parent = nullptr);
protected:
void messageReceived(const QByteArray &ba) override;
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index 04f97adcfe..59e0a9cb65 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -984,7 +984,7 @@ class DefaultPropertyExtendedObject : public QObject
Q_PROPERTY(QObject *firstProperty READ firstProperty WRITE setFirstProperty)
Q_PROPERTY(QObject *secondProperty READ secondProperty WRITE setSecondProperty)
public:
- DefaultPropertyExtendedObject(QObject *parent = 0) : QObject(parent), m_firstProperty(0), m_secondProperty(0) {}
+ DefaultPropertyExtendedObject(QObject *parent = nullptr) : QObject(parent), m_firstProperty(0), m_secondProperty(0) {}
QObject *firstProperty() const { return m_firstProperty; }
QObject *secondProperty() const { return m_secondProperty; }
@@ -1186,7 +1186,7 @@ class ScarceResourceObject : public QObject
Q_OBJECT
Q_PROPERTY(QPixmap scarceResource READ scarceResource WRITE setScarceResource NOTIFY scarceResourceChanged)
public:
- ScarceResourceObject(QObject *parent = 0) : QObject(parent), m_value(100, 100) { m_value.fill(Qt::blue); }
+ ScarceResourceObject(QObject *parent = nullptr) : QObject(parent), m_value(100, 100) { m_value.fill(Qt::blue); }
~ScarceResourceObject() {}
QPixmap scarceResource() const { return m_value; }
@@ -1222,7 +1222,7 @@ class testQObjectApi : public QObject
Q_PROPERTY (int qobjectTestWritableFinalProperty READ qobjectTestWritableFinalProperty WRITE setQObjectTestWritableFinalProperty NOTIFY qobjectTestWritableFinalPropertyChanged FINAL)
public:
- testQObjectApi(QObject* parent = 0)
+ testQObjectApi(QObject *parent = nullptr)
: QObject(parent), m_testProperty(0), m_testWritableProperty(0), m_testWritableFinalProperty(0), m_methodCallCount(0), m_trackedObject(0)
{
}
@@ -1284,7 +1284,7 @@ class testQObjectApiTwo : public QObject
Q_PROPERTY(int twoTestProperty READ twoTestProperty WRITE setTwoTestProperty NOTIFY twoTestPropertyChanged)
public:
- testQObjectApiTwo(QObject *parent = 0) : QObject(parent), m_ttp(42) {}
+ testQObjectApiTwo(QObject *parent = nullptr) : QObject(parent), m_ttp(42) {}
~testQObjectApiTwo() {}
void setTwoTestProperty(int v) { m_ttp = v; emit twoTestPropertyChanged(); }
@@ -1302,7 +1302,7 @@ class testImportOrderApi : public QObject
Q_OBJECT
public:
- testImportOrderApi(int value, QObject *parent = 0) : QObject(parent), m_value(value) {}
+ testImportOrderApi(int value, QObject *parent = nullptr) : QObject(parent), m_value(value) {}
Q_PROPERTY(int value READ value)
@@ -1317,7 +1317,7 @@ class CircularReferenceObject : public QObject
Q_OBJECT
public:
- CircularReferenceObject(QObject *parent = 0)
+ CircularReferenceObject(QObject *parent = nullptr)
: QObject(parent), m_dtorCount(0)
{
}
@@ -1332,7 +1332,7 @@ public:
m_dtorCount = dtorCount;
}
- Q_INVOKABLE CircularReferenceObject *generate(QObject *parent = 0)
+ Q_INVOKABLE CircularReferenceObject *generate(QObject *parent = nullptr)
{
CircularReferenceObject *retn = new CircularReferenceObject(parent);
retn->m_dtorCount = m_dtorCount;
@@ -1367,7 +1367,7 @@ class MyDynamicCreationDestructionObject : public QObject
Q_PROPERTY (int intProperty READ intProperty WRITE setIntProperty NOTIFY intPropertyChanged)
public:
- MyDynamicCreationDestructionObject(QObject *parent = 0) : QObject(parent), m_intProperty(0), m_dtorCount(0)
+ MyDynamicCreationDestructionObject(QObject *parent = nullptr) : QObject(parent), m_intProperty(0), m_dtorCount(0)
{
}
@@ -1539,14 +1539,14 @@ class MyDeleteObject : public QObject
Q_PROPERTY(QObject *object2 READ object2 NOTIFY object2Changed)
public:
- MyDeleteObject() : m_nestedObject(new MyQmlObject), m_object1(0), m_object2(0) {}
+ MyDeleteObject() : m_nestedObject(new MyQmlObject), m_object1(nullptr), m_object2(nullptr) {}
Q_INVOKABLE QObject *object1() const { return m_object1; }
Q_INVOKABLE QObject *object2() const { return m_object2; }
void setObject1(QObject *object) { m_object1 = object; }
void setObject2(QObject *object) { m_object2 = object; emit object2Changed(); }
QObject *nestedObject() const { return m_nestedObject; }
- int deleteNestedObject() { delete m_nestedObject; m_nestedObject = 0; return 1; }
+ int deleteNestedObject() { delete m_nestedObject; m_nestedObject = nullptr; return 1; }
signals:
void nestedObjectChanged();
@@ -1609,7 +1609,7 @@ Q_SIGNALS:
void done(const QString &result);
private:
- QThread *m_thread = 0;
+ QThread *m_thread = nullptr;
};
class MyUnregisteredEnumTypeObject : public QObject
@@ -1638,7 +1638,7 @@ class FallbackBindingsObject : public QObject
Q_OBJECT
Q_PROPERTY (int test READ test NOTIFY testChanged)
public:
- FallbackBindingsObject(QObject* parent = 0)
+ FallbackBindingsObject(QObject *parent = nullptr)
: QObject(parent), m_test(100)
{
}
@@ -1657,7 +1657,7 @@ class FallbackBindingsDerived : public FallbackBindingsObject
Q_OBJECT
Q_PROPERTY (QString test READ test NOTIFY testChanged)
public:
- FallbackBindingsDerived(QObject* parent = 0)
+ FallbackBindingsDerived(QObject *parent = nullptr)
: FallbackBindingsObject(parent), m_test("hello")
{
}
@@ -1692,7 +1692,7 @@ class FallbackBindingsAttachedDerived : public FallbackBindingsAttachedObject
Q_OBJECT
Q_PROPERTY (QString test READ test NOTIFY testChanged)
public:
- FallbackBindingsAttachedDerived(QObject* parent = 0)
+ FallbackBindingsAttachedDerived(QObject *parent = nullptr)
: FallbackBindingsAttachedObject(parent), m_test("hello")
{
}
diff --git a/tests/auto/qml/qqmlitemmodels/qtestmodel.h b/tests/auto/qml/qqmlitemmodels/qtestmodel.h
index a5d20d5653..67b9f5e590 100644
--- a/tests/auto/qml/qqmlitemmodels/qtestmodel.h
+++ b/tests/auto/qml/qqmlitemmodels/qtestmodel.h
@@ -38,10 +38,10 @@ class TestModel: public QAbstractItemModel
Q_OBJECT
public:
- TestModel(QObject *parent = 0): QAbstractItemModel(parent),
+ TestModel(QObject *parent = nullptr): QAbstractItemModel(parent),
fetched(false), rows(10), cols(1), levels(INT_MAX), wrongIndex(false) { init(); }
- TestModel(int _rows, int _cols, QObject *parent = 0): QAbstractItemModel(parent),
+ TestModel(int _rows, int _cols, QObject *parent = nullptr): QAbstractItemModel(parent),
fetched(false), rows(_rows), cols(_cols), levels(INT_MAX), wrongIndex(false) { init(); }
void init() {
diff --git a/tests/auto/qml/qqmlitemmodels/testtypes.h b/tests/auto/qml/qqmlitemmodels/testtypes.h
index 551697c626..db020830a5 100644
--- a/tests/auto/qml/qqmlitemmodels/testtypes.h
+++ b/tests/auto/qml/qqmlitemmodels/testtypes.h
@@ -44,7 +44,7 @@ class ItemModelsTest : public QObject
Q_PROPERTY(QItemSelection itemSelection READ itemSelection WRITE setItemSelection NOTIFY changed)
public:
- ItemModelsTest(QObject *parent = 0)
+ ItemModelsTest(QObject *parent = nullptr)
: QObject(parent)
, m_model(0)
{
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h
index 46ca821d98..55a549f0af 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.h
+++ b/tests/auto/qml/qqmllanguage/testtypes.h
@@ -1063,7 +1063,7 @@ class MyUncreateableBaseClass : public QObject
Q_PROPERTY(bool prop2 READ prop2 WRITE setprop2 REVISION 1)
Q_PROPERTY(bool prop3 READ prop3 WRITE setprop3 REVISION 1)
public:
- explicit MyUncreateableBaseClass(bool /* arg */, QObject *parent = 0)
+ explicit MyUncreateableBaseClass(bool /* arg */, QObject *parent = nullptr)
: QObject(parent), _prop1(false), _prop2(false), _prop3(false)
{
}
@@ -1085,7 +1085,7 @@ class MyCreateableDerivedClass : public MyUncreateableBaseClass
Q_PROPERTY(bool prop2 READ prop2 WRITE setprop2 REVISION 1)
public:
- MyCreateableDerivedClass(QObject *parent = 0)
+ MyCreateableDerivedClass(QObject *parent = nullptr)
: MyUncreateableBaseClass(true, parent)
{
}
@@ -1098,7 +1098,7 @@ class MyExtendedUncreateableBaseClass : public QObject
Q_PROPERTY(bool prop2 READ prop2 WRITE setprop2 REVISION 1)
Q_PROPERTY(bool prop3 READ prop3 WRITE setprop3 REVISION 1)
public:
- explicit MyExtendedUncreateableBaseClass(QObject *parent = 0)
+ explicit MyExtendedUncreateableBaseClass(QObject *parent = nullptr)
: QObject(parent), _prop1(false), _prop2(false), _prop3(false)
{
}
@@ -1119,7 +1119,7 @@ class MyExtendedUncreateableBaseClassExtension : public QObject
Q_OBJECT
Q_PROPERTY(bool prop4 READ prop4 WRITE setprop4)
public:
- explicit MyExtendedUncreateableBaseClassExtension(QObject *parent = 0)
+ explicit MyExtendedUncreateableBaseClassExtension(QObject *parent = nullptr)
: QObject(parent), _prop4(false)
{
}
@@ -1135,7 +1135,7 @@ class MyExtendedCreateableDerivedClass : public MyExtendedUncreateableBaseClass
Q_PROPERTY(bool prop5 READ prop5 WRITE setprop5)
public:
- MyExtendedCreateableDerivedClass(QObject *parent = 0)
+ MyExtendedCreateableDerivedClass(QObject *parent = nullptr)
: MyExtendedUncreateableBaseClass(parent), _prop5(false)
{
}
@@ -1366,7 +1366,7 @@ class SimpleObjectExtension : public QObject
Q_OBJECT
Q_PROPERTY(int extendedProperty READ extendedProperty WRITE setExtendedProperty NOTIFY extendedPropertyChanged)
public:
- SimpleObjectExtension(QObject *parent = 0)
+ SimpleObjectExtension(QObject *parent = nullptr)
: QObject(parent)
, m_extendedProperty(1584)
{}
diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
index 2cbce6c754..b2c5547dc1 100644
--- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
+++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
@@ -370,7 +370,7 @@ void tst_qqmlmoduleplugin::remoteImportWithUnquotedUri()
VERIFY_ERRORS(0);
}
-static QByteArray msgComponentError(const QQmlComponent &c, const QQmlEngine *engine /* = 0 */)
+static QByteArray msgComponentError(const QQmlComponent &c, const QQmlEngine *engine /* = nullptr */)
{
QString result;
const QList<QQmlError> errors = c.errors();
diff --git a/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp b/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp
index 4dc07b4366..509d7b25fc 100644
--- a/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp
+++ b/tests/auto/qml/qqmlxmllistmodel/tst_qqmlxmllistmodel.cpp
@@ -690,7 +690,7 @@ class SortFilterProxyModel : public QSortFilterProxyModel
Q_PROPERTY(QObject *source READ source WRITE setSource)
public:
- SortFilterProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent) { sort(0); }
+ SortFilterProxyModel(QObject *parent = nullptr) : QSortFilterProxyModel(parent) { sort(0); }
QObject *source() const { return sourceModel(); }
void setSource(QObject *source) { setSourceModel(qobject_cast<QAbstractItemModel *>(source)); }
};
diff --git a/tests/auto/quick/qquicklistview/incrementalmodel.h b/tests/auto/quick/qquicklistview/incrementalmodel.h
index 85f3b9263f..4dd5619eb7 100644
--- a/tests/auto/quick/qquicklistview/incrementalmodel.h
+++ b/tests/auto/quick/qquicklistview/incrementalmodel.h
@@ -38,7 +38,7 @@ class IncrementalModel : public QAbstractListModel
Q_OBJECT
public:
- IncrementalModel(QObject *parent = 0);
+ IncrementalModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
diff --git a/tests/auto/quick/qquicklistview/randomsortmodel.h b/tests/auto/quick/qquicklistview/randomsortmodel.h
index 06c065bf3a..43d641e3e4 100644
--- a/tests/auto/quick/qquicklistview/randomsortmodel.h
+++ b/tests/auto/quick/qquicklistview/randomsortmodel.h
@@ -36,7 +36,7 @@ class RandomSortModel : public QAbstractListModel
Q_OBJECT
public:
- explicit RandomSortModel(QObject* parent = 0);
+ explicit RandomSortModel(QObject *parent = nullptr);
QHash<int, QByteArray> roleNames() const override;
QVariant data(const QModelIndex& index, int role) const override;
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp
index 2044360b3d..b200f31f1c 100644
--- a/tests/benchmarks/qml/creation/tst_creation.cpp
+++ b/tests/benchmarks/qml/creation/tst_creation.cpp
@@ -81,7 +81,7 @@ Q_OBJECT
Q_PROPERTY(QQmlListProperty<QObject> resources READ resources)
Q_CLASSINFO("DefaultProperty", "resources")
public:
- TestType(QObject *parent = 0)
+ TestType(QObject *parent = nullptr)
: QObject(parent) {}
QQmlListProperty<QObject> resources() {
diff --git a/tests/benchmarks/qml/holistic/testtypes.h b/tests/benchmarks/qml/holistic/testtypes.h
index 3cf0664ef2..ae56bd6607 100644
--- a/tests/benchmarks/qml/holistic/testtypes.h
+++ b/tests/benchmarks/qml/holistic/testtypes.h
@@ -186,7 +186,7 @@ class testQObjectApi : public QObject
Q_PROPERTY (int qobjectTestProperty READ qobjectTestProperty NOTIFY qobjectTestPropertyChanged)
public:
- testQObjectApi(QObject* parent = 0)
+ testQObjectApi(QObject *parent = nullptr)
: QObject(parent), m_testProperty(0)
{
}
@@ -209,7 +209,7 @@ class ArbitraryVariantProvider : public QObject
Q_PROPERTY(QVariant arbitraryVariant READ arbitraryVariant WRITE setArbitraryVariant NOTIFY arbitraryVariantChanged)
public:
- ArbitraryVariantProvider(QObject *parent = 0)
+ ArbitraryVariantProvider(QObject *parent = nullptr)
: QObject(parent), m_value(QVariant(QString(QLatin1String("random string value")))), m_count(1)
{
}
@@ -290,7 +290,7 @@ class ScarceResourceProvider : public QObject
Q_PROPERTY(QPixmap largeScarceResource READ largeScarceResource WRITE setLargeScarceResource NOTIFY largeScarceResourceChanged)
public:
- ScarceResourceProvider(QObject *parent = 0)
+ ScarceResourceProvider(QObject *parent = nullptr)
: QObject(parent), m_small(100, 100), m_large(1000, 1000), m_colour(1)
{
m_small.fill(Qt::blue);
diff --git a/tests/benchmarks/qml/holistic/tst_holistic.cpp b/tests/benchmarks/qml/holistic/tst_holistic.cpp
index 9186816a16..5fc4138cc6 100644
--- a/tests/benchmarks/qml/holistic/tst_holistic.cpp
+++ b/tests/benchmarks/qml/holistic/tst_holistic.cpp
@@ -506,7 +506,7 @@ void tst_holistic::cppToJsIndirect()
QQmlComponent c(&engine, QString(SRCDIR + QLatin1String("/data/scopeSwitching/ScarceTwo.qml")));
QObject *obj = c.create();
- ScarceResourceProvider *srp = 0;
+ ScarceResourceProvider *srp = nullptr;
srp = qobject_cast<ScarceResourceProvider*>(QQmlProperty::read(obj, "a").value<QObject*>());
QBENCHMARK {
diff --git a/tests/benchmarks/qml/painting/paintbenchmark.cpp b/tests/benchmarks/qml/painting/paintbenchmark.cpp
index 5b1e908afd..5b4eeae307 100644
--- a/tests/benchmarks/qml/painting/paintbenchmark.cpp
+++ b/tests/benchmarks/qml/painting/paintbenchmark.cpp
@@ -46,7 +46,7 @@ const int spacing = 36;
QSizeF size(1000, 800);
const qreal lineWidth = 1000;
QString strings[lines];
-QOpenGLWidget *testWidget = 0;
+QOpenGLWidget *testWidget = nullptr;
void paint_QTextLayout(QPainter &p, bool useCache)
{
diff --git a/tests/benchmarks/qml/script/tst_script.cpp b/tests/benchmarks/qml/script/tst_script.cpp
index a48d6bdec7..0233398481 100644
--- a/tests/benchmarks/qml/script/tst_script.cpp
+++ b/tests/benchmarks/qml/script/tst_script.cpp
@@ -106,7 +106,7 @@ class TestObject : public QObject
Q_PROPERTY(int x READ x WRITE setX)
public:
- TestObject(QObject *parent = 0);
+ TestObject(QObject *parent = nullptr);
int x();
void setX(int x) { m_x = x; }
@@ -199,7 +199,7 @@ void tst_script::property_getter()
}
}
-static TestObject *property_getter_qobject_object = 0;
+static TestObject *property_getter_qobject_object = nullptr;
static QJSValue property_getter_qobject_method(QScriptContext *, QJSEngine *)
{
static int idx = -1;
diff --git a/tests/benchmarks/qml/typeimports/tst_typeimports.cpp b/tests/benchmarks/qml/typeimports/tst_typeimports.cpp
index 9c1698dc3e..151ba46ccc 100644
--- a/tests/benchmarks/qml/typeimports/tst_typeimports.cpp
+++ b/tests/benchmarks/qml/typeimports/tst_typeimports.cpp
@@ -51,7 +51,7 @@ class TestType1 : public QObject
Q_PROPERTY(QQmlListProperty<QObject> resources READ resources);
Q_CLASSINFO("DefaultProperty", "resources");
public:
- TestType1(QObject *parent = 0) : QObject(parent) {}
+ TestType1(QObject *parent = nullptr) : QObject(parent) {}
QQmlListProperty<QObject> resources() {
return QQmlListProperty<QObject>(this, 0, resources_append, 0, 0, 0);
@@ -66,7 +66,7 @@ class TestType2 : public TestType1
{
Q_OBJECT
public:
- TestType2(QObject *parent = 0) : TestType1(parent) {}
+ TestType2(QObject *parent = nullptr) : TestType1(parent) {}
};
@@ -74,14 +74,14 @@ class TestType3 : public TestType1
{
Q_OBJECT
public:
- TestType3(QObject *parent = 0) : TestType1(parent) {}
+ TestType3(QObject *parent = nullptr) : TestType1(parent) {}
};
class TestType4 : public TestType1
{
Q_OBJECT
public:
- TestType4(QObject *parent = 0) : TestType1(parent) {}
+ TestType4(QObject *parent = nullptr) : TestType1(parent) {}
};
diff --git a/tests/manual/quickcontrols2/gifs/eventcapturer.h b/tests/manual/quickcontrols2/gifs/eventcapturer.h
index ea01299f54..74b729e4d4 100644
--- a/tests/manual/quickcontrols2/gifs/eventcapturer.h
+++ b/tests/manual/quickcontrols2/gifs/eventcapturer.h
@@ -51,7 +51,7 @@ class EventCapturer : public QObject
Q_OBJECT
public:
- EventCapturer(QObject *parent = 0);
+ EventCapturer(QObject *parent = nullptr);
enum MoveEventTrimFlag
{
diff --git a/tools/qml/conf.h b/tools/qml/conf.h
index 7431276735..2c15ba4432 100644
--- a/tools/qml/conf.h
+++ b/tools/qml/conf.h
@@ -42,7 +42,7 @@ class PartialScene : public QObject
QML_ELEMENT
QML_ADDED_IN_VERSION(1, 0)
public:
- PartialScene(QObject *parent = 0) : QObject(parent)
+ PartialScene(QObject *parent = nullptr) : QObject(parent)
{}
const QUrl container() const { return m_container; }
diff --git a/tools/qmleasing/mainwindow.h b/tools/qmleasing/mainwindow.h
index 7ca4dbfd5c..361e1daadb 100644
--- a/tools/qmleasing/mainwindow.h
+++ b/tools/qmleasing/mainwindow.h
@@ -40,7 +40,7 @@ class MainWindow : public QMainWindow
{
Q_OBJECT
public:
- explicit MainWindow(QWidget *parent = 0);
+ explicit MainWindow(QWidget *parent = nullptr);
void showQuickView();
diff --git a/tools/qmleasing/segmentproperties.h b/tools/qmleasing/segmentproperties.h
index b6bb6e2a5f..d528f75051 100644
--- a/tools/qmleasing/segmentproperties.h
+++ b/tools/qmleasing/segmentproperties.h
@@ -38,7 +38,7 @@ class SegmentProperties : public QWidget
{
Q_OBJECT
public:
- explicit SegmentProperties(QWidget *parent = 0);
+ explicit SegmentProperties(QWidget *parent = nullptr);
void setSplineEditor(SplineEditor *splineEditor)
{
m_splineEditor = splineEditor;
diff --git a/tools/qmleasing/splineeditor.h b/tools/qmleasing/splineeditor.h
index 8dd47c3a89..de06bc7446 100644
--- a/tools/qmleasing/splineeditor.h
+++ b/tools/qmleasing/splineeditor.h
@@ -46,7 +46,7 @@ class SplineEditor : public QWidget
Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve NOTIFY easingCurveChanged);
public:
- explicit SplineEditor(QWidget *parent = 0);
+ explicit SplineEditor(QWidget *parent = nullptr);
QString generateCode();
QStringList presetNames() const;
QWidget *pointListWidget();
diff --git a/tools/qmlprofiler/qmlprofilerdata.h b/tools/qmlprofiler/qmlprofilerdata.h
index 16ebc37f28..778edb8a03 100644
--- a/tools/qmlprofiler/qmlprofilerdata.h
+++ b/tools/qmlprofiler/qmlprofilerdata.h
@@ -47,7 +47,7 @@ public:
Done
};
- explicit QmlProfilerData(QObject *parent = 0);
+ explicit QmlProfilerData(QObject *parent = nullptr);
~QmlProfilerData();
int numLoadedEventTypes() const override;