mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Merge branch 'cifileprofiles' into 'master'
Compare content files and archives case insensitively when matching existing profiles See merge request OpenMW/openmw!4419
This commit is contained in:
commit
e9627e9b0c
1 changed files with 8 additions and 5 deletions
|
@ -266,11 +266,14 @@ void Config::LauncherSettings::setContentList(const GameSettings& gameSettings)
|
||||||
if (!std::ranges::equal(
|
if (!std::ranges::equal(
|
||||||
dirs, listDirs, [](const SettingValue& dir, const QString& listDir) { return dir.value == listDir; }))
|
dirs, listDirs, [](const SettingValue& dir, const QString& listDir) { return dir.value == listDir; }))
|
||||||
continue;
|
continue;
|
||||||
if (files == getContentListFiles(listName) && archives == getArchiveList(listName))
|
constexpr auto compareFiles
|
||||||
{
|
= [](const QString& a, const QString& b) { return a.compare(b, Qt::CaseInsensitive) == 0; };
|
||||||
setCurrentContentListName(listName);
|
if (!std::ranges::equal(files, getContentListFiles(listName), compareFiles))
|
||||||
return;
|
continue;
|
||||||
}
|
if (!std::ranges::equal(archives, getArchiveList(listName), compareFiles))
|
||||||
|
continue;
|
||||||
|
setCurrentContentListName(listName);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, add content list
|
// otherwise, add content list
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue