Maemo: Fix race condition in debugger startup.

Task-number: QTCREATORBUG-2114
Reviewed-by: kh1
This commit is contained in:
Christian Kandeler
2010-08-20 14:34:14 +02:00
parent 0656b3a12c
commit f59127baca
2 changed files with 8 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging)
if (dumperInfo.exists()) {
const MaemoDeployable d(m_runConfig->dumperLib(),
remoteDir() + '/' + dumperInfo.fileName());
m_needsInstall = addDeployableIfNeeded(d);
m_needsInstall |= addDeployableIfNeeded(d);
}
}
deploy();
@@ -452,6 +452,7 @@ MaemoDebugRunControl::~MaemoDebugRunControl()
void MaemoDebugRunControl::startInternal()
{
m_debuggingStarted = false;
m_remoteOutput.clear();
startDeployment(true);
}
@@ -465,8 +466,11 @@ QString MaemoDebugRunControl::remoteCall() const
void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
{
if (!m_debuggingStarted) {
m_debuggingStarted = true;
startDebugging();
m_remoteOutput += output;
if (m_remoteOutput.contains(QLatin1String("Listening on port"))) {
m_debuggingStarted = true;
startDebugging();
}
}
emit addToOutputWindowInline(this, output, false);
}

View File

@@ -164,6 +164,7 @@ private:
QSharedPointer<Debugger::DebuggerStartParameters> m_startParams;
bool m_debuggingStarted;
QString m_remoteOutput;
};
} // namespace Internal