diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-09-26 17:00:22 -0700 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-27 15:40:06 +0000 |
commit | 9fcbef15f662cffb134925dc449ae8586cad44e4 (patch) | |
tree | e17e24127d28d8a1d1b4be1d69efcb6b19aeeaca /src/testlib | |
parent | ef0129bb66768e6dea9e13ce650054e149a79f53 (diff) |
Fix build: move Q_REQUIRED_RESULT to the right position
If you're using GCC 7 or Clang 4, Q_REQUIRED_RESULT expands to
[[nodiscard]] that must appear in as specific place on the line.
qcompilerdetection.h:1182:29: error: attribute ignored [-Werror=attributes]
qtestsystem.h:58:12: note: in expansion of macro ‘Q_REQUIRED_RESULT’
static Q_REQUIRED_RESULT bool qWaitFor(Functor predicate, int timeout = 5000)
^~~~~~~~~~~~~~~~~
Change-Id: I0b48fc8e90304e0dacc3fffd14e80ede168d5c6b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestsystem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 04c9c574f7..f22a16decb 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE namespace QTest { template <typename Functor> - static Q_REQUIRED_RESULT bool qWaitFor(Functor predicate, int timeout = 5000) + Q_REQUIRED_RESULT static bool qWaitFor(Functor predicate, int timeout = 5000) { // We should not spint the event loop in case the predicate is already true, // otherwise we might send new events that invalidate the predicate. |