aboutsummaryrefslogtreecommitdiffstats
path: root/src/messagedetailsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/messagedetailsdialog.cpp')
-rw-r--r--src/messagedetailsdialog.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/messagedetailsdialog.cpp b/src/messagedetailsdialog.cpp
index 058814b..e487270 100644
--- a/src/messagedetailsdialog.cpp
+++ b/src/messagedetailsdialog.cpp
@@ -88,10 +88,16 @@ MessageDetailsDialog::MessageDetailsDialog(const QList<ThreadRenderItem> &items,
QMenu menu(this);
auto *replace = menu.addAction(tr("Search for this"));
connect(replace, &QAction::triggered, this,
- [this, row]() { requestSearch(row, false); });
+ [this, row]() {
+ requestSearch(
+ row, SearchTerm::SearchMode::Replace);
+ });
auto *narrow = menu.addAction(tr("Add to search"));
connect(narrow, &QAction::triggered, this,
- [this, row]() { requestSearch(row, true); });
+ [this, row]() {
+ requestSearch(
+ row, SearchTerm::SearchMode::Narrow);
+ });
menu.exec(value->mapToGlobal(pos));
});
}
@@ -145,9 +151,10 @@ void MessageDetailsDialog::buildRows(const QList<ThreadRenderItem> &items)
}
}
-void MessageDetailsDialog::requestSearch(const HeaderRow &row, bool extend)
+void MessageDetailsDialog::requestSearch(const HeaderRow &row,
+ SearchTerm::SearchMode mode)
{
if (row.query.isEmpty())
return;
- emit searchRequested(row.query, extend);
+ emit searchRequested(row.query, mode);
}