Commit eeb6af51 authored by mfekari's avatar mfekari Committed by Christian Kandeler
Browse files

Qnx: Connect to the device before launching the application



Change-Id: Ic3bac7f5abaf363a2334d5c7c2273ae53c3234e6
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent c89ffbe3
......@@ -115,6 +115,7 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBe
m_runningStateTimer->setInterval(3000);
m_runningStateTimer->setSingleShot(true);
connect(m_runningStateTimer, SIGNAL(timeout()), this, SLOT(determineRunningState()));
connect(this, SIGNAL(started()), this, SLOT(checkSlog2Info()));
}
void BlackBerryApplicationRunner::start()
......
......@@ -47,14 +47,13 @@ BlackBerryRunControl::BlackBerryRunControl(BlackBerryRunConfiguration *runConfig
m_connector = BlackBerryConnect::instance(runConfiguration);
connect(m_runner, SIGNAL(started()), this, SIGNAL(started()));
connect(m_runner, SIGNAL(started()), m_connector, SLOT(connectToDevice()));
connect(m_runner, SIGNAL(finished()), this, SIGNAL(finished()));
connect(m_runner, SIGNAL(finished()), m_connector, SLOT(disconnectFromDevice()));
connect(m_runner, SIGNAL(output(QString,Utils::OutputFormat)),
this, SLOT(appendMessage(QString,Utils::OutputFormat)));
connect(m_runner, SIGNAL(startFailed(QString)), this, SLOT(handleStartFailed(QString)));
connect(m_connector, SIGNAL(connected()), this, SLOT(launchTailProcess()));
connect(m_connector, SIGNAL(connected()), m_runner, SLOT(start()));
connect(m_connector, SIGNAL(output(QString,Utils::OutputFormat)),
this, SLOT(appendMessage(QString,Utils::OutputFormat)));
}
......@@ -66,7 +65,7 @@ BlackBerryRunControl::~BlackBerryRunControl()
void BlackBerryRunControl::start()
{
m_runner->start();
m_connector->connectToDevice();
}
ProjectExplorer::RunControl::StopResult BlackBerryRunControl::stop()
......@@ -88,10 +87,3 @@ void BlackBerryRunControl::handleStartFailed(const QString &message)
{
appendMessage(message, Utils::StdErrFormat);
}
void BlackBerryRunControl::launchTailProcess()
{
// Delay the launch of "tail" to ensure the blackberry-connect
// connection has been properly established
QTimer::singleShot(500, m_runner, SLOT(checkSlog2Info()));
}
......@@ -59,7 +59,6 @@ public:
private slots:
void handleStartFailed(const QString &message);
void launchTailProcess();
private:
BlackBerryApplicationRunner *m_runner;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment