diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-21 20:24:09 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-23 01:22:06 +0300 |
commit | 794e0d1ac6b99c9398e4802b4f9e60012dcf055d (patch) | |
tree | 47128e81546e679a5cf55545313dc6f00de1038b /src/corelib/kernel/qtimer.h | |
parent | 9bc43ba1c69076a4107dd537e269a026c7177384 (diff) |
QTimer: fix API docs of callOnTimeOut overload
It actually takes one parameter, because in this overload the connection
type can't be specified, for example:
QTimer timer;
timer.callOnTimeout([]() { qDebug() << "slot"; });
The call chain is:
QObject::connect(timer, &QTimer::timeout, functor);
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 &&slot)
connect(sender, signal, sender, std::forward<Func2>(slot), Qt::DirectConnection);
the connection type is always DirectConnection.
Spotted by Giuseppe in code review.
Pick-to: 6.6 6.5 5.15
Change-Id: Ia8bbd91e98a357244cbfae4e3ed63d4c73038fa2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/kernel/qtimer.h')
-rw-r--r-- | src/corelib/kernel/qtimer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index e77db27049..b01cfdec9a 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -89,7 +89,7 @@ public: #ifdef Q_QDOC template <typename Functor> - QMetaObject::Connection callOnTimeout(Functor &&slot, Qt::ConnectionType connectionType = Qt::AutoConnection); + QMetaObject::Connection callOnTimeout(Functor &&slot); template <typename Functor> QMetaObject::Connection callOnTimeout(const QObject *context, Functor &&slot, Qt::ConnectionType connectionType = Qt::AutoConnection); #else |