diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index d1d0117664d6b1a46e72094f45b402f484dd01d2..eddd7a5d460adf09f7d4b4258020013047bbe696 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -49,6 +49,10 @@ QGCFlightGearLink::QGCFlightGearLink(UASInterface* mav, QString startupArguments _sensorHilEnabled(true), barometerOffsetkPa(0.0f) { + // We're doing it wrong - because the Qt folks got the API wrong: + // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ + moveToThread(this); + this->host = host; this->port = port+mav->getUASID(); this->connectState = false; diff --git a/src/comm/QGCJSBSimLink.cc b/src/comm/QGCJSBSimLink.cc index c50e517e224e128dbe047b30ee0d8894f263036d..7b56249db15ede3eef6496714a20ee7a21c04791 100644 --- a/src/comm/QGCJSBSimLink.cc +++ b/src/comm/QGCJSBSimLink.cc @@ -44,6 +44,10 @@ QGCJSBSimLink::QGCJSBSimLink(UASInterface* mav, QString startupArguments, QStrin process(NULL), startupArguments(startupArguments) { + // We're doing it wrong - because the Qt folks got the API wrong: + // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ + moveToThread(this); + this->host = host; this->port = port+mav->getUASID(); this->connectState = false; diff --git a/src/comm/QGCXPlaneLink.cc b/src/comm/QGCXPlaneLink.cc index ef9dfd0c3f9c914e04daa163d09b1a5d080269f4..1471dce1fed2d8be846b42561956b4c8a8b8f9bd 100644 --- a/src/comm/QGCXPlaneLink.cc +++ b/src/comm/QGCXPlaneLink.cc @@ -58,6 +58,10 @@ QGCXPlaneLink::QGCXPlaneLink(UASInterface* mav, QString remoteHost, QHostAddress simUpdateHz(0), _sensorHilEnabled(true) { + // We're doing it wrong - because the Qt folks got the API wrong: + // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ + moveToThread(this); + this->localHost = localHost; this->localPort = localPort/*+mav->getUASID()*/; this->connectState = false; diff --git a/src/comm/SerialLink.cc b/src/comm/SerialLink.cc index 58f31514091edc5d1c0dc69b5c94dfc1aad85440..395d9a9d860c0143fc36b40205b024d9e787a507 100644 --- a/src/comm/SerialLink.cc +++ b/src/comm/SerialLink.cc @@ -28,6 +28,10 @@ SerialLink::SerialLink(QString portname, int baudRate, bool hardwareFlowControl, m_stopp(false), m_reqReset(false) { + // We're doing it wrong - because the Qt folks got the API wrong: + // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ + moveToThread(this); + // Get the name of the current port in use. m_portName = portname.trimmed(); if (m_portName == "" && getCurrentPorts().size() > 0) diff --git a/src/comm/TCPLink.cc b/src/comm/TCPLink.cc index 0188b549bb65377fcc5fcb056eb961c5ac030f5f..a8964db6ca2c55c84ee86b2f586e6c7705c1b5eb 100644 --- a/src/comm/TCPLink.cc +++ b/src/comm/TCPLink.cc @@ -43,6 +43,10 @@ TCPLink::TCPLink(QHostAddress hostAddress, quint16 socketPort) : _socket(NULL), _socketIsConnected(false) { + // We're doing it wrong - because the Qt folks got the API wrong: + // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ + moveToThread(this); + _linkId = getNextLinkId(); _resetName(); diff --git a/src/comm/UDPLink.cc b/src/comm/UDPLink.cc index 101ee15fc6ba82a5c5766013d650c3982b0e49f2..10239d14d836654693773982587c1792c002a8a1 100644 --- a/src/comm/UDPLink.cc +++ b/src/comm/UDPLink.cc @@ -42,6 +42,9 @@ This file is part of the QGROUNDCONTROL project UDPLink::UDPLink(QHostAddress host, quint16 port) : socket(NULL) { + // We're doing it wrong - because the Qt folks got the API wrong: + // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ + moveToThread(this); this->host = host; this->port = port;