mirror of https://github.com/qt/qtbase.git
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:
parent
eac892dea9
commit
e3d5dc3fc7
|
@ -1084,6 +1084,11 @@ void QRangeModel::setRoleNames(const QHash<int, QByteArray> &names)
|
|||
Q_EMIT roleNamesChanged();
|
||||
}
|
||||
|
||||
void QRangeModel::resetRoleNames()
|
||||
{
|
||||
setRoleNames({});
|
||||
}
|
||||
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue