QRM: make implementation of resetRoleNames out of line

No reason to be inline, so avoid that we pay the compile-time and code
generation cost at each call site.

Address header review.

Pick-to: 6.10
Change-Id: I2f21b26519f8b8b1ce390533031dee95db205a20
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Volker Hilsheimer 2025-09-03 08:02:44 +03:00
parent eac892dea9
commit e3d5dc3fc7
2 changed files with 6 additions and 1 deletions

View File

@ -1084,6 +1084,11 @@ void QRangeModel::setRoleNames(const QHash<int, QByteArray> &names)
Q_EMIT roleNamesChanged();
}
void QRangeModel::resetRoleNames()
{
setRoleNames({});
}
/*!
\reimp
*/

View File

@ -76,7 +76,7 @@ public:
QHash<int, QByteArray> roleNames() const override;
void setRoleNames(const QHash<int, QByteArray> &names);
void resetRoleNames() { setRoleNames({}); }
void resetRoleNames();
bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent) override;