GUI: Code cleanup

This commit is contained in:
Daniel Marjamäki 2017-08-20 15:08:53 +02:00
parent 520ab204e5
commit 27fb430c1e
2 changed files with 19 additions and 30 deletions

View File

@ -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);

View File

@ -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.
*