diff --git a/gui/erroritem.cpp b/gui/erroritem.cpp index 6972d8cfe..99f9ebb29 100644 --- a/gui/erroritem.cpp +++ b/gui/erroritem.cpp @@ -29,7 +29,7 @@ ErrorItem::ErrorItem(const ErrorItem &item) file = item.file; files = item.files; lines = item.lines; - id = item.id; + errorId = item.errorId; inconclusive = item.inconclusive; severity = item.severity; summary = item.summary; @@ -41,7 +41,7 @@ ErrorItem::ErrorItem(const ErrorLine &line) file = line.file; files.append(line.file); lines.append(line.line); - id = line.id; + errorId = line.errorId; inconclusive = line.inconclusive; severity = line.severity; summary = line.summary; @@ -50,7 +50,7 @@ ErrorItem::ErrorItem(const ErrorLine &line) QString ErrorItem::ToString() const { - QString str = file + " - " + id + " - "; + QString str = file + " - " + errorId + " - "; if (inconclusive) str += "inconclusive "; str += GuiSeverity::toString(severity) +"\n"; diff --git a/gui/erroritem.h b/gui/erroritem.h index 7a4f67940..8bfe6cf1d 100644 --- a/gui/erroritem.h +++ b/gui/erroritem.h @@ -111,7 +111,7 @@ public: QString file; QStringList files; QList lines; - QString id; + QString errorId; Severity::SeverityType severity; bool inconclusive; QString summary; @@ -128,7 +128,7 @@ class ErrorLine public: QString file; unsigned int line; - QString id; + QString errorId; bool inconclusive; Severity::SeverityType severity; QString summary; diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index bb02cdc92..517900127 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -117,7 +117,7 @@ void ResultsTree::AddErrorItem(const ErrorItem &item) if (!item.summary.contains(mFilter, Qt::CaseInsensitive) && !item.message.contains(mFilter, Qt::CaseInsensitive) && !item.file.contains(mFilter, Qt::CaseInsensitive) && - !item.id.contains(mFilter, Qt::CaseInsensitive)) + !item.errorId.contains(mFilter, Qt::CaseInsensitive)) { hide = true; } @@ -131,7 +131,7 @@ void ResultsTree::AddErrorItem(const ErrorItem &item) ErrorLine line; line.file = realfile; - line.id = item.id; + line.errorId = item.errorId; line.inconclusive = item.inconclusive; line.line = item.lines[0]; line.summary = item.summary; @@ -155,7 +155,7 @@ void ResultsTree::AddErrorItem(const ErrorItem &item) data["message"] = item.message; data["file"] = item.files[0]; data["line"] = item.lines[0]; - data["id"] = item.id; + data["id"] = item.errorId; data["inconclusive"] = item.inconclusive; stditem->setData(QVariant(data)); @@ -177,7 +177,7 @@ void ResultsTree::AddErrorItem(const ErrorItem &item) child_data["message"] = line.message; child_data["file"] = item.files[i]; child_data["line"] = line.line; - child_data["id"] = line.id; + child_data["id"] = line.errorId; child_data["inconclusive"] = line.inconclusive; child_item->setData(QVariant(child_data)); } @@ -892,7 +892,7 @@ void ResultsTree::SaveErrors(Report *report, QStandardItem *item) item.severity = ShowTypes::ShowTypeToSeverity(ShowTypes::VariantToShowType(data["severity"])); item.summary = data["summary"].toString(); item.message = data["message"].toString(); - item.id = data["id"].toString(); + item.errorId = data["id"].toString(); item.inconclusive = data["inconclusive"].toBool(); QString file = StripPath(data["file"].toString(), true); unsigned int line = data["line"].toUInt(); diff --git a/gui/test/xmlreportv1/testxmlreportv1.cpp b/gui/test/xmlreportv1/testxmlreportv1.cpp index d4f4338ed..f4713b30c 100644 --- a/gui/test/xmlreportv1/testxmlreportv1.cpp +++ b/gui/test/xmlreportv1/testxmlreportv1.cpp @@ -34,7 +34,7 @@ void TestXmlReportV1::readXml() ErrorItem item = errors[0]; QCOMPARE(item.file, QString("test.cxx")); QCOMPARE(item.lines[0], (unsigned int)11); - QCOMPARE(item.id, QString("unreadVariable")); + QCOMPARE(item.errorId, QString("unreadVariable")); QCOMPARE(GuiSeverity::toString(item.severity), QString("style")); QCOMPARE(item.summary, QString("Variable 'a' is assigned a value that is never used")); QCOMPARE(item.message, QString("Variable 'a' is assigned a value that is never used")); diff --git a/gui/test/xmlreportv2/testxmlreportv2.cpp b/gui/test/xmlreportv2/testxmlreportv2.cpp index 2b5a2972c..b03ae4052 100644 --- a/gui/test/xmlreportv2/testxmlreportv2.cpp +++ b/gui/test/xmlreportv2/testxmlreportv2.cpp @@ -37,7 +37,7 @@ void TestXmlReportV2::readXml() QCOMPARE(item.lines.size(), 1); QCOMPARE(item.files[0], QString("test.cxx")); QCOMPARE(item.lines[0], (unsigned int)11); - QCOMPARE(item.id, QString("unreadVariable")); + QCOMPARE(item.errorId, QString("unreadVariable")); QCOMPARE(GuiSeverity::toString(item.severity), QString("style")); QCOMPARE(item.summary, QString("Variable 'a' is assigned a value that is never used")); QCOMPARE(item.message, QString("Variable 'a' is assigned a value that is never used")); @@ -50,7 +50,7 @@ void TestXmlReportV2::readXml() QCOMPARE(item2.lines[0], (unsigned int)32); QCOMPARE(item2.files[1], QString("test.cxx")); QCOMPARE(item2.lines[1], (unsigned int)16); - QCOMPARE(item2.id, QString("mismatchAllocDealloc")); + QCOMPARE(item2.errorId, QString("mismatchAllocDealloc")); QCOMPARE(GuiSeverity::toString(item2.severity), QString("error")); QCOMPARE(item2.summary, QString("Mismatching allocation and deallocation: k")); QCOMPARE(item2.message, QString("Mismatching allocation and deallocation: k")); diff --git a/gui/threadresult.cpp b/gui/threadresult.cpp index 7fe32ca0f..ac722273f 100644 --- a/gui/threadresult.cpp +++ b/gui/threadresult.cpp @@ -76,7 +76,7 @@ void ThreadResult::reportErr(const ErrorLogger::ErrorMessage &msg) ErrorItem item; item.file = QString(callStackToString(msg._callStack).c_str()); item.files = files; - item.id = QString(msg._id.c_str()); + item.errorId = QString(msg._id.c_str()); item.lines = lines; item.summary = QString::fromStdString(msg.shortMessage()); item.message = QString::fromStdString(msg.verboseMessage()); diff --git a/gui/xmlreportv1.cpp b/gui/xmlreportv1.cpp index 952e19b88..3589c7893 100644 --- a/gui/xmlreportv1.cpp +++ b/gui/xmlreportv1.cpp @@ -103,7 +103,7 @@ void XmlReportV1::WriteError(const ErrorItem &error) mXmlWriter->writeAttribute(FilenameAttribute, file); const QString line = QString::number(error.lines[error.lines.size() - 1]); mXmlWriter->writeAttribute(LineAttribute, line); - mXmlWriter->writeAttribute(IdAttribute, error.id); + mXmlWriter->writeAttribute(IdAttribute, error.errorId); // Don't localize severity so we can read these files mXmlWriter->writeAttribute(SeverityAttribute, GuiSeverity::toString(error.severity)); @@ -170,7 +170,7 @@ ErrorItem XmlReportV1::ReadError(QXmlStreamReader *reader) item.files.push_back(file); const int line = attribs.value("", LineAttribute).toString().toUInt(); item.lines.push_back(line); - item.id = attribs.value("", IdAttribute).toString(); + item.errorId = attribs.value("", IdAttribute).toString(); item.severity = GuiSeverity::fromString(attribs.value("", SeverityAttribute).toString()); // NOTE: This dublicates the message to Summary-field. But since diff --git a/gui/xmlreportv2.cpp b/gui/xmlreportv2.cpp index dbf244c25..2ba68b956 100644 --- a/gui/xmlreportv2.cpp +++ b/gui/xmlreportv2.cpp @@ -113,7 +113,7 @@ void XmlReportV2::WriteError(const ErrorItem &error) return; mXmlWriter->writeStartElement(ErrorElementName); - mXmlWriter->writeAttribute(IdAttribute, error.id); + mXmlWriter->writeAttribute(IdAttribute, error.errorId); // Don't localize severity so we can read these files mXmlWriter->writeAttribute(SeverityAttribute, GuiSeverity::toString(error.severity)); @@ -201,7 +201,7 @@ ErrorItem XmlReportV2::ReadError(QXmlStreamReader *reader) if (mXmlReader->name() == ErrorElementName) { QXmlStreamAttributes attribs = reader->attributes(); - item.id = attribs.value("", IdAttribute).toString(); + item.errorId = attribs.value("", IdAttribute).toString(); item.severity = GuiSeverity::fromString(attribs.value("", SeverityAttribute).toString()); const QString summary = attribs.value("", MsgAttribute).toString(); item.summary = XmlReport::unquoteMessage(summary);