Skip to content

Commit

Permalink
tracker/hatire: register even more signals earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Jun 19, 2016
1 parent 3156ffa commit a3e8c8b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tracker-hatire/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ void hatire_thread::Log(const QString& message)

void hatire_thread::start()
{
com_port.moveToThread(this);
#ifdef HATIRE_DEBUG_LOGFILE
read_timer.moveToThread(this);
#endif

QThread::start();
}

Expand All @@ -100,6 +95,13 @@ hatire_thread::hatire_thread()
connect(this, &hatire_thread::serial_info, this, &hatire_thread::serial_info_impl, Qt::QueuedConnection);
connect(this, &hatire_thread::sendcmd, this, &hatire_thread::sendcmd_impl, Qt::QueuedConnection);
connect(this, &hatire_thread::sendcmd_str, this, &hatire_thread::sendcmd_str_impl, Qt::QueuedConnection);

com_port.moveToThread(this);
#ifdef HATIRE_DEBUG_LOGFILE
read_timer.moveToThread(this);
#endif

connect(&com_port, &serial_t::readyRead, this, &hatire_thread::on_serial_read, Qt::DirectConnection);
}

void hatire_thread::teardown_serial()
Expand Down Expand Up @@ -135,8 +137,6 @@ void hatire_thread::run()

read_timer.start(10);
connect(&read_timer, &QTimer::timeout, this, &hatire_thread::on_serial_read, Qt::DirectConnection);
#else
connect(&com_port, &serial_t::readyRead, this, &hatire_thread::on_serial_read, Qt::DirectConnection);
#endif
(void) exec();

Expand Down

0 comments on commit a3e8c8b

Please sign in to comment.