diff options
author | Marc Mutz <[email protected]> | 2022-02-14 08:40:45 +0100 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2022-02-15 09:08:16 +0100 |
commit | 9b6c288281fc09223067d9f51a350ae1e43aadcd (patch) | |
tree | a424e249e1f50f666b88800528decf56798f5f99 | |
parent | 60a67dc41eb79ed488e8509769a2e2b96bed93bb (diff) |
De-duplicate vtables, 2022 edition
This de-inlines destuctors of classes whose vtables are proven to be
duplicated even within the set of Qt libraries.
Since these are all private API classes, we can pick all the way back
to 6.2, and we don't need the comment that the dtor must always stay
empty, like for public classes.
As a drive-by, also de-inline the QPaintDeviceWindowPrivate ctor.
That's just code hygiene, it doesn't partake in vtable duplicating.
Pick-to: 6.3 6.2
Task-number: QTBUG-45582
Change-Id: I3477063d6f42edc9a5d352c47900366fd50c3ef6
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Giuseppe D'Angelo <[email protected]>
-rw-r--r-- | src/corelib/kernel/qabstracteventdispatcher.cpp | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qabstracteventdispatcher_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qevent.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qevent_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qinputdevice.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qinputdevice_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qpaintdevicewindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qpaintdevicewindow_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qpointingdevice.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qpointingdevice_p.h | 1 |
10 files changed, 28 insertions, 0 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index 358a59d05b2..5c94f2de423 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -88,6 +88,9 @@ const int QtTimerIdFreeListConstants::Sizes[QtTimerIdFreeListConstants::BlockCou typedef QFreeList<void, QtTimerIdFreeListConstants> QtTimerIdFreeList; Q_GLOBAL_STATIC(QtTimerIdFreeList, timerIdFreeList) +QAbstractEventDispatcherPrivate::~QAbstractEventDispatcherPrivate() + = default; + int QAbstractEventDispatcherPrivate::allocateTimerId() { // This function may be called after timerIdFreeList() has been destructed diff --git a/src/corelib/kernel/qabstracteventdispatcher_p.h b/src/corelib/kernel/qabstracteventdispatcher_p.h index 5679cae076e..49462df9861 100644 --- a/src/corelib/kernel/qabstracteventdispatcher_p.h +++ b/src/corelib/kernel/qabstracteventdispatcher_p.h @@ -64,6 +64,7 @@ class Q_CORE_EXPORT QAbstractEventDispatcherPrivate : public QObjectPrivate public: inline QAbstractEventDispatcherPrivate() { } + ~QAbstractEventDispatcherPrivate() override; QList<QAbstractNativeEventFilter *> eventFilters; diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 5bff8488db1..c613b7abc47 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -4861,6 +4861,9 @@ QApplicationStateChangeEvent::QApplicationStateChangeEvent(Qt::ApplicationState Returns the state of the application. */ +QMutableTouchEvent::~QMutableTouchEvent() + = default; + /*! \internal Add the given \a point. */ @@ -4874,5 +4877,7 @@ void QMutableTouchEvent::addPoint(const QEventPoint &point) } +QMutableSinglePointEvent::~QMutableSinglePointEvent() + = default; QT_END_NAMESPACE diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h index 6b8e3ef3375..1c64ec2b571 100644 --- a/src/gui/kernel/qevent_p.h +++ b/src/gui/kernel/qevent_p.h @@ -68,6 +68,7 @@ public: Qt::KeyboardModifiers modifiers = Qt::NoModifier, const QList<QEventPoint> &touchPoints = QList<QEventPoint>()) : QTouchEvent(eventType, device, modifiers, touchPoints) { } + ~QMutableTouchEvent() override; static QMutableTouchEvent *from(QTouchEvent *e) { return static_cast<QMutableTouchEvent *>(e); } @@ -87,6 +88,7 @@ public: Qt::KeyboardModifiers modifiers = Qt::NoModifier, Qt::MouseEventSource source = Qt::MouseEventSynthesizedByQt) : QSinglePointEvent(type, device, point, button, buttons, modifiers, source) { } + ~QMutableSinglePointEvent() override; static QMutableSinglePointEvent *from(QSinglePointEvent *e) { return static_cast<QMutableSinglePointEvent *>(e); } diff --git a/src/gui/kernel/qinputdevice.cpp b/src/gui/kernel/qinputdevice.cpp index 26975f478e9..13bd672f3d8 100644 --- a/src/gui/kernel/qinputdevice.cpp +++ b/src/gui/kernel/qinputdevice.cpp @@ -329,6 +329,9 @@ const QInputDevice *QInputDevice::primaryKeyboard(const QString& seatName) return ret; } +QInputDevicePrivate::~QInputDevicePrivate() + = default; + /*! \internal Checks whether a matching device is already registered diff --git a/src/gui/kernel/qinputdevice_p.h b/src/gui/kernel/qinputdevice_p.h index 41150d055db..6baea5cee1a 100644 --- a/src/gui/kernel/qinputdevice_p.h +++ b/src/gui/kernel/qinputdevice_p.h @@ -73,6 +73,7 @@ public: if (!systemId) systemId = nextId++; } + ~QInputDevicePrivate() override; QString name; QString seatName; diff --git a/src/gui/kernel/qpaintdevicewindow.cpp b/src/gui/kernel/qpaintdevicewindow.cpp index ebacc727f9e..e5ab6914505 100644 --- a/src/gui/kernel/qpaintdevicewindow.cpp +++ b/src/gui/kernel/qpaintdevicewindow.cpp @@ -44,6 +44,12 @@ QT_BEGIN_NAMESPACE +QPaintDeviceWindowPrivate::QPaintDeviceWindowPrivate() + = default; + +QPaintDeviceWindowPrivate::~QPaintDeviceWindowPrivate() + = default; + /*! \class QPaintDeviceWindow \inmodule QtGui diff --git a/src/gui/kernel/qpaintdevicewindow_p.h b/src/gui/kernel/qpaintdevicewindow_p.h index a16b83689e8..8c4c715766c 100644 --- a/src/gui/kernel/qpaintdevicewindow_p.h +++ b/src/gui/kernel/qpaintdevicewindow_p.h @@ -64,6 +64,9 @@ class Q_GUI_EXPORT QPaintDeviceWindowPrivate : public QWindowPrivate Q_DECLARE_PUBLIC(QPaintDeviceWindow) public: + QPaintDeviceWindowPrivate(); + ~QPaintDeviceWindowPrivate() override; + virtual void beginPaint(const QRegion ®ion) { Q_UNUSED(region); diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp index b6d94218972..e2f17f821c0 100644 --- a/src/gui/kernel/qpointingdevice.cpp +++ b/src/gui/kernel/qpointingdevice.cpp @@ -316,6 +316,9 @@ const QPointingDevice *QPointingDevice::primaryPointingDevice(const QString& sea return touchpad; } +QPointingDevicePrivate::~QPointingDevicePrivate() + = default; + /*! \internal Finds the device instance belonging to the drawing or eraser end of a particular stylus, diff --git a/src/gui/kernel/qpointingdevice_p.h b/src/gui/kernel/qpointingdevice_p.h index 263bc918647..fd6ee406956 100644 --- a/src/gui/kernel/qpointingdevice_p.h +++ b/src/gui/kernel/qpointingdevice_p.h @@ -79,6 +79,7 @@ public: pointingDeviceType = true; activePoints.reserve(maxPoints); } + ~QPointingDevicePrivate() override; void sendTouchCancelEvent(QTouchEvent *cancelEvent); |