Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
a59f45c5
Commit
a59f45c5
authored
Jul 07, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: try to improve tooltip handling
Still far from usable.
parent
ed843bf5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+7
-5
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+1
-1
src/plugins/debugger/gdb/pythongdbengine.cpp
src/plugins/debugger/gdb/pythongdbengine.cpp
+5
-2
No files found.
src/plugins/debugger/gdb/gdbengine.cpp
View file @
a59f45c5
...
...
@@ -114,9 +114,9 @@ static const char winPythonVersionC[] = "python2.5";
#define CB(callback) &GdbEngine::callback, STRINGIFY(callback)
QByteArray
GdbEngine
::
tooltipIName
()
QByteArray
GdbEngine
::
tooltipIName
(
const
QString
&
exp
)
{
return
"tooltip.
x
"
;
return
"tooltip."
+
exp
.
toLatin1
().
toHex
()
;
}
static
bool
stateAcceptsGdbCommands
(
DebuggerState
state
)
...
...
@@ -3222,7 +3222,7 @@ QPoint GdbEngine::m_toolTipPos;
bool
GdbEngine
::
showToolTip
()
{
QByteArray
iname
=
tooltipIName
();
QByteArray
iname
=
tooltipIName
(
m_toolTipExpression
);
if
(
!
theDebuggerBoolSetting
(
UseToolTipsInMainEditor
))
{
watchHandler
()
->
removeData
(
iname
);
...
...
@@ -3257,8 +3257,10 @@ void GdbEngine::setToolTipExpression(const QPoint &mousePos,
m_toolTipPos
=
mousePos
;
int
line
,
column
;
QString
exp
=
cppExpressionAt
(
editor
,
cursorPos
,
&
line
,
&
column
);
if
(
exp
==
m_toolTipExpression
)
if
(
!
exp
.
isEmpty
()
&&
exp
==
m_toolTipExpression
)
{
showToolTip
();
return
;
}
m_toolTipExpression
=
exp
;
...
...
@@ -3326,7 +3328,7 @@ void GdbEngine::setToolTipExpression(const QPoint &mousePos,
WatchData
toolTip
;
toolTip
.
exp
=
exp
.
toLatin1
();
toolTip
.
name
=
exp
;
toolTip
.
iname
=
tooltipIName
();
toolTip
.
iname
=
tooltipIName
(
exp
);
watchHandler
()
->
removeData
(
toolTip
.
iname
);
watchHandler
()
->
insertData
(
toolTip
);
}
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
a59f45c5
...
...
@@ -525,7 +525,7 @@ private: ////////// View & Data Stuff //////////
static
QString
m_toolTipExpression
;
static
QPoint
m_toolTipPos
;
static
QByteArray
tooltipIName
();
static
QByteArray
tooltipIName
(
const
QString
&
exp
);
// HACK:
StackFrame
m_targetFrame
;
...
...
src/plugins/debugger/gdb/pythongdbengine.cpp
View file @
a59f45c5
...
...
@@ -60,8 +60,11 @@ void GdbEngine::updateLocalsPython(const QByteArray &varList)
expanded
+=
"formats:"
+
handler
->
individualFormatRequests
();
QByteArray
watchers
;
if
(
!
m_toolTipExpression
.
isEmpty
())
watchers
+=
m_toolTipExpression
.
toLatin1
()
+
'#'
+
tooltipIName
();
if
(
!
m_toolTipExpression
.
isEmpty
())
{
watchers
+=
m_toolTipExpression
.
toLatin1
();
watchers
+=
'#'
;
watchers
+=
tooltipIName
(
m_toolTipExpression
);
}
QHash
<
QByteArray
,
int
>
watcherNames
=
handler
->
watcherNames
();
QHashIterator
<
QByteArray
,
int
>
it
(
watcherNames
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment