From 564b59d903683b14c75b72a3e93367717f201def Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 7 Oct 2020 13:05:48 +0200 Subject: 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 Reviewed-by: Friedemann Kleint --- .../effects/qgraphicseffect/tst_qgraphicseffect.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'tests/auto/widgets/effects') diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp index bd1b56ebc1..0aead57d11 100644 --- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp @@ -68,9 +68,9 @@ void tst_QGraphicsEffect::initTestCase() class CustomItem : public QGraphicsRectItem { public: - CustomItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = 0) + CustomItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = nullptr) : QGraphicsRectItem(x, y, width, height, parent), numRepaints(0), - m_painter(0), m_styleOption(0) + m_painter(nullptr), m_styleOption(nullptr) {} void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override @@ -84,8 +84,8 @@ public: void reset() { numRepaints = 0; - m_painter = 0; - m_styleOption = 0; + m_painter = nullptr; + m_styleOption = nullptr; } int numRepaints; @@ -98,7 +98,8 @@ class CustomEffect : public QGraphicsEffect public: CustomEffect() : QGraphicsEffect(), numRepaints(0), m_margin(10), - doNothingInDraw(false), m_painter(0), m_styleOption(0), m_source(0), m_opacity(1.0) + doNothingInDraw(false), m_painter(nullptr), m_styleOption(nullptr), + m_source(nullptr), m_opacity(1.0) {} QRectF boundingRectFor(const QRectF &rect) const override @@ -108,9 +109,9 @@ public: { numRepaints = 0; m_sourceChangedFlags = QGraphicsEffect::ChangeFlags(); - m_painter = 0; - m_styleOption = 0; - m_source = 0; + m_painter = nullptr; + m_styleOption = nullptr; + m_source = nullptr; m_opacity = 1.0; } @@ -645,7 +646,7 @@ void tst_QGraphicsEffect::dropShadowClipping() class MyGraphicsItem : public QGraphicsWidget { public: - MyGraphicsItem(QGraphicsItem *parent = 0) : + MyGraphicsItem(QGraphicsItem *parent = nullptr) : QGraphicsWidget(parent), nbPaint(0) {} void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override -- cgit v1.2.3