Commit d1870e21 authored by Pawel Polanski's avatar Pawel Polanski
Browse files

Creator crashes while Carbide has ownership over serial connection and Creator...

Creator crashes while Carbide has ownership over serial connection and Creator wants to use it as well

Reviewed-by: Tobias Hunger
parent 69c04d91
......@@ -139,6 +139,18 @@ bool S60DeployStep::init()
appendMessage(message, true);
return false;
}
// Prompt the user to start up the Blue tooth connection
const trk::PromptStartCommunicationResult src =
S60RunConfigBluetoothStarter::startCommunication(m_launcher->trkDevice(),
0, &message);
if (src != trk::PromptStartCommunicationConnected) {
if (!message.isEmpty())
trk::Launcher::releaseToDeviceManager(m_launcher);
delete m_launcher;
m_launcher = 0;
appendMessage(message, true);
return false;
}
return true;
}
......@@ -237,36 +249,21 @@ void S60DeployStep::startDeployment()
{
Q_ASSERT(m_launcher);
QString errorMessage;
bool success = false;
do {
setupConnections();
//TODO sisx destination and file path user definable
const QString copyDst = QString::fromLatin1("C:\\Data\\%1").arg(QFileInfo(m_signedPackage).fileName());
m_launcher->setCopyFileName(m_signedPackage, copyDst);
m_launcher->setInstallFileName(copyDst);
m_launcher->addStartupActions(trk::Launcher::ActionCopyInstall);
appendMessage(tr("Package: %1\nDeploying application to '%2'...").arg(m_signedPackage, m_serialPortFriendlyName), false);
// Prompt the user to start up the Blue tooth connection
const trk::PromptStartCommunicationResult src =
S60RunConfigBluetoothStarter::startCommunication(m_launcher->trkDevice(),
0, &errorMessage);
if (src != trk::PromptStartCommunicationConnected)
break;
if (!m_launcher->startServer(&errorMessage)) {
errorMessage = tr("Could not connect to phone on port '%1': %2\n"
"Check if the phone is connected and App TRK is running.").arg(m_serialPortName, errorMessage);
break;
}
success = true;
} while (false);
setupConnections();
//TODO sisx destination and file path user definable
const QString copyDst = QString::fromLatin1("C:\\Data\\%1").arg(QFileInfo(m_signedPackage).fileName());
m_launcher->setCopyFileName(m_signedPackage, copyDst);
m_launcher->setInstallFileName(copyDst);
m_launcher->addStartupActions(trk::Launcher::ActionCopyInstall);
appendMessage(tr("Package: %1\nDeploying application to '%2'...").arg(m_signedPackage, m_serialPortFriendlyName), false);
if (!success) {
if (!errorMessage.isEmpty())
appendMessage(errorMessage, true);
QString errorMessage;
if (!m_launcher->startServer(&errorMessage)) {
errorMessage = tr("Could not connect to phone on port '%1': %2\n"
"Check if the phone is connected and App TRK is running.").arg(m_serialPortName, errorMessage);
appendMessage(errorMessage, true);
stop();
emit finished();
}
......
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