forked from qt-creator/qt-creator
debugger: prepare removal of plugin()->updateState(this);
This commit is contained in:
@@ -1487,11 +1487,17 @@ void DebuggerEngine::setState(DebuggerState state, bool forced)
|
||||
threadsHandler()->notifyRunning();
|
||||
|
||||
showMessage(msg, LogDebug);
|
||||
plugin()->updateState(this);
|
||||
updateViews();
|
||||
|
||||
emit stateChanged(d->m_state);
|
||||
}
|
||||
|
||||
void DebuggerEngine::updateViews()
|
||||
{
|
||||
// FIXME: This should not be done for slave engines.
|
||||
plugin()->updateState(this);
|
||||
}
|
||||
|
||||
void DebuggerEngine::setRunInWrapperEngine(bool value)
|
||||
{
|
||||
d->m_runInWrapperEngine = value;
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
void initializeFromTemplate(DebuggerEngine *other);
|
||||
|
||||
virtual void updateWatchData(const Internal::WatchData &data,
|
||||
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
|
||||
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
|
||||
void startDebugger(DebuggerRunControl *runControl);
|
||||
virtual bool isSessionEngine() const;
|
||||
|
||||
@@ -286,8 +286,11 @@ public:
|
||||
virtual void gotoLocation(const Internal::StackFrame &frame, bool setMarker);
|
||||
virtual void quitDebugger(); // called by DebuggerRunControl
|
||||
|
||||
virtual void updateViews();
|
||||
|
||||
signals:
|
||||
void stateChanged(const DebuggerState &state);
|
||||
void updateViewsRequested();
|
||||
|
||||
protected:
|
||||
// The base notify*() function implementation should be sufficient
|
||||
|
||||
@@ -2994,9 +2994,12 @@ void GdbEngine::handleThreadInfo(const GdbResponse &response)
|
||||
const int currentThreadId =
|
||||
response.data.findChild("current-thread-id").data().toInt();
|
||||
threadsHandler()->setCurrentThreadId(currentThreadId);
|
||||
plugin()->updateState(this); // Adjust Threads combobox.
|
||||
if (m_hasInferiorThreadList)
|
||||
postCommand("threadnames " + theDebuggerAction(MaximalStackDepth)->value().toByteArray(), CB(handleThreadNames), id);
|
||||
updateViews(); // Adjust Threads combobox.
|
||||
if (m_hasInferiorThreadList) {
|
||||
postCommand("threadnames " +
|
||||
theDebuggerAction(MaximalStackDepth)->value().toByteArray(),
|
||||
CB(handleThreadNames), id);
|
||||
}
|
||||
} else {
|
||||
// Fall back for older versions: Try to get at least a list
|
||||
// of running threads.
|
||||
@@ -3034,15 +3037,15 @@ void GdbEngine::handleThreadNames(const GdbResponse &response)
|
||||
for (int index = 0, n = threads.size(); index != n; ++index) {
|
||||
ThreadData & thread = threads[index];
|
||||
if (thread.id == (quint64)id) {
|
||||
thread.name = decodeData(name.findChild("value").data(), name.findChild("valueencoded").data().toInt());
|
||||
thread.name = decodeData(name.findChild("value").data(),
|
||||
name.findChild("valueencoded").data().toInt());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
threadsHandler()->setThreads(threads);
|
||||
plugin()->updateState(this);
|
||||
updateViews();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user