Common/FileSearch: Refactor DoFileSearch

This commit is contained in:
Sintendo committed 2026-01-24 16:50:10 +01:00
1 parent 3221e982d3
commit f2e1c71803
19 files changed
+87 -48

No files matched your search

@@ -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));