GUI: Refactor linenumber in ErrorLine to unsigned int.

This commit is contained in:
Kimmo Varis 2010-07-12 01:51:36 +03:00
parent 4a2446d235
commit 801afae88b
4 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ ErrorItem::ErrorItem(const ErrorLine &line)
{
file = line.file;
files.append(line.file);
lines.append(line.line.toUInt());
lines.append(line.line);
id = line.id;
severity = line.severity;
msg = line.msg;

View File

@ -52,7 +52,7 @@ class ErrorLine
{
public:
QString file;
QString line;
unsigned int line;
QString id;
QString severity;
QString msg;

View File

@ -93,7 +93,7 @@ void ResultsTree::AddErrorItem(const ErrorItem &item)
ErrorLine line;
line.file = realfile;
line.id = item.id;
line.line = QString::number(item.lines[0]);
line.line = item.lines[0];
line.msg = item.msg;
line.severity = item.severity;
//Create the base item for the error and ensure it has a proper
@ -111,7 +111,7 @@ void ResultsTree::AddErrorItem(const ErrorItem &item)
data["severity"] = SeverityToShowType(item.severity);
data["message"] = item.msg;
data["file"] = item.files[0];
data["line"] = QString::number(item.lines[0]);
data["line"] = item.lines[0];
data["id"] = item.id;
stditem->setData(QVariant(data));

View File

@ -150,7 +150,7 @@ ErrorLine XmlReport::ReadError(QXmlStreamReader *reader)
{
QXmlStreamAttributes attribs = reader->attributes();
line.file = attribs.value("", FilenameAttribute).toString();
line.line = attribs.value("", LineAttribute).toString();
line.line = attribs.value("", LineAttribute).toString().toUInt();
line.id = attribs.value("", IdAttribute).toString();
line.severity = attribs.value("", SeverityAttribute).toString();
line.msg = attribs.value("", MsgAttribute).toString();