Move Q_REQUIRED_RESULT to its correct position

That's before the return type or static, inline, constexpr or such
keywords (if any).

Perl Script:
s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/

Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Thiago Macieira 2017-04-18 16:22:46 -07:00
parent 870964895b
commit 3dcc075f4a
28 changed files with 281 additions and 288 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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),

View File

@ -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);

View File

@ -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);

View File

@ -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); }

View File

@ -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);

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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;

View File

@ -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");
}

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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);

View File

@ -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
{

View File

@ -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());
}