25 #include "ui_newsuppressiondialog.h"
31 #include <QStringList>
44 void reportOut(
const std::string & ,
Color )
override {}
46 errorIds << QString::fromStdString(msg.
id);
51 QErrorLogger errorLogger;
53 errorLogger.errorIds.sort();
55 mUI->mComboErrorId->addItems(errorLogger.errorIds);
56 mUI->mComboErrorId->setCurrentIndex(-1);
57 mUI->mComboErrorId->setCurrentText(
"");
68 ret.
errorId =
mUI->mComboErrorId->currentText().toStdString();
71 ret.
fileName =
mUI->mTextFileName->text().toStdString();
72 if (!
mUI->mTextLineNumber->text().isEmpty())
80 setWindowTitle(tr(
"Edit suppression"));
81 mUI->mComboErrorId->setCurrentText(QString::fromStdString(suppression.
errorId));
82 mUI->mTextFileName->setText(QString::fromStdString(suppression.
fileName));
83 mUI->mTextLineNumber->setText(suppression.
lineNumber > 0 ? QString::number(suppression.
lineNumber) : QString());
84 mUI->mTextSymbolName->setText(QString::fromStdString(suppression.
symbolName));
static void getErrorMessages(ErrorLogger &errorlogger)
Call all "getErrorMessages" in all registered Check classes.
This is an interface, which the class responsible of error logging should implement.
Wrapper for error messages, provided by reportErr()
SuppressionList::Suppression getSuppression() const
Translate the user input in the GUI into a suppression.
void setSuppression(const SuppressionList::Suppression &suppression)
Update the GUI so it corresponds with the given Cppcheck suppression.
Ui::NewSuppressionDialog * mUI
~NewSuppressionDialog() override
NewSuppressionDialog(QWidget *parent=nullptr)