diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-07 13:05:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-07 23:02:47 +0200 |
commit | 564b59d903683b14c75b72a3e93367717f201def (patch) | |
tree | 03ffe749d83dce84429a7db484bf92795047036f /tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | |
parent | b5fc1e4e2643e73d3b44c483d159529f8deb8af1 (diff) |
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 <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp')
-rw-r--r-- | tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<int, CustomObject*> StdMapIntCustomObject ; StdMapIntCustomObject intComparableMap; - CustomObject *o = 0; + CustomObject *o = nullptr; intComparableMap[4] = o; QCOMPARE(QVariant::fromValue(intComparableMap).value<StdMapIntCustomObject >()[4], o); } @@ -1822,7 +1822,7 @@ void tst_QMetaType::automaticTemplateRegistration() } { typedef std::pair<int, CustomQObject*> StdIntComparablePair; - CustomQObject* o = 0; + CustomQObject *o = nullptr; StdIntComparablePair intComparablePair = std::make_pair(4, o); QCOMPARE(QVariant::fromValue(intComparablePair).value<StdIntComparablePair>().first, 4); QCOMPARE(QVariant::fromValue(intComparablePair).value<StdIntComparablePair>().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) {} }; |