m_tcfTrkDevice = new TcfTrkDevice;
if (debug)
- m_tcfTrkDevice->setVerbose(1);
+ m_tcfTrkDevice->setVerbose(debug);
connect(m_tcfTrkDevice, SIGNAL(error(QString)), this, SLOT(slotError(QString)));
connect(m_tcfTrkDevice, SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString)));
}
m_state = StateConnecting;
m_tcfTrkDevice->sendSerialPing(false);
+ QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
} else {
const QSharedPointer<QTcpSocket> tcfTrkSocket(new QTcpSocket);
m_tcfTrkDevice->setDevice(tcfTrkSocket);
}
m_state = StateConnecting;
m_trkDevice->sendSerialPing(false);
+ QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
} else {
const QSharedPointer<QTcpSocket> tcfTrkSocket(new QTcpSocket);
m_trkDevice->setDevice(tcfTrkSocket);
switch (event.type()) {
case tcftrk::TcfTrkEvent::LocatorHello: {// Commands accepted now
m_state = StateConnected;
- emit tcpConnected();
+ emit codaConnected();
startTransferring();
break;
}
return;
const QString title = tr("Waiting for CODA");
- const QString text = tr("Qt Creator is waiting for the CODA application to connect. "
- "Please make sure the application is running on "
- "your mobile phone and the right IP address and port are "
+ const QString text = tr("Qt Creator is waiting for the CODA application to connect."
+ "\nPlease make sure the application is running on "
+ "your mobile phone and the right IP address or serial port is "
"configured in the project settings.");
QMessageBox *mb = new QMessageBox(QMessageBox::Information, title, text,
QMessageBox::Cancel, Core::ICore::instance()->mainWindow());
- connect(this, SIGNAL(tcpConnected()), mb, SLOT(close()));
+ connect(this, SIGNAL(codaConnected()), mb, SLOT(close()));
connect(this, SIGNAL(finished()), mb, SLOT(close()));
connect(this, SIGNAL(finishNow()), mb, SLOT(close()));
connect(mb, SIGNAL(finished(int)), this, SLOT(slotWaitingForTckTrkClosed(int)));