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>
This commit is contained in:
parent
60a67dc41e
commit
9b6c288281
@ -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
|
||||
|
@ -64,6 +64,7 @@ class Q_CORE_EXPORT QAbstractEventDispatcherPrivate : public QObjectPrivate
|
||||
public:
|
||||
inline QAbstractEventDispatcherPrivate()
|
||||
{ }
|
||||
~QAbstractEventDispatcherPrivate() override;
|
||||
|
||||
QList<QAbstractNativeEventFilter *> eventFilters;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
if (!systemId)
|
||||
systemId = nextId++;
|
||||
}
|
||||
~QInputDevicePrivate() override;
|
||||
|
||||
QString name;
|
||||
QString seatName;
|
||||
|
@ -44,6 +44,12 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QPaintDeviceWindowPrivate::QPaintDeviceWindowPrivate()
|
||||
= default;
|
||||
|
||||
QPaintDeviceWindowPrivate::~QPaintDeviceWindowPrivate()
|
||||
= default;
|
||||
|
||||
/*!
|
||||
\class QPaintDeviceWindow
|
||||
\inmodule QtGui
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
pointingDeviceType = true;
|
||||
activePoints.reserve(maxPoints);
|
||||
}
|
||||
~QPointingDevicePrivate() override;
|
||||
|
||||
void sendTouchCancelEvent(QTouchEvent *cancelEvent);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user