GUI: Rename ErrorItem::id to ErrorItem::errorId.
This commit is contained in:
parent
b73896bcc5
commit
4c24b6a804
|
@ -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";
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
QString file;
|
||||
QStringList files;
|
||||
QList<unsigned int> 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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue