debugger: fix display of correct thread in the thread combobox

This commit is contained in:
hjk
2010-07-21 13:11:03 +02:00
parent 57c96ee3a9
commit dfd44a0ceb
6 changed files with 26 additions and 30 deletions

View File

@@ -51,10 +51,11 @@
#include "threadswindow.h"
#include "watchwindow.h"
#include "watchutils.h"
#include "breakhandler.h"
#include "snapshothandler.h"
#include "sessionengine.h"
#include "snapshothandler.h"
#include "threadshandler.h"
#include "watchutils.h"
#ifdef Q_OS_WIN
# include "shared/peutils.h"
@@ -2136,6 +2137,9 @@ void DebuggerPluginPrivate::setInitialState()
void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
{
//m_threadBox->setModel(engine->threadsModel());
//m_threadBox->setModel(engine->threadsModel());
m_threadBox->setCurrentIndex(engine->threadsHandler()->currentThread());
m_watchersWindow->setVisible(
m_watchersWindow->model()->rowCount(QModelIndex()) > 0);
m_returnWindow->setVisible(
@@ -2192,16 +2196,11 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|| m_state == InferiorUnrunnable;
const bool running = m_state == InferiorRunOk;
// FIXME ABC
// if (running)
// threadsHandler()->notifyRunning();
const bool stopped = m_state == InferiorStopOk;
if (stopped)
QApplication::alert(mainWindow(), 3000);
//qDebug() << "FLAGS: " << stoppable << running << stopped;
m_actions.watchAction1->setEnabled(true);
m_actions.watchAction2->setEnabled(true);
m_actions.breakAction->setEnabled(true);