summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-14 08:40:45 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-02-15 09:08:16 +0100
commit9b6c288281fc09223067d9f51a350ae1e43aadcd (patch)
treea424e249e1f50f666b88800528decf56798f5f99
parent60a67dc41eb79ed488e8509769a2e2b96bed93bb (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 <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp3
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher_p.h1
-rw-r--r--src/gui/kernel/qevent.cpp5
-rw-r--r--src/gui/kernel/qevent_p.h2
-rw-r--r--src/gui/kernel/qinputdevice.cpp3
-rw-r--r--src/gui/kernel/qinputdevice_p.h1
-rw-r--r--src/gui/kernel/qpaintdevicewindow.cpp6
-rw-r--r--src/gui/kernel/qpaintdevicewindow_p.h3
-rw-r--r--src/gui/kernel/qpointingdevice.cpp3
-rw-r--r--src/gui/kernel/qpointingdevice_p.h1
10 files changed, 28 insertions, 0 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index 358a59d05b..5c94f2de42 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 5679cae076..49462df986 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 5bff8488db..c613b7abc4 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 6b8e3ef337..1c64ec2b57 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 26975f478e..13bd672f3d 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 41150d055d..6baea5cee1 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 ebacc727f9..e5ab691450 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 a16b83689e..8c4c715766 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 &region)
{
Q_UNUSED(region);
diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp
index b6d9421897..e2f17f821c 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 263bc91864..fd6ee40695 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);