aboutsummaryrefslogtreecommitdiff
path: root/src/core/kconfig.cpp
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2020-08-24 07:29:22 +0200
committerLaurent Montel <montel@kde.org>2020-08-24 07:29:22 +0200
commita3d55917068c99fc343ad4163be2ed52d25fc691 (patch)
treeea836353ae1cd0574f855aa8506cc2cdd88a3509 /src/core/kconfig.cpp
parent9574fe42b6a93ebbc116d0fc2bd0a962af0dd020 (diff)
downloadkconfig-a3d55917068c99fc343ad4163be2ed52d25fc691.tar.gz
kconfig-a3d55917068c99fc343ad4163be2ed52d25fc691.tar.bz2
Fix qt warning:
"QtPrivate::DeprecatedRefClassBehavior::warn|?libKF5ConfigCore.so.5?|?libKF5ConfigCore.so.5? Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt." We try to access to an invalid index.
Diffstat (limited to 'src/core/kconfig.cpp')
-rw-r--r--src/core/kconfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp
index d9232fa5..19e82ffe 100644
--- a/src/core/kconfig.cpp
+++ b/src/core/kconfig.cpp
@@ -190,7 +190,7 @@ QString KConfigPrivate::expandString(const QString &value)
nEndPos++;
aVarName = aValue.midRef(nDollarPos + 2, nEndPos - nDollarPos - 3);
} else {
- while (nEndPos <= aValue.length() &&
+ while (nEndPos < aValue.length() &&
(aValue[nEndPos].isNumber() ||
aValue[nEndPos].isLetter() ||
aValue[nEndPos] == QLatin1Char('_'))) {