summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/effects
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-07 13:05:48 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-07 23:02:47 +0200
commit564b59d903683b14c75b72a3e93367717f201def (patch)
tree03ffe749d83dce84429a7db484bf92795047036f /tests/auto/widgets/effects
parentb5fc1e4e2643e73d3b44c483d159529f8deb8af1 (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/widgets/effects')
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp19
1 files changed, 10 insertions, 9 deletions
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