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
7a77f837
Commit
7a77f837
authored
15 years ago
by
hjk
Browse files
Options
Downloads
Patches
Plain Diff
debugger: stack view cosmetics
parent
1fd6aa1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/debugger/stackhandler.cpp
+15
-12
15 additions, 12 deletions
src/plugins/debugger/stackhandler.cpp
src/plugins/debugger/stackhandler.h
+2
-2
2 additions, 2 deletions
src/plugins/debugger/stackhandler.h
with
17 additions
and
14 deletions
src/plugins/debugger/stackhandler.cpp
+
15
−
12
View file @
7a77f837
...
...
@@ -53,10 +53,11 @@ bool StackFrame::isUsable() const
////////////////////////////////////////////////////////////////////////
StackHandler
::
StackHandler
(
QObject
*
parent
)
:
QAbstractTableModel
(
parent
),
m_currentIndex
(
0
)
:
QAbstractTableModel
(
parent
),
m_positionIcon
(
QIcon
(
":/gdbdebugger/images/location.svg"
)),
m_emptyIcon
(
QIcon
(
":/gdbdebugger/images/empty.svg"
))
{
m_emptyIcon
=
QIcon
(
":/gdbdebugger/images/empty.svg"
);
m_positionIcon
=
QIcon
(
":/gdbdebugger/images/location.svg"
);
m_currentIndex
=
0
;
m_canExpand
=
false
;
}
...
...
@@ -78,7 +79,11 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
if
(
index
.
row
()
==
m_stackFrames
.
size
())
{
if
(
role
==
Qt
::
DisplayRole
&&
index
.
column
()
==
0
)
return
"<...>"
;
return
tr
(
"..."
);
if
(
role
==
Qt
::
DisplayRole
&&
index
.
column
()
==
1
)
return
tr
(
"<More>"
);
if
(
role
==
Qt
::
DecorationRole
&&
index
.
column
()
==
0
)
return
m_emptyIcon
;
return
QVariant
();
}
...
...
@@ -115,15 +120,13 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
QVariant
StackHandler
::
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
)
const
{
if
(
orientation
==
Qt
::
Horizontal
&&
role
==
Qt
::
DisplayRole
)
{
s
tatic
const
char
*
const
headers
[]
=
{
QT_TR_NOOP
(
"Level"
)
,
QT_TR_NOOP
(
"Function"
)
,
QT_TR_NOOP
(
"File"
)
,
QT_TR_NOOP
(
"Line"
)
,
QT_TR_NOOP
(
"Address"
)
s
witch
(
section
)
{
case
0
:
return
tr
(
"Level"
)
;
case
1
:
return
tr
(
"Function"
)
;
case
2
:
return
tr
(
"File"
)
;
case
3
:
return
tr
(
"Line"
)
;
case
4
:
return
tr
(
"Address"
)
;
};
if
(
section
<
5
)
return
tr
(
headers
[
section
]);
}
return
QVariant
();
}
...
...
This diff is collapsed.
Click to expand it.
src/plugins/debugger/stackhandler.h
+
2
−
2
View file @
7a77f837
...
...
@@ -86,8 +86,8 @@ private:
QList
<
StackFrame
>
m_stackFrames
;
int
m_currentIndex
;
QI
con
m_positionIcon
;
QI
con
m_emptyIcon
;
con
st
QVariant
m_positionIcon
;
con
st
QVariant
m_emptyIcon
;
bool
m_canExpand
;
};
...
...
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