diff --git a/plugins/grepview/grepoutputview.h b/plugins/grepview/grepoutputview.h --- a/plugins/grepview/grepoutputview.h +++ b/plugins/grepview/grepoutputview.h @@ -90,6 +90,7 @@ void expandAllItems(); void onApply(); void showDialog(); + void refresh(); void expandElements( const QModelIndex & parent ); void rowsRemoved(); void clearSearchHistory(); diff --git a/plugins/grepview/grepoutputview.cpp b/plugins/grepview/grepoutputview.cpp --- a/plugins/grepview/grepoutputview.cpp +++ b/plugins/grepview/grepoutputview.cpp @@ -84,6 +84,7 @@ separator->setSeparator(true); QAction *newSearchAction = new QAction(QIcon::fromTheme(QStringLiteral("edit-find")), i18n("New &Search"), this); m_clearSearchHistory = new QAction(QIcon::fromTheme(QStringLiteral("edit-clear-list")), i18n("Clear Search History"), this); + QAction *refreshAction = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18n("Refresh"), this); addAction(m_prev); addAction(m_next); @@ -91,6 +92,7 @@ addAction(m_expandAll); addAction(separator); addAction(newSearchAction); + addAction(refreshAction); addAction(m_clearSearchHistory); separator = new QAction(this); @@ -129,6 +131,8 @@ connect(newSearchAction, &QAction::triggered, this, &GrepOutputView::showDialog); + connect(refreshAction, &QAction::triggered, this, &GrepOutputView::refresh); + resultsTreeView->header()->setStretchLastSection(true); resultsTreeView->header()->setStretchLastSection(true); @@ -274,6 +278,11 @@ m_plugin->showDialog(true); } +void GrepOutputView::refresh() +{ + m_plugin->showDialog(false, QString(), false); +} + void GrepOutputView::expandElements(const QModelIndex& index) { m_prev->setEnabled(true);