diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-30 22:11:15 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-19 10:32:55 +0000 |
commit | a767014167d4f7b258a2bd83637dc1ef25b364f0 (patch) | |
tree | dec849a76c2109cd3dff1d0b3b51c3fe85a91b3e /src/gui/painting | |
parent | 08f6b38ec72f9358ce0f6270034b5a8a4baf2e14 (diff) |
QtGui: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.
Task-number: QTBUG-45291
Change-Id: I72ab40b21a9499b53a639564fa45884de17b6c98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qbackingstore.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qcolor.h | 16 | ||||
-rw-r--r-- | src/gui/painting/qmatrix.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainter.h | 8 | ||||
-rw-r--r-- | src/gui/painting/qtransform.h | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/painting/qbackingstore.h b/src/gui/painting/qbackingstore.h index ee3c05f7a9..331fa8c534 100644 --- a/src/gui/painting/qbackingstore.h +++ b/src/gui/painting/qbackingstore.h @@ -61,7 +61,7 @@ public: // 'window' can be a child window, in which case 'region' is in child window coordinates and // offset is the (child) window's offset in relation to the window surface. - void flush(const QRegion ®ion, QWindow *window = 0, const QPoint &offset = QPoint()); + void flush(const QRegion ®ion, QWindow *window = Q_NULLPTR, const QPoint &offset = QPoint()); void resize(const QSize &size); QSize size() const; diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index 9175875310..8af87a49af 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -102,10 +102,10 @@ public: void setGreenF(qreal green); void setBlueF(qreal blue); - void getRgb(int *r, int *g, int *b, int *a = 0) const; + void getRgb(int *r, int *g, int *b, int *a = Q_NULLPTR) const; void setRgb(int r, int g, int b, int a = 255); - void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = 0) const; + void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = Q_NULLPTR) const; void setRgbF(qreal r, qreal g, qreal b, qreal a = 1.0); QRgb rgba() const; @@ -129,10 +129,10 @@ public: qreal hsvSaturationF() const; qreal valueF() const; - void getHsv(int *h, int *s, int *v, int *a = 0) const; + void getHsv(int *h, int *s, int *v, int *a = Q_NULLPTR) const; void setHsv(int h, int s, int v, int a = 255); - void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = 0) const; + void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = Q_NULLPTR) const; void setHsvF(qreal h, qreal s, qreal v, qreal a = 1.0); int cyan() const; @@ -145,10 +145,10 @@ public: qreal yellowF() const; qreal blackF() const; - void getCmyk(int *c, int *m, int *y, int *k, int *a = 0); + void getCmyk(int *c, int *m, int *y, int *k, int *a = Q_NULLPTR); void setCmyk(int c, int m, int y, int k, int a = 255); - void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = 0); + void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = Q_NULLPTR); void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); int hslHue() const; // 0 <= hue < 360 @@ -159,10 +159,10 @@ public: qreal hslSaturationF() const; qreal lightnessF() const; - void getHsl(int *h, int *s, int *l, int *a = 0) const; + void getHsl(int *h, int *s, int *l, int *a = Q_NULLPTR) const; void setHsl(int h, int s, int l, int a = 255); - void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = 0) const; + void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = Q_NULLPTR) const; void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0); QColor toRgb() const; diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h index c036e4df93..809a19a0b8 100644 --- a/src/gui/painting/qmatrix.h +++ b/src/gui/painting/qmatrix.h @@ -92,7 +92,7 @@ public: bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); } qreal determinant() const { return _m11*_m22 - _m12*_m21; } - QMatrix inverted(bool *invertible = 0) const Q_REQUIRED_RESULT; + QMatrix inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT; bool operator==(const QMatrix &) const; bool operator!=(const QMatrix &) const; diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 51776a9642..e0c124ea66 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -408,9 +408,9 @@ public: void drawText(const QPointF &p, const QString &str, int tf, int justificationPadding); - void drawText(const QRectF &r, int flags, const QString &text, QRectF *br=0); - void drawText(const QRect &r, int flags, const QString &text, QRect *br=0); - inline void drawText(int x, int y, int w, int h, int flags, const QString &text, QRect *br=0); + void drawText(const QRectF &r, int flags, const QString &text, QRectF *br = Q_NULLPTR); + void drawText(const QRect &r, int flags, const QString &text, QRect *br = Q_NULLPTR); + inline void drawText(int x, int y, int w, int h, int flags, const QString &text, QRect *br = Q_NULLPTR); void drawText(const QRectF &r, const QString &text, const QTextOption &o = QTextOption()); @@ -453,7 +453,7 @@ public: static void setRedirected(const QPaintDevice *device, QPaintDevice *replacement, const QPoint& offset = QPoint()); - static QPaintDevice *redirected(const QPaintDevice *device, QPoint *offset = 0); + static QPaintDevice *redirected(const QPaintDevice *device, QPoint *offset = Q_NULLPTR); static void restoreRedirected(const QPaintDevice *device); void beginNativePainting(); diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index 65f543144d..8874996e19 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -96,7 +96,7 @@ public: qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33); - QTransform inverted(bool *invertible = 0) const Q_REQUIRED_RESULT; + QTransform inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT; QTransform adjoint() const Q_REQUIRED_RESULT; QTransform transposed() const Q_REQUIRED_RESULT; |