diff options
Diffstat (limited to 'tests/auto/corelib/tools')
4 files changed, 17 insertions, 17 deletions
diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp index e5cfb0fbad..1e01c5a484 100644 --- a/tests/auto/corelib/tools/collections/tst_collections.cpp +++ b/tests/auto/corelib/tools/collections/tst_collections.cpp @@ -812,7 +812,7 @@ void tst_Collections::vector() QVERIFY(LargeStatic::count == originalLargeStaticCount); { QVector<LargeStatic> vector; - LargeStatic *dummy = 0; + LargeStatic *dummy = nullptr; for (int i = 0; i < 10000; ++i) { delete dummy; dummy = new LargeStatic; @@ -834,7 +834,7 @@ void tst_Collections::vector() QVERIFY(Movable::count == originalMovableCount); { QVector<Movable> vector; - Movable *dummy = 0; + Movable *dummy = nullptr; for (int i = 0; i < 10000; ++i) { delete dummy; dummy = new Movable; @@ -2583,7 +2583,7 @@ void tst_Collections::list_stl() } template <typename T> -T qtInit(T * = 0) +T qtInit(T * = nullptr) { return T(); } @@ -2593,9 +2593,9 @@ void tst_Collections::q_init() QCOMPARE(qtInit<int>(), 0); QCOMPARE(qtInit<double>(), 0.0); QCOMPARE(qtInit<QString>(), QString()); - QCOMPARE(qtInit<int *>(), static_cast<int *>(0)); - QCOMPARE(qtInit<double *>(), static_cast<double *>(0)); - QCOMPARE(qtInit<QString *>(), static_cast<QString *>(0)); + QCOMPARE(qtInit<int *>(), static_cast<int *>(nullptr)); + QCOMPARE(qtInit<double *>(), static_cast<double *>(nullptr)); + QCOMPARE(qtInit<QString *>(), static_cast<QString *>(nullptr)); QCOMPARE(qtInit<Pod>().i1, 0); QCOMPARE(qtInit<Pod>().i2, 0); } diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp index e0062b9118..76ae592011 100644 --- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -167,42 +167,42 @@ void tst_QAlgorithms::swap() } { - void *a = 0, *b = 0; + void *a = nullptr, *b = nullptr; qSwap(a, b); } { - const void *a = 0, *b = 0; + const void *a = nullptr, *b = nullptr; qSwap(a, b); } { - QString *a = 0, *b = 0; + QString *a = nullptr, *b = nullptr; qSwap(a, b); } { - const QString *a = 0, *b = 0; + const QString *a = nullptr, *b = nullptr; qSwap(a, b); } { - QString **a = 0, **b = 0; + QString **a = nullptr, **b = nullptr; qSwap(a, b); } { - const QString **a = 0, **b = 0; + const QString **a = nullptr, **b = nullptr; qSwap(a, b); } { - QString * const *a = 0, * const *b = 0; + QString * const *a = nullptr, * const *b = nullptr; qSwap(a, b); } { - const QString * const *a = 0, * const *b = 0; + const QString * const *a = nullptr, * const *b = nullptr; qSwap(a, b); } } diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp index 90fadbb628..069f990e2c 100644 --- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp @@ -501,7 +501,7 @@ class tst_QEasingProperties : public QObject Q_OBJECT Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing) public: - tst_QEasingProperties(QObject *parent = 0) : QObject(parent) {} + tst_QEasingProperties(QObject *parent = nullptr) : QObject(parent) {} QEasingCurve easing() const { return e; } void setEasing(const QEasingCurve& value) { e = value; } diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 4ca7940556..06c4091232 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -2251,12 +2251,12 @@ void tst_QSharedPointer::invalidConstructs_data() QTest::newRow("weak-pointer-from-regular-pointer") << &QTest::QExternalTest::tryCompileFail - << "Data *ptr = 0;\n" + << "Data *ptr = nullptr;\n" "QWeakPointer<Data> weakptr(ptr);\n"; QTest::newRow("shared-pointer-implicit-from-uninitialized") << &QTest::QExternalTest::tryCompileFail - << "Data *ptr = 0;\n" + << "Data *ptr = nullptr;\n" "QSharedPointer<Data> weakptr = Qt::Uninitialized;\n"; QTest::newRow("incompatible-custom-deleter1") |