centralize setting of AdapterStarted state

This commit is contained in:
Oswald Buddenhagen
2009-10-15 13:48:25 +02:00
parent e0a0aebbae
commit de9b4e8365
6 changed files with 1 additions and 5 deletions

View File

@@ -73,7 +73,6 @@ void AttachGdbAdapter::startAdapter()
void AttachGdbAdapter::handleGdbStarted() void AttachGdbAdapter::handleGdbStarted()
{ {
QTC_ASSERT(state() == AdapterStarting, qDebug() << state()); QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
setState(AdapterStarted);
emit adapterStarted(); emit adapterStarted();
} }

View File

@@ -73,7 +73,6 @@ void CoreGdbAdapter::startAdapter()
void CoreGdbAdapter::handleGdbStarted() void CoreGdbAdapter::handleGdbStarted()
{ {
QTC_ASSERT(state() == AdapterStarting, qDebug() << state()); QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
setState(AdapterStarted);
emit adapterStarted(); emit adapterStarted();
} }

View File

@@ -4100,6 +4100,7 @@ void GdbEngine::handleAdapterStartFailed(const QString &msg, const QString &sett
void GdbEngine::handleAdapterStarted() void GdbEngine::handleAdapterStarted()
{ {
setState(AdapterStarted);
debugMessage(_("ADAPTER SUCCESSFULLY STARTED, INITIALIZING GDB")); debugMessage(_("ADAPTER SUCCESSFULLY STARTED, INITIALIZING GDB"));
postCommand(_("show version"), CB(handleShowVersion)); postCommand(_("show version"), CB(handleShowVersion));

View File

@@ -93,7 +93,6 @@ void PlainGdbAdapter::startAdapter()
void PlainGdbAdapter::handleGdbStarted() void PlainGdbAdapter::handleGdbStarted()
{ {
QTC_ASSERT(state() == AdapterStarting, qDebug() << state()); QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
setState(AdapterStarted);
emit adapterStarted(); emit adapterStarted();
} }

View File

@@ -93,7 +93,6 @@ void RemoteGdbAdapter::startAdapter()
void RemoteGdbAdapter::handleGdbStarted() void RemoteGdbAdapter::handleGdbStarted()
{ {
QTC_ASSERT(state() == AdapterStarting, qDebug() << state()); QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
setState(AdapterStarted);
emit adapterStarted(); emit adapterStarted();
} }

View File

@@ -1563,7 +1563,6 @@ void TrkGdbAdapter::maybeAdapterStarted()
{ {
QTC_ASSERT(state() == AdapterStarting, qDebug() << state()); QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
if (m_gdbProc.state() == QProcess::Running && m_trkDevice.isOpen()) { if (m_gdbProc.state() == QProcess::Running && m_trkDevice.isOpen()) {
setState(AdapterStarted);
emit adapterStarted(); emit adapterStarted();
} }
} }