Any plans on supporting QSerialPort
as first party socket?
#102
-
I noticed that some subclasses of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I don't see a reason why it wouldn't be possible to support it. Probably the hardest thing will be creating a test infrastructure for it :-) |
Beta Was this translation helpful? Give feedback.
-
Just looking at the code of The reason the other sockets got their own wrappers is that they have asynchronous state which needs to be taken into account. But Please try out and let me know if there are any issues. If it turns out there's a need for a dedicated wrapper type, I'm totally fine with implementing it. I realize that it's confusing why some |
Beta Was this translation helpful? Give feedback.
Just looking at the code of
QSerialPort
(which I assume is what you meant instead ofQSerialSocket
) and I think it should work out-of-the-box with the existingQCoroIODevice
wrapper.The reason the other sockets got their own wrappers is that they have asynchronous state which needs to be taken into account. But
QSerialPort
doesn't have async state andopen()
andclose()
are synchronous operations, so I think it shoud work just fine withQCoroIODevice
.Please try out and let me know if there are any issues. If it turns out there's a need for a dedicated wrapper type, I'm totally fine with implementing it.
I realize that it's confusing why some
QIODevice
s need a special wrapper and some wo…