From 50dba88077814d643ca2a8654c256915b9613e94 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Thu, 27 Jan 2011 08:47:28 +0200 Subject: [PATCH] Fix formatting of debug messages to log view. Ticket #2513 (GUI: Garbage printed to log after missing include warning) The linenumber was not properly converted to the QString so there were garbage printed to the log. --- gui/erroritem.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/erroritem.cpp b/gui/erroritem.cpp index 35506c697..a7b09c853 100644 --- a/gui/erroritem.cpp +++ b/gui/erroritem.cpp @@ -43,9 +43,11 @@ ErrorItem::ErrorItem(const ErrorLine &line) QString ErrorItem::ToString() const { QString str = file + " - " + id + " - " + severity +"\n"; - str += " " + summary; - str += "\n" + message; + str += summary + "\n"; + str += message + "\n"; for (int i = 0; i < files.size(); i++) - str += " " + files[i] + ": " + lines[i] + "\n"; + { + str += " " + files[i] + ": " + QString::number(lines[i]) + "\n"; + } return str; }