summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-20 11:19:14 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-20 12:31:27 +0200
commit7950b6b283549c98f1e0f981c84b68071a13b616 (patch)
treecf7281872045ebd57c68e10064ff0f400084aa13 /src/corelib/tools/qbytearray.h
parent58d2927861d3e57cac4f6db599e209d2bfb17a2c (diff)
parent0794d61c822585530243f638687b8a75f0a15d0c (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r--src/corelib/tools/qbytearray.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 4763afafe1..453f28f39f 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -231,10 +231,10 @@ 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;
- QByteArray chopped(int len) 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;
+ Q_REQUIRED_RESULT QByteArray chopped(int len) const
{ Q_ASSERT(len >= 0); Q_ASSERT(len <= size()); return left(size() - len); }
bool startsWith(const QByteArray &a) const;
@@ -249,41 +249,41 @@ public:
void chop(int n);
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
-# if defined(Q_CC_GNU)
+# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
// required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941
# pragma push_macro("Q_REQUIRED_RESULT")
# undef Q_REQUIRED_RESULT
# 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);
inline QByteArray &prepend(int count, char c);
@@ -318,7 +318,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);
@@ -368,16 +368,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);