From: Pawel Polanski Date: Wed, 2 Feb 2011 09:44:57 +0000 (+0100) Subject: Symbian: Add timeout to CODA's serial ping message X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1a36518082e7e622681cf5c6f7d483fae29afffe;p=qt-creator-jp%2Fqt-creator-jp.git Symbian: Add timeout to CODA's serial ping message --- diff --git a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp index 1fd21d0485..806e715731 100644 --- a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp @@ -117,7 +117,7 @@ bool CodaRunControl::setupLauncher() 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))); @@ -136,6 +136,7 @@ bool CodaRunControl::setupLauncher() } m_state = StateConnecting; m_tcfTrkDevice->sendSerialPing(false); + QTimer::singleShot(4000, this, SLOT(checkForTimeout())); } else { const QSharedPointer tcfTrkSocket(new QTcpSocket); m_tcfTrkDevice->setDevice(tcfTrkSocket); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp index 313c828e6f..1c58be31c7 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp @@ -391,6 +391,7 @@ void S60DeployStep::startDeployment() } m_state = StateConnecting; m_trkDevice->sendSerialPing(false); + QTimer::singleShot(4000, this, SLOT(checkForTimeout())); } else { const QSharedPointer tcfTrkSocket(new QTcpSocket); m_trkDevice->setDevice(tcfTrkSocket); @@ -462,7 +463,7 @@ void S60DeployStep::slotTcftrkEvent (const tcftrk::TcfTrkEvent &event) switch (event.type()) { case tcftrk::TcfTrkEvent::LocatorHello: {// Commands accepted now m_state = StateConnected; - emit tcpConnected(); + emit codaConnected(); startTransferring(); break; } @@ -620,13 +621,13 @@ void S60DeployStep::checkForTimeout() 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))); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h index b17579be61..9ec947b798 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h @@ -145,7 +145,7 @@ signals: void allFilesSent(); void allFilesInstalled(); - void tcpConnected(); + void codaConnected(); void manualInstallation();