summaryrefslogtreecommitdiff
path: root/tests/tools
diff options
context:
space:
mode:
authorPawel Polanski <pawel.3.polanski@nokia.com>2011-01-25 09:18:45 +0100
committerPawel Polanski <pawel.3.polanski@nokia.com>2011-01-31 11:34:05 +0100
commit440bba257a49d9d43b4bc58ddf64f2a44562c815 (patch)
tree4e4974b5d6f41a425b3bb21525e2e3feaafc26a2 /tests/tools
parent7bfc798a7d4229753ae7ffb52f9a697ed79cbaa2 (diff)
downloadqt-creator-440bba257a49d9d43b4bc58ddf64f2a44562c815.tar.gz
Symbian: Added a serial connection type to CODA
Diffstat (limited to 'tests/tools')
-rw-r--r--tests/tools/codaclient/codaclient.pro1
-rw-r--r--tests/tools/codaclient/codaclientapplication.cpp24
2 files changed, 4 insertions, 21 deletions
diff --git a/tests/tools/codaclient/codaclient.pro b/tests/tools/codaclient/codaclient.pro
index 3c579b4342..0682df39a2 100644
--- a/tests/tools/codaclient/codaclient.pro
+++ b/tests/tools/codaclient/codaclient.pro
@@ -2,7 +2,6 @@ DEFINES += SYMBIANUTILS_INCLUDE_PRI
include(../../../qtcreator.pri)
include(../../../src/shared/symbianutils/symbianutils.pri)
-# include(../../../src/libs/3rdparty/qextserialport/qextserialport.pri)
QT += core gui network
TARGET = codaclient
diff --git a/tests/tools/codaclient/codaclientapplication.cpp b/tests/tools/codaclient/codaclientapplication.cpp
index 4a3272f4bd..382fd1ce92 100644
--- a/tests/tools/codaclient/codaclientapplication.cpp
+++ b/tests/tools/codaclient/codaclientapplication.cpp
@@ -34,7 +34,7 @@
#include "codaclientapplication.h"
#ifdef HAS_SERIALPORT
-# include <qextserialport/qextserialport.h>
+#include "virtualserialdevice.h"
#endif
#include "tcftrkdevice.h"
@@ -322,32 +322,16 @@ bool CodaClientApplication::start()
if (isSerialPort(m_address)) {
#ifdef HAS_SERIALPORT
// Serial
-#ifdef Q_OS_WIN
- const QString fullPort = QextSerialPort::fullPortNameWin(m_address);
-#else
- const QString fullPort = m_address;
-#endif
- const QSharedPointer<QextSerialPort>
- serialPort(new QextSerialPort(fullPort, QextSerialPort::EventDriven));
- std::printf("Opening port %s...\n", qPrintable(fullPort));
-
- // Magic USB serial parameters
- serialPort->setTimeout(2000);
- serialPort->setBaudRate(BAUD115200);
- serialPort->setFlowControl(FLOW_OFF);
- serialPort->setParity(PAR_NONE);
- serialPort->setDataBits(DATA_8);
- serialPort->setStopBits(STOP_1);
-
+ const QSharedPointer<QIODevice> serialPort(new SymbianUtils::VirtualSerialDevice(m_address));
+ std::printf("Opening port %s...\n", qPrintable(m_address));
m_trkDevice->setSerialFrame(true);
m_trkDevice->setDevice(serialPort); // Grab all data from start
- if (!serialPort->open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
+ if (!serialPort->open(QIODevice::ReadWrite)) {
std::fprintf(stderr, "Cannot open port: %s", qPrintable(serialPort->errorString()));
return false;
}
// Initiate communication
m_trkDevice->sendSerialPing(m_mode == Ping);
- serialPort->flush();
#else
std::fprintf(stderr, "Not implemented\n");
return false;