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 <edward.welbourne@qt.io>
(cherry picked from commit 8e504bfeb7872e6d604cd19719f84a5794091386)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-03-08 13:03:06 +01:00 committed by Qt Cherry-pick Bot
parent 11b2047d4c
commit b17025e889

View File

@ -52,7 +52,7 @@ qWaitFor(Functor predicate, QDeadlineTimer deadline = QDeadlineTimer(std::chrono
}
template <typename Functor>
[[nodiscard]] static bool qWaitFor(Functor predicate, int timeout)
[[nodiscard]] bool qWaitFor(Functor predicate, int timeout)
{
return qWaitFor(predicate, QDeadlineTimer{timeout, Qt::PreciseTimer});
}