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()) {
|
if (dumperInfo.exists()) {
|
||||||
const MaemoDeployable d(m_runConfig->dumperLib(),
|
const MaemoDeployable d(m_runConfig->dumperLib(),
|
||||||
remoteDir() + '/' + dumperInfo.fileName());
|
remoteDir() + '/' + dumperInfo.fileName());
|
||||||
m_needsInstall = addDeployableIfNeeded(d);
|
m_needsInstall |= addDeployableIfNeeded(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deploy();
|
deploy();
|
||||||
@@ -452,6 +452,7 @@ MaemoDebugRunControl::~MaemoDebugRunControl()
|
|||||||
void MaemoDebugRunControl::startInternal()
|
void MaemoDebugRunControl::startInternal()
|
||||||
{
|
{
|
||||||
m_debuggingStarted = false;
|
m_debuggingStarted = false;
|
||||||
|
m_remoteOutput.clear();
|
||||||
startDeployment(true);
|
startDeployment(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,8 +466,11 @@ QString MaemoDebugRunControl::remoteCall() const
|
|||||||
void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
|
void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
|
||||||
{
|
{
|
||||||
if (!m_debuggingStarted) {
|
if (!m_debuggingStarted) {
|
||||||
m_debuggingStarted = true;
|
m_remoteOutput += output;
|
||||||
startDebugging();
|
if (m_remoteOutput.contains(QLatin1String("Listening on port"))) {
|
||||||
|
m_debuggingStarted = true;
|
||||||
|
startDebugging();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
emit addToOutputWindowInline(this, output, false);
|
emit addToOutputWindowInline(this, output, false);
|
||||||
}
|
}
|
||||||
|
@@ -164,6 +164,7 @@ private:
|
|||||||
QSharedPointer<Debugger::DebuggerStartParameters> m_startParams;
|
QSharedPointer<Debugger::DebuggerStartParameters> m_startParams;
|
||||||
|
|
||||||
bool m_debuggingStarted;
|
bool m_debuggingStarted;
|
||||||
|
QString m_remoteOutput;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
Reference in New Issue
Block a user