forked from qt-creator/qt-creator
S60/Trk: Make the port a property of TrkDevice.
Associate the port with the device instead of passing it to open for better handling.
This commit is contained in:
@@ -51,7 +51,6 @@ trk::BluetoothListener *S60DebuggerBluetoothStarter::createListener()
|
|||||||
|
|
||||||
trk::PromptStartCommunicationResult
|
trk::PromptStartCommunicationResult
|
||||||
S60DebuggerBluetoothStarter::startCommunication(const TrkDevicePtr &trkDevice,
|
S60DebuggerBluetoothStarter::startCommunication(const TrkDevicePtr &trkDevice,
|
||||||
const QString &device,
|
|
||||||
int communicationType,
|
int communicationType,
|
||||||
QWidget *msgBoxParent,
|
QWidget *msgBoxParent,
|
||||||
QString *errorMessage)
|
QString *errorMessage)
|
||||||
@@ -59,12 +58,10 @@ S60DebuggerBluetoothStarter::startCommunication(const TrkDevicePtr &trkDevice,
|
|||||||
// Bluetooth?
|
// Bluetooth?
|
||||||
if (communicationType == TrkOptions::BlueTooth) {
|
if (communicationType == TrkOptions::BlueTooth) {
|
||||||
S60DebuggerBluetoothStarter bluetoothStarter(trkDevice);
|
S60DebuggerBluetoothStarter bluetoothStarter(trkDevice);
|
||||||
bluetoothStarter.setDevice(device);
|
|
||||||
return trk::promptStartBluetooth(bluetoothStarter, msgBoxParent, errorMessage);
|
return trk::promptStartBluetooth(bluetoothStarter, msgBoxParent, errorMessage);
|
||||||
}
|
}
|
||||||
// Serial
|
// Serial
|
||||||
BaseCommunicationStarter serialStarter(trkDevice);
|
BaseCommunicationStarter serialStarter(trkDevice);
|
||||||
serialStarter.setDevice(device);
|
|
||||||
return trk::promptStartSerial(serialStarter, msgBoxParent, errorMessage);
|
return trk::promptStartSerial(serialStarter, msgBoxParent, errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ class S60DebuggerBluetoothStarter : public trk::AbstractBluetoothStarter
|
|||||||
public:
|
public:
|
||||||
static trk::PromptStartCommunicationResult
|
static trk::PromptStartCommunicationResult
|
||||||
startCommunication(const TrkDevicePtr &trkDevice,
|
startCommunication(const TrkDevicePtr &trkDevice,
|
||||||
const QString &device,
|
|
||||||
int communicationType,
|
int communicationType,
|
||||||
QWidget *msgBoxParent,
|
QWidget *msgBoxParent,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
|||||||
@@ -1730,12 +1730,13 @@ void TrkGdbAdapter::startAdapter()
|
|||||||
setState(AdapterStarting);
|
setState(AdapterStarting);
|
||||||
debugMessage(_("TRYING TO START ADAPTER"));
|
debugMessage(_("TRYING TO START ADAPTER"));
|
||||||
logMessage(QLatin1String("### Starting TrkGdbAdapter"));
|
logMessage(QLatin1String("### Starting TrkGdbAdapter"));
|
||||||
|
m_trkDevice->setPort(effectiveTrkDevice());
|
||||||
m_trkDevice->setSerialFrame(effectiveTrkDeviceType() != TrkOptions::BlueTooth);
|
m_trkDevice->setSerialFrame(effectiveTrkDeviceType() != TrkOptions::BlueTooth);
|
||||||
// Prompt the user to start communication
|
// Prompt the user to start communication
|
||||||
QString message;
|
QString message;
|
||||||
|
|
||||||
const trk::PromptStartCommunicationResult src =
|
const trk::PromptStartCommunicationResult src =
|
||||||
S60DebuggerBluetoothStarter::startCommunication(m_trkDevice,
|
S60DebuggerBluetoothStarter::startCommunication(m_trkDevice,
|
||||||
effectiveTrkDevice(),
|
|
||||||
effectiveTrkDeviceType(),
|
effectiveTrkDeviceType(),
|
||||||
0, &message);
|
0, &message);
|
||||||
switch (src) {
|
switch (src) {
|
||||||
|
|||||||
@@ -764,7 +764,6 @@ void S60DeviceRunControlBase::startDeployment()
|
|||||||
// Prompt the user to start up the Blue tooth connection
|
// Prompt the user to start up the Blue tooth connection
|
||||||
const trk::PromptStartCommunicationResult src =
|
const trk::PromptStartCommunicationResult src =
|
||||||
S60RunConfigBluetoothStarter::startCommunication(m_launcher->trkDevice(),
|
S60RunConfigBluetoothStarter::startCommunication(m_launcher->trkDevice(),
|
||||||
m_serialPortName,
|
|
||||||
m_communicationType, 0,
|
m_communicationType, 0,
|
||||||
&errorMessage);
|
&errorMessage);
|
||||||
switch (src) {
|
switch (src) {
|
||||||
@@ -779,7 +778,6 @@ void S60DeviceRunControlBase::startDeployment()
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!m_launcher->startServer(&errorMessage)) {
|
if (!m_launcher->startServer(&errorMessage)) {
|
||||||
|
|
||||||
error(this, tr("Could not connect to phone on port '%1': %2\n"
|
error(this, 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));
|
"Check if the phone is connected and App TRK is running.").arg(m_serialPortName, errorMessage));
|
||||||
stop();
|
stop();
|
||||||
|
|||||||
@@ -330,7 +330,6 @@ void S60DeviceRunConfigurationWidget::updateDeviceInfo()
|
|||||||
QString message;
|
QString message;
|
||||||
const trk::PromptStartCommunicationResult src =
|
const trk::PromptStartCommunicationResult src =
|
||||||
S60RunConfigBluetoothStarter::startCommunication(m_infoLauncher->trkDevice(),
|
S60RunConfigBluetoothStarter::startCommunication(m_infoLauncher->trkDevice(),
|
||||||
commDev.portName(),
|
|
||||||
commDev.type(), this,
|
commDev.type(), this,
|
||||||
&message);
|
&message);
|
||||||
switch (src) {
|
switch (src) {
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ trk::BluetoothListener *S60RunConfigBluetoothStarter::createListener()
|
|||||||
|
|
||||||
trk::PromptStartCommunicationResult
|
trk::PromptStartCommunicationResult
|
||||||
S60RunConfigBluetoothStarter::startCommunication(const TrkDevicePtr &trkDevice,
|
S60RunConfigBluetoothStarter::startCommunication(const TrkDevicePtr &trkDevice,
|
||||||
const QString &device,
|
|
||||||
int communicationType,
|
int communicationType,
|
||||||
QWidget *msgBoxParent,
|
QWidget *msgBoxParent,
|
||||||
QString *errorMessage)
|
QString *errorMessage)
|
||||||
@@ -61,12 +60,10 @@ S60RunConfigBluetoothStarter::startCommunication(const TrkDevicePtr &trkDevice,
|
|||||||
// Bluetooth?
|
// Bluetooth?
|
||||||
if (communicationType == SymbianUtils::BlueToothCommunication) {
|
if (communicationType == SymbianUtils::BlueToothCommunication) {
|
||||||
S60RunConfigBluetoothStarter bluetoothStarter(trkDevice);
|
S60RunConfigBluetoothStarter bluetoothStarter(trkDevice);
|
||||||
bluetoothStarter.setDevice(device);
|
|
||||||
return trk::promptStartBluetooth(bluetoothStarter, msgBoxParent, errorMessage);
|
return trk::promptStartBluetooth(bluetoothStarter, msgBoxParent, errorMessage);
|
||||||
}
|
}
|
||||||
// Serial
|
// Serial
|
||||||
BaseCommunicationStarter serialStarter(trkDevice);
|
BaseCommunicationStarter serialStarter(trkDevice);
|
||||||
serialStarter.setDevice(device);
|
|
||||||
return trk::promptStartSerial(serialStarter, msgBoxParent, errorMessage);
|
return trk::promptStartSerial(serialStarter, msgBoxParent, errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ public:
|
|||||||
// passing on the right messages.
|
// passing on the right messages.
|
||||||
static trk::PromptStartCommunicationResult
|
static trk::PromptStartCommunicationResult
|
||||||
startCommunication(const TrkDevicePtr &trkDevice,
|
startCommunication(const TrkDevicePtr &trkDevice,
|
||||||
const QString &device,
|
|
||||||
int communicationType,
|
int communicationType,
|
||||||
QWidget *msgBoxParent,
|
QWidget *msgBoxParent,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ struct BaseCommunicationStarterPrivate {
|
|||||||
int intervalMS;
|
int intervalMS;
|
||||||
int attempts;
|
int attempts;
|
||||||
int n;
|
int n;
|
||||||
QString device;
|
|
||||||
QString errorString;
|
QString errorString;
|
||||||
BaseCommunicationStarter::State state;
|
BaseCommunicationStarter::State state;
|
||||||
};
|
};
|
||||||
@@ -58,7 +57,6 @@ BaseCommunicationStarterPrivate::BaseCommunicationStarterPrivate(const BaseCommu
|
|||||||
intervalMS(1000),
|
intervalMS(1000),
|
||||||
attempts(-1),
|
attempts(-1),
|
||||||
n(0),
|
n(0),
|
||||||
device(QLatin1String("/dev/rfcomm0")),
|
|
||||||
state(BaseCommunicationStarter::TimedOut)
|
state(BaseCommunicationStarter::TimedOut)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -96,7 +94,7 @@ BaseCommunicationStarter::StartResult BaseCommunicationStarter::start()
|
|||||||
// Before we instantiate timers, and such, try to open the device,
|
// Before we instantiate timers, and such, try to open the device,
|
||||||
// which should succeed if another listener is already running in
|
// which should succeed if another listener is already running in
|
||||||
// 'Watch' mode
|
// 'Watch' mode
|
||||||
if (d->trkDevice->open(d->device , &(d->errorString)))
|
if (d->trkDevice->open(&(d->errorString)))
|
||||||
return ConnectionSucceeded;
|
return ConnectionSucceeded;
|
||||||
// Pull up resources for next attempt
|
// Pull up resources for next attempt
|
||||||
d->n = 0;
|
d->n = 0;
|
||||||
@@ -143,12 +141,7 @@ void BaseCommunicationStarter::setAttempts(int a)
|
|||||||
|
|
||||||
QString BaseCommunicationStarter::device() const
|
QString BaseCommunicationStarter::device() const
|
||||||
{
|
{
|
||||||
return d->device;
|
return d->trkDevice->port();
|
||||||
}
|
|
||||||
|
|
||||||
void BaseCommunicationStarter::setDevice(const QString &dv)
|
|
||||||
{
|
|
||||||
d->device = dv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BaseCommunicationStarter::errorString() const
|
QString BaseCommunicationStarter::errorString() const
|
||||||
@@ -163,20 +156,20 @@ void BaseCommunicationStarter::slotTimer()
|
|||||||
if (d->attempts >= 0 && d->n >= d->attempts) {
|
if (d->attempts >= 0 && d->n >= d->attempts) {
|
||||||
stopTimer();
|
stopTimer();
|
||||||
d->errorString = tr("%1: timed out after %n attempts using an interval of %2ms.", 0, d->n)
|
d->errorString = tr("%1: timed out after %n attempts using an interval of %2ms.", 0, d->n)
|
||||||
.arg(d->device).arg(d->intervalMS);
|
.arg(d->trkDevice->port()).arg(d->intervalMS);
|
||||||
d->state = TimedOut;
|
d->state = TimedOut;
|
||||||
emit timeout();
|
emit timeout();
|
||||||
} else {
|
} else {
|
||||||
// Attempt n to connect?
|
// Attempt n to connect?
|
||||||
if (d->trkDevice->open(d->device , &(d->errorString))) {
|
if (d->trkDevice->open(&(d->errorString))) {
|
||||||
stopTimer();
|
stopTimer();
|
||||||
const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->device).arg(d->n);
|
const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->trkDevice->port()).arg(d->n);
|
||||||
emit message(msg);
|
emit message(msg);
|
||||||
d->state = Connected;
|
d->state = Connected;
|
||||||
emit connected();
|
emit connected();
|
||||||
} else {
|
} else {
|
||||||
const QString msg = tr("%1: Connection attempt %2 failed: %3 (retrying)...")
|
const QString msg = tr("%1: Connection attempt %2 failed: %3 (retrying)...")
|
||||||
.arg(d->device).arg(d->n).arg(d->errorString);
|
.arg(d->trkDevice->port()).arg(d->n).arg(d->errorString);
|
||||||
emit message(msg);
|
emit message(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,13 +209,11 @@ BluetoothListener *ConsoleBluetoothStarter::createListener()
|
|||||||
|
|
||||||
bool ConsoleBluetoothStarter::startBluetooth(const TrkDevicePtr &trkDevice,
|
bool ConsoleBluetoothStarter::startBluetooth(const TrkDevicePtr &trkDevice,
|
||||||
QObject *listenerParent,
|
QObject *listenerParent,
|
||||||
const QString &device,
|
|
||||||
int attempts,
|
int attempts,
|
||||||
QString *errorMessage)
|
QString *errorMessage)
|
||||||
{
|
{
|
||||||
// Set up a console starter to print to stdout.
|
// Set up a console starter to print to stdout.
|
||||||
ConsoleBluetoothStarter starter(trkDevice, listenerParent);
|
ConsoleBluetoothStarter starter(trkDevice, listenerParent);
|
||||||
starter.setDevice(device);
|
|
||||||
starter.setAttempts(attempts);
|
starter.setAttempts(attempts);
|
||||||
switch (starter.start()) {
|
switch (starter.start()) {
|
||||||
case Started:
|
case Started:
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ public:
|
|||||||
int attempts() const;
|
int attempts() const;
|
||||||
void setAttempts(int a);
|
void setAttempts(int a);
|
||||||
|
|
||||||
QString device() const;
|
QString device() const; // via TrkDevice
|
||||||
void setDevice(const QString &);
|
|
||||||
|
|
||||||
State state() const;
|
State state() const;
|
||||||
QString errorString() const;
|
QString errorString() const;
|
||||||
@@ -130,7 +129,6 @@ class SYMBIANUTILS_EXPORT ConsoleBluetoothStarter : public AbstractBluetoothStar
|
|||||||
public:
|
public:
|
||||||
static bool startBluetooth(const TrkDevicePtr& trkDevice,
|
static bool startBluetooth(const TrkDevicePtr& trkDevice,
|
||||||
QObject *listenerParent,
|
QObject *listenerParent,
|
||||||
const QString &device,
|
|
||||||
int attempts,
|
int attempts,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ struct LauncherPrivate {
|
|||||||
explicit LauncherPrivate(const TrkDevicePtr &d);
|
explicit LauncherPrivate(const TrkDevicePtr &d);
|
||||||
|
|
||||||
TrkDevicePtr m_device;
|
TrkDevicePtr m_device;
|
||||||
QString m_trkServerName;
|
|
||||||
QByteArray m_trkReadBuffer;
|
QByteArray m_trkReadBuffer;
|
||||||
Launcher::State m_state;
|
Launcher::State m_state;
|
||||||
|
|
||||||
@@ -119,12 +118,12 @@ void Launcher::addStartupActions(trk::Launcher::Actions startupActions)
|
|||||||
|
|
||||||
void Launcher::setTrkServerName(const QString &name)
|
void Launcher::setTrkServerName(const QString &name)
|
||||||
{
|
{
|
||||||
d->m_trkServerName = name;
|
d->m_device->setPort(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Launcher::trkServerName() const
|
QString Launcher::trkServerName() const
|
||||||
{
|
{
|
||||||
return d->m_trkServerName;
|
return d->m_device->port();
|
||||||
}
|
}
|
||||||
|
|
||||||
TrkDevicePtr Launcher::trkDevice() const
|
TrkDevicePtr Launcher::trkDevice() const
|
||||||
@@ -179,7 +178,7 @@ bool Launcher::startServer(QString *errorMessage)
|
|||||||
errorMessage->clear();
|
errorMessage->clear();
|
||||||
if (d->m_verbose) {
|
if (d->m_verbose) {
|
||||||
const QString msg = QString::fromLatin1("Port=%1 Executable=%2 Arguments=%3 Package=%4 Remote Package=%5 Install file=%6")
|
const QString msg = QString::fromLatin1("Port=%1 Executable=%2 Arguments=%3 Package=%4 Remote Package=%5 Install file=%6")
|
||||||
.arg(d->m_trkServerName, d->m_fileName,
|
.arg(trkServerName(), d->m_fileName,
|
||||||
d->m_commandLineArgs.join(QString(QLatin1Char(' '))),
|
d->m_commandLineArgs.join(QString(QLatin1Char(' '))),
|
||||||
d->m_copyState.sourceFileName, d->m_copyState.destinationFileName, d->m_installFileName);
|
d->m_copyState.sourceFileName, d->m_copyState.destinationFileName, d->m_installFileName);
|
||||||
logMessage(msg);
|
logMessage(msg);
|
||||||
@@ -201,7 +200,7 @@ bool Launcher::startServer(QString *errorMessage)
|
|||||||
qWarning("No remote executable given for running.");
|
qWarning("No remote executable given for running.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!d->m_device->isOpen() && !d->m_device->open(d->m_trkServerName, errorMessage))
|
if (!d->m_device->isOpen() && !d->m_device->open(errorMessage))
|
||||||
return false;
|
return false;
|
||||||
if (d->m_closeDevice) {
|
if (d->m_closeDevice) {
|
||||||
connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close()));
|
connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close()));
|
||||||
|
|||||||
@@ -871,6 +871,7 @@ struct TrkDevicePrivate
|
|||||||
QByteArray trkReadBuffer;
|
QByteArray trkReadBuffer;
|
||||||
int verbose;
|
int verbose;
|
||||||
QString errorString;
|
QString errorString;
|
||||||
|
QString port;
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
@@ -902,13 +903,19 @@ TrkDevice::~TrkDevice()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TrkDevice::open(const QString &port, QString *errorMessage)
|
bool TrkDevice::open(QString *errorMessage)
|
||||||
{
|
{
|
||||||
if (d->verbose)
|
if (d->verbose)
|
||||||
qDebug() << "Opening" << port << "is open: " << isOpen() << " serialFrame=" << serialFrame();
|
qDebug() << "Opening" << port() << "is open: " << isOpen() << " serialFrame=" << serialFrame();
|
||||||
|
if (d->port.isEmpty()) {
|
||||||
|
*errorMessage = QLatin1String("Internal error: No port set on TrkDevice");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
close();
|
close();
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
d->deviceContext->device = CreateFile(QString("\\\\.\\").append(port).toStdWString().c_str(),
|
const QString fullPort = QLatin1String("\\\\.\\") + d->port;
|
||||||
|
d->deviceContext->device = CreateFile(reinterpret_cast<const WCHAR*>(fullPort.utf16()),
|
||||||
GENERIC_READ | GENERIC_WRITE,
|
GENERIC_READ | GENERIC_WRITE,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -917,7 +924,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (INVALID_HANDLE_VALUE == d->deviceContext->device) {
|
if (INVALID_HANDLE_VALUE == d->deviceContext->device) {
|
||||||
*errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port, winErrorMessage(GetLastError()));
|
*errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port(), winErrorMessage(GetLastError()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
memset(&d->deviceContext->readOverlapped, 0, sizeof(OVERLAPPED));
|
memset(&d->deviceContext->readOverlapped, 0, sizeof(OVERLAPPED));
|
||||||
@@ -929,9 +936,9 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
d->deviceContext->file.setFileName(port);
|
d->deviceContext->file.setFileName(d->port);
|
||||||
if (!d->deviceContext->file.open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
|
if (!d->deviceContext->file.open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
|
||||||
*errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(port, d->deviceContext->file.errorString());
|
*errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(d->port, d->deviceContext->file.errorString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -970,7 +977,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
|
|||||||
d->writerThread->start();
|
d->writerThread->start();
|
||||||
|
|
||||||
if (d->verbose)
|
if (d->verbose)
|
||||||
qDebug() << "Opened" << port;
|
qDebug() << "Opened" << d->port;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1004,6 +1011,16 @@ bool TrkDevice::isOpen() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString TrkDevice::port() const
|
||||||
|
{
|
||||||
|
return d->port;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TrkDevice::setPort(const QString &p)
|
||||||
|
{
|
||||||
|
d->port = p;
|
||||||
|
}
|
||||||
|
|
||||||
QString TrkDevice::errorString() const
|
QString TrkDevice::errorString() const
|
||||||
{
|
{
|
||||||
return d->errorString;
|
return d->errorString;
|
||||||
|
|||||||
@@ -68,13 +68,17 @@ class SYMBIANUTILS_EXPORT TrkDevice : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame)
|
Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame)
|
||||||
Q_PROPERTY(bool verbose READ verbose WRITE setVerbose)
|
Q_PROPERTY(bool verbose READ verbose WRITE setVerbose)
|
||||||
|
Q_PROPERTY(QString port READ port WRITE setPort)
|
||||||
public:
|
public:
|
||||||
explicit TrkDevice(QObject *parent = 0);
|
explicit TrkDevice(QObject *parent = 0);
|
||||||
virtual ~TrkDevice();
|
virtual ~TrkDevice();
|
||||||
|
|
||||||
bool open(const QString &port, QString *errorMessage);
|
bool open(QString *errorMessage);
|
||||||
bool isOpen() const;
|
bool isOpen() const;
|
||||||
|
|
||||||
|
QString port() const;
|
||||||
|
void setPort(const QString &p);
|
||||||
|
|
||||||
QString errorString() const;
|
QString errorString() const;
|
||||||
|
|
||||||
bool serialFrame() const;
|
bool serialFrame() const;
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ int main(int argc, char *argv[])
|
|||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
if (bluetooth && !trk::ConsoleBluetoothStarter::startBluetooth(launcher->trkDevice(),
|
if (bluetooth && !trk::ConsoleBluetoothStarter::startBluetooth(launcher->trkDevice(),
|
||||||
launcher.data(),
|
launcher.data(),
|
||||||
launcher->trkServerName(),
|
|
||||||
30, &errorMessage)) {
|
30, &errorMessage)) {
|
||||||
qWarning("%s\n", qPrintable(errorMessage));
|
qWarning("%s\n", qPrintable(errorMessage));
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user