diff options
author | hjk <hjk@qt.io> | 2022-06-09 13:08:25 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-06-16 08:25:23 +0200 |
commit | 903a883044165b8f40f500684c437f4102031425 (patch) | |
tree | ada4ca63324ca2cae0d93580cd0619314e6b178a /src/corelib/io | |
parent | 4912903e37b6739d05d4d4acf405470c541199e1 (diff) |
QSettings: Fix reading of the [%General] section
The currentSection key was accidentally using the whole remaining
section contents.
Pick-to: 6.4
Change-Id: Iec6e38636e519170eef136401ede4b626e12754a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/io')
-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 100c3efa94..60622e3aaa 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); |