From 564b59d903683b14c75b72a3e93367717f201def Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 7 Oct 2020 13:05:48 +0200 Subject: Another round of replacing 0 with nullptr This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot Reviewed-by: Friedemann Kleint --- tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/auto/corelib/kernel/qmetatype') diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index ca215386fb..f116684f5b 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -367,7 +367,7 @@ class CustomQObject : public QObject { Q_OBJECT public: - CustomQObject(QObject *parent = 0) + CustomQObject(QObject *parent = nullptr) : QObject(parent) { } @@ -1017,7 +1017,7 @@ class CustomObject : public QObject { Q_OBJECT public: - CustomObject(QObject *parent = 0) + CustomObject(QObject *parent = nullptr) : QObject(parent) { @@ -1031,7 +1031,7 @@ class CustomMultiInheritanceObject : public QObject, SecondBase { Q_OBJECT public: - CustomMultiInheritanceObject(QObject *parent = 0) + CustomMultiInheritanceObject(QObject *parent = nullptr) : QObject(parent) { @@ -1605,7 +1605,7 @@ class AutoMetaTypeObject : public QObject Q_PROPERTY(IntIntHash someHash READ someHash CONSTANT) Q_PROPERTY(NaturalNumber someInt READ someInt CONSTANT) public: - AutoMetaTypeObject(QObject *parent = 0) + AutoMetaTypeObject(QObject *parent = nullptr) : QObject(parent), m_int(42) { m_hash.insert(4, 2); @@ -1630,7 +1630,7 @@ class MyObject : public QObject { Q_OBJECT public: - MyObject(QObject *parent = 0) + MyObject(QObject *parent = nullptr) : QObject(parent) { } @@ -1781,7 +1781,7 @@ void tst_QMetaType::automaticTemplateRegistration() { typedef std::map StdMapIntCustomObject ; StdMapIntCustomObject intComparableMap; - CustomObject *o = 0; + CustomObject *o = nullptr; intComparableMap[4] = o; QCOMPARE(QVariant::fromValue(intComparableMap).value()[4], o); } @@ -1822,7 +1822,7 @@ void tst_QMetaType::automaticTemplateRegistration() } { typedef std::pair StdIntComparablePair; - CustomQObject* o = 0; + CustomQObject *o = nullptr; StdIntComparablePair intComparablePair = std::make_pair(4, o); QCOMPARE(QVariant::fromValue(intComparablePair).value().first, 4); QCOMPARE(QVariant::fromValue(intComparablePair).value().second, o); @@ -2099,7 +2099,7 @@ class MyQObjectFromGadget : public QObject, public MyGadget { Q_OBJECT public: - MyQObjectFromGadget(QObject *parent = 0) + MyQObjectFromGadget(QObject *parent = nullptr) : QObject(parent) {} }; -- cgit v1.2.3