Commit 6bcfee48 authored by Robert Loehning's avatar Robert Loehning
Browse files

Trk: Closing TrkDevice when Launcher emits finished()

Reviewed-by: Friedemann Kleint
parent ac4f53ef
......@@ -76,6 +76,7 @@ Launcher::Launcher(Actions startupActions) :
{
d->m_startupActions = startupActions;
connect(&d->m_device, SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult)));
connect(this, SIGNAL(finished()), &d->m_device, SLOT(close()));
}
Launcher::~Launcher()
......
......@@ -893,7 +893,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
Qt::QueuedConnection);
connect(d->readerThread.data(), SIGNAL(messageReceived(trk::TrkResult,QByteArray)),
this, SLOT(slotMessageReceived(trk::TrkResult,QByteArray)),
Qt::BlockingQueuedConnection);
Qt::QueuedConnection);
d->readerThread->start();
d->writerThread = QSharedPointer<WriterThread>(new WriterThread(d->deviceContext));
......
......@@ -73,7 +73,6 @@ public:
bool open(const QString &port, QString *errorMessage);
bool isOpen() const;
void close();
QString errorString() const;
......@@ -109,6 +108,9 @@ protected slots:
void emitError(const QString &msg);
void emitLogMessage(const QString &msg);
public slots:
void close();
private:
void readMessages();
TrkDevicePrivate *d;
......
Markdown is supported
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