forked from qt-creator/qt-creator
Maemo: Fix race condition in debugger startup.
Task-number: QTCREATORBUG-2114 Reviewed-by: kh1
This commit is contained in:
@@ -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,9 +466,12 @@ QString MaemoDebugRunControl::remoteCall() const
|
||||
void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
|
||||
{
|
||||
if (!m_debuggingStarted) {
|
||||
m_remoteOutput += output;
|
||||
if (m_remoteOutput.contains(QLatin1String("Listening on port"))) {
|
||||
m_debuggingStarted = true;
|
||||
startDebugging();
|
||||
}
|
||||
}
|
||||
emit addToOutputWindowInline(this, output, false);
|
||||
}
|
||||
|
||||
|
@@ -164,6 +164,7 @@ private:
|
||||
QSharedPointer<Debugger::DebuggerStartParameters> m_startParams;
|
||||
|
||||
bool m_debuggingStarted;
|
||||
QString m_remoteOutput;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user