summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-19 13:29:11 -0700
committerLiang Qi <liang.qi@qt.io>2017-06-20 04:28:05 +0000
commit8a4ea3f03807c4d75ef73609dae30cfcf427c3ea (patch)
tree70c0348d8d87a767b242bd35fae6d9f10bef959c /src/corelib/tools/qstring.h
parent7ad55ca65f42351e231f31f7a9253ae6eaf1ebb3 (diff)
Move Q_REQUIRED_RESULT to its correct position
This commit complements commit 3dcc075f4a5efce348a6fa00cf5a0adef97b1089 for Qt 5.10. Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r--src/corelib/tools/qstring.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index d5301a396f..539abbe999 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -109,8 +109,8 @@ public:
{ return Q_ASSERT(i >= 0), Q_ASSERT(i < size()), QLatin1Char(m_data[i]); }
Q_DECL_CONSTEXPR QLatin1Char operator[](int i) const { return at(i); }
- Q_DECL_CONSTEXPR QLatin1Char front() const Q_REQUIRED_RESULT { return at(0); }
- Q_DECL_CONSTEXPR QLatin1Char back() const Q_REQUIRED_RESULT { return at(size() - 1); }
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR QLatin1Char front() const { return at(0); }
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR QLatin1Char back() const { return at(size() - 1); }
Q_REQUIRED_RESULT bool startsWith(QStringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const Q_DECL_NOTHROW
{ return qStartsWith(*this, s, cs); }
@@ -159,7 +159,7 @@ public:
{ return Q_ASSERT(n >= 0), Q_ASSERT(n <= size()), QLatin1String(m_data, n); }
Q_DECL_CONSTEXPR QLatin1String right(int n) const
{ return Q_ASSERT(n >= 0), Q_ASSERT(n <= size()), QLatin1String(m_data + m_size - n, n); }
- Q_DECL_CONSTEXPR QLatin1String chopped(int n) const Q_REQUIRED_RESULT
+ Q_REQUIRED_RESULT Q_DECL_CONSTEXPR QLatin1String chopped(int n) const
{ return Q_ASSERT(n >= 0), Q_ASSERT(n <= size()), QLatin1String(m_data, m_size - n); }
Q_DECL_RELAXED_CONSTEXPR void chop(int n)
@@ -1543,8 +1543,8 @@ public:
inline const QChar at(int i) const
{ Q_ASSERT(uint(i) < uint(size())); return m_string->at(i + m_position); }
QChar operator[](int i) const { return at(i); }
- QChar front() const Q_REQUIRED_RESULT { return at(0); }
- QChar back() const Q_REQUIRED_RESULT { return at(size() - 1); }
+ Q_REQUIRED_RESULT QChar front() const { return at(0); }
+ Q_REQUIRED_RESULT QChar back() const { return at(size() - 1); }
#if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII)
// ASCII compatibility