5050#include " xmlreportv2.h"
5151
5252static const char COLUMN[] = " column" ;
53- static const char CPPCHECKID[] = " cppcheckId" ;
5453static const char CWE[] = " cwe" ;
5554static const char ERRORID[] = " id" ;
5655static const char FILENAME[] = " file" ;
5756static const char FILE0[] = " file0" ;
5857static const char FUNCTION[] = " function" ;
58+ static const char HASH[] = " hash" ;
5959static const char HIDE[] = " hide" ;
6060static const char INCOMPLETE[] = " incomplete" ;
6161static const char INCONCLUSIVE[] = " inconclusive" ;
@@ -187,14 +187,14 @@ bool ResultsTree::addErrorItem(const ErrorItem &item)
187187 line.errorId = item.errorId ;
188188 line.incomplete = item.incomplete ;
189189 line.cwe = item.cwe ;
190- line.cppcheckId = item.cppcheckId ;
190+ line.hash = item.hash ;
191191 line.inconclusive = item.inconclusive ;
192192 line.summary = item.summary ;
193193 line.message = item.message ;
194194 line.severity = item.severity ;
195195 line.sinceDate = item.sinceDate ;
196196 if (const ProjectFile *activeProject = ProjectFile::getActiveProject ()) {
197- line.tags = activeProject->getWarningTags (item.cppcheckId );
197+ line.tags = activeProject->getWarningTags (item.hash );
198198 }
199199 // Create the base item for the error and ensure it has a proper
200200 // file item as a parent
@@ -219,7 +219,7 @@ bool ResultsTree::addErrorItem(const ErrorItem &item)
219219 data[ERRORID] = item.errorId ;
220220 data[INCOMPLETE] = item.incomplete ;
221221 data[CWE] = item.cwe ;
222- data[CPPCHECKID ] = item.cppcheckId ;
222+ data[HASH ] = item.hash ;
223223 data[INCONCLUSIVE] = item.inconclusive ;
224224 data[FILE0] = stripPath (item.file0 , true );
225225 data[FUNCTION] = item.function ;
@@ -256,7 +256,7 @@ bool ResultsTree::addErrorItem(const ErrorItem &item)
256256 child_data[ERRORID] = line.errorId ;
257257 child_data[INCOMPLETE] = line.incomplete ;
258258 child_data[CWE] = line.cwe ;
259- child_data[CPPCHECKID ] = line.cppcheckId ;
259+ child_data[HASH ] = line.hash ;
260260 child_data[INCONCLUSIVE] = line.inconclusive ;
261261 child_data[SYMBOLNAMES] = item.symbolNames ;
262262 child_item->setData (QVariant (child_data));
@@ -661,7 +661,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
661661 QAction *copy = new QAction (tr (" Copy" ), &menu);
662662 QAction *hide = new QAction (tr (" Hide" ), &menu);
663663 QAction *hideallid = new QAction (tr (" Hide all with id" ), &menu);
664- QAction *suppressCppcheckID = new QAction (tr (" Suppress cppcheck-id " ), &menu);
664+ QAction *suppresshash = new QAction (tr (" Suppress hash " ), &menu);
665665 QAction *opencontainingfolder = new QAction (tr (" Open containing folder" ), &menu);
666666
667667 if (multipleSelection) {
@@ -679,7 +679,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
679679 menu.addSeparator ();
680680 menu.addAction (hide);
681681 menu.addAction (hideallid);
682- menu.addAction (suppressCppcheckID );
682+ menu.addAction (suppresshash );
683683 if (!bughunting) {
684684 QAction *suppress = new QAction (tr (" Suppress selected id(s)" ), &menu);
685685 menu.addAction (suppress);
@@ -692,7 +692,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
692692 connect (copy, SIGNAL (triggered ()), this , SLOT (copy ()));
693693 connect (hide, SIGNAL (triggered ()), this , SLOT (hideResult ()));
694694 connect (hideallid, SIGNAL (triggered ()), this , SLOT (hideAllIdResult ()));
695- connect (suppressCppcheckID , &QAction::triggered, this , &ResultsTree::suppressCppcheckID );
695+ connect (suppresshash , &QAction::triggered, this , &ResultsTree::suppressHash );
696696 connect (opencontainingfolder, SIGNAL (triggered ()), this , SLOT (openContainingFolder ()));
697697
698698 const ProjectFile *currentProject = ProjectFile::getActiveProject ();
@@ -1066,7 +1066,7 @@ void ResultsTree::suppressSelectedIds()
10661066 emit suppressIds (selectedIds.toList ());
10671067}
10681068
1069- void ResultsTree::suppressCppcheckID ()
1069+ void ResultsTree::suppressHash ()
10701070{
10711071 if (!mSelectionModel )
10721072 return ;
@@ -1087,9 +1087,9 @@ void ResultsTree::suppressCppcheckID()
10871087 for (QStandardItem *item: selectedWarnings) {
10881088 QStandardItem *fileItem = item->parent ();
10891089 const QVariantMap data = item->data ().toMap ();
1090- if (projectFile && data.contains (" cppcheckId " )) {
1090+ if (projectFile && data.contains (HASH )) {
10911091 Suppressions::Suppression suppression;
1092- suppression.cppcheckId = data[CPPCHECKID ].toULongLong ();
1092+ suppression.hash = data[HASH ].toULongLong ();
10931093 suppression.errorId = data[ERRORID].toString ().toStdString ();
10941094 suppression.fileName = data[FILENAME].toString ().toStdString ();
10951095 suppression.lineNumber = data[LINE].toInt ();
@@ -1132,9 +1132,9 @@ void ResultsTree::tagSelectedItems(const QString &tag)
11321132 data[TAGS] = tag;
11331133 item->setData (QVariant (data));
11341134 item->parent ()->child (index.row (), COLUMN_TAGS)->setText (tag);
1135- if (currentProject && data.contains (CPPCHECKID )) {
1135+ if (currentProject && data.contains (HASH )) {
11361136 isTagged = true ;
1137- currentProject->setWarningTags (data[CPPCHECKID ].toULongLong (), tag);
1137+ currentProject->setWarningTags (data[HASH ].toULongLong (), tag);
11381138 }
11391139 }
11401140 }
@@ -1296,7 +1296,7 @@ void ResultsTree::readErrorItem(const QStandardItem *error, ErrorItem *item) con
12961296 item->errorId = data[ERRORID].toString ();
12971297 item->incomplete = data[INCOMPLETE].toBool ();
12981298 item->cwe = data[CWE].toInt ();
1299- item->cppcheckId = data[CPPCHECKID ].toULongLong ();
1299+ item->hash = data[HASH ].toULongLong ();
13001300 item->inconclusive = data[INCONCLUSIVE].toBool ();
13011301 item->file0 = data[FILE0].toString ();
13021302 item->sinceDate = data[SINCEDATE].toString ();
0 commit comments