Debugger: Simplify handling of requestRemoteSetup in QmlCppEngine

Just emit the requestRemoteSetup on your own in QmlCppEngine. Also
properly check the related state transitions in DebuggerEngine.

Change-Id: I15dc4236303911126de7eee63ed996bdd8e5c5a8
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Kai Koehne
2012-01-31 13:23:05 +01:00
committed by hjk
parent 095946d441
commit 2a02841383
8 changed files with 119 additions and 36 deletions

View File

@@ -406,8 +406,11 @@ void QmlEngine::stopApplicationLauncher()
void QmlEngine::handleRemoteSetupDone(int gdbServerPort, int qmlPort)
{
Q_UNUSED(gdbServerPort);
if (qmlPort != -1)
startParameters().qmlServerPort = qmlPort;
notifyEngineRemoteSetupDone();
notifyEngineSetupOk();
}
@@ -416,6 +419,8 @@ void QmlEngine::handleRemoteSetupFailed(const QString &message)
if (isMasterEngine())
QMessageBox::critical(0,tr("Failed to start application"),
tr("Application startup failed: %1").arg(message));
notifyEngineRemoteSetupFailed();
notifyEngineSetupFailed();
}
@@ -450,7 +455,7 @@ void QmlEngine::setupEngine()
{
if (startParameters().requestRemoteSetup) {
// we need to get the port first
emit requestRemoteSetup();
notifyEngineRequestRemoteSetup();
} else {
d->m_applicationLauncher.setEnvironment(startParameters().environment);
d->m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);