From 801afae88bedf609da860db0432ffd9fc878fded Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 12 Jul 2010 01:51:36 +0300 Subject: [PATCH] GUI: Refactor linenumber in ErrorLine to unsigned int. --- gui/erroritem.cpp | 2 +- gui/erroritem.h | 2 +- gui/resultstree.cpp | 4 ++-- gui/xmlreport.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/erroritem.cpp b/gui/erroritem.cpp index 98f620671..bb2eb219b 100644 --- a/gui/erroritem.cpp +++ b/gui/erroritem.cpp @@ -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; diff --git a/gui/erroritem.h b/gui/erroritem.h index 73fc661d9..447d89700 100644 --- a/gui/erroritem.h +++ b/gui/erroritem.h @@ -52,7 +52,7 @@ class ErrorLine { public: QString file; - QString line; + unsigned int line; QString id; QString severity; QString msg; diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index bd24bb1cd..92ee3da33 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -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)); diff --git a/gui/xmlreport.cpp b/gui/xmlreport.cpp index 57873feba..e015657b6 100644 --- a/gui/xmlreport.cpp +++ b/gui/xmlreport.cpp @@ -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();