diff --git a/libs/utils/qad_types.h b/libs/utils/qad_types.h index 8749bf8..047640c 100644 --- a/libs/utils/qad_types.h +++ b/libs/utils/qad_types.h @@ -347,10 +347,13 @@ T qDeserialize(const QByteArray & data, int version = -1) { /// qCallQueued(this, &MyClass::myFuncWithIntAndString, 0xAB, "string"); template void qCallQueued(O * o, F f, Args... args) { - QMetaObject::invokeMethod( - o, - [o, f, args...]() { (o->*f)(args...); }, - Qt::QueuedConnection); + QMetaObject::invokeMethod(o, [o, f, args...]() { (o->*f)(args...); }, Qt::QueuedConnection); +} + +/// qCallQueued with lambda +template +void qCallQueuedL(O * o, L func) { + QMetaObject::invokeMethod(o, [func] { func(); }, Qt::QueuedConnection); }