From b17025e8895161936672c08ee7e7c24f53020269 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 8 Mar 2024 13:03:06 +0100 Subject: [PATCH] QTest::qWaitFor(., int): remove superfluous static keyword The static keyword prevents the linker from reusing the executable code of one TU's instantiation of this function in other TUs. There's no reason for this restriction, so remove it. Amends 292cb12e024e63f17c501611e021b6f8da7d6dcc. Change-Id: Ide60ce0bf4b7118295fad98a25bd438fc1da2039 Reviewed-by: Edward Welbourne (cherry picked from commit 8e504bfeb7872e6d604cd19719f84a5794091386) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qtestsupport_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qtestsupport_core.h b/src/corelib/kernel/qtestsupport_core.h index 1de17a6b2e6..27265903afe 100644 --- a/src/corelib/kernel/qtestsupport_core.h +++ b/src/corelib/kernel/qtestsupport_core.h @@ -52,7 +52,7 @@ qWaitFor(Functor predicate, QDeadlineTimer deadline = QDeadlineTimer(std::chrono } template -[[nodiscard]] static bool qWaitFor(Functor predicate, int timeout) +[[nodiscard]] bool qWaitFor(Functor predicate, int timeout) { return qWaitFor(predicate, QDeadlineTimer{timeout, Qt::PreciseTimer}); }