summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-05-28 19:48:21 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2020-05-28 19:48:21 +0200
commitd2b7a1a321d5cf496860f717eccdfb9487621169 (patch)
treead20b2202c9632189fc80a6664de2ea39d72ceca /src/mainwindow.cpp
parent4791569790e9695512248a9acdfbcd1c96f13967 (diff)
Expose ModDataContentHolder from OrganizerCore instead of vector of Content.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a720b621..35e31e61 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -5950,9 +5950,8 @@ void MainWindow::onFiltersCriteria(const std::vector<ModListSortProxy::Criteria>
const auto& c = criteria[0];
if (c.type == ModListSortProxy::TypeContent) {
- auto& contents = m_OrganizerCore.modDataContents();
- auto it = std::find_if(std::begin(contents), std::end(contents), [&c](auto const& content) { return content.id() == c.id; });
- label = it != std::end(contents) ? it->name() : QString();
+ const auto *content = m_OrganizerCore.modDataContents().findById(c.id);
+ label = content ? content->name() : QString();
} else {
label = m_CategoryFactory.getCategoryNameByID(c.id);
}