From fe92b080658f0d8609e2a2a69e5ec2b51dd7bf9d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 1 Aug 2022 11:12:20 -0700 Subject: QMetaObject: add a new, variadic invoke/invokeMethod/newInstance [ChangeLog][QtCore][Meta Objects] The QMetaObject::invokeMethod() taking a method name by string, QMetaObject::newInstance(), and QMetaMethod::invoke() now support more than 10 arguments. [ChangeLog][QtCore][Meta Objects] The use of the Q_ARG and Q_RETURN_ARG macros is now optional with QMetaObject::invokeMethod(), QMetaObject::newInstance(), and QMetaMethod::invoke(): the type name will be obtained from the C++ type (the same as QMetaType). The function qReturnArg() can be used in place of the Q_RETURN_ARG macro. The macros are still useful in rare conditions where the type was typedef'ed from its original name. Change-Id: I36b24183fbd041179f2ffffd17022a2b48c7639b Reviewed-by: Volker Hilsheimer --- tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/global/qlogging') diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index df0cb5ae77..be27ab65b9 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -732,12 +732,12 @@ void tst_qmessagehandler::qMessagePattern_data() // Q_OBJECT macro hence the ?helper? frame "[MyClass::myFunction|MyClass::mySlot1|?" BACKTRACE_HELPER_NAME "?|", - // QMetaObject::invokeMethod calls internal function + // QMetaObject::invokeMethodImpl calls internal function // (QMetaMethodPrivate::invokeImpl, at the tims of this writing), which // will usually show only as ?libQt6Core.so? or equivalent, so we skip // end of backtrace, actual message - "|" QT_NAMESPACE_STR "QMetaObject::invokeMethod] from_a_function 34" + "|" QT_NAMESPACE_STR "QMetaObject::invokeMethodImpl] from_a_function 34" }; QTest::newRow("backtrace") << "[%{backtrace}] %{message}" << true << expectedBacktrace; #endif -- cgit v1.2.3