diff options
author | Friedrich W. H. Kossebau <kossebau@kde.org> | 2021-11-14 19:26:34 +0100 |
---|---|---|
committer | Friedrich W. H. Kossebau <kossebau@kde.org> | 2021-11-14 19:26:34 +0100 |
commit | c3be6d02f6c061707c6d93e06889a2e56b994d87 (patch) | |
tree | 413f81904db72616b064923c6a6d1fa021675af4 /src/core/kcoreconfigskeleton.cpp | |
parent | 473a9137db305ea69cb4b40f23ed679c90c4b475 (diff) | |
download | kconfig-c3be6d02f6c061707c6d93e06889a2e56b994d87.tar.gz kconfig-c3be6d02f6c061707c6d93e06889a2e56b994d87.tar.bz2 |
Avoid some allocations by QString/QByteArray's toLower()
NO_CHANGELOG
Diffstat (limited to 'src/core/kcoreconfigskeleton.cpp')
-rw-r--r-- | src/core/kcoreconfigskeleton.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp index f8097055..030039fc 100644 --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -608,10 +608,10 @@ void KCoreConfigSkeleton::ItemEnum::readConfig(KConfig *config) } else { int i = 0; mReference = -1; - QString tmp = cg.readEntry(mKey, QString()).toLower(); + const QString entryString = cg.readEntry(mKey, QString()); for (auto it = mChoices.cbegin(); it != mChoices.cend(); ++it, ++i) { QString choiceName = (*it).name; - if (valueForChoice(choiceName).toLower() == tmp) { + if (valueForChoice(choiceName).compare(entryString, Qt::CaseInsensitive) == 0) { mReference = i; break; } |