| 
    Cppcheck
    
   | 
 
Widget to show cppcheck progressbar and result. More...
#include <resultsview.h>
 Public Slots | |
| void | progress (int value, const QString &description) | 
| Slot for updating the checking progress.  More... | |
| void | error (const ErrorItem &item) | 
| Slot for new error to be displayed.  More... | |
| void | filterResults (const QString &filter) | 
| Filters the results in the result list.  More... | |
| void | updateDetails (const QModelIndex &index) | 
| Update detailed message when selected item is changed.  More... | |
| void | print () | 
| Slot opening a print dialog to print the current report.  More... | |
| void | print (QPrinter *printer) | 
| Slot printing the current report to the printer.  More... | |
| void | printPreview () | 
| Slot opening a print preview dialog.  More... | |
| void | log (const QString &str) | 
| Log message.  More... | |
| void | debugError (const ErrorItem &item) | 
| debug message  More... | |
| void | logClear () | 
| Clear log messages.  More... | |
| void | logCopyEntry () | 
| Copy selected log message entry.  More... | |
| void | logCopyComplete () | 
| Copy all log messages.  More... | |
Signals | |
| void | gotResults () | 
| Signal to be emitted when we have results.  More... | |
| void | resultsHidden (bool hidden) | 
| Signal that results have been hidden or shown.  More... | |
| void | checkSelected (QStringList selectedFilesList) | 
| Signal to perform recheck of selected files.  More... | |
| void | suppressIds (QStringList ids) | 
| Suppress Ids.  More... | |
| void | showResults (ShowTypes::ShowType type, bool show) | 
| Show/hide certain type of errors Refreshes the tree.  More... | |
| void | showCppcheckResults (bool show) | 
| Show/hide cppcheck errors.  More... | |
| void | showClangResults (bool show) | 
| Show/hide clang-tidy/clang-analyzer errors.  More... | |
| void | collapseAllResults () | 
| Collapse all results in the result list.  More... | |
| void | expandAllResults () | 
| Expand all results in the result list.  More... | |
| void | showHiddenResults () | 
| Show hidden results in the result list.  More... | |
Public Member Functions | |
| ResultsView (QWidget *parent=nullptr) | |
| void | initialize (QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler) | 
| ResultsView (const ResultsView &)=delete | |
| ~ResultsView () override | |
| ResultsView & | operator= (const ResultsView &)=delete | 
| void | clear (bool results) | 
| Clear results and statistics and reset progressinfo.  More... | |
| void | clear (const QString &filename) | 
| Remove a file from the results.  More... | |
| void | clearRecheckFile (const QString &filename) | 
| Remove a recheck file from the results.  More... | |
| void | saveStatistics (const QString &filename) const | 
| Write statistics in file.  More... | |
| void | save (const QString &filename, Report::Type type, const QString &productName) const | 
| Save results to a file.  More... | |
| void | updateFromOldReport (const QString &filename) const | 
| Update results from old report (tag, sinceDate)  More... | |
| void | updateSettings (bool showFullPath, bool saveFullPath, bool saveAllErrors, bool showNoErrorsMessage, bool showErrorId, bool showInconclusive) | 
| Update tree settings.  More... | |
| void | updateStyleSetting (QSettings *settings) | 
| Update Code Editor Style.  More... | |
| void | setCheckDirectory (const QString &dir) | 
| Set the directory we are checking.  More... | |
| QString | getCheckDirectory () | 
| Get the directory we are checking.  More... | |
| void | setCheckSettings (const Settings &settings) | 
| Set settings used in checking.  More... | |
| void | checkingStarted (int count) | 
| Inform the view that checking has started.  More... | |
| void | checkingFinished () | 
| Inform the view that checking finished.  More... | |
| bool | hasVisibleResults () const | 
| Do we have visible results to show?  More... | |
| bool | hasResults () const | 
| Do we have results from check?  More... | |
| void | saveSettings (QSettings *settings) | 
| Save View's settings.  More... | |
| void | translate () | 
| Translate this view.  More... | |
| void | stopAnalysis () | 
| This function should be called when analysis is stopped.  More... | |
| bool | isSuccess () const | 
| Are there successful results?  More... | |
| void | disableProgressbar () | 
| void | readErrorsXml (const QString &filename) | 
| Read errors from report XML file.  More... | |
| const CheckStatistics * | getStatistics () const | 
| Return checking statistics.  More... | |
| const ShowTypes & | getShowTypes () const | 
| Return Showtypes.  More... | |
Private Slots | |
| void | on_mListLog_customContextMenuRequested (const QPoint &pos) | 
| Custom context menu for Analysis Log.  More... | |
Private Member Functions | |
| void | handleCriticalError (const ErrorItem &item) | 
| If provided ErrorItem is a critical error then display warning message in the resultsview.  More... | |
Private Attributes | |
| bool | mShowNoErrorsMessage = true | 
| Should we show a "No errors found dialog" every time no errors were found?  More... | |
| Ui::ResultsView * | mUI | 
| CheckStatistics * | mStatistics | 
| Settings * | mCheckSettings = nullptr | 
| bool | mSuccess = false | 
| Set to true when checking finish successfully.  More... | |
| QString | mCriticalErrors | 
| Critical error ids.  More... | |
Widget to show cppcheck progressbar and result.
Definition at line 51 of file resultsview.h.
      
  | 
  explicit | 
Definition at line 76 of file resultsview.cpp.
References checkSelected(), ResultsTree::checkSelected(), collapseAllResults(), expandAllResults(), mUI, ResultsTree::resultsHidden(), resultsHidden(), ResultsTree::showClangResults(), showClangResults(), ResultsTree::showCppcheckResults(), showCppcheckResults(), ResultsTree::showHiddenResults(), showHiddenResults(), ResultsTree::showResults(), showResults(), ResultsTree::suppressIds(), suppressIds(), ResultsTree::treeSelectionChanged(), and updateDetails().
      
  | 
  delete | 
      
  | 
  override | 
Definition at line 113 of file resultsview.cpp.
References mCheckSettings, and mUI.
| void ResultsView::checkingFinished | ( | ) | 
Inform the view that checking finished.
Definition at line 320 of file resultsview.cpp.
References CheckStatistics::getActiveCheckers(), CheckersReport::getReport(), hasResults(), mCheckSettings, mCriticalErrors, mShowNoErrorsMessage, mStatistics, mUI, and CheckStatistics::setCheckersReport().
| void ResultsView::checkingStarted | ( | int | count | ) | 
Inform the view that checking has started.
| count | Count of files to be checked. | 
Definition at line 311 of file resultsview.cpp.
References mSuccess, mUI, and PROGRESS_MAX.
      
  | 
  signal | 
Signal to perform recheck of selected files.
| selectedFilesList | list of selected files | 
Referenced by MainWindow::MainWindow(), and ResultsView().
| void ResultsView::clear | ( | bool | results | ) | 
Clear results and statistics and reset progressinfo.
| results | Remove all the results from view? | 
Definition at line 119 of file resultsview.cpp.
References CheckStatistics::clear(), mCheckSettings, mStatistics, mSuccess, mUI, and PROGRESS_MAX.
| void ResultsView::clear | ( | const QString & | filename | ) | 
| void ResultsView::clearRecheckFile | ( | const QString & | filename | ) | 
Remove a recheck file from the results.
Definition at line 146 of file resultsview.cpp.
References mUI.
      
  | 
  signal | 
Collapse all results in the result list.
Referenced by MainWindow::MainWindow(), and ResultsView().
      
  | 
  slot | 
debug message
Definition at line 507 of file resultsview.cpp.
References mUI, and ErrorItem::toString().
Referenced by MainWindow::MainWindow().
| void ResultsView::disableProgressbar | ( | ) | 
Definition at line 386 of file resultsview.cpp.
References mUI.
      
  | 
  slot | 
Slot for new error to be displayed.
| item | Error data | 
Definition at line 162 of file resultsview.cpp.
References CheckStatistics::addChecker(), CheckStatistics::addItem(), ErrorItem::errorId, gotResults(), handleCriticalError(), internal, ErrorItem::message, mStatistics, mUI, ErrorItem::severity, ShowTypes::SeverityToShowType(), and ErrorItem::tool().
Referenced by ThreadHandler::initialize().
      
  | 
  signal | 
Expand all results in the result list.
Referenced by MainWindow::MainWindow(), and ResultsView().
      
  | 
  slot | 
Filters the results in the result list.
Definition at line 180 of file resultsview.cpp.
References mUI.
| QString ResultsView::getCheckDirectory | ( | ) | 
Get the directory we are checking.
Definition at line 299 of file resultsview.cpp.
References mUI.
| const ShowTypes & ResultsView::getShowTypes | ( | ) | const | 
Return Showtypes.
Definition at line 151 of file resultsview.cpp.
References mUI.
      
  | 
  inline | 
Return checking statistics.
Definition at line 210 of file resultsview.h.
References mStatistics.
      
  | 
  signal | 
Signal to be emitted when we have results.
Referenced by error(), and MainWindow::MainWindow().
      
  | 
  private | 
If provided ErrorItem is a critical error then display warning message in the resultsview.
Definition at line 561 of file resultsview.cpp.
References ErrorItem::errorId, ErrorItem::file0, internal, ErrorLogger::isCriticalErrorId(), mCriticalErrors, mSuccess, mUI, and ErrorItem::severity.
Referenced by error(), and readErrorsXml().
| bool ResultsView::hasResults | ( | ) | const | 
Do we have results from check?
Definition at line 367 of file resultsview.cpp.
References mUI.
Referenced by checkingFinished(), and print().
| bool ResultsView::hasVisibleResults | ( | ) | const | 
Do we have visible results to show?
Definition at line 362 of file resultsview.cpp.
References mUI.
| void ResultsView::initialize | ( | QSettings * | settings, | 
| ApplicationList * | list, | ||
| ThreadHandler * | checkThreadHandler | ||
| ) | 
Definition at line 97 of file resultsview.cpp.
References CodeEditorStyle::loadSettings(), mShowNoErrorsMessage, mUI, SETTINGS_MAINWND_SPLITTER_STATE, and SETTINGS_SHOW_NO_ERRORS.
| bool ResultsView::isSuccess | ( | ) | const | 
Are there successful results?
Definition at line 583 of file resultsview.cpp.
References mSuccess.
      
  | 
  slot | 
Log message.
Definition at line 502 of file resultsview.cpp.
References mUI.
Referenced by MainWindow::MainWindow().
      
  | 
  slot | 
Clear log messages.
Definition at line 512 of file resultsview.cpp.
References mUI.
Referenced by on_mListLog_customContextMenuRequested().
      
  | 
  slot | 
Copy all log messages.
Definition at line 526 of file resultsview.cpp.
References mUI.
Referenced by on_mListLog_customContextMenuRequested().
      
  | 
  slot | 
Copy selected log message entry.
Definition at line 517 of file resultsview.cpp.
References mUI.
Referenced by on_mListLog_customContextMenuRequested().
      
  | 
  privateslot | 
Custom context menu for Analysis Log.
| pos | Mouse click position | 
Definition at line 539 of file resultsview.cpp.
References logClear(), logCopyComplete(), logCopyEntry(), and mUI.
      
  | 
  delete | 
      
  | 
  slot | 
Slot opening a print dialog to print the current report.
Definition at line 242 of file resultsview.cpp.
Referenced by printPreview().
      
  | 
  slot | 
Slot printing the current report to the printer.
| printer | The printer used for printing the report. | 
Definition at line 261 of file resultsview.cpp.
References PrintableReport::getFormattedReportText(), hasResults(), and mUI.
      
  | 
  slot | 
Slot opening a print preview dialog.
Definition at line 253 of file resultsview.cpp.
References print().
      
  | 
  slot | 
Slot for updating the checking progress.
| value | Current progress value | 
| description | Description to accompany the progress | 
Definition at line 156 of file resultsview.cpp.
References mUI.
Referenced by ThreadHandler::initialize().
| void ResultsView::readErrorsXml | ( | const QString & | filename | ) | 
Read errors from report XML file.
| filename | Report file to read. | 
Definition at line 391 of file resultsview.cpp.
References XmlReport::determineVersion(), handleCriticalError(), mSuccess, mUI, XmlReportV2::open(), and XmlReportV2::read().
      
  | 
  signal | 
Signal that results have been hidden or shown.
| hidden | true if there are some hidden results, or false if there are not | 
Referenced by MainWindow::MainWindow(), and ResultsView().
| void ResultsView::save | ( | const QString & | filename, | 
| Report::Type | type, | ||
| const QString & | productName | ||
| ) | const | 
Save results to a file.
| filename | Filename to save results to | 
| type | Type of the report. | 
| productName | Custom product name | 
Definition at line 207 of file resultsview.cpp.
References Report::create(), Report::CSV, mUI, Report::TXT, and Report::XMLV2.
| void ResultsView::saveSettings | ( | QSettings * | settings | ) | 
Save View's settings.
| settings | program settings. | 
Definition at line 372 of file resultsview.cpp.
References mUI, and SETTINGS_MAINWND_SPLITTER_STATE.
| void ResultsView::saveStatistics | ( | const QString & | filename | ) | const | 
Write statistics in file.
| filename | Filename to save statistics to | 
Definition at line 185 of file resultsview.cpp.
References CheckStatistics::getCount(), CheckStatistics::getTools(), mStatistics, ShowTypes::ShowErrors, ShowTypes::ShowPerformance, ShowTypes::ShowPortability, ShowTypes::ShowStyle, and ShowTypes::ShowWarnings.
| void ResultsView::setCheckDirectory | ( | const QString & | dir | ) | 
Set the directory we are checking.
This is used to split error file path to relative if necessary
| dir | Directory we are checking | 
Definition at line 294 of file resultsview.cpp.
References mUI.
| void ResultsView::setCheckSettings | ( | const Settings & | settings | ) | 
Set settings used in checking.
Definition at line 304 of file resultsview.cpp.
References mCheckSettings.
      
  | 
  signal | 
Show/hide clang-tidy/clang-analyzer errors.
Refreshes the tree.
| show | Should specified errors be shown (true) or hidden (false) | 
Referenced by MainWindow::MainWindow(), and ResultsView().
      
  | 
  signal | 
Show/hide cppcheck errors.
Refreshes the tree.
| show | Should specified errors be shown (true) or hidden (false) | 
Referenced by MainWindow::MainWindow(), and ResultsView().
      
  | 
  signal | 
Show hidden results in the result list.
Referenced by MainWindow::MainWindow(), and ResultsView().
      
  | 
  signal | 
Show/hide certain type of errors Refreshes the tree.
| type | Type of error to show/hide | 
| show | Should specified errors be shown (true) or hidden (false) | 
Referenced by ResultsView().
| void ResultsView::stopAnalysis | ( | ) | 
This function should be called when analysis is stopped.
Definition at line 554 of file resultsview.cpp.
      
  | 
  signal | 
Suppress Ids.
Referenced by MainWindow::MainWindow(), and ResultsView().
| void ResultsView::translate | ( | ) | 
      
  | 
  slot | 
Update detailed message when selected item is changed.
| index | Position of new selected item. | 
Definition at line 437 of file resultsview.cpp.
References Path::isHeader2(), mUI, and toString().
Referenced by ResultsView().
| void ResultsView::updateFromOldReport | ( | const QString & | filename | ) | const | 
Update results from old report (tag, sinceDate)
Definition at line 202 of file resultsview.cpp.
References mUI.
| void ResultsView::updateSettings | ( | bool | showFullPath, | 
| bool | saveFullPath, | ||
| bool | saveAllErrors, | ||
| bool | showNoErrorsMessage, | ||
| bool | showErrorId, | ||
| bool | showInconclusive | ||
| ) | 
Update tree settings.
| showFullPath | Show full path of files in the tree | 
| saveFullPath | Save full path of files in reports | 
| saveAllErrors | Save all visible errors | 
| showNoErrorsMessage | Show "no errors"? | 
| showErrorId | Show error id? | 
| showInconclusive | Show inconclusive? | 
Definition at line 277 of file resultsview.cpp.
References mShowNoErrorsMessage, and mUI.
| void ResultsView::updateStyleSetting | ( | QSettings * | settings | ) | 
Update Code Editor Style.
Function will read updated Code Editor styling from stored program settings.
| settings | Pointer to QSettings Object | 
Definition at line 288 of file resultsview.cpp.
References CodeEditorStyle::loadSettings(), and mUI.
      
  | 
  private | 
Definition at line 378 of file resultsview.h.
Referenced by checkingFinished(), clear(), setCheckSettings(), and ~ResultsView().
      
  | 
  private | 
Critical error ids.
Definition at line 386 of file resultsview.h.
Referenced by checkingFinished(), and handleCriticalError().
      
  | 
  private | 
Should we show a "No errors found dialog" every time no errors were found?
Definition at line 372 of file resultsview.h.
Referenced by checkingFinished(), initialize(), and updateSettings().
      
  | 
  private | 
Definition at line 376 of file resultsview.h.
Referenced by checkingFinished(), clear(), error(), getStatistics(), and saveStatistics().
      
  | 
  private | 
Set to true when checking finish successfully.
Set to false whenever analysis starts.
Definition at line 383 of file resultsview.h.
Referenced by checkingStarted(), clear(), handleCriticalError(), isSuccess(), readErrorsXml(), and stopAnalysis().
      
  | 
  private | 
Definition at line 374 of file resultsview.h.
Referenced by checkingFinished(), checkingStarted(), clear(), clearRecheckFile(), debugError(), disableProgressbar(), error(), filterResults(), getCheckDirectory(), getShowTypes(), handleCriticalError(), hasResults(), hasVisibleResults(), initialize(), log(), logClear(), logCopyComplete(), logCopyEntry(), on_mListLog_customContextMenuRequested(), print(), progress(), readErrorsXml(), ResultsView(), save(), saveSettings(), setCheckDirectory(), stopAnalysis(), translate(), updateDetails(), updateFromOldReport(), updateSettings(), updateStyleSetting(), and ~ResultsView().