From 9fcbef15f662cffb134925dc449ae8586cad44e4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Sep 2017 17:00:22 -0700 Subject: Fix build: move Q_REQUIRED_RESULT to the right position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/testlib/qtestsystem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testlib') 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 - 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. -- cgit v1.2.3