De-inline dtors of QAbstractEventDispatcherPrivate subclasses

... pinning the vtables to a single TU each, instead of duplicating
them for every user.

Task-number: QTBUG-45582
Change-Id: I3b7bce14567dc8be89795a48f6871eb24fe908aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 2e2f5093912faf612f0be72289180b167d6326a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-09-20 14:15:48 +02:00 committed by Qt Cherry-pick Bot
parent 94dab5c628
commit 729a30a9df
6 changed files with 13 additions and 0 deletions

View File

@ -322,6 +322,9 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
g_source_attach(&idleTimerSource->source, mainContext);
}
QEventDispatcherGlibPrivate::~QEventDispatcherGlibPrivate()
= default;
void QEventDispatcherGlibPrivate::runTimersOnceWithNormalPriority()
{
timerSource->runWithIdlePriority = false;

View File

@ -65,6 +65,8 @@ class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatche
public:
QEventDispatcherGlibPrivate(GMainContext *context = nullptr);
~QEventDispatcherGlibPrivate() override;
GMainContext *mainContext;
GPostEventSource *postEventSource;
GSocketNotifierSource *socketNotifierSource;

View File

@ -63,6 +63,8 @@ QPAEventDispatcherGlibPrivate::QPAEventDispatcherGlibPrivate(GMainContext *conte
g_source_attach(&userEventSource->source, mainContext);
}
QPAEventDispatcherGlibPrivate::~QPAEventDispatcherGlibPrivate()
= default;
QPAEventDispatcherGlib::QPAEventDispatcherGlib(QObject *parent)
: QEventDispatcherGlib(*new QPAEventDispatcherGlibPrivate, parent)

View File

@ -43,6 +43,8 @@ class QPAEventDispatcherGlibPrivate : public QEventDispatcherGlibPrivate
Q_DECLARE_PUBLIC(QPAEventDispatcherGlib)
public:
QPAEventDispatcherGlibPrivate(GMainContext *context = nullptr);
~QPAEventDispatcherGlibPrivate() override;
GUserEventSource *userEventSource;
};

View File

@ -110,6 +110,7 @@ class QCocoaEventDispatcherPrivate : public QAbstractEventDispatcherPrivate
public:
QCocoaEventDispatcherPrivate();
~QCocoaEventDispatcherPrivate() override;
uint processEventsFlags;

View File

@ -796,6 +796,9 @@ QCocoaEventDispatcherPrivate::QCocoaEventDispatcherPrivate()
{
}
QCocoaEventDispatcherPrivate::~QCocoaEventDispatcherPrivate()
= default;
void qt_mac_maybeCancelWaitForMoreEventsForwarder(QAbstractEventDispatcher *eventDispatcher)
{
static_cast<QCocoaEventDispatcher *>(eventDispatcher)->d_func()->maybeCancelWaitForMoreEvents();