Revert "kdecore: pass the QByteArray object size to the static QString::fromUtf8() constructor"

This reverts commit 6a13ed2c4d.
This commit is contained in:
Ivailo Monev 2022-11-01 00:40:02 +02:00
parent 6a13ed2c4d
commit 53e44caa06

View file

@ -239,7 +239,7 @@ QStringList KConfigPrivate::keyListImpl(const QByteArray& theGroup) const
for (; it != theEnd && it.key().mGroup == theGroup; ++it) {
const KEntryKey& key = it.key();
if (!key.mKey.isNull() && !it->bDeleted)
tmp << QString::fromUtf8(key.mKey, key.mKey.size());
tmp << QString::fromUtf8(key.mKey);
}
keys = tmp.toList();
}
@ -273,9 +273,9 @@ QMap<QString,QString> KConfig::entryMap(const QString& aGroup) const
// with the non-localized entry
if (!theMap.contains(key)) {
if (it->bExpand) {
theMap.insert(key,KShell::envExpand(QString::fromUtf8(it->mValue.constData(), it->mValue.size())));
theMap.insert(key,KShell::envExpand(QString::fromUtf8(it->mValue.constData())));
} else {
theMap.insert(key,QString::fromUtf8(it->mValue.constData(), it->mValue.size()));
theMap.insert(key,QString::fromUtf8(it->mValue.constData()));
}
}
}