Debugger: Fix startup of PdbEngine

If the Modules view of the debugger is one of the enabled views
the command for fetching modules is triggered before the
PdbEngine could start up at all.
Ignore the respective command if the engine is currently requested
to start.

Change-Id: I509d122ecba4f3bde6b2139a519c9a12ac627c2f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2016-08-02 15:35:32 +02:00
parent 421a66b101
commit 59b57241b3

View File

@@ -91,6 +91,10 @@ void PdbEngine::postDirectCommand(const QString &command)
void PdbEngine::runCommand(const DebuggerCommand &cmd) void PdbEngine::runCommand(const DebuggerCommand &cmd)
{ {
if (state() == EngineSetupRequested) { // cmd has been triggered too early
showMessage("IGNORED COMMAND: " + cmd.function);
return;
}
QTC_ASSERT(m_proc.state() == QProcess::Running, notifyEngineIll()); QTC_ASSERT(m_proc.state() == QProcess::Running, notifyEngineIll());
QString command = "qdebug('" + cmd.function + "'," + cmd.argsToPython() + ")"; QString command = "qdebug('" + cmd.function + "'," + cmd.argsToPython() + ")";
showMessage(command, LogInput); showMessage(command, LogInput);