Cppcheck
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ErrorItem Class Reference

A class containing error data for one error. More...

#include <erroritem.h>

Public Member Functions

 ErrorItem ()
 
 ErrorItem (const ErrorMessage &errmsg)
 
QString toString () const
 Convert error item to string. More...
 
QString tool () const
 

Static Public Member Functions

static bool sameCID (const ErrorItem &errorItem1, const ErrorItem &errorItem2)
 Compare "CID". More...
 

Public Attributes

QString file0
 
QString errorId
 
Severity severity
 
bool inconclusive
 
QString summary
 
QString message
 
int cwe
 
unsigned long long hash
 
QList< QErrorPathItemerrorPath
 
QString symbolNames
 
QString sinceDate
 
QString tags
 

Detailed Description

A class containing error data for one error.

The paths are stored with internal ("/") separators. Only when we show the path or copy if for user (to clipboard) we convert to native separators. Full path is stored instead of relative path for flexibility. It is easy to get the relative path from full path when needed.

Definition at line 72 of file erroritem.h.

Constructor & Destructor Documentation

◆ ErrorItem() [1/2]

ErrorItem::ErrorItem ( )

Definition at line 37 of file erroritem.cpp.

References inconclusive, and none.

◆ ErrorItem() [2/2]

ErrorItem::ErrorItem ( const ErrorMessage errmsg)
explicit

Definition at line 44 of file erroritem.cpp.

References ErrorMessage::callStack, errorPath, and inconclusive.

Member Function Documentation

◆ sameCID()

bool ErrorItem::sameCID ( const ErrorItem errorItem1,
const ErrorItem errorItem2 
)
static

Compare "CID".

Definition at line 87 of file erroritem.cpp.

References errorId, errorPath, file0, hash, inconclusive, message, and severity.

Referenced by indexOf().

◆ tool()

QString ErrorItem::tool ( ) const

Definition at line 62 of file erroritem.cpp.

References CLANG_ANALYZER, CLANG_TIDY, and errorId.

Referenced by ResultsView::error().

◆ toString()

QString ErrorItem::toString ( ) const

Convert error item to string.

Returns
Error item as string.

Definition at line 73 of file erroritem.cpp.

References errorId, errorPath, inconclusive, message, severity, summary, and GuiSeverity::toString().

Referenced by ResultsView::debugError().

Member Data Documentation

◆ cwe

int ErrorItem::cwe

◆ errorId

QString ErrorItem::errorId

◆ errorPath

QList<QErrorPathItem> ErrorItem::errorPath

◆ file0

QString ErrorItem::file0

◆ hash

unsigned long long ErrorItem::hash

◆ inconclusive

bool ErrorItem::inconclusive

◆ message

QString ErrorItem::message

◆ severity

Severity ErrorItem::severity

◆ sinceDate

QString ErrorItem::sinceDate

◆ summary

QString ErrorItem::summary

◆ symbolNames

QString ErrorItem::symbolNames

Definition at line 93 of file erroritem.h.

Referenced by ResultsTree::addErrorItem().

◆ tags

QString ErrorItem::tags

The documentation for this class was generated from the following files: