| 
    Cppcheck
    
   | 
 
Threads use this class to obtain new files to process and to publish results. More...
#include <threadresult.h>
  
Public Slots | |
| void | fileChecked (const QString &file) | 
| Slot threads use to signal this class that a specific file is checked.  More... | |
Signals | |
| void | progress (int value, const QString &description) | 
| Progress signal.  More... | |
| void | error (const ErrorItem &item) | 
| Signal of a new error.  More... | |
| void | log (const QString &logline) | 
| Signal of a new log message.  More... | |
| void | debugError (const ErrorItem &item) | 
| Signal of a debug error.  More... | |
Public Member Functions | |
| ThreadResult ()=default | |
| QString | getNextFile () | 
| Get next unprocessed file.  More... | |
| FileSettings | getNextFileSettings () | 
| void | setFiles (const QStringList &files) | 
| Set list of files to check.  More... | |
| void | setProject (const ImportProject &prj) | 
| void | clearFiles () | 
| Clear files to check.  More... | |
| int | getFileCount () const | 
| Get the number of files to check.  More... | |
| void | reportOut (const std::string &outmsg, Color c=Color::Reset) override | 
| ErrorLogger methods.  More... | |
| void | reportErr (const ErrorMessage &msg) override | 
| Information about found errors and warnings is directed here.  More... | |
  Public Member Functions inherited from ErrorLogger | |
| ErrorLogger ()=default | |
| virtual | ~ErrorLogger ()=default | 
| virtual void | reportProgress (const std::string &filename, const char stage[], const std::size_t value) | 
| Report progress to client.  More... | |
Protected Attributes | |
| std::mutex | mutex | 
| Mutex.  More... | |
| QStringList | mFiles | 
| List of files to check.  More... | |
| std::list< FileSettings > | mFileSettings | 
| quint64 | mMaxProgress {} | 
| Max progress.  More... | |
| quint64 | mProgress {} | 
| Current progress.  More... | |
| unsigned long | mFilesChecked {} | 
| Current number of files checked.  More... | |
| unsigned long | mTotalFiles {} | 
| Total number of files.  More... | |
Additional Inherited Members | |
  Static Public Member Functions inherited from ErrorLogger | |
| static std::string | callStackToString (const std::list< ErrorMessage::FileLocation > &callStack) | 
| static std::string | toxml (const std::string &str) | 
| Convert XML-sensitive characters into XML entities.  More... | |
| static std::string | plistHeader (const std::string &version, const std::vector< std::string > &files) | 
| static std::string | plistData (const ErrorMessage &msg) | 
| static const char * | plistFooter () | 
| static bool | isCriticalErrorId (const std::string &id) | 
Threads use this class to obtain new files to process and to publish results.
Definition at line 46 of file threadresult.h.
      
  | 
  default | 
| void ThreadResult::clearFiles | ( | ) | 
Clear files to check.
Definition at line 114 of file threadresult.cpp.
References mFiles, mFilesChecked, mFileSettings, mTotalFiles, and mutex.
Referenced by ThreadHandler::clearFiles().
      
  | 
  signal | 
Signal of a debug error.
| item | Error data | 
Referenced by ThreadHandler::initialize(), and reportErr().
      
  | 
  signal | 
Signal of a new error.
| item | Error data | 
Referenced by ThreadHandler::initialize(), and reportErr().
      
  | 
  slot | 
Slot threads use to signal this class that a specific file is checked.
| file | File that is checked | 
Definition at line 36 of file threadresult.cpp.
References mFilesChecked, mMaxProgress, mProgress, mTotalFiles, mutex, progress(), and PROGRESS_MAX.
Referenced by ThreadHandler::removeThreads(), and ThreadHandler::setThreadCount().
| int ThreadResult::getFileCount | ( | ) | const | 
Get the number of files to check.
Definition at line 123 of file threadresult.cpp.
References mFiles, mFileSettings, and mutex.
Referenced by ThreadHandler::check().
| QString ThreadResult::getNextFile | ( | ) | 
| FileSettings ThreadResult::getNextFileSettings | ( | ) | 
Definition at line 71 of file threadresult.cpp.
References mFileSettings, and mutex.
      
  | 
  signal | 
Signal of a new log message.
| logline | Log line | 
Referenced by ThreadHandler::initialize(), and reportOut().
      
  | 
  signal | 
Progress signal.
| value | Current progress | 
| description | Description of the current stage | 
Referenced by fileChecked(), and ThreadHandler::initialize().
      
  | 
  overridevirtual | 
Information about found errors and warnings is directed here.
Override this to receive the errormessages.
| msg | Location and other information about the found error. | 
Implements ErrorLogger.
Definition at line 51 of file threadresult.cpp.
References debug, debugError(), error(), mutex, and ErrorMessage::severity.
Referenced by CheckThread::parseClangErrors().
      
  | 
  overridevirtual | 
ErrorLogger methods.
Implements ErrorLogger.
Definition at line 31 of file threadresult.cpp.
References log().
| void ThreadResult::setFiles | ( | const QStringList & | files | ) | 
Set list of files to check.
| files | List of files to check | 
Definition at line 82 of file threadresult.cpp.
References mFiles, mFilesChecked, mMaxProgress, mProgress, mTotalFiles, and mutex.
Referenced by MainWindow::analyzeCode(), ThreadHandler::setCheckFiles(), and ThreadHandler::setFiles().
| void ThreadResult::setProject | ( | const ImportProject & | prj | ) | 
Definition at line 98 of file threadresult.cpp.
References ImportProject::fileSettings, mFiles, mFilesChecked, mFileSettings, mMaxProgress, mProgress, mTotalFiles, and mutex.
Referenced by ThreadHandler::setProject().
      
  | 
  protected | 
List of files to check.
Definition at line 137 of file threadresult.h.
Referenced by clearFiles(), getFileCount(), getNextFile(), setFiles(), and setProject().
      
  | 
  protected | 
Current number of files checked.
Definition at line 157 of file threadresult.h.
Referenced by clearFiles(), fileChecked(), setFiles(), and setProject().
      
  | 
  protected | 
Definition at line 139 of file threadresult.h.
Referenced by clearFiles(), getFileCount(), getNextFileSettings(), and setProject().
      
  | 
  protected | 
Max progress.
Definition at line 145 of file threadresult.h.
Referenced by fileChecked(), setFiles(), and setProject().
      
  | 
  protected | 
Current progress.
Definition at line 151 of file threadresult.h.
Referenced by fileChecked(), setFiles(), and setProject().
      
  | 
  protected | 
Total number of files.
Definition at line 163 of file threadresult.h.
Referenced by clearFiles(), fileChecked(), setFiles(), and setProject().
      
  | 
  mutableprotected | 
Mutex.
Definition at line 131 of file threadresult.h.
Referenced by clearFiles(), fileChecked(), getFileCount(), getNextFile(), getNextFileSettings(), reportErr(), setFiles(), and setProject().