From a3d55917068c99fc343ad4163be2ed52d25fc691 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 24 Aug 2020 07:29:22 +0200 Subject: 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. --- src/core/kconfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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('_'))) { -- cgit v1.2.1