| 5 | static Q_LOGGING_CATEGORY(log, "Client.Plugin.Thread") |
| 6 | |
| 7 | CPluginClientThread::CPluginClientThread(QObject *parent) |
| 8 | : CPluginClient(parent), |
| 9 | m_pThread(nullptr) |
| 10 | { |
| 11 | m_pThread = new CPluginThread(); // Note that the parent object pointer cannot be set here. |
| 12 | if(m_pThread) |
| 13 | { |
| 14 | // The object is also deleted when the thread finishes executing. |
| 15 | bool check = connect(m_pThread, SIGNAL(finished()), |
| 16 | m_pThread, SLOT(deleteLater())); |
| 17 | Q_ASSERT(check); |
| 18 | m_pThread->start(); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | CPluginClientThread::~CPluginClientThread() |
| 23 | { |