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

Method clearRecheckFile

gui/resultstree.cpp:437–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437void ResultsTree::clearRecheckFile(const QString &filename)
438{
439 for (int i = 0; i < mModel->rowCount(); ++i) {
440 const auto *fileItem = dynamic_cast<ResultItem*>(mModel->item(i, COLUMN_FILE));
441 if (!fileItem)
442 continue;
443
444 QString actualfile((!mCheckPath.isEmpty() && filename.startsWith(mCheckPath)) ? filename.mid(mCheckPath.length() + 1) : filename);
445 QString storedfile = fileItem->getErrorPathItem().file;
446 storedfile = ((!mCheckPath.isEmpty() && storedfile.startsWith(mCheckPath)) ? storedfile.mid(mCheckPath.length() + 1) : storedfile);
447 if (actualfile == storedfile) {
448 mErrorList.removeAll(fileItem->errorItem->toString());
449 mModel->removeRow(i);
450 break;
451 }
452 }
453}
454
455
456void ResultsTree::loadSettings()

Callers 1

reAnalyzeSelectedMethod · 0.45

Calls 5

rowCountMethod · 0.80
isEmptyMethod · 0.80
startsWithMethod · 0.80
getErrorPathItemMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected