diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-15 14:25:58 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-15 14:25:58 +0300 |
commit | 1b42b9a08e5777fcf0d2578f3ffa05e354e47f9a (patch) | |
tree | 5c7a9c15cbc37925460b8acfb41bdcf995a8dfa2 /launcher/settings | |
parent | 535fb2c4d6af12b5dc8d39770aee8769833a6199 (diff) | |
download | PrismLauncher-1b42b9a08e5777fcf0d2578f3ffa05e354e47f9a.tar.gz PrismLauncher-1b42b9a08e5777fcf0d2578f3ffa05e354e47f9a.tar.bz2 PrismLauncher-1b42b9a08e5777fcf0d2578f3ffa05e354e47f9a.zip |
Fixed tests
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/settings')
-rw-r--r-- | launcher/settings/INIFile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/settings/INIFile.cpp b/launcher/settings/INIFile.cpp index ad600ab9..d16256b9 100644 --- a/launcher/settings/INIFile.cpp +++ b/launcher/settings/INIFile.cpp @@ -98,7 +98,7 @@ QString unescape(QString orig) return out; } -QString unquete(QString str) +QString unquote(QString str) { if ((str.contains(QChar(';')) || str.contains(QChar('=')) || str.contains(QChar(','))) && str.endsWith("\"") && str.startsWith("\"")) { #if QT_VERSION < QT_VERSION_CHECK(6, 5, 0) @@ -138,7 +138,7 @@ bool parseOldFileFormat(QIODevice& device, QSettings::SettingsMap& map) QString key = line.left(eqPos).trimmed(); QString valueStr = line.right(line.length() - eqPos - 1).trimmed(); - valueStr = unquete(unescape(valueStr)); + valueStr = unquote(unescape(valueStr)); QVariant value(valueStr); map.insert(key, value); @@ -174,7 +174,7 @@ bool INIFile::loadFile(QString fileName) if (auto valueStr = _settings_obj.value(key).toString(); (valueStr.contains(QChar(';')) || valueStr.contains(QChar('=')) || valueStr.contains(QChar(','))) && valueStr.endsWith("\"") && valueStr.startsWith("\"")) { - insert(key, unquete(valueStr)); + insert(key, unquote(valueStr)); } else insert(key, _settings_obj.value(key)); } |