Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
bd2d160a
Commit
bd2d160a
authored
Sep 15, 2010
by
hjk
Browse files
debugger: suppress variable tooltips with outdated contents
parent
2e02f4cb
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerengine.cpp
View file @
bd2d160a
...
...
@@ -35,6 +35,7 @@
#include "debuggeroutputwindow.h"
#include "debuggerplugin.h"
#include "debuggerstringutils.h"
#include "debuggertooltip.h"
#include "breakhandler.h"
#include "moduleshandler.h"
...
...
@@ -421,11 +422,26 @@ void DebuggerEngine::showStatusMessage(const QString &msg, int timeout) const
showMessage
(
msg
,
StatusBar
,
timeout
);
}
void
DebuggerEngine
::
removeTooltip
()
{
watchHandler
()
->
removeTooltip
();
hideDebuggerToolTip
();
}
void
DebuggerEngine
::
handleCommand
(
int
role
,
const
QVariant
&
value
)
{
//qDebug() << "COMMAND: " << role << value;
if
(
role
!=
RequestToolTipByExpressionRole
)
removeTooltip
();
switch
(
role
)
{
case
RequestActivateFrameRole
:
activateFrame
(
value
.
toInt
());
break
;
case
RequestReloadFullStackRole
:
reloadFullStack
();
break
;
case
RequestReloadSourceFilesRole
:
reloadSourceFiles
();
break
;
...
...
src/plugins/debugger/debuggerengine.h
View file @
bd2d160a
...
...
@@ -185,6 +185,7 @@ public:
virtual
void
selectThread
(
int
index
);
virtual
void
assignValueInDebugger
(
const
QString
&
expr
,
const
QString
&
value
);
virtual
void
removeTooltip
();
// Convenience
static
QMessageBox
*
showMessageBox
...
...
src/plugins/debugger/debuggertooltip.cpp
View file @
bd2d160a
...
...
@@ -151,7 +151,6 @@ void ToolTipWidget::run(const QPoint &point, QAbstractItemModel *model,
{
move
(
point
);
setModel
(
model
);
setRootIndex
(
index
.
parent
());
computeSize
();
setRootIsDecorated
(
model
->
hasChildren
(
index
));
// FIXME: use something more sensible
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
bd2d160a
...
...
@@ -3189,9 +3189,6 @@ bool GdbEngine::supportsThreads() const
//
//////////////////////////////////////////////////////////////////////
QString
GdbEngine
::
m_toolTipExpression
;
QPoint
GdbEngine
::
m_toolTipPos
;
bool
GdbEngine
::
showToolTip
()
{
QByteArray
iname
=
tooltipIName
(
m_toolTipExpression
);
...
...
@@ -4394,6 +4391,13 @@ void GdbEngine::resetCommandQueue()
}
}
void
GdbEngine
::
removeTooltip
()
{
m_toolTipExpression
.
clear
();
m_toolTipPos
=
QPoint
();
DebuggerEngine
::
removeTooltip
();
}
//
// Factory
//
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
bd2d160a
...
...
@@ -532,9 +532,10 @@ private: ////////// View & Data Stuff //////////
AbstractGdbProcess
*
gdbProc
()
const
;
void
showExecutionError
(
const
QString
&
message
);
static
QString
m_toolTipExpression
;
static
QPoint
m_toolTipPos
;
void
removeTooltip
();
static
QByteArray
tooltipIName
(
const
QString
&
exp
);
QString
m_toolTipExpression
;
QPoint
m_toolTipPos
;
// HACK:
StackFrame
m_targetFrame
;
...
...
src/plugins/debugger/stackhandler.cpp
View file @
bd2d160a
...
...
@@ -140,8 +140,9 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
bool
StackHandler
::
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
{
switch
(
role
)
{
case
RequestReloadFullStackRole
:
case
RequestActivateFrameRole
:
m_engine
->
activateFrame
(
value
.
toInt
()
);
m_engine
->
handleCommand
(
role
,
value
);
return
true
;
case
RequestShowMemoryRole
:
...
...
@@ -154,10 +155,6 @@ bool StackHandler::setData(const QModelIndex &index, const QVariant &value, int
return
true
;
}
case
RequestReloadFullStackRole
:
m_engine
->
reloadFullStack
();
return
true
;
default:
return
QAbstractTableModel
::
setData
(
index
,
value
,
role
);
}
...
...
src/plugins/debugger/watchhandler.cpp
View file @
bd2d160a
...
...
@@ -1661,5 +1661,11 @@ void WatchHandler::showInEditorHelper(QString *contents, WatchItem *item, int de
showInEditorHelper
(
contents
,
child
,
depth
+
1
);
}
void
WatchHandler
::
removeTooltip
()
{
m_tooltips
->
reinitialize
();
m_tooltips
->
emitAllChanged
();
}
}
// namespace Internal
}
// namespace Debugger
src/plugins/debugger/watchhandler.h
View file @
bd2d160a
...
...
@@ -156,6 +156,7 @@ public:
void
loadSessionData
();
void
saveSessionData
();
void
removeTooltip
();
void
initializeFromTemplate
(
WatchHandler
*
other
);
void
storeToTemplate
(
WatchHandler
*
other
);
...
...
Write
Preview
Supports
Markdown
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