The return value of this function is constant and some users call this function often (an earlier version of QGenericItemModel did, possibly QML does?), so memoize the result of the function instead of re-creating the QHash on every call. Use QAbstractItemModelPrivate::defaultRoleNames() so we don't need an instance to get the base class' contents. Add a comment to keep the two in sync. As a drive-by, port from the QByteArrayLiteral macro to _ba UDLs. Amends 32b586864e3a4398da38c045f4ac0823c3dc3c57. Pick-to: 6.8 Change-Id: If00b51e60930c974e6f8f928711dc78ba1f42b93 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit fde232c855d59009503fe6dbaadd10346ab0830a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%