Qt 5.2.0 acting strange with " if (port->open(QIODevice::ReadWrite)) " statement
-
I just updated my Qt 5.1.1 (Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL)
to Qt 5.2.0 (Qt 5.2.0 for Windows 32-bit (MinGW 4.8, OpenGL) today.
I had created a simple project called "scanComPorts" based upon a web page title
"What's New in Qt 5.1: QtSerialPort". It worked for version Qt 5.1.1.I used those examples that I found to complete a REAL project that required using
what I learn from that web page. I ported that REAL project to Qt 5.2.0
and started to see those strange messages was popping up.I decided to created the same project for Qt 5.2.0 and replaced the project's main.cpp
with a copy from Qt 5.1.1's scanComPorts.It appeared to compile the same way, how ever when I ran the application
that I'm now seeing the following message appear for every COM port detected:void QSerialPortPrivate::detectDefaultSetting(): Unexpected flow control settings
The application appears to be working correctly except for this extra message that
showing up.Please Note: That I spent over 2+ hour searching the Forums and also searching
the inter net for any mention of this problem prior to deciding to post this topic. -
bq. void QSerialPortPrivate::detectDefaultSetting(): Unexpected flow control settings
Don't pay to it attention. :)
Simply now is added the qWarning() function. If in process of opening of the port it isn't possible to correlate the received settings from the DCB structure to the known combinations - then will be displayed this message.
It means that any of the parameters: BaudRate, DataBits, Parity, StopBits, FlowControl wasn't correctly detected and interpreted (In your case it is FlowControl).
Simply for confidence do setup the desirable parameters with use of the setXXX() methods. Of course it need to do only after port is open. Also don't forget do a watching of returned values. If everything returns true - then there are no reasons to worry. :)