diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 711a3ae2bc759d921bafeb97719b2e1bb59155f1..e92bdfcdec1a492dbde6991593642c285d4e880c 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -553,12 +553,6 @@ void DebuggerManager::showStatusMessage(const QString &msg, int timeout) } } -void DebuggerManager::notifyStartupFinished() -{ - setStatus(DebuggerProcessReady); - showStatusMessage(tr("Startup finished. Debugger ready."), -1); -} - void DebuggerManager::notifyInferiorStopRequested() { setStatus(DebuggerInferiorStopRequested); @@ -572,12 +566,6 @@ void DebuggerManager::notifyInferiorStopped() showStatusMessage(tr("Stopped."), 5000); } -void DebuggerManager::notifyInferiorUpdateFinished() -{ - setStatus(DebuggerInferiorReady); - showStatusMessage(tr("Stopped."), 5000); -} - void DebuggerManager::notifyInferiorRunningRequested() { setStatus(DebuggerInferiorRunningRequested); @@ -592,7 +580,7 @@ void DebuggerManager::notifyInferiorRunning() void DebuggerManager::notifyInferiorExited() { - setStatus(DebuggerProcessReady); + setStatus(DebuggerProcessNotReady); showStatusMessage(tr("Stopped."), 5000); } @@ -679,7 +667,9 @@ void DebuggerManager::toggleBreakpoint(const QString &fileName, int lineNumber) { QTC_ASSERT(m_engine, return); QTC_ASSERT(m_breakHandler, return); - if (status() != DebuggerInferiorRunning && status() != DebuggerInferiorStopped) { + if (status() != DebuggerInferiorRunning + && status() != DebuggerInferiorStopped + && status() != DebuggerProcessNotReady) { showStatusMessage(tr("Changing breakpoint state requires either a " "fully running or fully stopped application.")); return; @@ -842,11 +832,13 @@ bool DebuggerManager::startNewDebugger(StartMode mode) else setDebuggerType(GdbDebugger); - if (!m_engine->startDebugger()) + setStatus(DebuggerProcessStartingUp); + if (!m_engine->startDebugger()) { + setStatus(DebuggerProcessNotReady); return false; + } m_busy = false; - setStatus(DebuggerProcessStartingUp); return true; } @@ -1049,16 +1041,11 @@ void DebuggerManager::setStatus(int status) const bool started = status == DebuggerInferiorRunning || status == DebuggerInferiorRunningRequested || status == DebuggerInferiorStopRequested - || status == DebuggerInferiorStopped - || status == DebuggerInferiorUpdating - || status == DebuggerInferiorUpdateFinishing - || status == DebuggerInferiorReady; + || status == DebuggerInferiorStopped; const bool starting = status == DebuggerProcessStartingUp; const bool running = status == DebuggerInferiorRunning; - const bool ready = status == DebuggerInferiorStopped - || status == DebuggerInferiorReady - || status == DebuggerProcessReady; + const bool ready = status == DebuggerInferiorStopped; m_startExternalAction->setEnabled(!started && !starting); m_attachExternalAction->setEnabled(!started && !starting); diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h index fd5c06e4c6e8bdf10186eeebd20583e596e33063..18d5475e728f59c092c1a4d7ff29ecc5ac082c5e 100644 --- a/src/plugins/debugger/debuggermanager.h +++ b/src/plugins/debugger/debuggermanager.h @@ -77,23 +77,15 @@ class BreakpointData; // DebuggerProcessNotReady // | // DebuggerProcessStartingUp -// | -// DebuggerReady [R] [N] // | <-------------------------------------. // DebuggerInferiorRunningRequested | -// | | -// DebuggerInferiorRunning | -// | | +// | | +// DebuggerInferiorRunning | +// | | // DebuggerInferiorStopRequested | // | | // DebuggerInferiorStopped | // | | -// DebuggerInferiorUpdating | -// | | -// DebuggerInferiorUpdateFinishing | -// | | -// DebuggerInferiorReady [C] [N] | -// | | // `---------------------------------------' // // Allowed actions: @@ -107,17 +99,11 @@ enum DebuggerStatus { DebuggerProcessNotReady, // Debugger not started DebuggerProcessStartingUp, // Debugger starting up - DebuggerProcessReady, // Debugger started, Inferior not yet - // running or already finished DebuggerInferiorRunningRequested, // Debuggee requested to run DebuggerInferiorRunning, // Debuggee running DebuggerInferiorStopRequested, // Debuggee running, stop requested DebuggerInferiorStopped, // Debuggee stopped - - DebuggerInferiorUpdating, // Debuggee updating data views - DebuggerInferiorUpdateFinishing, // Debuggee updating data views aborting - DebuggerInferiorReady, }; @@ -151,10 +137,8 @@ private: friend class WinEngine; // called from the engines after successful startup - virtual void notifyStartupFinished() = 0; virtual void notifyInferiorStopRequested() = 0; virtual void notifyInferiorStopped() = 0; - virtual void notifyInferiorUpdateFinished() = 0; virtual void notifyInferiorRunningRequested() = 0; virtual void notifyInferiorRunning() = 0; virtual void notifyInferiorExited() = 0; @@ -343,9 +327,7 @@ private: QString selectedPluginBreakpointsPattern() const { return m_settings.m_pluginSelectedBreakpointsPattern; } - void notifyStartupFinished(); void notifyInferiorStopped(); - void notifyInferiorUpdateFinished(); void notifyInferiorRunningRequested(); void notifyInferiorStopRequested(); void notifyInferiorRunning(); diff --git a/src/plugins/debugger/scriptengine.cpp b/src/plugins/debugger/scriptengine.cpp index b868dcd99ad4044b107b3a6140c535bd4053b299..0af403322730482f5926e29d8e6bca1ce209e4b7 100644 --- a/src/plugins/debugger/scriptengine.cpp +++ b/src/plugins/debugger/scriptengine.cpp @@ -216,7 +216,6 @@ bool ScriptEngine::startDebugger() m_scriptContents = stream.readAll(); scriptFile.close(); attemptBreakpointSynchronization(); - QTimer::singleShot(0, q, SLOT(notifyStartupFinished())); return true; }