| 9377 | #endif |
| 9378 | |
| 9379 | void QKeyMapper_Worker::threadStarted() |
| 9380 | { |
| 9381 | #ifdef DEBUG_LOGOUT_ON |
| 9382 | qDebug("[QKeyMapper_Worker::threadStarted] Name:%s, ID:0x%08X", QThread::currentThread()->objectName().toLatin1().constData(), QThread::currentThreadId()); |
| 9383 | #endif |
| 9384 | |
| 9385 | HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); |
| 9386 | if (SUCCEEDED(hr)) { |
| 9387 | m_ComInitialized = true; |
| 9388 | |
| 9389 | // Initialize volume controller after COM is initialized |
| 9390 | if (!m_volumeController.initialize()) { |
| 9391 | #ifdef DEBUG_LOGOUT_ON |
| 9392 | qWarning() << "[QKeyMapper_Worker::threadStarted] Failed to initialize volume controller"; |
| 9393 | #endif |
| 9394 | } |
| 9395 | } |
| 9396 | else { |
| 9397 | #ifdef DEBUG_LOGOUT_ON |
| 9398 | qWarning() << "[QKeyMapper_Worker::threadStarted] CoInitializeEx failed:" << hr; |
| 9399 | #endif |
| 9400 | } |
| 9401 | |
| 9402 | /* UDP Data Port Listener */ |
| 9403 | m_UdpSocket = new QUdpSocket(this); |
| 9404 | QObject::connect(m_UdpSocket, &QUdpSocket::readyRead, this, &QKeyMapper_Worker::processUdpPendingDatagrams); |
| 9405 | } |
| 9406 | |
| 9407 | void QKeyMapper_Worker::threadFinished() |
| 9408 | { |
nothing calls this directly
no test coverage detected