diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-28 19:48:21 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-28 19:48:21 +0200 |
| commit | d2b7a1a321d5cf496860f717eccdfb9487621169 (patch) | |
| tree | ad20b2202c9632189fc80a6664de2ea39d72ceca /src/mainwindow.cpp | |
| parent | 4791569790e9695512248a9acdfbcd1c96f13967 (diff) | |
Expose ModDataContentHolder from OrganizerCore instead of vector of Content.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 5 |
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); } |
