From 27fb430c1e1f291f03f7b979e7f9115dcbe3f7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Aug 2017 15:08:53 +0200 Subject: [PATCH] GUI: Code cleanup --- gui/resultsview.cpp | 18 +++--------------- gui/resultsview.h | 31 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/gui/resultsview.cpp b/gui/resultsview.cpp index b915bc087..599e876eb 100644 --- a/gui/resultsview.cpp +++ b/gui/resultsview.cpp @@ -56,6 +56,9 @@ ResultsView::ResultsView(QWidget * parent) : connect(this, &ResultsView::showResults, mUI.mTree, &ResultsTree::showResults); connect(this, &ResultsView::showCppcheckResults, mUI.mTree, &ResultsTree::showCppcheckResults); connect(this, &ResultsView::showClangResults, mUI.mTree, &ResultsTree::showClangResults); + connect(this, &ResultsView::collapseAllResults, mUI.mTree, &ResultsTree::collapseAll); + connect(this, &ResultsView::expandAllResults, mUI.mTree, &ResultsTree::expandAll); + connect(this, &ResultsView::showHiddenResults, mUI.mTree, &ResultsTree::showHiddenResults); } void ResultsView::initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler) @@ -115,21 +118,6 @@ void ResultsView::error(const ErrorItem &item) } } -void ResultsView::collapseAllResults() -{ - mUI.mTree->collapseAll(); -} - -void ResultsView::expandAllResults() -{ - mUI.mTree->expandAll(); -} - -void ResultsView::showHiddenResults() -{ - mUI.mTree->showHiddenResults(); -} - void ResultsView::filterResults(const QString& filter) { mUI.mTree->filterResults(filter); diff --git a/gui/resultsview.h b/gui/resultsview.h index 57992e19f..ff3d72b59 100644 --- a/gui/resultsview.h +++ b/gui/resultsview.h @@ -240,6 +240,22 @@ signals: * @param show Should specified errors be shown (true) or hidden (false) */ void showClangResults(bool show); + + /** + * @brief Collapse all results in the result list. + */ + void collapseAllResults(); + + /** + * @brief Expand all results in the result list. + */ + void expandAllResults(); + + /** + * @brief Show hidden results in the result list. + */ + void showHiddenResults(); + public slots: /** @@ -257,26 +273,11 @@ public slots: */ void error(const ErrorItem &item); - /** - * @brief Collapse all results in the result list. - */ - void collapseAllResults(); - - /** - * @brief Expand all results in the result list. - */ - void expandAllResults(); - /** * @brief Filters the results in the result list. */ void filterResults(const QString& filter); - /** - * @brief Show hidden results in the result list. - */ - void showHiddenResults(); - /** * @brief Update detailed message when selected item is changed. *