MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / toString

Method toString

gui/erroritem.cpp:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71QString ErrorItem::toString() const
72{
73 const int i = getMainLocIndex();
74 QString ret = errorPath[i].file + ":" + QString::number(errorPath[i].line) + ":" + QString::number(errorPath[i].column) + ":";
75 ret += GuiSeverity::toString(severity);
76 if (inconclusive)
77 ret += ",inconclusive";
78 ret += ": " + summary + " [" + errorId + "]";
79 if (errorPath.size() >= 2) {
80 for (const auto& e: errorPath)
81 ret += "\n" + e.file + ":" + QString::number(e.line) + ":" + QString::number(e.column) + ":note: " + e.info;
82 }
83 return ret;
84}
85
86bool ErrorItem::same(const ErrorItem &errorItem1, const ErrorItem &errorItem2)
87{

Callers 15

addErrorItemMethod · 0.45
clearMethod · 0.45
clearRecheckFileMethod · 0.45
copyMethod · 0.45
updateFromOldReportMethod · 0.45
loadFromProjectFileMethod · 0.45
determineVersionMethod · 0.45
getPathFunction · 0.45
getDataDirFunction · 0.45
SettingsDialogMethod · 0.45
saveSettingValuesMethod · 0.45
readErrorMethod · 0.45

Calls 2

toStringFunction · 0.50
sizeMethod · 0.45

Tested by 3

saveCfgFileMethod · 0.36
multiLineResultMethod · 0.36
resultsInSameFileMethod · 0.36