Maemo: Support QML-only debugging.

Reviewed-by: kh1
This commit is contained in:
Christian Kandeler
2010-09-16 17:08:07 +02:00
parent 82f4e73c7b
commit ae4c35bd86
12 changed files with 158 additions and 89 deletions

View File

@@ -168,19 +168,23 @@ void QmlEngine::setupInferior()
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
connect(&d->m_applicationLauncher, SIGNAL(processExited(int)),
this, SLOT(disconnected()));
connect(&d->m_applicationLauncher, SIGNAL(appendMessage(QString,bool)),
runControl(), SLOT(emitAppendMessage(QString,bool)));
connect(&d->m_applicationLauncher, SIGNAL(appendOutput(QString, bool)),
runControl(), SLOT(emitAddToOutputWindow(QString, bool)));
connect(&d->m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)),
runControl(), SLOT(bringApplicationToForeground(qint64)));
if (startParameters().startMode == AttachToRemote) {
emit remoteStartupRequested();
} else {
connect(&d->m_applicationLauncher, SIGNAL(processExited(int)),
this, SLOT(disconnected()));
connect(&d->m_applicationLauncher, SIGNAL(appendMessage(QString,bool)),
runControl(), SLOT(emitAppendMessage(QString,bool)));
connect(&d->m_applicationLauncher, SIGNAL(appendOutput(QString, bool)),
runControl(), SLOT(emitAddToOutputWindow(QString, bool)));
connect(&d->m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)),
runControl(), SLOT(bringApplicationToForeground(qint64)));
d->m_applicationLauncher.setEnvironment(startParameters().environment);
d->m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);
d->m_applicationLauncher.setEnvironment(startParameters().environment);
d->m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);
notifyInferiorSetupOk();
notifyInferiorSetupOk();
}
}
void QmlEngine::connectionEstablished()
@@ -227,6 +231,18 @@ void QmlEngine::runEngine()
plugin()->showMessage(tr("QML Debugger connecting..."), StatusBar);
}
void QmlEngine::handleRemoteSetupDone()
{
notifyInferiorSetupOk();
}
void QmlEngine::handleRemoteSetupFailed(const QString &message)
{
QMessageBox::critical(0,tr("Failed to start application"),
tr("Application startup failed: %1").arg(message));
notifyInferiorSetupFailed();
}
void QmlEngine::shutdownInferiorAsSlave()
{
resetLocation();