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

Method editSuppression

gui/projectfiledialog.cpp:950–963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948}
949
950void ProjectFileDialog::editSuppression(const QModelIndex & /*index*/)
951{
952 const int row = mUI->mListSuppressions->currentRow();
953 QListWidgetItem *item = mUI->mListSuppressions->item(row);
954 const int suppressionIndex = getSuppressionIndex(item->text());
955 if (suppressionIndex >= 0) { // TODO what if suppression is not found?
956 NewSuppressionDialog dlg;
957 dlg.setSuppression(mSuppressions[suppressionIndex]);
958 if (dlg.exec() == QDialog::Accepted) {
959 mSuppressions[suppressionIndex] = dlg.getSuppression();
960 setSuppressions(mSuppressions);
961 }
962 }
963}
964
965int ProjectFileDialog::getSuppressionIndex(const QString &shortText) const
966{

Callers

nothing calls this directly

Calls 3

setSuppressionsFunction · 0.85
setSuppressionMethod · 0.80
getSuppressionMethod · 0.80

Tested by

no test coverage detected