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

Method saveErrors

gui/resultstree.cpp:1114–1133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112}
1113
1114void ResultsTree::saveErrors(Report *report, const ResultItem *fileItem) const
1115{
1116 if (!fileItem) {
1117 return;
1118 }
1119
1120 for (int i = 0; i < fileItem->rowCount(); i++) {
1121 const auto *error = dynamic_cast<ResultItem*>(fileItem->child(i, 0));
1122
1123 if (!error) {
1124 continue;
1125 }
1126
1127 if (isRowHidden(i, fileItem->index()) && !mSaveAllErrors) {
1128 continue;
1129 }
1130
1131 report->writeError(*error->errorItem);
1132 }
1133}
1134
1135void ResultsTree::updateFromOldReport(const QString &filename)
1136{

Callers

nothing calls this directly

Calls 2

rowCountMethod · 0.80
writeErrorMethod · 0.45

Tested by

no test coverage detected