QtCore: De-duplicate vtables, 2024 edition
This de-inlines destuctors of classes whose vtables are proven to be duplicated by -Wweak-tables using the upcoming headersclean for _p.h feature. 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. Task-number: QTBUG-45582 Task-number: QTBUG-126219 Pick-to: 6.8 Change-Id: I8c864c0d2ed3ca20d20d5cfc356290eb529edf6c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
81d55f7728
commit
3af20bd8eb
@ -58,6 +58,9 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
QPropertyAnimationPrivate::~QPropertyAnimationPrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
void QPropertyAnimationPrivate::updateMetaProperty()
|
void QPropertyAnimationPrivate::updateMetaProperty()
|
||||||
{
|
{
|
||||||
const QObject *target = targetObject.valueBypassingBindings();
|
const QObject *target = targetObject.valueBypassingBindings();
|
||||||
|
@ -29,6 +29,7 @@ class QPropertyAnimationPrivate : public QVariantAnimationPrivate
|
|||||||
Q_DECLARE_PUBLIC(QPropertyAnimation)
|
Q_DECLARE_PUBLIC(QPropertyAnimation)
|
||||||
public:
|
public:
|
||||||
QPropertyAnimationPrivate() : propertyType(0), propertyIndex(-1) { }
|
QPropertyAnimationPrivate() : propertyType(0), propertyIndex(-1) { }
|
||||||
|
~QPropertyAnimationPrivate() override;
|
||||||
|
|
||||||
void setTargetObjectForwarder(QObject *target) { q_func()->setTargetObject(target); }
|
void setTargetObjectForwarder(QObject *target) { q_func()->setTargetObject(target); }
|
||||||
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QPropertyAnimationPrivate, QObject *, targetObject,
|
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QPropertyAnimationPrivate, QObject *, targetObject,
|
||||||
|
@ -152,6 +152,9 @@ template<> Q_INLINE_TEMPLATE QLineF _q_interpolate(const QLineF &f, const QLineF
|
|||||||
QVariantAnimationPrivate::QVariantAnimationPrivate() : duration(250), interpolator(&defaultInterpolator)
|
QVariantAnimationPrivate::QVariantAnimationPrivate() : duration(250), interpolator(&defaultInterpolator)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
QVariantAnimationPrivate::~QVariantAnimationPrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
void QVariantAnimationPrivate::convertValues(int t)
|
void QVariantAnimationPrivate::convertValues(int t)
|
||||||
{
|
{
|
||||||
auto type = QMetaType(t);
|
auto type = QMetaType(t);
|
||||||
|
@ -34,6 +34,7 @@ class QVariantAnimationPrivate : public QAbstractAnimationPrivate
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
QVariantAnimationPrivate();
|
QVariantAnimationPrivate();
|
||||||
|
~QVariantAnimationPrivate() override;
|
||||||
|
|
||||||
static QVariantAnimationPrivate *get(QVariantAnimation *q)
|
static QVariantAnimationPrivate *get(QVariantAnimation *q)
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,9 @@ static QString appendSlashIfNeeded(const QString &path)
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QAbstractFileEnginePrivate::~QAbstractFileEnginePrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QAbstractFileEngineHandler
|
\class QAbstractFileEngineHandler
|
||||||
\inmodule QtCore
|
\inmodule QtCore
|
||||||
|
@ -246,7 +246,7 @@ public:
|
|||||||
: fileError(QFile::UnspecifiedError), q_ptr(q)
|
: fileError(QFile::UnspecifiedError), q_ptr(q)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
inline virtual ~QAbstractFileEnginePrivate() { }
|
virtual ~QAbstractFileEnginePrivate();
|
||||||
|
|
||||||
QFile::FileError fileError;
|
QFile::FileError fileError;
|
||||||
QString errorString;
|
QString errorString;
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
QIdentityProxyModelPrivate::~QIdentityProxyModelPrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 4.8
|
\since 4.8
|
||||||
\class QIdentityProxyModel
|
\class QIdentityProxyModel
|
||||||
|
@ -29,6 +29,7 @@ public:
|
|||||||
QIdentityProxyModelPrivate()
|
QIdentityProxyModelPrivate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
~QIdentityProxyModelPrivate() override;
|
||||||
|
|
||||||
QList<QPersistentModelIndex> layoutChangePersistentIndexes;
|
QList<QPersistentModelIndex> layoutChangePersistentIndexes;
|
||||||
QModelIndexList proxyIndexes;
|
QModelIndexList proxyIndexes;
|
||||||
|
@ -592,6 +592,8 @@ void QItemSelection::split(const QItemSelectionRange &range,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QItemSelectionModelPrivate::~QItemSelectionModelPrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
void QItemSelectionModelPrivate::initModel(QAbstractItemModel *m)
|
void QItemSelectionModelPrivate::initModel(QAbstractItemModel *m)
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,7 @@ public:
|
|||||||
QItemSelectionModelPrivate()
|
QItemSelectionModelPrivate()
|
||||||
: currentCommand(QItemSelectionModel::NoUpdate),
|
: currentCommand(QItemSelectionModel::NoUpdate),
|
||||||
tableSelected(false), tableColCount(0), tableRowCount(0) {}
|
tableSelected(false), tableColCount(0), tableRowCount(0) {}
|
||||||
|
~QItemSelectionModelPrivate() override;
|
||||||
|
|
||||||
QItemSelection expandSelection(const QItemSelection &selection,
|
QItemSelection expandSelection(const QItemSelection &selection,
|
||||||
QItemSelectionModel::SelectionFlags command) const;
|
QItemSelectionModel::SelectionFlags command) const;
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
QEventLoopPrivate::~QEventLoopPrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QEventLoop
|
\class QEventLoop
|
||||||
\inmodule QtCore
|
\inmodule QtCore
|
||||||
|
@ -30,6 +30,7 @@ public:
|
|||||||
returnCode.storeRelaxed(-1);
|
returnCode.storeRelaxed(-1);
|
||||||
exit.storeRelaxed(true);
|
exit.storeRelaxed(true);
|
||||||
}
|
}
|
||||||
|
~QEventLoopPrivate() override;
|
||||||
|
|
||||||
QAtomicInt quitLockRef;
|
QAtomicInt quitLockRef;
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@ using namespace std::chrono_literals;
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
QTimerPrivate::~QTimerPrivate()
|
||||||
|
= default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QTimer
|
\class QTimer
|
||||||
\inmodule QtCore
|
\inmodule QtCore
|
||||||
|
@ -35,6 +35,7 @@ public:
|
|||||||
{
|
{
|
||||||
intervalDuration.notify();
|
intervalDuration.notify();
|
||||||
}
|
}
|
||||||
|
~QTimerPrivate() override;
|
||||||
|
|
||||||
static constexpr int INV_TIMER = -1; // invalid timer id
|
static constexpr int INV_TIMER = -1; // invalid timer id
|
||||||
|
|
||||||
|
@ -57,6 +57,9 @@ static const char matchMaskAttributeC[] = "mask";
|
|||||||
\sa QMimeTypeParser
|
\sa QMimeTypeParser
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
QMimeTypeParser::~QMimeTypeParser()
|
||||||
|
= default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QMimeTypeParserBase
|
\class QMimeTypeParserBase
|
||||||
\inmodule QtCore
|
\inmodule QtCore
|
||||||
@ -69,6 +72,9 @@ static const char matchMaskAttributeC[] = "mask";
|
|||||||
\sa QMimeTypeParser
|
\sa QMimeTypeParser
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
QMimeTypeParserBase::~QMimeTypeParserBase()
|
||||||
|
= default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QMimeTypeParserBase::process(const QMimeType &t, QString *errorMessage) = 0;
|
\fn virtual bool QMimeTypeParserBase::process(const QMimeType &t, QString *errorMessage) = 0;
|
||||||
Overwrite to process the sequence of parsed data
|
Overwrite to process the sequence of parsed data
|
||||||
|
@ -47,7 +47,7 @@ class QMimeTypeParserBase
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
QMimeTypeParserBase() {}
|
QMimeTypeParserBase() {}
|
||||||
virtual ~QMimeTypeParserBase() {}
|
virtual ~QMimeTypeParserBase();
|
||||||
|
|
||||||
bool parse(QIODevice *dev, const QString &fileName, QString *errorMessage);
|
bool parse(QIODevice *dev, const QString &fileName, QString *errorMessage);
|
||||||
|
|
||||||
@ -86,6 +86,7 @@ class QMimeTypeParser : public QMimeTypeParserBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit QMimeTypeParser(QMimeXMLProvider &provider) : m_provider(provider) {}
|
explicit QMimeTypeParser(QMimeXMLProvider &provider) : m_provider(provider) {}
|
||||||
|
~QMimeTypeParser() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline bool process(const QMimeTypeXMLData &t, QString *) override
|
inline bool process(const QMimeTypeXMLData &t, QString *) override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user