diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index b1a5cbe59d3..b69f8df01f1 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -197,7 +197,7 @@ void QmlEngine::setupInferior() QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); if (startParameters().startMode == AttachToRemote) { - requestRemoteSetup(); + emit requestRemoteSetup(); } else { connect(&d->m_applicationLauncher, SIGNAL(processExited(int)), @@ -311,10 +311,11 @@ void QmlEngine::stopApplicationLauncher() } } -void QmlEngine::handleRemoteSetupDone(int port) +void QmlEngine::handleRemoteSetupDone(int gdbServerPort, int qmlPort) { - if (port != -1) - startParameters().qmlServerPort = port; + Q_UNUSED(gdbServerPort); + if (qmlPort != -1) + startParameters().qmlServerPort = qmlPort; notifyInferiorSetupOk(); } diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h index 3b900af02ed..2cf79ec7567 100644 --- a/src/plugins/debugger/qml/qmlengine.h +++ b/src/plugins/debugger/qml/qmlengine.h @@ -55,7 +55,7 @@ public: DebuggerEngine *masterEngine); ~QmlEngine(); - void handleRemoteSetupDone(int port); + void handleRemoteSetupDone(int gdbServerPort, int qmlPort); void handleRemoteSetupFailed(const QString &message); void gotoLocation(const Location &location); @@ -66,9 +66,6 @@ public slots: void messageReceived(const QByteArray &message); void disconnected(); -signals: - void remoteStartupRequested(); - private: // DebuggerEngine implementation. bool isSynchronous() const { return false; } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp index 1dacab47d01..9ac94b2bdd4 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp @@ -285,6 +285,10 @@ void MaemoDebugSupport::startDebugging() SLOT(handleRemoteErrorOutput(QByteArray))); connect(m_runner, SIGNAL(remoteOutput(QByteArray)), this, SLOT(handleRemoteOutput(QByteArray))); + if (m_debuggingType == MaemoRunConfiguration::DebugQmlOnly) { + connect(m_runner, SIGNAL(remoteProcessStarted()), + SLOT(handleRemoteProcessStarted())); + } const QString &remoteExe = m_runner->remoteExecutable(); const QString cmdPrefix = MaemoGlobal::remoteCommandPrefix(remoteExe); const QString env = MaemoGlobal::remoteEnvironment(m_userEnvChanges); @@ -350,6 +354,13 @@ void MaemoDebugSupport::handleAdapterSetupDone() m_engine->handleRemoteSetupDone(m_gdbServerPort, m_qmlPort); } +void MaemoDebugSupport::handleRemoteProcessStarted() +{ + Q_ASSERT(m_debuggingType == MaemoRunConfiguration::DebugQmlOnly); + ASSERT_STATE(StartingRemoteProcess); + handleAdapterSetupDone(); +} + void MaemoDebugSupport::setState(State newState) { if (m_state == newState) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h index 5f8a181c079..775f9b9400b 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h @@ -82,6 +82,7 @@ private slots: void handleRemoteOutput(const QByteArray &output); void handleRemoteErrorOutput(const QByteArray &output); void handleProgressReport(const QString &progressOutput); + void handleRemoteProcessStarted(); private: enum State {