From 9880acb424fd814501ba5fc4ae1caa989e23fafa Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Fri, 6 Oct 2017 11:38:59 +0200 Subject: Replace remaining Q_NULLPTR with nullptr Change-Id: I28a32af7f1c306a3002d47025a842475f848c1a4 Reviewed-by: Lars Knoll --- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 ++-- .../auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp | 2 +- tests/auto/qml/qqmlqt/tst_qqmlqt.cpp | 2 +- tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp | 2 +- tests/auto/quick/nodes/tst_nodestest.cpp | 6 +++--- tests/auto/quick/qquickgridview/tst_qquickgridview.cpp | 2 +- tests/auto/quick/qquickitem2/tst_qquickitem.cpp | 12 ++++++------ tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 2 +- tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 19c12ead1c..4388e1412c 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -7289,8 +7289,8 @@ class WeakReferenceMutator : public QObject Q_OBJECT public: WeakReferenceMutator() - : resultPtr(Q_NULLPTR) - , weakRef(Q_NULLPTR) + : resultPtr(nullptr) + , weakRef(nullptr) {} void init(QV4::ExecutionEngine *v4, QV4::WeakValue *weakRef, bool *resultPtr) diff --git a/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp b/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp index 268010ead8..2511eebefe 100644 --- a/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp +++ b/tests/auto/qml/qqmlextensionplugin/tst_qqmlextensionplugin.cpp @@ -105,7 +105,7 @@ void tst_qqmlextensionplugin::iidCheck() QPluginLoader loader(filePath); QVERIFY2(loader.load(), qPrintable(loader.errorString())); - QVERIFY(loader.instance() != Q_NULLPTR); + QVERIFY(loader.instance() != nullptr); if (qobject_cast(loader.instance())) { QString iid = loader.metaData().value(QStringLiteral("IID")).toString(); diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp index 6c920471c4..0bc1127069 100644 --- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp +++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp @@ -998,7 +998,7 @@ void tst_qqmlqt::exit() QSignalSpy spy(&engine, &QQmlEngine::exit); QObject *object = component.create(); - QVERIFY(object != Q_NULLPTR); + QVERIFY(object != nullptr); QCOMPARE(spy.count(), 1); QList arguments = spy.takeFirst(); QVERIFY(arguments.at(0).toInt() == object->property("returnCode").toInt()); diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index a8a6456dff..59716acc0d 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -291,7 +291,7 @@ class TestThreadedHTTPServer : public QObject Q_OBJECT public: TestThreadedHTTPServer(const QUrl &expectUrl, const QUrl &replyUrl, const QUrl &bodyUrl) - : m_server(Q_NULLPTR) { + : m_server(nullptr) { QMutexLocker locker(&m_lock); moveToThread(&m_thread); m_thread.start(); diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp index 140a3b583e..e7303604b4 100644 --- a/tests/auto/quick/nodes/tst_nodestest.cpp +++ b/tests/auto/quick/nodes/tst_nodestest.cpp @@ -147,9 +147,9 @@ public: int DummyRenderer::globalRendereringOrder; NodesTest::NodesTest() - : surface(Q_NULLPTR) - , context(Q_NULLPTR) - , renderContext(Q_NULLPTR) + : surface(nullptr) + , context(nullptr) + , renderContext(nullptr) { } diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index 2b14842658..9bba6c9291 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -6650,7 +6650,7 @@ void tst_QQuickGridView::QTBUG_48870_fastModelUpdates() QQuickItemViewPrivate *priv = QQuickItemViewPrivate::get(view); bool nonUnique; - FxViewItem *item = Q_NULLPTR; + FxViewItem *item = nullptr; int expectedIdx; QVERIFY(testVisibleItems(priv, &nonUnique, &item, &expectedIdx)); diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index 00aa5ef726..b66dc1708f 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -301,7 +301,7 @@ class TabFenceItem : public QQuickItem Q_OBJECT public: - TabFenceItem(QQuickItem *parent = Q_NULLPTR) + TabFenceItem(QQuickItem *parent = nullptr) : QQuickItem(parent) { QQuickItemPrivate *d = QQuickItemPrivate::get(this); @@ -316,7 +316,7 @@ class TabFenceItem2 : public QQuickItem Q_OBJECT public: - TabFenceItem2(QQuickItem *parent = Q_NULLPTR) + TabFenceItem2(QQuickItem *parent = nullptr) : QQuickItem(parent) { QQuickItemPrivate *d = QQuickItemPrivate::get(this); @@ -1188,12 +1188,12 @@ void tst_QQuickItem::tabFence() QVERIFY(window->rootObject()->hasActiveFocus()); const char *rootTabFocusChain[] = { - "input1", "input2", "input3", "input1", Q_NULLPTR + "input1", "input2", "input3", "input1", nullptr }; verifyTabFocusChain(window, rootTabFocusChain, true /* forward */); const char *rootBacktabFocusChain[] = { - "input3", "input2", "input1", "input3", Q_NULLPTR + "input3", "input2", "input1", "input3", nullptr }; verifyTabFocusChain(window, rootBacktabFocusChain, false /* forward */); @@ -1204,12 +1204,12 @@ void tst_QQuickItem::tabFence() QVERIFY(item->hasActiveFocus()); const char *fence1TabFocusChain[] = { - "input12", "input13", "input11", "input12", Q_NULLPTR + "input12", "input13", "input11", "input12", nullptr }; verifyTabFocusChain(window, fence1TabFocusChain, true /* forward */); const char *fence1BacktabFocusChain[] = { - "input11", "input13", "input12", "input11", Q_NULLPTR + "input11", "input13", "input12", "input11", nullptr }; verifyTabFocusChain(window, fence1BacktabFocusChain, false /* forward */); } diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 0d0f234d33..511a95f04f 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -8485,7 +8485,7 @@ void tst_QQuickListView::QTBUG_48870_fastModelUpdates() QQuickItemViewPrivate *priv = QQuickItemViewPrivate::get(listview); bool nonUnique; - FxViewItem *item = Q_NULLPTR; + FxViewItem *item = nullptr; int expectedIdx; QVERIFY(testVisibleItems(priv, &nonUnique, &item, &expectedIdx)); diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index cbef0fcc8d..061f71aeb0 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -2351,7 +2351,7 @@ void tst_QQuickPathView::qtbug37815() QTest::qWait(1000); QQuickPathView *pathView = findItem(window->rootObject(), "pathView"); - QVERIFY(pathView != Q_NULLPTR); + QVERIFY(pathView != nullptr); const int pathItemCount = pathView->pathItemCount(); const int cacheItemCount = pathView->cacheItemCount(); @@ -2421,7 +2421,7 @@ void tst_QQuickPathView::qtbug53464() QVERIFY(QTest::qWaitForWindowActive(window.data())); QQuickPathView *pathView = findItem(window->rootObject(), "pathView"); - QVERIFY(pathView != Q_NULLPTR); + QVERIFY(pathView != nullptr); const int currentIndex = pathView->currentIndex(); QCOMPARE(currentIndex, 8); -- cgit v1.2.3