diff options
author | hjk <hjk@qt.io> | 2022-06-09 13:08:25 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-06-16 22:39:25 +0000 |
commit | e0aa72c32d9547dde558c6f5cbac32a377feb9da (patch) | |
tree | d0e9c8b57bfde1d8a745c4c9eed784b9c3d3500b /src/corelib | |
parent | 34a130a2da2984752a84869d20b7ffb19012836b (diff) |
QSettings: Fix reading of the [%General] section
The currentSection key was accidentally using the whole remaining
section contents.
Change-Id: Iec6e38636e519170eef136401ede4b626e12754a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 903a883044165b8f40f500684c437f4102031425)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qsettings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 7e5d40108d..aa4197bfef 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -1631,7 +1631,7 @@ bool QConfFileSettingsPrivate::readIniFile(QByteArrayView data, currentSection.clear(); } else { if (iniSection.compare("%general", Qt::CaseInsensitive) == 0) { - currentSection = QLatin1StringView(iniSection.constData() + 1); + currentSection = QLatin1StringView(iniSection.constData() + 1, iniSection.size() - 1); } else { currentSection.clear(); iniUnescapedKey(iniSection, currentSection); |