summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-20 04:28:09 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-06-20 04:28:09 +0000
commitd1ff9b419da5e3ace68479b02582222486ec9703 (patch)
treea978de6c9844cf37bbd7dc5cecc298bf51f4dce3 /src/corelib/tools/qstring.h
parent8a4ea3f03807c4d75ef73609dae30cfcf427c3ea (diff)
parentce09ef431373f45d14ce0a6e7de24aee3666093d (diff)
Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r--src/corelib/tools/qstring.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 539abbe999..a3e100c568 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -407,7 +407,7 @@ public:
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)
+# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) && !QT_HAS_CPP_ATTRIBUTE(nodiscard)
// required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941
# pragma push_macro("Q_REQUIRED_RESULT")
# undef Q_REQUIRED_RESULT