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/other | |
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/other')
7 files changed, 18 insertions, 18 deletions
diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp index fe95120656..1dfd1f977b 100644 --- a/tests/auto/other/gestures/tst_gestures.cpp +++ b/tests/auto/other/gestures/tst_gestures.cpp @@ -54,7 +54,7 @@ class CustomGesture : public QGesture public: static Qt::GestureType GestureType; - CustomGesture(QObject *parent = 0) + CustomGesture(QObject *parent = nullptr) : QGesture(parent), serial(0) { } @@ -183,7 +183,7 @@ class GestureWidget : public QWidget { Q_OBJECT public: - GestureWidget(const char *name = 0, QWidget *parent = 0) + GestureWidget(const char *name = nullptr, QWidget *parent = nullptr) : QWidget(parent) { if (name) @@ -1395,7 +1395,7 @@ void tst_Gestures::ungrabGesture() // a method on QWidget { class MockGestureWidget : public GestureWidget { public: - MockGestureWidget(const char *name = 0, QWidget *parent = 0) + MockGestureWidget(const char *name = nullptr, QWidget *parent = nullptr) : GestureWidget(name, parent) { } @@ -1924,7 +1924,7 @@ void tst_Gestures::deleteGestureTargetItem() class GraphicsView : public QGraphicsView { public: - GraphicsView(QGraphicsScene *scene, QWidget *parent = 0) + GraphicsView(QGraphicsScene *scene, QWidget *parent = nullptr) : QGraphicsView(scene, parent) { } @@ -2124,7 +2124,7 @@ private: class ReuseCanceledGesturesWidget : public QGraphicsWidget { public: - ReuseCanceledGesturesWidget(Qt::GestureType gestureType = Qt::TapGesture, QGraphicsItem *parent = 0) + ReuseCanceledGesturesWidget(Qt::GestureType gestureType = Qt::TapGesture, QGraphicsItem *parent = nullptr) : QGraphicsWidget(parent), m_gestureType(gestureType), m_started(0), m_updated(0), m_canceled(0), m_finished(0) diff --git a/tests/auto/other/macgui/guitest.h b/tests/auto/other/macgui/guitest.h index e2bbcf5900..74f4292a6b 100644 --- a/tests/auto/other/macgui/guitest.h +++ b/tests/auto/other/macgui/guitest.h @@ -82,7 +82,7 @@ namespace NativeEvents { class ColorWidget : public QWidget { public: - ColorWidget(QWidget *parent = 0, QColor color = QColor(Qt::red)) + ColorWidget(QWidget *parent = nullptr, QColor color = QColor(Qt::red)) : QWidget(parent), color(color) {} QColor color; diff --git a/tests/auto/other/macnativeevents/nativeeventlist.h b/tests/auto/other/macnativeevents/nativeeventlist.h index 8f823becf3..7425414da7 100644 --- a/tests/auto/other/macnativeevents/nativeeventlist.h +++ b/tests/auto/other/macnativeevents/nativeeventlist.h @@ -43,7 +43,7 @@ class NativeEventList : public QObject ~NativeEventList(); void append(QNativeEvent *event); - void append(int waitMs, QNativeEvent *event = 0); + void append(int waitMs, QNativeEvent *event = nullptr); void play(Playback playback = WaitUntilFinished); void stop(); diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h index e28575e50b..ba566cbbac 100644 --- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h +++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h @@ -39,7 +39,7 @@ class DynamicTreeModel : public QAbstractItemModel Q_OBJECT public: - DynamicTreeModel(QObject *parent = 0); + DynamicTreeModel(QObject *parent = nullptr); QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; QModelIndex parent(const QModelIndex &index) const override; @@ -86,7 +86,7 @@ class ModelChangeCommand : public QObject Q_OBJECT public: - ModelChangeCommand(DynamicTreeModel *model, QObject *parent = 0); + ModelChangeCommand(DynamicTreeModel *model, QObject *parent = nullptr); virtual ~ModelChangeCommand() { @@ -132,7 +132,7 @@ class ModelInsertCommand : public ModelChangeCommand public: - ModelInsertCommand(DynamicTreeModel *model, QObject *parent = 0); + ModelInsertCommand(DynamicTreeModel *model, QObject *parent = nullptr); virtual ~ModelInsertCommand() { } @@ -179,7 +179,7 @@ class ModelResetCommand : public ModelMoveCommand { Q_OBJECT public: - ModelResetCommand(DynamicTreeModel *model, QObject *parent = 0); + ModelResetCommand(DynamicTreeModel *model, QObject *parent = nullptr); virtual ~ModelResetCommand(); @@ -195,7 +195,7 @@ class ModelResetCommandFixed : public ModelMoveCommand { Q_OBJECT public: - ModelResetCommandFixed(DynamicTreeModel *model, QObject *parent = 0); + ModelResetCommandFixed(DynamicTreeModel *model, QObject *parent = nullptr); virtual ~ModelResetCommandFixed(); diff --git a/tests/auto/other/qaccessibility/accessiblewidgets.h b/tests/auto/other/qaccessibility/accessiblewidgets.h index d436f81d17..13ca687dd9 100644 --- a/tests/auto/other/qaccessibility/accessiblewidgets.h +++ b/tests/auto/other/qaccessibility/accessiblewidgets.h @@ -74,7 +74,7 @@ class KFooButton: public QPushButton { Q_OBJECT public: - KFooButton(const QString &text, QWidget* parent = 0) + KFooButton(const QString &text, QWidget *parent = nullptr) : QPushButton(text, parent) {} }; diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp index 5c025c8c4e..b9777c6114 100644 --- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp @@ -46,7 +46,7 @@ QT_FORWARD_DECLARE_CLASS(QWidget) class FocusLineEdit : public QLineEdit { public: - FocusLineEdit( QWidget* parent = 0, const char* name = 0 ) : QLineEdit(name, parent) {} + FocusLineEdit(QWidget *parent = nullptr, const char *name = nullptr ) : QLineEdit(name, parent) {} int focusInEventReason; int focusOutEventReason; bool focusInEventRecieved; @@ -107,7 +107,7 @@ void tst_QFocusEvent::initTestCase() if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) QSKIP("QWindow::requestActivate() is not supported on this platform."); - testFocusWidget = new QWidget( 0 ); + testFocusWidget = new QWidget( nullptr ); childFocusWidgetOne = new FocusLineEdit( testFocusWidget ); childFocusWidgetOne->setGeometry( 10, 10, 180, 20 ); childFocusWidgetTwo = new FocusLineEdit( testFocusWidget ); @@ -322,8 +322,8 @@ void tst_QFocusEvent::checkReason_focusWidget() QTRY_VERIFY(edit1.hasFocus()); edit2.setFocus(); - QVERIFY(frame1.focusWidget() != 0); - QVERIFY(frame2.focusWidget() != 0); + QVERIFY(frame1.focusWidget() != nullptr); + QVERIFY(frame2.focusWidget() != nullptr); } void tst_QFocusEvent::checkReason_ActiveWindow() diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp index 3f18bad5cf..ed365dfcdc 100644 --- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp +++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp @@ -54,7 +54,7 @@ class DownloadCheckWidget : public QWidget { Q_OBJECT public: - DownloadCheckWidget(QWidget *parent = 0) : + DownloadCheckWidget(QWidget *parent = nullptr) : QWidget(parent), lateReadyRead(true), zeroCopy(false), progressDlg(this), netmanager(this) { |