const'ify
svn path=/trunk/KDE/kdebase/runtime/; revision=1190586
This commit is contained in:
parent
a84b230ddc
commit
337cd237f1
@ -182,13 +182,13 @@ void InternalDataModel::setItems(const QVariantList &list)
|
|||||||
m_roleIds.clear();
|
m_roleIds.clear();
|
||||||
|
|
||||||
if (list.first().canConvert<QVariantHash>()) {
|
if (list.first().canConvert<QVariantHash>()) {
|
||||||
foreach (QString roleName, list.first().value<QVariantHash>().keys()) {
|
foreach (const QString& roleName, list.first().value<QVariantHash>().keys()) {
|
||||||
++role;
|
++role;
|
||||||
m_roleNames[role] = roleName.toLatin1();
|
m_roleNames[role] = roleName.toLatin1();
|
||||||
m_roleIds[roleName] = role;
|
m_roleIds[roleName] = role;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach (QString roleName, list.first().value<QVariantMap>().keys()) {
|
foreach (const QString& roleName, list.first().value<QVariantMap>().keys()) {
|
||||||
++role;
|
++role;
|
||||||
m_roleNames[role] = roleName.toLatin1();
|
m_roleNames[role] = roleName.toLatin1();
|
||||||
m_roleIds[roleName] = role;
|
m_roleIds[roleName] = role;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user