From b174be2247773cd9a76700b0936da8c82740c36e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 28 Jun 2024 10:18:20 +0200 Subject: [PATCH] QSingleShotTimer: de-inline [2/4]: clean up header Remove the inline keyword. As a drive-by, mark the ctors explicit and the dtor override, and sort the SMFs idiomatically (dtor _after_ ctors). Amends e0573e73645c0f57e46332a94160e28eb6c8ebac. Change-Id: I2496360e1f72a4ab54a7c090ca966e1c4828a314 Reviewed-by: Ahmad Samir (cherry picked from commit b05022e8473d5517f0a8b0c8c4d5dff6e31c5a97) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qsingleshottimer_p.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/corelib/kernel/qsingleshottimer_p.h b/src/corelib/kernel/qsingleshottimer_p.h index 44d00252db9..11354e0b9e5 100644 --- a/src/corelib/kernel/qsingleshottimer_p.h +++ b/src/corelib/kernel/qsingleshottimer_p.h @@ -31,19 +31,18 @@ class QSingleShotTimer : public QObject Qt::TimerId timerId = Qt::TimerId::Invalid; -#define inline public: // use the same duration type using Duration = QAbstractEventDispatcher::Duration; - inline ~QSingleShotTimer(); - inline QSingleShotTimer(Duration interval, Qt::TimerType timerType, - const QObject *r, const char *member); - inline QSingleShotTimer(Duration interval, Qt::TimerType timerType, - const QObject *r, QtPrivate::QSlotObjectBase *slotObj); + explicit QSingleShotTimer(Duration interval, Qt::TimerType timerType, + const QObject *r, const char *member); + explicit QSingleShotTimer(Duration interval, Qt::TimerType timerType, + const QObject *r, QtPrivate::QSlotObjectBase *slotObj); + ~QSingleShotTimer() override; - inline void startTimerForReceiver(Duration interval, Qt::TimerType timerType, - const QObject *receiver); + void startTimerForReceiver(Duration interval, Qt::TimerType timerType, + const QObject *receiver); static Duration fromMsecs(std::chrono::milliseconds ms) { @@ -63,8 +62,7 @@ Q_SIGNALS: void timeout(); private: - inline void timerEvent(QTimerEvent *) override; -#undef inline + void timerEvent(QTimerEvent *) override; }; QT_END_NAMESPACE