diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2021-05-03 01:49:43 +0200 | 
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2021-05-09 07:50:25 +0000 | 
| commit | 2e8742e64fc02477296335c39b0485895321855b (patch) | |
| tree | 3aab8862899b9805bd8261a6e14c52d86118d15d /src/core | |
| parent | f3e8853abf53a80cbe7d7a0de21070505b1ee5fb (diff) | |
| download | kconfig-2e8742e64fc02477296335c39b0485895321855b.tar.gz kconfig-2e8742e64fc02477296335c39b0485895321855b.tar.bz2  | |
Revert QStringView port
QStringView has some bits of API that were only added in 5.15.2, whereas KF
requires 5.15.0.
This reverts commit 1780fb2a237af80ddc1f9cfb70cb892b53b91990.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/kconfig.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 8118ea51..cc3700e1 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -174,21 +174,21 @@ QString KConfigPrivate::expandString(const QString &value)      int nDollarPos = aValue.indexOf(QLatin1Char('$'));      while (nDollarPos != -1 && nDollarPos + 1 < aValue.length()) {          // there is at least one $ -        if (aValue.at(nDollarPos + 1) != QLatin1Char('$')) { +        if (aValue[nDollarPos + 1] != QLatin1Char('$')) {              int nEndPos = nDollarPos + 1;              // the next character is not $ -            QStringView aVarName; -            if (aValue.at(nEndPos) == QLatin1Char('{')) { +            QStringRef aVarName; +            if (aValue[nEndPos] == QLatin1Char('{')) {                  while ((nEndPos <= aValue.length()) && (aValue[nEndPos] != QLatin1Char('}'))) {                      ++nEndPos;                  }                  ++nEndPos; -                aVarName = QStringView(aValue).mid(nDollarPos + 2, nEndPos - nDollarPos - 3); +                aVarName = aValue.midRef(nDollarPos + 2, nEndPos - nDollarPos - 3);              } else {                  while (nEndPos < aValue.length() && (aValue[nEndPos].isNumber() || aValue[nEndPos].isLetter() || aValue[nEndPos] == QLatin1Char('_'))) {                      ++nEndPos;                  } -                aVarName = QStringView(aValue).mid(nDollarPos + 1, nEndPos - nDollarPos - 1); +                aVarName = aValue.midRef(nDollarPos + 1, nEndPos - nDollarPos - 1);              }              QString env;              if (!aVarName.isEmpty()) {  | 
