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

Method handleCriticalError

gui/resultsview.cpp:548–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void ResultsView::handleCriticalError(const ErrorItem &item)
549{
550 if (ErrorLogger::isCriticalErrorId(item.errorId.toStdString())) {
551 if (!mCriticalErrors.contains(item.errorId)) {
552 if (!mCriticalErrors.isEmpty())
553 mCriticalErrors += ",";
554 mCriticalErrors += item.errorId;
555 if (item.severity == Severity::internal)
556 mCriticalErrors += " (suppressed)";
557 }
558 QString msg = tr("There was a critical error with id '%1'").arg(item.errorId);
559 if (!item.file0.isEmpty())
560 msg += ", " + tr("when checking %1").arg(item.file0);
561 else
562 msg += ", " + tr("when checking a file");
563 msg += ". " + tr("Analysis was aborted.");
564 mUI->mLabelCriticalErrors->setText(msg);
565 mUI->mLabelCriticalErrors->setVisible(true);
566 }
567}

Callers

nothing calls this directly

Calls 3

isCriticalErrorIdFunction · 0.85
isEmptyMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected