mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-27 03:49:41 -04:00
feat(add): Hidden Paths logic for saving to qt_config
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -299,6 +299,16 @@ void QtConfig::ReadUIGamelistValues() {
|
||||
}
|
||||
EndArray();
|
||||
|
||||
const int hidden_paths_size = BeginArray("hidden_paths");
|
||||
for (int i = 0; i < hidden_paths_size; ++i) {
|
||||
SetArrayIndex(i);
|
||||
const std::string path = ReadStringSetting(std::string("path"));
|
||||
if (!path.empty()) {
|
||||
UISettings::values.hidden_paths.append(QString::fromStdString(path));
|
||||
}
|
||||
}
|
||||
EndArray();
|
||||
|
||||
EndGroup();
|
||||
}
|
||||
|
||||
@@ -499,6 +509,13 @@ void QtConfig::SaveUIGamelistValues() {
|
||||
}
|
||||
EndArray(); // favorites
|
||||
|
||||
BeginArray(std::string("hidden_paths"));
|
||||
for (int i = 0; i < UISettings::values.hidden_paths.size(); ++i) {
|
||||
SetArrayIndex(i);
|
||||
WriteStringSetting(std::string("path"), UISettings::values.hidden_paths[i].toStdString());
|
||||
}
|
||||
EndArray(); // hidden_paths
|
||||
|
||||
EndGroup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user