invokeMethod: std::forward universal-ref argument

Spotted in API review

Change-Id: I4ab660bb9955176f40b4123e775d65c17edbeeb8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 99da7c23c3ef8b2525fc570180da017589e840f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Mårten Nordheim 2024-01-16 15:10:18 +01:00 committed by Qt Cherry-pick Bot
parent f1bd8bcaba
commit 590e1c9cdb

View File

@ -620,7 +620,7 @@ private:
ExpectedArguments>::value,
"Incompatible arguments");
auto h = QtPrivate::invokeMethodHelper(ret, args...);
auto h = QtPrivate::invokeMethodHelper(ret, std::forward<Args>(args)...);
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
auto callable = new QtPrivate::QCallableObject<std::decay_t<Func>, ActualArguments,