From dabfdb5f2dd8a9889b44c3922ec6fcb128c0cbd6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 28 Jun 2024 10:18:20 +0200 Subject: [PATCH] QSingleShotTimer: de-inline [4/4]: clean up includes Include what you need, don't rely on transitive includes. Forward-declare what you need in-name-only. Also port the one unchanged include in the header (qabstracteventdispatcher.h) to idiomatic form. It's an unrelated change, but it looked so lost among the QtCore/ headers, I felt pity. Amends e0573e73645c0f57e46332a94160e28eb6c8ebac. Change-Id: I4f25df7465f08378bc4e003bde12c28f4d231f14 Reviewed-by: Ahmad Samir (cherry picked from commit 49d5b0a5a10634841122bbbc5e986ce307e7017a) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qsingleshottimer.cpp | 3 --- src/corelib/kernel/qsingleshottimer_p.h | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/corelib/kernel/qsingleshottimer.cpp b/src/corelib/kernel/qsingleshottimer.cpp index ee2b2dc3807..aafb5960776 100644 --- a/src/corelib/kernel/qsingleshottimer.cpp +++ b/src/corelib/kernel/qsingleshottimer.cpp @@ -4,13 +4,10 @@ #include -#include "qabstracteventdispatcher.h" #include "qcoreapplication.h" #include "qmetaobject_p.h" #include "private/qnumeric_p.h" -#include - QT_BEGIN_NAMESPACE QSingleShotTimer::QSingleShotTimer(Duration interval, Qt::TimerType timerType, diff --git a/src/corelib/kernel/qsingleshottimer_p.h b/src/corelib/kernel/qsingleshottimer_p.h index 800936a30de..9a7ad2ed298 100644 --- a/src/corelib/kernel/qsingleshottimer_p.h +++ b/src/corelib/kernel/qsingleshottimer_p.h @@ -16,12 +16,16 @@ // We mean it. // -#include "qabstracteventdispatcher.h" -#include "qcoreapplication.h" -#include "qmetaobject_p.h" +#include +#include +#include QT_BEGIN_NAMESPACE +namespace QtPrivate { +class QSlotObjectBase; +} + class QSingleShotTimer : public QObject { Q_OBJECT