diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-10 18:48:17 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-31 01:52:25 +0300 |
commit | b902b152af0bf144c9c9833502e1dcfae0166620 (patch) | |
tree | f0b4c7d96fd59ce9f8136aaa8b4b762daafea719 /src/corelib/kernel/qobject.h | |
parent | e8e9c287ec6a086a96b36e692ab6d5ed11b64951 (diff) |
QObject: replace _q_reregisterTimers with a lambda
- Pass the QList by value, no heap allocation and no plain new/delete
- A lambda means that there isn't runtime string-based lookup to find
the member method in QObjectPrivate
The code is only a couple of lines and used in a single place, so might
as well move the code from _q_reregisterTimers to the local lambda.
Modify tst_moc to account for the numer of methods in QObjectPrivate
changing. The test had hardcoded numbers.
Change-Id: I07906fc7138b8e601e4695f8d2de1b5fdd88449c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r-- | src/corelib/kernel/qobject.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 88ba5318a1..eb99504647 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -353,7 +353,6 @@ private: bool doSetProperty(const char *name, const QVariant *lvalue, QVariant *rvalue); Q_DISABLE_COPY(QObject) - Q_PRIVATE_SLOT(d_func(), void _q_reregisterTimers(void *)) private: static QMetaObject::Connection connectImpl(const QObject *sender, void **signal, |