diff options
| author | Josh Ferrell <josh@vector35.com> | 2026-01-26 14:23:12 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2026-02-06 17:53:45 -0500 |
| commit | 70bbb18a9444824a8ec2b9a7ff57fc848e017b6e (patch) | |
| tree | fe87c0976b75a7557986d1ac6bcc2409a839624c /examples/triage/entry.cpp | |
| parent | 9b7604d13e8bd98c6998facb9326926ed96281b5 (diff) | |
Add regex and case sensitivity options to FilterEdit
Diffstat (limited to 'examples/triage/entry.cpp')
| -rw-r--r-- | examples/triage/entry.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/triage/entry.cpp b/examples/triage/entry.cpp index addb5960..dfee4a2f 100644 --- a/examples/triage/entry.cpp +++ b/examples/triage/entry.cpp @@ -141,13 +141,14 @@ void GenericEntryModel::sort(int col, Qt::SortOrder order) } -void GenericEntryModel::setFilter(const std::string& filterText) +void GenericEntryModel::setFilter(const std::string& filterText, FilterOptions options) { beginResetModel(); m_entries.clear(); + bool caseSensitive = options.testFlag(FilterOption::CaseSensitiveOption); for (auto& entry : m_allEntries) { - if (FilteredView::match(entry->GetSymbol()->GetFullName(), filterText)) + if (FilteredView::match(entry->GetSymbol()->GetFullName(), filterText, caseSensitive)) m_entries.push_back(entry); } performSort(m_sortCol, m_sortOrder); @@ -250,9 +251,9 @@ void EntryTreeView::entryDoubleClicked(const QModelIndex& cur) } -void EntryTreeView::setFilter(const std::string& filterText) +void EntryTreeView::setFilter(const std::string& filterText, FilterOptions options) { - m_model->setFilter(filterText); + m_model->setFilter(filterText, options); } |
