Rename the flow to flowControl for consistency

Change-Id: Ida3c4ff049f21bd96fd64b41c66787b3961ada5e
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Do not use the deprecated method in the "See also" section

Change-Id: I2a73e9dc19e93c678d803d4aaf2e03c19e7613fb
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Add API for querying the serial number

Thanks go to Massimo Callegari for the initial patch and the request to remind
us again. Thanks also go to Denis and Sergey for working on the windows serial
number parser.

Task-number: QTBUG-31981
Change-Id: I60d882280f481eb99d275e0a9c81da50292b1c61
Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Use early return on error in the open method

It was done like that for consistency with QFile, probably, but it is not a good
style in Qt overall.

Change-Id: I5233a7f0f03cab947b061520fe2ec64585632920
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Make it possible to set the port values before opening

This patch also changes the behavior of the open method. We do not use port
detection anymore for good. It has been a broken concept, and it is very
unlikely that anyone has ever relied on it. If anyone had done that, they would
be in trouble anyway, getting noisy warnings needlessly and all that.

The other option was also considered to keep this behavior optionally as the
default, but that would complicate the API too much without not much gain.

The default port settings are now also the sane 9600,8,N,1, and no flow control.
Also please note that the serial port is closed automatically in the open method
if any of the settings fails.

Several subsequent changes can follow this one, namely:

* Changing the examples to show this usage.

* Add a QSerialPortSettings data structure as it seems to be common currently in
client codes.

* Add the QML plugin with only thin wrapper declarative classes and all that.

* Deprecate the restore settings on close API.

* Remove the internal current and restored data representations.

* Add further error values to the API for the fine tuning of the error reporting
when there are setting errors on open.

* Add proper test coverage.

In short, this change opens the gate up for many interesting subsequent changes
that would be useful for the module overall.

In general, this change makes it possible to reach the feature parity with
QextSerialPort so that we are not much worse anymore. We could do the same that
QextSerialPort could do many years ago, already.

Task-number: QTBUG-33774

Change-Id: I8527672f8b0bb2581fa7054ccffda66ab7fa4a85
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Swap the open and configure error reporting in the terminal example

It seems they were accidentally misplaced, and it was not caught by anyone while
testing and using this example. Although, I have seen users doing this mistake
on Stack Overflow, so I was wondering where they would get the idea from. It is
possible they have done such mistakes due to a copy/paste operation from this
old example.

Change-Id: Iaa25ae47c5f161856930801611a3dc7ff0aa3b0a
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Obsolete the "settings restore on close" API

Now that the settings detection is removed, it would be better to make this API
deprecate because it does not make much sense anymore. It was a bad idea to add
this, but we cannot remove it for now, hence the obsoletion.

Change-Id: I5e02959cb54281995b911ff0f64bd2fa36b80060
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Fixed info update for FTDI devices on Android

Added check for Q_OS_ANDROID.  If connected to Android, look for a valid TTY_USB id.

Task-number: QTBUG-36296
Change-Id: Ic99b0ddd7afc6621e795e2f6cf2952cae6634fb0
Reviewed-by: Luke Andrew <codereview@lukeandrew.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Id1ab0adc63aa025dc5ed8a05b313f2f295c91c77
Set the port settings before open in the examples

Change-Id: I946a3f1d3a64a9b8c0d901347aa8ff5959ebc601
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Use QScopedPointer (RAII) for avoiding the memory leak for udev

Task-number: QTBUG-37578

Change-Id: I9e9146a1f7339a88c63cb320a47f63f069a6120e
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I734425a9f778b730616e117ae454300e0ce23aee