Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
270cd904
Commit
270cd904
authored
14 years ago
by
Arvid Ephraim Picciani
Browse files
Options
Downloads
Patches
Plain Diff
Clean up StackFrame
Reviewed-by: hjk
parent
728ef58b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/debugger/stackframe.cpp
+15
-19
15 additions, 19 deletions
src/plugins/debugger/stackframe.cpp
src/plugins/debugger/stackframe.h
+5
-2
5 additions, 2 deletions
src/plugins/debugger/stackframe.h
with
20 additions
and
21 deletions
src/plugins/debugger/stackframe.cpp
+
15
−
19
View file @
270cd904
...
...
@@ -28,15 +28,12 @@
**************************************************************************/
#include
"stackframe.h"
#include
"stackhandler.h"
#include
<QtCore/QFileInfo>
#include
<QtCore/QDebug>
#include
<QtCore/QDir>
#include
<QtCore/QTextStream>
#include
<QtGui/QToolTip>
#include
<QtGui/QFontMetrics>
#include
<QtCore/QCoreApplication>
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
<<
"<html><body><table>"
<<
"<tr><td>"
<<
StackHandler
::
tr
(
"Address:"
)
<<
"</td><td>0x"
;
<<
"<tr><td>"
<<
tr
(
"Address:"
)
<<
"</td><td>0x"
;
str
.
setIntegerBase
(
16
);
str
<<
address
;
str
.
setIntegerBase
(
10
);
str
<<
"</td></tr>"
<<
"<tr><td>"
<<
StackHandler
::
tr
(
"Function:"
)
<<
"</td><td>"
<<
function
<<
"</td></tr>"
<<
"<tr><td>"
<<
StackHandler
::
tr
(
"File:"
)
<<
"</td><td width="
<<
QFontMetrics
(
QToolTip
::
font
()).
width
(
filePath
)
<<
">"
<<
filePath
<<
"</td></tr>"
<<
"<tr><td>"
<<
StackHandler
::
tr
(
"Line:"
)
<<
"</td><td>"
<<
line
<<
"</td></tr>"
<<
"<tr><td>"
<<
StackHandler
::
tr
(
"From:"
)
<<
"</td><td>"
<<
from
<<
"</td></tr>"
<<
"<tr><td>"
<<
StackHandler
::
tr
(
"To:"
)
<<
"</td><td>"
<<
to
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"Function:"
)
<<
"</td><td>"
<<
function
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"File:"
)
<<
"</td><td>"
<<
filePath
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"Line:"
)
<<
"</td><td>"
<<
line
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"From:"
)
<<
"</td><td>"
<<
from
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"To:"
)
<<
"</td><td>"
<<
to
<<
"</td></tr>"
<<
"</table></body></html>"
;
return
res
;
}
...
...
This diff is collapsed.
Click to expand it.
src/plugins/debugger/stackframe.h
+
5
−
2
View file @
270cd904
...
...
@@ -33,6 +33,7 @@
#include
<QtCore/QList>
#include
<QtCore/QMetaType>
#include
<QtCore/QString>
#include
<QtCore/QCoreApplication>
QT_BEGIN_NAMESPACE
class
QDebug
;
...
...
@@ -51,13 +52,15 @@ public:
QString
toString
()
const
;
public:
int
level
;
q
int
32
level
;
QString
function
;
QString
file
;
// We try to put an absolute file name in there.
QString
from
;
// Sometimes something like "/usr/lib/libstdc++.so.6"
QString
to
;
// Used in ScriptEngine only.
int
line
;
q
int
32
line
;
quint64
address
;
Q_DECLARE_TR_FUNCTIONS
(
StackHandler
)
};
QDebug
operator
<<
(
QDebug
d
,
const
StackFrame
&
frame
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment