Funq::Funq(Funq::MODE mode, int port) : QObject(), m_mode(mode), m_port(port), m_server(0), m_pick(0) { Q_ASSERT(!_instance); _instance = this; // this is needed for the dll injection under Windows moveToThread(qApp->thread()); QTimer::singleShot(0, this, SLOT(funqInit())); }
Funq::Funq(Funq::MODE mode, const QHostAddress & host, int port) : QObject(), m_mode(mode), m_port(port), m_host(host), m_server(0), m_pick(0) { Q_ASSERT(!_instance); _instance = this; // Move event processing of this thread (i.e. invoking funqInit()) to the // thread of QApplication because the injection was performed in a dedicated // thread. moveToThread(qApp->thread()); QTimer::singleShot(0, this, SLOT(funqInit())); }