forked from qt-creator/qt-creator
debugger: fix vanishing location mark in disassembler mode
Task-number: QTCREATORBUG-4157
This commit is contained in:
@@ -246,6 +246,7 @@ public slots:
|
||||
void scheduleResetLocation()
|
||||
{
|
||||
m_stackHandler.scheduleResetLocation();
|
||||
m_disassemblerAgent.scheduleResetLocation();
|
||||
m_locationTimer.setSingleShot(true);
|
||||
m_locationTimer.start(80);
|
||||
}
|
||||
|
||||
@@ -117,13 +117,15 @@ public:
|
||||
|
||||
QHash<QString, DisassemblerLines> cache;
|
||||
QString mimeType;
|
||||
bool m_resetLocationScheduled;
|
||||
};
|
||||
|
||||
DisassemblerAgentPrivate::DisassemblerAgentPrivate()
|
||||
: editor(0),
|
||||
tryMixed(true),
|
||||
locationMark(new LocationMark2),
|
||||
mimeType(_("text/x-qtcreator-generic-asm"))
|
||||
mimeType(_("text/x-qtcreator-generic-asm")),
|
||||
m_resetLocationScheduled(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -162,11 +164,19 @@ void DisassemblerAgent::cleanup()
|
||||
d->cache.clear();
|
||||
}
|
||||
|
||||
void DisassemblerAgent::scheduleResetLocation()
|
||||
{
|
||||
d->m_resetLocationScheduled = true;
|
||||
}
|
||||
|
||||
void DisassemblerAgent::resetLocation()
|
||||
{
|
||||
if (!d->editor)
|
||||
return;
|
||||
d->editor->markableInterface()->removeMark(d->locationMark);
|
||||
if (d->m_resetLocationScheduled) {
|
||||
d->m_resetLocationScheduled = false;
|
||||
d->editor->markableInterface()->removeMark(d->locationMark);
|
||||
}
|
||||
}
|
||||
|
||||
static QString frameKey(const Location &loc)
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
void setTryMixed(bool on);
|
||||
void setLocation(const Location &location);
|
||||
const Location &location() const;
|
||||
void scheduleResetLocation();
|
||||
void resetLocation();
|
||||
void setContents(const DisassemblerLines &contents);
|
||||
void updateLocationMarker();
|
||||
|
||||
Reference in New Issue
Block a user