Common/FileSearch: Refactor DoFileSearch

This commit is contained in:
Sintendo
2025-12-24 10:14:02 +01:00
parent 3221e982d3
commit f2e1c71803
19 changed files with 87 additions and 48 deletions

View File

@@ -132,8 +132,8 @@ void InterfacePane::CreateUI()
combobox_layout->addRow(tr("&Language:"), m_combobox_language);
// List available themes
auto theme_paths =
Common::DoFileSearch({File::GetUserPath(D_THEMES_IDX), File::GetSysDirectory() + THEMES_DIR});
auto theme_paths = Common::DoFileSearch(
{{File::GetUserPath(D_THEMES_IDX), File::GetSysDirectory() + THEMES_DIR}});
std::vector<std::string> theme_names;
theme_names.reserve(theme_paths.size());
std::ranges::transform(theme_paths, std::back_inserter(theme_names), PathToFileName);
@@ -147,7 +147,7 @@ void InterfacePane::CreateUI()
m_label_userstyle = new QLabel(tr("Style:"));
combobox_layout->addRow(m_label_userstyle, m_combobox_userstyle);
auto userstyle_search_results = Common::DoFileSearch({File::GetUserPath(D_STYLES_IDX)});
auto userstyle_search_results = Common::DoFileSearch(File::GetUserPath(D_STYLES_IDX));
m_combobox_userstyle->addItem(tr("(System)"), static_cast<int>(Settings::StyleType::System));