summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qcolor.h6
-rw-r--r--src/gui/painting/qpainterpath.h14
-rw-r--r--src/gui/painting/qpolygon.h18
-rw-r--r--src/gui/painting/qregion.h18
-rw-r--r--src/gui/painting/qtransform.h6
5 files changed, 31 insertions, 31 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index d8269974be..03129e8241 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -195,7 +195,7 @@ public:
QColor toHsl() const noexcept;
QColor toExtendedRgb() const noexcept;
- Q_REQUIRED_RESULT QColor convertTo(Spec colorSpec) const noexcept;
+ [[nodiscard]] QColor convertTo(Spec colorSpec) const noexcept;
static QColor fromRgb(QRgb rgb) noexcept;
static QColor fromRgba(QRgb rgba) noexcept;
@@ -215,8 +215,8 @@ public:
static QColor fromHsl(int h, int s, int l, int a = 255);
static QColor fromHslF(float h, float s, float l, float a = 1.0);
- Q_REQUIRED_RESULT QColor lighter(int f = 150) const noexcept;
- Q_REQUIRED_RESULT QColor darker(int f = 200) const noexcept;
+ [[nodiscard]] QColor lighter(int f = 150) const noexcept;
+ [[nodiscard]] QColor darker(int f = 200) const noexcept;
bool operator==(const QColor &c) const noexcept;
bool operator!=(const QColor &c) const noexcept;
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 51a2874ed5..a839a73b4b 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -150,8 +150,8 @@ public:
void translate(qreal dx, qreal dy);
inline void translate(const QPointF &offset);
- Q_REQUIRED_RESULT QPainterPath translated(qreal dx, qreal dy) const;
- Q_REQUIRED_RESULT inline QPainterPath translated(const QPointF &offset) const;
+ [[nodiscard]] QPainterPath translated(qreal dx, qreal dy) const;
+ [[nodiscard]] inline QPainterPath translated(const QPointF &offset) const;
QRectF boundingRect() const;
QRectF controlPointRect() const;
@@ -161,7 +161,7 @@ public:
bool isEmpty() const;
- Q_REQUIRED_RESULT QPainterPath toReversed() const;
+ [[nodiscard]] QPainterPath toReversed() const;
QList<QPolygonF> toSubpathPolygons(const QTransform &matrix = QTransform()) const;
QList<QPolygonF> toFillPolygons(const QTransform &matrix = QTransform()) const;
@@ -179,11 +179,11 @@ public:
bool intersects(const QPainterPath &p) const;
bool contains(const QPainterPath &p) const;
- Q_REQUIRED_RESULT QPainterPath united(const QPainterPath &r) const;
- Q_REQUIRED_RESULT QPainterPath intersected(const QPainterPath &r) const;
- Q_REQUIRED_RESULT QPainterPath subtracted(const QPainterPath &r) const;
+ [[nodiscard]] QPainterPath united(const QPainterPath &r) const;
+ [[nodiscard]] QPainterPath intersected(const QPainterPath &r) const;
+ [[nodiscard]] QPainterPath subtracted(const QPainterPath &r) const;
- Q_REQUIRED_RESULT QPainterPath simplified() const;
+ [[nodiscard]] QPainterPath simplified() const;
bool operator==(const QPainterPath &other) const;
bool operator!=(const QPainterPath &other) const;
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index 80edd8d387..a861da5f32 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -69,8 +69,8 @@ public:
Q_GUI_EXPORT void translate(int dx, int dy);
void translate(const QPoint &offset);
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygon translated(int dx, int dy) const;
- Q_REQUIRED_RESULT inline QPolygon translated(const QPoint &offset) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygon translated(int dx, int dy) const;
+ [[nodiscard]] inline QPolygon translated(const QPoint &offset) const;
Q_GUI_EXPORT QRect boundingRect() const;
@@ -86,9 +86,9 @@ public:
Q_GUI_EXPORT bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygon united(const QPolygon &r) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygon intersected(const QPolygon &r) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygon subtracted(const QPolygon &r) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygon united(const QPolygon &r) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygon intersected(const QPolygon &r) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygon subtracted(const QPolygon &r) const;
Q_GUI_EXPORT bool intersects(const QPolygon &r) const;
};
@@ -144,7 +144,7 @@ public:
void Q_GUI_EXPORT translate(const QPointF &offset);
inline QPolygonF translated(qreal dx, qreal dy) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygonF translated(const QPointF &offset) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygonF translated(const QPointF &offset) const;
QPolygon Q_GUI_EXPORT toPolygon() const;
@@ -154,9 +154,9 @@ public:
Q_GUI_EXPORT bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygonF united(const QPolygonF &r) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygonF intersected(const QPolygonF &r) const;
- Q_REQUIRED_RESULT Q_GUI_EXPORT QPolygonF subtracted(const QPolygonF &r) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygonF united(const QPolygonF &r) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygonF intersected(const QPolygonF &r) const;
+ [[nodiscard]] Q_GUI_EXPORT QPolygonF subtracted(const QPolygonF &r) const;
Q_GUI_EXPORT bool intersects(const QPolygonF &r) const;
};
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index c4c0164a5b..8b991f2fb2 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -97,15 +97,15 @@ public:
void translate(int dx, int dy);
inline void translate(const QPoint &p) { translate(p.x(), p.y()); }
- Q_REQUIRED_RESULT QRegion translated(int dx, int dy) const;
- Q_REQUIRED_RESULT inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); }
-
- Q_REQUIRED_RESULT QRegion united(const QRegion &r) const;
- Q_REQUIRED_RESULT QRegion united(const QRect &r) const;
- Q_REQUIRED_RESULT QRegion intersected(const QRegion &r) const;
- Q_REQUIRED_RESULT QRegion intersected(const QRect &r) const;
- Q_REQUIRED_RESULT QRegion subtracted(const QRegion &r) const;
- Q_REQUIRED_RESULT QRegion xored(const QRegion &r) const;
+ [[nodiscard]] QRegion translated(int dx, int dy) const;
+ [[nodiscard]] inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); }
+
+ [[nodiscard]] QRegion united(const QRegion &r) const;
+ [[nodiscard]] QRegion united(const QRect &r) const;
+ [[nodiscard]] QRegion intersected(const QRegion &r) const;
+ [[nodiscard]] QRegion intersected(const QRect &r) const;
+ [[nodiscard]] QRegion subtracted(const QRegion &r) const;
+ [[nodiscard]] QRegion xored(const QRegion &r) const;
bool intersects(const QRegion &r) const;
bool intersects(const QRect &r) const;
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 972e45146a..a84563baea 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -113,9 +113,9 @@ public:
qreal m21, qreal m22, qreal m23,
qreal m31, qreal m32, qreal m33);
- Q_REQUIRED_RESULT QTransform inverted(bool *invertible = nullptr) const;
- Q_REQUIRED_RESULT QTransform adjoint() const;
- Q_REQUIRED_RESULT QTransform transposed() const;
+ [[nodiscard]] QTransform inverted(bool *invertible = nullptr) const;
+ [[nodiscard]] QTransform adjoint() const;
+ [[nodiscard]] QTransform transposed() const;
QTransform &translate(qreal dx, qreal dy);
QTransform &scale(qreal sx, qreal sy);