summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-09-23 10:09:42 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-09-25 07:10:45 +0200
commitc2be9180b7430221e9136afb1a8c2a752ac2710f (patch)
tree5b390c53f4744c7bd4faeaf4d3a12d77ce3c0ba7 /src/gui/image
parent31a1b3280cf076fcdb45a658d0140af3737be138 (diff)
Replace Q_REQUIRED_RESULT with [[nodiscard]]
It was already used many places directly making the code inconsistent. Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 2ce9d96e6a..d95055e35d 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -156,22 +156,22 @@ public:
Format format() const;
- Q_REQUIRED_RESULT Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const &
+ [[nodiscard]] Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const &
{ return convertToFormat_helper(f, flags); }
- Q_REQUIRED_RESULT Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) &&
+ [[nodiscard]] Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) &&
{
if (convertToFormat_inplace(f, flags))
return std::move(*this);
else
return convertToFormat_helper(f, flags);
}
- Q_REQUIRED_RESULT QImage convertToFormat(Format f, const QList<QRgb> &colorTable,
+ [[nodiscard]] QImage convertToFormat(Format f, const QList<QRgb> &colorTable,
Qt::ImageConversionFlags flags = Qt::AutoColor) const;
bool reinterpretAsFormat(Format f);
- Q_REQUIRED_RESULT QImage convertedTo(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const &
+ [[nodiscard]] QImage convertedTo(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const &
{ return convertToFormat(f, flags); }
- Q_REQUIRED_RESULT QImage convertedTo(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) &&
+ [[nodiscard]] QImage convertedTo(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) &&
{ return convertToFormat(f, flags); }
void convertTo(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor);
@@ -248,13 +248,13 @@ public:
QImage scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const;
QImage transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const;
static QTransform trueMatrix(const QTransform &, int w, int h);
- Q_REQUIRED_RESULT QImage mirrored(bool horizontally = false, bool vertically = true) const &
+ [[nodiscard]] QImage mirrored(bool horizontally = false, bool vertically = true) const &
{ return mirrored_helper(horizontally, vertically); }
- Q_REQUIRED_RESULT QImage mirrored(bool horizontally = false, bool vertically = true) &&
+ [[nodiscard]] QImage mirrored(bool horizontally = false, bool vertically = true) &&
{ mirrored_inplace(horizontally, vertically); return std::move(*this); }
- Q_REQUIRED_RESULT QImage rgbSwapped() const &
+ [[nodiscard]] QImage rgbSwapped() const &
{ return rgbSwapped_helper(); }
- Q_REQUIRED_RESULT QImage rgbSwapped() &&
+ [[nodiscard]] QImage rgbSwapped() &&
{ rgbSwapped_inplace(); return std::move(*this); }
void mirror(bool horizontally = false, bool vertically = true)
{ mirrored_inplace(horizontally, vertically); }