From 270cd904f809cdfae831819e28e8e459248bb33e Mon Sep 17 00:00:00 2001 From: Arvid Ephraim Picciani Date: Fri, 15 Oct 2010 11:17:32 +0200 Subject: Clean up StackFrame Reviewed-by: hjk --- src/plugins/debugger/stackframe.cpp | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/plugins/debugger/stackframe.cpp') diff --git a/src/plugins/debugger/stackframe.cpp b/src/plugins/debugger/stackframe.cpp index 18062920a8..da62a225d7 100644 --- a/src/plugins/debugger/stackframe.cpp +++ b/src/plugins/debugger/stackframe.cpp @@ -28,15 +28,12 @@ **************************************************************************/ #include "stackframe.h" -#include "stackhandler.h" #include #include #include #include - -#include -#include +#include namespace Debugger { namespace Internal { @@ -48,12 +45,12 @@ namespace Internal { //////////////////////////////////////////////////////////////////////// StackFrame::StackFrame() - : level(0), line(0), address(0) + : level(-1), line(-1), address(0) {} void StackFrame::clear() { - line = level = 0; + line = level = -1; function.clear(); file.clear(); from.clear(); @@ -70,16 +67,16 @@ QString StackFrame::toString() const { QString res; QTextStream str(&res); - str << StackHandler::tr("Address:") << ' '; + str << tr("Address:") << ' '; str.setIntegerBase(16); str << address; str.setIntegerBase(10); str << ' ' - << StackHandler::tr("Function:") << ' ' << function << ' ' - << StackHandler::tr("File:") << ' ' << file << ' ' - << StackHandler::tr("Line:") << ' ' << line << ' ' - << StackHandler::tr("From:") << ' ' << from << ' ' - << StackHandler::tr("To:") << ' ' << to; + << tr("Function:") << ' ' << function << ' ' + << tr("File:") << ' ' << file << ' ' + << tr("Line:") << ' ' << line << ' ' + << tr("From:") << ' ' << from << ' ' + << tr("To:") << ' ' << to; return res; } @@ -89,17 +86,16 @@ QString StackFrame::toToolTip() const QString res; QTextStream str(&res); str << "" - << "" - << "" - << "" - << "" - << "" - << "" + << "" + << "" + << "" + << "" + << "" << "
" << StackHandler::tr("Address:") << "0x"; + << "
" << tr("Address:") << "0x"; str.setIntegerBase(16); str << address; str.setIntegerBase(10); str << "
" << StackHandler::tr("Function:") << "" << function << "
" << StackHandler::tr("File:") << "" << filePath << "
" << StackHandler::tr("Line:") << "" << line << "
" << StackHandler::tr("From:") << "" << from << "
" << StackHandler::tr("To:") << "" << to << "
" << tr("Function:") << "" << function << "
" << tr("File:") << "" << filePath << "
" << tr("Line:") << "" << line << "
" << tr("From:") << "" << from << "
" << tr("To:") << "" << to << "
"; return res; } -- cgit v1.2.1