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/gui/util | |
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/gui/util')
-rw-r--r-- | tests/auto/gui/util/qundogroup/tst_qundogroup.cpp | 6 | ||||
-rw-r--r-- | tests/auto/gui/util/qundostack/tst_qundostack.cpp | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/gui/util/qundogroup/tst_qundogroup.cpp b/tests/auto/gui/util/qundogroup/tst_qundogroup.cpp index e915fd7e24..514890d50b 100644 --- a/tests/auto/gui/util/qundogroup/tst_qundogroup.cpp +++ b/tests/auto/gui/util/qundogroup/tst_qundogroup.cpp @@ -38,7 +38,7 @@ class InsertCommand : public QUndoCommand { public: InsertCommand(QString *str, int idx, const QString &text, - QUndoCommand *parent = 0); + QUndoCommand *parent = nullptr); virtual void undo() override; virtual void redo() override; @@ -52,7 +52,7 @@ private: class RemoveCommand : public QUndoCommand { public: - RemoveCommand(QString *str, int idx, int len, QUndoCommand *parent = 0); + RemoveCommand(QString *str, int idx, int len, QUndoCommand *parent = nullptr); virtual void undo() override; virtual void redo() override; @@ -66,7 +66,7 @@ private: class AppendCommand : public QUndoCommand { public: - AppendCommand(QString *str, const QString &text, QUndoCommand *parent = 0); + AppendCommand(QString *str, const QString &text, QUndoCommand *parent = nullptr); virtual void undo() override; virtual void redo() override; diff --git a/tests/auto/gui/util/qundostack/tst_qundostack.cpp b/tests/auto/gui/util/qundostack/tst_qundostack.cpp index 4c201ba4f9..aa3f3c6aa4 100644 --- a/tests/auto/gui/util/qundostack/tst_qundostack.cpp +++ b/tests/auto/gui/util/qundostack/tst_qundostack.cpp @@ -39,7 +39,7 @@ class InsertCommand : public QUndoCommand { public: InsertCommand(QString *str, int idx, const QString &text, - QUndoCommand *parent = 0); + QUndoCommand *parent = nullptr); virtual void undo() override; virtual void redo() override; @@ -53,7 +53,7 @@ private: class RemoveCommand : public QUndoCommand { public: - RemoveCommand(QString *str, int idx, int len, QUndoCommand *parent = 0); + RemoveCommand(QString *str, int idx, int len, QUndoCommand *parent = nullptr); virtual void undo() override; virtual void redo() override; @@ -68,7 +68,7 @@ class AppendCommand : public QUndoCommand { public: AppendCommand(QString *str, const QString &text, bool _fail_merge = false, - QUndoCommand *parent = 0); + QUndoCommand *parent = nullptr); ~AppendCommand(); virtual void undo() override; @@ -88,7 +88,7 @@ private: class IdleCommand : public QUndoCommand { public: - IdleCommand(QUndoCommand *parent = 0); + IdleCommand(QUndoCommand *parent = nullptr); ~IdleCommand(); virtual void undo() override; @@ -98,7 +98,7 @@ public: class MoveMouseCommand : public QUndoCommand { public: - MoveMouseCommand(QPoint *mouse, QPoint oldPoint, QPoint newPoint, QUndoCommand *parent = 0); + MoveMouseCommand(QPoint *mouse, QPoint oldPoint, QPoint newPoint, QUndoCommand *parent = nullptr); ~MoveMouseCommand(); virtual void undo() override; @@ -2636,8 +2636,8 @@ void tst_QUndoStack::obsolete() QSignalSpy redoTextChangedSpy(&stack, &QUndoStack::redoTextChanged); QPoint mouse(0, 0); QString str; - MoveMouseCommand *cmd1 = 0; - MoveMouseCommand *cmd2 = 0; + MoveMouseCommand *cmd1 = nullptr; + MoveMouseCommand *cmd2 = nullptr; stack.resetClean(); checkState(redoTextChangedSpy, |