summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qfloat16.h16
-rw-r--r--src/corelib/global/qglobal.h18
-rw-r--r--src/corelib/io/qurl.h4
-rw-r--r--src/corelib/thread/qthreadpool.h2
-rw-r--r--src/corelib/tools/qarraydata.h14
-rw-r--r--src/corelib/tools/qarraydatapointer.h2
-rw-r--r--src/corelib/tools/qbytearray.h56
-rw-r--r--src/corelib/tools/qdatetime.h20
-rw-r--r--src/corelib/tools/qline.h18
-rw-r--r--src/corelib/tools/qpoint.h6
-rw-r--r--src/corelib/tools/qrect.h46
-rw-r--r--src/corelib/tools/qsize.h26
-rw-r--r--src/corelib/tools/qstring.h202
-rw-r--r--src/corelib/tools/qtimezoneprivate_p.h4
-rw-r--r--src/corelib/tools/qversionnumber.h28
-rw-r--r--src/gui/image/qimage.h8
-rw-r--r--src/gui/math3d/qgenericmatrix.h2
-rw-r--r--src/gui/math3d/qquaternion.h6
-rw-r--r--src/gui/math3d/qvector2d.h2
-rw-r--r--src/gui/math3d/qvector4d.h2
-rw-r--r--src/gui/painting/qcolor.h10
-rw-r--r--src/gui/painting/qmatrix.h2
-rw-r--r--src/gui/painting/qpainterpath.h16
-rw-r--r--src/gui/painting/qpolygon.h18
-rw-r--r--src/gui/painting/qregion.h28
-rw-r--r--src/gui/painting/qtransform.h6
-rw-r--r--src/network/ssl/qsslellipticcurve.h4
-rw-r--r--src/widgets/kernel/qsizepolicy.h3
28 files changed, 281 insertions, 288 deletions
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
index 3b54719f4f..b0272c51c3 100644
--- a/src/corelib/global/qfloat16.h
+++ b/src/corelib/global/qfloat16.h
@@ -81,18 +81,18 @@ private:
Q_DECLARE_TYPEINFO(qfloat16, Q_PRIMITIVE_TYPE);
-Q_CORE_EXPORT Q_REQUIRED_RESULT bool qIsInf(qfloat16 f) Q_DECL_NOTHROW; // complements qnumeric.h
-Q_CORE_EXPORT Q_REQUIRED_RESULT bool qIsNaN(qfloat16 f) Q_DECL_NOTHROW; // complements qnumeric.h
-Q_CORE_EXPORT Q_REQUIRED_RESULT bool qIsFinite(qfloat16 f) Q_DECL_NOTHROW; // complements qnumeric.h
+Q_REQUIRED_RESULT Q_CORE_EXPORT bool qIsInf(qfloat16 f) Q_DECL_NOTHROW; // complements qnumeric.h
+Q_REQUIRED_RESULT Q_CORE_EXPORT bool qIsNaN(qfloat16 f) Q_DECL_NOTHROW; // complements qnumeric.h
+Q_REQUIRED_RESULT Q_CORE_EXPORT bool qIsFinite(qfloat16 f) Q_DECL_NOTHROW; // complements qnumeric.h
// The remainder of these utility functions complement qglobal.h
-inline Q_REQUIRED_RESULT int qRound(qfloat16 d) Q_DECL_NOTHROW
+Q_REQUIRED_RESULT inline int qRound(qfloat16 d) Q_DECL_NOTHROW
{ return qRound(static_cast<float>(d)); }
-inline Q_REQUIRED_RESULT qint64 qRound64(qfloat16 d) Q_DECL_NOTHROW
+Q_REQUIRED_RESULT inline qint64 qRound64(qfloat16 d) Q_DECL_NOTHROW
{ return qRound64(static_cast<float>(d)); }
-inline Q_REQUIRED_RESULT bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) Q_DECL_NOTHROW
+Q_REQUIRED_RESULT inline bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) Q_DECL_NOTHROW
{
float f1 = static_cast<float>(p1);
float f2 = static_cast<float>(p2);
@@ -105,7 +105,7 @@ inline Q_REQUIRED_RESULT bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) Q_DECL_NOT
return (qAbs(f1 - f2) * 102.5f <= qMin(qAbs(f1), qAbs(f2)));
}
-inline Q_REQUIRED_RESULT bool qIsNull(qfloat16 f) Q_DECL_NOTHROW
+Q_REQUIRED_RESULT inline bool qIsNull(qfloat16 f) Q_DECL_NOTHROW
{
return (f.b16 & static_cast<quint16>(0x7fff)) == 0;
}
@@ -247,7 +247,7 @@ QT_WARNING_POP
/*!
\internal
*/
-inline Q_REQUIRED_RESULT bool qFuzzyIsNull(qfloat16 f) Q_DECL_NOTHROW
+Q_REQUIRED_RESULT inline bool qFuzzyIsNull(qfloat16 f) Q_DECL_NOTHROW
{
return qAbs(static_cast<float>(f)) <= 0.001f;
}
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 9ac29acd16..d4d20fd54a 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -770,26 +770,22 @@ typedef void (*QFunctionPointer)();
# define Q_UNIMPLEMENTED() qWarning("Unimplemented code.")
#endif
-Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;
-Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2)
+Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyCompare(double p1, double p2)
{
return (qAbs(p1 - p2) * 1000000000000. <= qMin(qAbs(p1), qAbs(p2)));
}
-Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;
-Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2)
+Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyCompare(float p1, float p2)
{
return (qAbs(p1 - p2) * 100000.f <= qMin(qAbs(p1), qAbs(p2)));
}
-Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED;
-Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d)
+Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyIsNull(double d)
{
return qAbs(d) <= 0.000000000001;
}
-Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED;
-Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f)
+Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyIsNull(float f)
{
return qAbs(f) <= 0.00001f;
}
@@ -799,8 +795,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f)
check whether the actual value is 0 or close to 0, but whether
it is binary 0, disregarding sign.
*/
-static inline bool qIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED;
-static inline bool qIsNull(double d)
+Q_REQUIRED_RESULT static inline Q_DECL_UNUSED bool qIsNull(double d)
{
union U {
double d;
@@ -816,8 +811,7 @@ static inline bool qIsNull(double d)
check whether the actual value is 0 or close to 0, but whether
it is binary 0, disregarding sign.
*/
-static inline bool qIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED;
-static inline bool qIsNull(float f)
+Q_REQUIRED_RESULT static inline Q_DECL_UNUSED bool qIsNull(float f)
{
union U {
float f;
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index c16825a033..0bb8707ff9 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -196,7 +196,7 @@ public:
QString url(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
QString toString(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
QString toDisplayString(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
- QUrl adjusted(FormattingOptions options) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QUrl adjusted(FormattingOptions options) const;
QByteArray toEncoded(FormattingOptions options = FullyEncoded) const;
static QUrl fromEncoded(const QByteArray &url, ParsingMode mode = TolerantMode);
@@ -255,7 +255,7 @@ public:
QString fragment(ComponentFormattingOptions options = PrettyDecoded) const;
void setFragment(const QString &fragment, ParsingMode mode = TolerantMode);
- QUrl resolved(const QUrl &relative) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QUrl resolved(const QUrl &relative) const;
bool isRelative() const;
bool isParentOf(const QUrl &url) const;
diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h
index 74a8c28fc8..09b7f96f48 100644
--- a/src/corelib/thread/qthreadpool.h
+++ b/src/corelib/thread/qthreadpool.h
@@ -88,7 +88,7 @@ public:
QT_DEPRECATED_X("use tryTake(), but note the different deletion rules")
void cancel(QRunnable *runnable);
#endif
- bool tryTake(QRunnable *runnable) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT bool tryTake(QRunnable *runnable);
};
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index bc20932cca..88f0cfb0ea 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -112,12 +112,10 @@ struct Q_CORE_EXPORT QArrayData
return result;
}
- static QArrayData *allocate(size_t objectSize, size_t alignment,
- size_t capacity, AllocationOptions options = Default)
- Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- static QArrayData *reallocateUnaligned(QArrayData *data, size_t objectSize,
- size_t newCapacity, AllocationOptions newOptions = Default)
- Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QArrayData *allocate(size_t objectSize, size_t alignment,
+ size_t capacity, AllocationOptions options = Default) Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT static QArrayData *reallocateUnaligned(QArrayData *data, size_t objectSize,
+ size_t newCapacity, AllocationOptions newOptions = Default) Q_DECL_NOTHROW;
static void deallocate(QArrayData *data, size_t objectSize,
size_t alignment) Q_DECL_NOTHROW;
@@ -217,8 +215,8 @@ struct QTypedArrayData
class AlignmentDummy { QArrayData header; T data; };
- static QTypedArrayData *allocate(size_t capacity,
- AllocationOptions options = Default) Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT static QTypedArrayData *allocate(size_t capacity,
+ AllocationOptions options = Default)
{
Q_STATIC_ASSERT(sizeof(QTypedArrayData) == sizeof(QArrayData));
return static_cast<QTypedArrayData *>(QArrayData::allocate(sizeof(T),
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index b97dde5a61..51cfa6e849 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -174,7 +174,7 @@ public:
}
private:
- Data *clone(QArrayData::AllocationOptions options) const Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Data *clone(QArrayData::AllocationOptions options) const
{
Data *x = Data::allocate(d->detachCapacity(d->size), options);
Q_CHECK_PTR(x);
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index a0e5c5478b..03bb9b5747 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -227,9 +227,9 @@ public:
int count(const char *a) const;
int count(const QByteArray &a) const;
- QByteArray left(int len) const Q_REQUIRED_RESULT;
- QByteArray right(int len) const Q_REQUIRED_RESULT;
- QByteArray mid(int index, int len = -1) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QByteArray left(int len) const;
+ Q_REQUIRED_RESULT QByteArray right(int len) const;
+ Q_REQUIRED_RESULT QByteArray mid(int index, int len = -1) const;
bool startsWith(const QByteArray &a) const;
bool startsWith(char c) const;
@@ -250,34 +250,34 @@ public:
# define Q_REQUIRED_RESULT
# define Q_REQUIRED_RESULT_pushed
# endif
- Q_ALWAYS_INLINE QByteArray toLower() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray toLower() const &
{ return toLower_helper(*this); }
- Q_ALWAYS_INLINE QByteArray toLower() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray toLower() &&
{ return toLower_helper(*this); }
- Q_ALWAYS_INLINE QByteArray toUpper() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray toUpper() const &
{ return toUpper_helper(*this); }
- Q_ALWAYS_INLINE QByteArray toUpper() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray toUpper() &&
{ return toUpper_helper(*this); }
- Q_ALWAYS_INLINE QByteArray trimmed() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray trimmed() const &
{ return trimmed_helper(*this); }
- Q_ALWAYS_INLINE QByteArray trimmed() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray trimmed() &&
{ return trimmed_helper(*this); }
- Q_ALWAYS_INLINE QByteArray simplified() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray simplified() const &
{ return simplified_helper(*this); }
- Q_ALWAYS_INLINE QByteArray simplified() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QByteArray simplified() &&
{ return simplified_helper(*this); }
# ifdef Q_REQUIRED_RESULT_pushed
# pragma pop_macro("Q_REQUIRED_RESULT")
# endif
#else
- QByteArray toLower() const Q_REQUIRED_RESULT;
- QByteArray toUpper() const Q_REQUIRED_RESULT;
- QByteArray trimmed() const Q_REQUIRED_RESULT;
- QByteArray simplified() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QByteArray toLower() const;
+ Q_REQUIRED_RESULT QByteArray toUpper() const;
+ Q_REQUIRED_RESULT QByteArray trimmed() const;
+ Q_REQUIRED_RESULT QByteArray simplified() const;
#endif
- QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const Q_REQUIRED_RESULT;
- QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const;
+ Q_REQUIRED_RESULT QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const;
QByteArray &prepend(char c);
QByteArray &prepend(int count, char c);
@@ -312,7 +312,7 @@ public:
QList<QByteArray> split(char sep) const;
- QByteArray repeated(int times) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QByteArray repeated(int times) const;
#ifndef QT_NO_CAST_TO_ASCII
QT_ASCII_CAST_WARN QByteArray &append(const QString &s);
@@ -362,16 +362,16 @@ public:
QByteArray &setNum(double, char f = 'g', int prec = 6);
QByteArray &setRawData(const char *a, uint n); // ### Qt 6: use an int
- static QByteArray number(int, int base = 10) Q_REQUIRED_RESULT;
- static QByteArray number(uint, int base = 10) Q_REQUIRED_RESULT;
- static QByteArray number(qlonglong, int base = 10) Q_REQUIRED_RESULT;
- static QByteArray number(qulonglong, int base = 10) Q_REQUIRED_RESULT;
- static QByteArray number(double, char f = 'g', int prec = 6) Q_REQUIRED_RESULT;
- static QByteArray fromRawData(const char *, int size) Q_REQUIRED_RESULT;
- static QByteArray fromBase64(const QByteArray &base64, Base64Options options) Q_REQUIRED_RESULT;
- static QByteArray fromBase64(const QByteArray &base64) Q_REQUIRED_RESULT; // ### Qt6 merge with previous
- static QByteArray fromHex(const QByteArray &hexEncoded) Q_REQUIRED_RESULT;
- static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%') Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QByteArray number(int, int base = 10);
+ Q_REQUIRED_RESULT static QByteArray number(uint, int base = 10);
+ Q_REQUIRED_RESULT static QByteArray number(qlonglong, int base = 10);
+ Q_REQUIRED_RESULT static QByteArray number(qulonglong, int base = 10);
+ Q_REQUIRED_RESULT static QByteArray number(double, char f = 'g', int prec = 6);
+ Q_REQUIRED_RESULT static QByteArray fromRawData(const char *, int size);
+ Q_REQUIRED_RESULT static QByteArray fromBase64(const QByteArray &base64, Base64Options options);
+ Q_REQUIRED_RESULT static QByteArray fromBase64(const QByteArray &base64); // ### Qt6 merge with previous
+ Q_REQUIRED_RESULT static QByteArray fromHex(const QByteArray &hexEncoded);
+ Q_REQUIRED_RESULT static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%');
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
static QByteArray fromCFData(CFDataRef data);
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index c7f14ed40a..2518dc7301 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -103,9 +103,9 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d)
#endif // < Qt 6
void getDate(int *year, int *month, int *day) const;
- QDate addDays(qint64 days) const Q_REQUIRED_RESULT;
- QDate addMonths(int months) const Q_REQUIRED_RESULT;
- QDate addYears(int years) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QDate addDays(qint64 days) const;
+ Q_REQUIRED_RESULT QDate addMonths(int months) const;
+ Q_REQUIRED_RESULT QDate addYears(int years) const;
qint64 daysTo(const QDate &) const;
Q_DECL_CONSTEXPR bool operator==(const QDate &other) const { return jd == other.jd; }
@@ -166,9 +166,9 @@ public:
#endif
bool setHMS(int h, int m, int s, int ms = 0);
- QTime addSecs(int secs) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QTime addSecs(int secs) const;
int secsTo(const QTime &) const;
- QTime addMSecs(int ms) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QTime addMSecs(int ms) const;
int msecsTo(const QTime &) const;
Q_DECL_CONSTEXPR bool operator==(const QTime &other) const { return mds == other.mds; }
@@ -297,11 +297,11 @@ public:
QString toString(Qt::DateFormat f = Qt::TextDate) const;
QString toString(const QString &format) const;
#endif
- QDateTime addDays(qint64 days) const Q_REQUIRED_RESULT;
- QDateTime addMonths(int months) const Q_REQUIRED_RESULT;
- QDateTime addYears(int years) const Q_REQUIRED_RESULT;
- QDateTime addSecs(qint64 secs) const Q_REQUIRED_RESULT;
- QDateTime addMSecs(qint64 msecs) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QDateTime addDays(qint64 days) const;
+ Q_REQUIRED_RESULT QDateTime addMonths(int months) const;
+ Q_REQUIRED_RESULT QDateTime addYears(int years) const;
+ Q_REQUIRED_RESULT QDateTime addSecs(qint64 secs) const;
+ Q_REQUIRED_RESULT QDateTime addMSecs(qint64 msecs) const;
QDateTime toTimeSpec(Qt::TimeSpec spec) const;
inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); }
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h
index 5b5ca3b4c8..6361c1af9f 100644
--- a/src/corelib/tools/qline.h
+++ b/src/corelib/tools/qline.h
@@ -73,10 +73,10 @@ public:
inline void translate(const QPoint &p);
inline void translate(int dx, int dy);
- Q_DECL_CONSTEXPR inline QLine translated(const QPoint &p) const Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QLine translated(int dx, int dy) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QLine translated(const QPoint &p) const;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QLine translated(int dx, int dy) const;
- Q_DECL_CONSTEXPR inline QPoint center() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QPoint center() const;
inline void setP1(const QPoint &p1);
inline void setP2(const QPoint &p2);
@@ -221,7 +221,7 @@ public:
Q_DECL_CONSTEXPR inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2);
Q_DECL_CONSTEXPR inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { }
- static QLineF fromPolar(qreal length, qreal angle) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QLineF fromPolar(qreal length, qreal angle);
Q_DECL_CONSTEXPR bool isNull() const;
@@ -245,8 +245,8 @@ public:
qreal angleTo(const QLineF &l) const;
- QLineF unitVector() const Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QLineF normalVector() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QLineF unitVector() const;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QLineF normalVector() const;
// ### Qt 6: rename intersects() or intersection() and rename IntersectType IntersectionType
IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const;
@@ -257,10 +257,10 @@ public:
inline void translate(const QPointF &p);
inline void translate(qreal dx, qreal dy);
- Q_DECL_CONSTEXPR inline QLineF translated(const QPointF &p) const Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QLineF translated(qreal dx, qreal dy) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QLineF translated(const QPointF &p) const;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QLineF translated(qreal dx, qreal dy) const;
- Q_DECL_CONSTEXPR inline QPointF center() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QPointF center() const;
inline void setP1(const QPointF &p1);
inline void setP2(const QPointF &p2);
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index 7b1004897a..0f3e0c3517 100644
--- a/src/corelib/tools/qpoint.h
+++ b/src/corelib/tools/qpoint.h
@@ -94,7 +94,7 @@ public:
friend Q_DECL_CONSTEXPR inline const QPoint operator/(const QPoint &, qreal);
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
- CGPoint toCGPoint() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT CGPoint toCGPoint() const Q_DECL_NOTHROW;
#endif
private:
@@ -256,8 +256,8 @@ public:
Q_DECL_CONSTEXPR QPoint toPoint() const;
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
- static QPointF fromCGPoint(CGPoint point) Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- CGPoint toCGPoint() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QPointF fromCGPoint(CGPoint point) Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT CGPoint toCGPoint() const Q_DECL_NOTHROW;
#endif
private:
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index 4030cccbd5..19ff87b420 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -70,7 +70,7 @@ public:
Q_DECL_CONSTEXPR inline int top() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline int right() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline int bottom() const Q_DECL_NOTHROW;
- QRect normalized() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QRect normalized() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline int x() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline int y() const Q_DECL_NOTHROW;
@@ -104,9 +104,9 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void translate(int dx, int dy) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void translate(const QPoint &p) Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QRect translated(int dx, int dy) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QRect translated(const QPoint &p) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QRect transposed() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRect translated(int dx, int dy) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRect translated(const QPoint &p) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRect transposed() const Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void moveTo(int x, int t) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void moveTo(const QPoint &p) Q_DECL_NOTHROW;
@@ -118,7 +118,7 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void getCoords(int *x1, int *y1, int *x2, int *y2) const;
Q_DECL_RELAXED_CONSTEXPR inline void adjust(int x1, int y1, int x2, int y2) Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QRect adjusted(int x1, int y1, int x2, int y2) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRect adjusted(int x1, int y1, int x2, int y2) const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline QSize size() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline int width() const Q_DECL_NOTHROW;
@@ -136,8 +136,8 @@ public:
bool contains(const QPoint &p, bool proper=false) const Q_DECL_NOTHROW;
inline bool contains(int x, int y) const Q_DECL_NOTHROW;
inline bool contains(int x, int y, bool proper) const Q_DECL_NOTHROW;
- inline QRect united(const QRect &other) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- inline QRect intersected(const QRect &other) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT inline QRect united(const QRect &other) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT inline QRect intersected(const QRect &other) const Q_DECL_NOTHROW;
bool intersects(const QRect &r) const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline QRect marginsAdded(const QMargins &margins) const Q_DECL_NOTHROW;
@@ -146,15 +146,15 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline QRect &operator-=(const QMargins &margins) Q_DECL_NOTHROW;
#if QT_DEPRECATED_SINCE(5, 0)
- QT_DEPRECATED QRect unite(const QRect &r) const Q_DECL_NOTHROW Q_REQUIRED_RESULT { return united(r); }
- QT_DEPRECATED QRect intersect(const QRect &r) const Q_DECL_NOTHROW Q_REQUIRED_RESULT { return intersected(r); }
+ Q_REQUIRED_RESULT QT_DEPRECATED QRect unite(const QRect &r) const Q_DECL_NOTHROW { return united(r); }
+ Q_REQUIRED_RESULT QT_DEPRECATED QRect intersect(const QRect &r) const Q_DECL_NOTHROW { return intersected(r); }
#endif
friend Q_DECL_CONSTEXPR inline bool operator==(const QRect &, const QRect &) Q_DECL_NOTHROW;
friend Q_DECL_CONSTEXPR inline bool operator!=(const QRect &, const QRect &) Q_DECL_NOTHROW;
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
- CGRect toCGRect() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT CGRect toCGRect() const Q_DECL_NOTHROW;
#endif
private:
@@ -520,7 +520,7 @@ public:
Q_DECL_CONSTEXPR inline bool isNull() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline bool isEmpty() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline bool isValid() const Q_DECL_NOTHROW;
- QRectF normalized() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QRectF normalized() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline qreal left() const Q_DECL_NOTHROW { return xp; }
Q_DECL_CONSTEXPR inline qreal top() const Q_DECL_NOTHROW { return yp; }
@@ -560,10 +560,10 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void translate(qreal dx, qreal dy) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void translate(const QPointF &p) Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QRectF transposed() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRectF transposed() const Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void moveTo(qreal x, qreal y) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void moveTo(const QPointF &p) Q_DECL_NOTHROW;
@@ -575,7 +575,7 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const;
Q_DECL_RELAXED_CONSTEXPR inline void adjust(qreal x1, qreal y1, qreal x2, qreal y2) Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline QSizeF size() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline qreal width() const Q_DECL_NOTHROW;
@@ -592,8 +592,8 @@ public:
bool contains(const QRectF &r) const Q_DECL_NOTHROW;
bool contains(const QPointF &p) const Q_DECL_NOTHROW;
inline bool contains(qreal x, qreal y) const Q_DECL_NOTHROW;
- inline QRectF united(const QRectF &other) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- inline QRectF intersected(const QRectF &other) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT inline QRectF united(const QRectF &other) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT inline QRectF intersected(const QRectF &other) const Q_DECL_NOTHROW;
bool intersects(const QRectF &r) const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR inline QRectF marginsAdded(const QMarginsF &margins) const Q_DECL_NOTHROW;
@@ -602,19 +602,19 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline QRectF &operator-=(const QMarginsF &margins) Q_DECL_NOTHROW;
#if QT_DEPRECATED_SINCE(5, 0)
- QT_DEPRECATED QRectF unite(const QRectF &r) const Q_DECL_NOTHROW Q_REQUIRED_RESULT { return united(r); }
- QT_DEPRECATED QRectF intersect(const QRectF &r) const Q_DECL_NOTHROW Q_REQUIRED_RESULT { return intersected(r); }
+ Q_REQUIRED_RESULT QT_DEPRECATED QRectF unite(const QRectF &r) const Q_DECL_NOTHROW { return united(r); }
+ Q_REQUIRED_RESULT QT_DEPRECATED QRectF intersect(const QRectF &r) const Q_DECL_NOTHROW { return intersected(r); }
#endif
friend Q_DECL_CONSTEXPR inline bool operator==(const QRectF &, const QRectF &) Q_DECL_NOTHROW;
friend Q_DECL_CONSTEXPR inline bool operator!=(const QRectF &, const QRectF &) Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QRect toRect() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QRect toAlignedRect() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QRect toRect() const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QRect toAlignedRect() const Q_DECL_NOTHROW;
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
- static QRectF fromCGRect(CGRect rect) Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- CGRect toCGRect() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QRectF fromCGRect(CGRect rect) Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT CGRect toCGRect() const Q_DECL_NOTHROW;
#endif
private:
diff --git a/src/corelib/tools/qsize.h b/src/corelib/tools/qsize.h
index cd5f8adbf5..bb29dca7c4 100644
--- a/src/corelib/tools/qsize.h
+++ b/src/corelib/tools/qsize.h
@@ -64,15 +64,15 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void setWidth(int w) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void setHeight(int h) Q_DECL_NOTHROW;
void transpose() Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QSize transposed() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QSize transposed() const Q_DECL_NOTHROW;
inline void scale(int w, int h, Qt::AspectRatioMode mode) Q_DECL_NOTHROW;
inline void scale(const QSize &s, Qt::AspectRatioMode mode) Q_DECL_NOTHROW;
- QSize scaled(int w, int h, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QSize scaled(int w, int h, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QSize expandedTo(const QSize &) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QSize boundedTo(const QSize &) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QSize expandedTo(const QSize &) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QSize boundedTo(const QSize &) const Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline int &rwidth() Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline int &rheight() Q_DECL_NOTHROW;
@@ -91,7 +91,7 @@ public:
friend inline const QSize operator/(const QSize &, qreal);
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
- CGSize toCGSize() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT CGSize toCGSize() const Q_DECL_NOTHROW;
#endif
private:
@@ -228,15 +228,15 @@ public:
Q_DECL_RELAXED_CONSTEXPR inline void setWidth(qreal w) Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline void setHeight(qreal h) Q_DECL_NOTHROW;
void transpose() Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QSizeF transposed() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QSizeF transposed() const Q_DECL_NOTHROW;
inline void scale(qreal w, qreal h, Qt::AspectRatioMode mode) Q_DECL_NOTHROW;
inline void scale(const QSizeF &s, Qt::AspectRatioMode mode) Q_DECL_NOTHROW;
- QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const Q_DECL_NOTHROW;
- Q_DECL_CONSTEXPR inline QSizeF expandedTo(const QSizeF &) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- Q_DECL_CONSTEXPR inline QSizeF boundedTo(const QSizeF &) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QSizeF expandedTo(const QSizeF &) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QSizeF boundedTo(const QSizeF &) const Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline qreal &rwidth() Q_DECL_NOTHROW;
Q_DECL_RELAXED_CONSTEXPR inline qreal &rheight() Q_DECL_NOTHROW;
@@ -257,8 +257,8 @@ public:
Q_DECL_CONSTEXPR inline QSize toSize() const Q_DECL_NOTHROW;
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
- static QSizeF fromCGSize(CGSize size) Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- CGSize toCGSize() const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QSizeF fromCGSize(CGSize size) Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT CGSize toCGSize() const Q_DECL_NOTHROW;
#endif
private:
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 09a3bcb521..f81a58813d 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -261,47 +261,47 @@ public:
const QChar operator[](uint i) const;
QCharRef operator[](uint i);
- QString arg(qlonglong a, int fieldwidth=0, int base=10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(qulonglong a, int fieldwidth=0, int base=10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(long a, int fieldwidth=0, int base=10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(ulong a, int fieldwidth=0, int base=10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(int a, int fieldWidth = 0, int base = 10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(uint a, int fieldWidth = 0, int base = 10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(short a, int fieldWidth = 0, int base = 10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(ushort a, int fieldWidth = 0, int base = 10,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(char a, int fieldWidth = 0,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(QChar a, int fieldWidth = 0,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(const QString &a, int fieldWidth = 0,
- QChar fillChar = QLatin1Char(' ')) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3,
- const QString &a4) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3,
- const QString &a4, const QString &a5) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3,
- const QString &a4, const QString &a5, const QString &a6) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3,
+ Q_REQUIRED_RESULT QString arg(qlonglong a, int fieldwidth=0, int base=10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(qulonglong a, int fieldwidth=0, int base=10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(long a, int fieldwidth=0, int base=10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(ulong a, int fieldwidth=0, int base=10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(int a, int fieldWidth = 0, int base = 10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(uint a, int fieldWidth = 0, int base = 10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(short a, int fieldWidth = 0, int base = 10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(ushort a, int fieldWidth = 0, int base = 10,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(char a, int fieldWidth = 0,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(QChar a, int fieldWidth = 0,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a, int fieldWidth = 0,
+ QChar fillChar = QLatin1Char(' ')) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3,
const QString &a4, const QString &a5, const QString &a6,
- const QString &a7) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a7) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3,
const QString &a4, const QString &a5, const QString &a6,
- const QString &a7, const QString &a8) const Q_REQUIRED_RESULT;
- QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a7, const QString &a8) const;
+ Q_REQUIRED_RESULT QString arg(const QString &a1, const QString &a2, const QString &a3,
const QString &a4, const QString &a5, const QString &a6,
- const QString &a7, const QString &a8, const QString &a9) const Q_REQUIRED_RESULT;
+ const QString &a7, const QString &a8, const QString &a9) const;
QString &vsprintf(const char *format, va_list ap) Q_ATTRIBUTE_FORMAT_PRINTF(2, 0);
QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
@@ -363,12 +363,12 @@ public:
#ifndef QT_NO_REGULAREXPRESSION
QString section(const QRegularExpression &re, int start, int end = -1, SectionFlags flags = SectionDefault) const;
#endif
- QString left(int n) const Q_REQUIRED_RESULT;
- QString right(int n) const Q_REQUIRED_RESULT;
- QString mid(int position, int n = -1) const Q_REQUIRED_RESULT;
- QStringRef leftRef(int n) const Q_REQUIRED_RESULT;
- QStringRef rightRef(int n) const Q_REQUIRED_RESULT;
- QStringRef midRef(int position, int n = -1) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QString left(int n) const;
+ Q_REQUIRED_RESULT QString right(int n) const;
+ Q_REQUIRED_RESULT QString mid(int position, int n = -1) const;
+ Q_REQUIRED_RESULT QStringRef leftRef(int n) const;
+ Q_REQUIRED_RESULT QStringRef rightRef(int n) const;
+ Q_REQUIRED_RESULT QStringRef midRef(int position, int n = -1) const;
bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
bool startsWith(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
@@ -379,8 +379,8 @@ public:
bool endsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
bool endsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
- QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const Q_REQUIRED_RESULT;
- QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const;
+ Q_REQUIRED_RESULT QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const;
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
@@ -390,37 +390,37 @@ public:
# define Q_REQUIRED_RESULT
# define Q_REQUIRED_RESULT_pushed
# endif
- Q_ALWAYS_INLINE QString toLower() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString toLower() const &
{ return toLower_helper(*this); }
- Q_ALWAYS_INLINE QString toLower() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString toLower() &&
{ return toLower_helper(*this); }
- Q_ALWAYS_INLINE QString toUpper() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString toUpper() const &
{ return toUpper_helper(*this); }
- Q_ALWAYS_INLINE QString toUpper() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString toUpper() &&
{ return toUpper_helper(*this); }
- Q_ALWAYS_INLINE QString toCaseFolded() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString toCaseFolded() const &
{ return toCaseFolded_helper(*this); }
- Q_ALWAYS_INLINE QString toCaseFolded() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString toCaseFolded() &&
{ return toCaseFolded_helper(*this); }
- Q_ALWAYS_INLINE QString trimmed() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString trimmed() const &
{ return trimmed_helper(*this); }
- Q_ALWAYS_INLINE QString trimmed() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString trimmed() &&
{ return trimmed_helper(*this); }
- Q_ALWAYS_INLINE QString simplified() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString simplified() const &
{ return simplified_helper(*this); }
- Q_ALWAYS_INLINE QString simplified() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QString simplified() &&
{ return simplified_helper(*this); }
# ifdef Q_REQUIRED_RESULT_pushed
# pragma pop_macro("Q_REQUIRED_RESULT")
# endif
#else
- QString toLower() const Q_REQUIRED_RESULT;
- QString toUpper() const Q_REQUIRED_RESULT;
- QString toCaseFolded() const Q_REQUIRED_RESULT;
- QString trimmed() const Q_REQUIRED_RESULT;
- QString simplified() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QString toLower() const;
+ Q_REQUIRED_RESULT QString toUpper() const;
+ Q_REQUIRED_RESULT QString toCaseFolded() const;
+ Q_REQUIRED_RESULT QString trimmed() const;
+ Q_REQUIRED_RESULT QString simplified() const;
#endif
- QString toHtmlEscaped() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QString toHtmlEscaped() const;
QString &insert(int i, QChar c);
QString &insert(int i, const QChar *uc, int len);
@@ -479,21 +479,21 @@ public:
enum SplitBehavior { KeepEmptyParts, SkipEmptyParts };
- QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_REQUIRED_RESULT;
- QVector<QStringRef> splitRef(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_REQUIRED_RESULT;
- QStringList split(QChar sep, SplitBehavior behavior = KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_REQUIRED_RESULT;
- QVector<QStringRef> splitRef(QChar sep, SplitBehavior behavior = KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ Q_REQUIRED_RESULT QVector<QStringRef> splitRef(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ Q_REQUIRED_RESULT QStringList split(QChar sep, SplitBehavior behavior = KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ Q_REQUIRED_RESULT QVector<QStringRef> splitRef(QChar sep, SplitBehavior behavior = KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#ifndef QT_NO_REGEXP
- QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT;
- QVector<QStringRef> splitRef(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const;
+ Q_REQUIRED_RESULT QVector<QStringRef> splitRef(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const;
#endif
#ifndef QT_NO_REGULAREXPRESSION
- QStringList split(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT;
- QVector<QStringRef> splitRef(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QStringList split(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const;
+ Q_REQUIRED_RESULT QVector<QStringRef> splitRef(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const;
#endif
enum NormalizationForm {
NormalizationForm_D,
@@ -501,31 +501,31 @@ public:
NormalizationForm_KD,
NormalizationForm_KC
};
- QString normalized(NormalizationForm mode, QChar::UnicodeVersion version = QChar::Unicode_Unassigned) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QString normalized(NormalizationForm mode, QChar::UnicodeVersion version = QChar::Unicode_Unassigned) const;
- QString repeated(int times) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QString repeated(int times) const;
const ushort *utf16() const;
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
- QByteArray toLatin1() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toLatin1() const &
{ return toLatin1_helper(*this); }
- QByteArray toLatin1() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toLatin1() &&
{ return toLatin1_helper_inplace(*this); }
- QByteArray toUtf8() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toUtf8() const &
{ return toUtf8_helper(*this); }
- QByteArray toUtf8() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toUtf8() &&
{ return toUtf8_helper(*this); }
- QByteArray toLocal8Bit() const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toLocal8Bit() const &
{ return toLocal8Bit_helper(isNull() ? nullptr : constData(), size()); }
- QByteArray toLocal8Bit() && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toLocal8Bit() &&
{ return toLocal8Bit_helper(isNull() ? nullptr : constData(), size()); }
#else
- QByteArray toLatin1() const Q_REQUIRED_RESULT;
- QByteArray toUtf8() const Q_REQUIRED_RESULT;
- QByteArray toLocal8Bit() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QByteArray toLatin1() const;
+ Q_REQUIRED_RESULT QByteArray toUtf8() const;
+ Q_REQUIRED_RESULT QByteArray toLocal8Bit() const;
#endif
- QVector<uint> toUcs4() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QVector<uint> toUcs4() const;
// note - this are all inline so we can benefit from strlen() compile time optimizations
static inline QString fromLatin1(const char *str, int size = -1)
@@ -563,12 +563,12 @@ public:
{ return fromLatin1(str, size); }
QT_DEPRECATED static inline QString fromAscii(const QByteArray &str)
{ return fromLatin1(str); }
- QByteArray toAscii() const Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QByteArray toAscii() const
{ return toLatin1(); }
#endif
inline int toWCharArray(wchar_t *array) const;
- static inline QString fromWCharArray(const wchar_t *string, int size = -1) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static inline QString fromWCharArray(const wchar_t *string, int size = -1);
QString &setRawData(const QChar *unicode, int size);
QString &setUnicode(const QChar *unicode, int size);
@@ -1425,14 +1425,14 @@ public:
int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
int count(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
- QVector<QStringRef> split(const QString &sep, QString::SplitBehavior behavior = QString::KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_REQUIRED_RESULT;
- QVector<QStringRef> split(QChar sep, QString::SplitBehavior behavior = QString::KeepEmptyParts,
- Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QVector<QStringRef> split(const QString &sep, QString::SplitBehavior behavior = QString::KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ Q_REQUIRED_RESULT QVector<QStringRef> split(QChar sep, QString::SplitBehavior behavior = QString::KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
- QStringRef left(int n) const Q_REQUIRED_RESULT;
- QStringRef right(int n) const Q_REQUIRED_RESULT;
- QStringRef mid(int pos, int n = -1) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QStringRef left(int n) const;
+ Q_REQUIRED_RESULT QStringRef right(int n) const;
+ Q_REQUIRED_RESULT QStringRef mid(int pos, int n = -1) const;
void truncate(int pos) Q_DECL_NOTHROW { m_size = qBound(0, pos, m_size); }
void chop(int n) Q_DECL_NOTHROW
@@ -1478,13 +1478,13 @@ public:
inline const_reverse_iterator crend() const { return rend(); }
#if QT_DEPRECATED_SINCE(5, 0)
- QT_DEPRECATED QByteArray toAscii() const Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT QT_DEPRECATED QByteArray toAscii() const
{ return toLatin1(); }
#endif
- QByteArray toLatin1() const Q_REQUIRED_RESULT;
- QByteArray toUtf8() const Q_REQUIRED_RESULT;
- QByteArray toLocal8Bit() const Q_REQUIRED_RESULT;
- QVector<uint> toUcs4() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QByteArray toLatin1() const;
+ Q_REQUIRED_RESULT QByteArray toUtf8() const;
+ Q_REQUIRED_RESULT QByteArray toLocal8Bit() const;
+ Q_REQUIRED_RESULT QVector<uint> toUcs4() const;
inline void clear() { m_string = Q_NULLPTR; m_position = m_size = 0; }
QString toString() const;
@@ -1526,7 +1526,7 @@ public:
static int localeAwareCompare(const QStringRef &s1, const QString &s2);
static int localeAwareCompare(const QStringRef &s1, const QStringRef &s2);
- QStringRef trimmed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QStringRef trimmed() const;
short toShort(bool *ok = Q_NULLPTR, int base = 10) const;
ushort toUShort(bool *ok = Q_NULLPTR, int base = 10) const;
int toInt(bool *ok = Q_NULLPTR, int base = 10) const;
diff --git a/src/corelib/tools/qtimezoneprivate_p.h b/src/corelib/tools/qtimezoneprivate_p.h
index 0038908160..74b79dce16 100644
--- a/src/corelib/tools/qtimezoneprivate_p.h
+++ b/src/corelib/tools/qtimezoneprivate_p.h
@@ -154,12 +154,12 @@ public:
QLocale::Country country);
// returns "UTC" QString and QByteArray
- static inline QString utcQString() Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT static inline QString utcQString()
{
return QStringLiteral("UTC");
}
- static inline QByteArray utcQByteArray() Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT static inline QByteArray utcQByteArray()
{
return QByteArrayLiteral("UTC");
}
diff --git a/src/corelib/tools/qversionnumber.h b/src/corelib/tools/qversionnumber.h
index 2aaa6201f7..d3cf743a67 100644
--- a/src/corelib/tools/qversionnumber.h
+++ b/src/corelib/tools/qversionnumber.h
@@ -248,39 +248,39 @@ public:
inline explicit QVersionNumber(int maj, int min, int mic)
{ m_segments.setSegments(3, maj, min, mic); }
- inline bool isNull() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline bool isNull() const Q_DECL_NOTHROW
{ return segmentCount() == 0; }
- inline bool isNormalized() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline bool isNormalized() const Q_DECL_NOTHROW
{ return isNull() || segmentAt(segmentCount() - 1) != 0; }
- inline int majorVersion() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline int majorVersion() const Q_DECL_NOTHROW
{ return segmentAt(0); }
- inline int minorVersion() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline int minorVersion() const Q_DECL_NOTHROW
{ return segmentAt(1); }
- inline int microVersion() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline int microVersion() const Q_DECL_NOTHROW
{ return segmentAt(2); }
- Q_CORE_EXPORT QVersionNumber normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT QVersionNumber normalized() const;
- Q_CORE_EXPORT QVector<int> segments() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT QVector<int> segments() const;
- inline int segmentAt(int index) const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline int segmentAt(int index) const Q_DECL_NOTHROW
{ return (m_segments.size() > index) ? m_segments.at(index) : 0; }
- inline int segmentCount() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT inline int segmentCount() const Q_DECL_NOTHROW
{ return m_segments.size(); }
- Q_CORE_EXPORT bool isPrefixOf(const QVersionNumber &other) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT bool isPrefixOf(const QVersionNumber &other) const Q_DECL_NOTHROW;
- Q_CORE_EXPORT static int compare(const QVersionNumber &v1, const QVersionNumber &v2) Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT static int compare(const QVersionNumber &v1, const QVersionNumber &v2) Q_DECL_NOTHROW;
- Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber commonPrefix(const QVersionNumber &v1, const QVersionNumber &v2) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber commonPrefix(const QVersionNumber &v1, const QVersionNumber &v2);
- Q_CORE_EXPORT QString toString() const Q_REQUIRED_RESULT;
- Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber fromString(const QString &string, int *suffixIndex = Q_NULLPTR) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT QString toString() const;
+ Q_REQUIRED_RESULT Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber fromString(const QString &string, int *suffixIndex = Q_NULLPTR);
private:
#ifndef QT_NO_DATASTREAM
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 204e7a54b2..225ef3d2e8 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -179,9 +179,9 @@ public:
Format format() const;
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QIMAGE_COMPAT_CPP)
- Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const & Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const &
{ return convertToFormat_helper(f, flags); }
- Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) && Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_ALWAYS_INLINE QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) &&
{
if (convertToFormat_inplace(f, flags))
return std::move(*this);
@@ -189,9 +189,9 @@ public:
return convertToFormat_helper(f, flags);
}
#else
- QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const;
#endif
- QImage convertToFormat(Format f, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QImage convertToFormat(Format f, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const;
bool reinterpretAsFormat(Format f);
int width() const;
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index 9a1ab54124..6a2a9e5bae 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -64,7 +64,7 @@ public:
void fill(T value);
- QGenericMatrix<M, N, T> transposed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QGenericMatrix<M, N, T> transposed() const;
QGenericMatrix<N, M, T>& operator+=(const QGenericMatrix<N, M, T>& other);
QGenericMatrix<N, M, T>& operator-=(const QGenericMatrix<N, M, T>& other);
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index eff427117f..7f7f89db4d 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -90,14 +90,14 @@ public:
float length() const;
float lengthSquared() const;
- QQuaternion normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QQuaternion normalized() const;
void normalize();
inline QQuaternion inverted() const;
- QQuaternion conjugated() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QQuaternion conjugated() const;
#if QT_DEPRECATED_SINCE(5, 5)
- QT_DEPRECATED QQuaternion conjugate() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QT_DEPRECATED QQuaternion conjugate() const;
#endif
QVector3D rotatedVector(const QVector3D& vector) const;
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index bdb56c9c1f..5e0394b998 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -82,7 +82,7 @@ public:
float length() const;
float lengthSquared() const; //In Qt 6 convert to inline and constexpr
- QVector2D normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QVector2D normalized() const;
void normalize();
float distanceToPoint(const QVector2D &point) const;
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index f63b2f141b..be373aa806 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -88,7 +88,7 @@ public:
float length() const;
float lengthSquared() const; //In Qt 6 convert to inline and constexpr
- QVector4D normalized() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QVector4D normalized() const;
void normalize();
QVector4D &operator+=(const QVector4D &vector);
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 22fcbcb2a8..83a93e25ea 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -191,7 +191,7 @@ public:
QColor toCmyk() const Q_DECL_NOTHROW;
QColor toHsl() const Q_DECL_NOTHROW;
- QColor convertTo(Spec colorSpec) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QColor convertTo(Spec colorSpec) const Q_DECL_NOTHROW;
static QColor fromRgb(QRgb rgb) Q_DECL_NOTHROW;
static QColor fromRgba(QRgb rgba) Q_DECL_NOTHROW;
@@ -211,10 +211,10 @@ public:
static QColor fromHsl(int h, int s, int l, int a = 255);
static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
- QColor light(int f = 150) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QColor lighter(int f = 150) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QColor dark(int f = 200) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
- QColor darker(int f = 200) const Q_DECL_NOTHROW Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QColor light(int f = 150) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QColor lighter(int f = 150) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QColor dark(int f = 200) const Q_DECL_NOTHROW;
+ Q_REQUIRED_RESULT QColor darker(int f = 200) const Q_DECL_NOTHROW;
bool operator==(const QColor &c) const Q_DECL_NOTHROW;
bool operator!=(const QColor &c) const Q_DECL_NOTHROW;
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 76bf61671c..15e0ab5be1 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -108,7 +108,7 @@ public:
bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); }
qreal determinant() const { return _m11*_m22 - _m12*_m21; }
- QMatrix inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QMatrix inverted(bool *invertible = Q_NULLPTR) const;
bool operator==(const QMatrix &) const;
bool operator!=(const QMatrix &) const;
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 131fcde8cc..db39c1c5a0 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -154,8 +154,8 @@ public:
void translate(qreal dx, qreal dy);
inline void translate(const QPointF &offset);
- QPainterPath translated(qreal dx, qreal dy) const Q_REQUIRED_RESULT;
- inline QPainterPath translated(const QPointF &offset) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPainterPath translated(qreal dx, qreal dy) const;
+ Q_REQUIRED_RESULT inline QPainterPath translated(const QPointF &offset) const;
QRectF boundingRect() const;
QRectF controlPointRect() const;
@@ -165,7 +165,7 @@ public:
bool isEmpty() const;
- QPainterPath toReversed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPainterPath toReversed() const;
QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const;
QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const;
@@ -185,12 +185,12 @@ public:
bool intersects(const QPainterPath &p) const;
bool contains(const QPainterPath &p) const;
- QPainterPath united(const QPainterPath &r) const Q_REQUIRED_RESULT;
- QPainterPath intersected(const QPainterPath &r) const Q_REQUIRED_RESULT;
- QPainterPath subtracted(const QPainterPath &r) const Q_REQUIRED_RESULT;
- QPainterPath subtractedInverted(const QPainterPath &r) const Q_REQUIRED_RESULT;
+ 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;
+ Q_REQUIRED_RESULT QPainterPath subtractedInverted(const QPainterPath &r) const;
- QPainterPath simplified() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT 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 c57802e84e..f192e8d10b 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -78,8 +78,8 @@ public:
void translate(int dx, int dy);
void translate(const QPoint &offset);
- QPolygon translated(int dx, int dy) const Q_REQUIRED_RESULT;
- inline QPolygon translated(const QPoint &offset) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygon translated(int dx, int dy) const;
+ Q_REQUIRED_RESULT inline QPolygon translated(const QPoint &offset) const;
QRect boundingRect() const;
@@ -95,9 +95,9 @@ public:
bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const;
- QPolygon united(const QPolygon &r) const Q_REQUIRED_RESULT;
- QPolygon intersected(const QPolygon &r) const Q_REQUIRED_RESULT;
- QPolygon subtracted(const QPolygon &r) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygon united(const QPolygon &r) const;
+ Q_REQUIRED_RESULT QPolygon intersected(const QPolygon &r) const;
+ Q_REQUIRED_RESULT QPolygon subtracted(const QPolygon &r) const;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygon)
@@ -162,7 +162,7 @@ public:
void translate(const QPointF &offset);
inline QPolygonF translated(qreal dx, qreal dy) const;
- QPolygonF translated(const QPointF &offset) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygonF translated(const QPointF &offset) const;
QPolygon toPolygon() const;
@@ -172,9 +172,9 @@ public:
bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const;
- QPolygonF united(const QPolygonF &r) const Q_REQUIRED_RESULT;
- QPolygonF intersected(const QPolygonF &r) const Q_REQUIRED_RESULT;
- QPolygonF subtracted(const QPolygonF &r) const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QPolygonF united(const QPolygonF &r) const;
+ Q_REQUIRED_RESULT QPolygonF intersected(const QPolygonF &r) const;
+ Q_REQUIRED_RESULT QPolygonF subtracted(const QPolygonF &r) const;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygonF)
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 4f0a071da8..8dd7649447 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -99,23 +99,23 @@ public:
void translate(int dx, int dy);
inline void translate(const QPoint &p) { translate(p.x(), p.y()); }
- QRegion translated(int dx, int dy) const Q_REQUIRED_RESULT;
- inline QRegion translated(const QPoint &p) const Q_REQUIRED_RESULT { return translated(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()); }
- 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 Q_REQUIRED_RESULT;
+ 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;
#if QT_DEPRECATED_SINCE(5, 0)
- inline QT_DEPRECATED QRegion unite(const QRegion &r) const Q_REQUIRED_RESULT { return united(r); }
- inline QT_DEPRECATED QRegion unite(const QRect &r) const Q_REQUIRED_RESULT { return united(r); }
- inline QT_DEPRECATED QRegion intersect(const QRegion &r) const Q_REQUIRED_RESULT { return intersected(r); }
- inline QT_DEPRECATED QRegion intersect(const QRect &r) const Q_REQUIRED_RESULT { return intersected(r); }
- inline QT_DEPRECATED QRegion subtract(const QRegion &r) const Q_REQUIRED_RESULT { return subtracted(r); }
- inline QT_DEPRECATED QRegion eor(const QRegion &r) const Q_REQUIRED_RESULT { return xored(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRegion &r) const { return united(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRect &r) const { return united(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRegion &r) const { return intersected(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRect &r) const { return intersected(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion subtract(const QRegion &r) const { return subtracted(r); }
+ Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion eor(const QRegion &r) const { return xored(r); }
#endif
bool intersects(const QRegion &r) const;
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 5ca1d46982..06ae611861 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -116,9 +116,9 @@ public:
qreal m21, qreal m22, qreal m23,
qreal m31, qreal m32, qreal m33);
- QTransform inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT;
- QTransform adjoint() const Q_REQUIRED_RESULT;
- QTransform transposed() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT QTransform inverted(bool *invertible = Q_NULLPTR) const;
+ Q_REQUIRED_RESULT QTransform adjoint() const;
+ Q_REQUIRED_RESULT QTransform transposed() const;
QTransform &translate(qreal dx, qreal dy);
QTransform &scale(qreal sx, qreal sy);
diff --git a/src/network/ssl/qsslellipticcurve.h b/src/network/ssl/qsslellipticcurve.h
index 0e7cc60e31..231566063e 100644
--- a/src/network/ssl/qsslellipticcurve.h
+++ b/src/network/ssl/qsslellipticcurve.h
@@ -64,8 +64,8 @@ public:
Q_NETWORK_EXPORT static QSslEllipticCurve fromShortName(const QString &name);
Q_NETWORK_EXPORT static QSslEllipticCurve fromLongName(const QString &name);
- Q_NETWORK_EXPORT QString shortName() const Q_REQUIRED_RESULT;
- Q_NETWORK_EXPORT QString longName() const Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT Q_NETWORK_EXPORT QString shortName() const;
+ Q_REQUIRED_RESULT Q_NETWORK_EXPORT QString longName() const;
Q_DECL_CONSTEXPR bool isValid() const Q_DECL_NOTHROW
{
diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h
index 6cb4e147e9..dba742dec5 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -159,10 +159,11 @@ public:
Q_DECL_RELAXED_CONSTEXPR void setRetainSizeWhenHidden(bool retainSize) Q_DECL_NOTHROW { bits.retainSizeWhenHidden = retainSize; }
Q_DECL_RELAXED_CONSTEXPR void transpose() Q_DECL_NOTHROW { *this = transposed(); }
+ Q_REQUIRED_RESULT
#ifndef Q_QDOC
QT_SIZEPOLICY_CONSTEXPR_AND_UNIFORM_INIT
#endif
- QSizePolicy transposed() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
+ QSizePolicy transposed() const Q_DECL_NOTHROW
{
return QSizePolicy(bits.transposed());
}