C++ (Qt)void SerialPortNotifier::run(){ while (m_running) { m_setCommMaskMutex.lock(); ::SetCommMask(m_ref->m_descriptor, m_setMask); m_setCommMaskMutex.unlock(); if (::WaitCommEvent(m_ref->m_descriptor, &m_currentMask, 0) != 0) { if (EV_ERR & m_currentMask & m_setMask) { m_ref->canErrorNotification(); } if (EV_RXCHAR & m_currentMask & m_setMask) { m_ref->canReadNotification(); } //FIXME: This is why it does not work? if (EV_TXEMPTY & m_currentMask & m_setMask) { m_ref->canWriteNotification(); } } }}
C++ (Qt)... m_descriptor = ::CreateFile((const wchar_t*)nativeFilePath.constData(), desiredAccess, shareMode, 0, OPEN_EXISTING, flagsAndAttributes, 0);...
C++ (Qt)typedef struct _DevmgrDeviceInformation_tag { DWORD dwSize; HANDLE hDevice; HANDLE hParentDevice; WCHAR szLegacyName[6]; WCHAR szDeviceKey[MAX_PATH]; WCHAR szDeviceName[MAX_PATH]; WCHAR szBusName[MAX_PATH];} DEVMGR_DEVICE_INFORMATION, *PDEVMGR_DEVICE_INFORMATION;
qserialdevice$ git diffdiff --git a/src/qserialdevice/nativeserialnotifier_unix.cpp b/src/qserialdevice/nativeserialnotifier_unix.cppindex 753c7f4..4ab3f79 100644--- a/src/qserialdevice/nativeserialnotifier_unix.cpp+++ b/src/qserialdevice/nativeserialnotifier_unix.cpp@@ -114,7 +114,7 @@ bool NativeSerialNotifier::eventFilter(QObject *obj, QEvent *e) this->engine->exceptionNotification(); return true; }- return NativeSerialNotifier::eventFilter(obj, e);+ return QThread::eventFilter(obj, e); } void NativeSerialNotifier::run()