Fix the flush regression on Unix

Currently, flushing is not flushing the buffer to the device because
it is calling the wrong function.

Before flush() is invoked startAsyncWrite, but this did not flush the buffer
when it was not empty. The only possible way to fix this is by invoking the
function completeAsyncWrite, it first checks for pending information in the
buffer for sending and then invokes startAsyncWrite if necessary.

The following change caused the regression: 21f5049

Test Environment: Qt 5.3.0-beta1 and Qt 4.8.2.
S.O.: 3.12.6-2kali1 i686 GNU/Linux.
Fiscal Machine: SRP350 Bixolon.
USB Adapter Serial Port: CH341
Task-number: QTBUG-38339
Change-Id: I5159b48f073d537a396b65484fcc2c3d37e4908c
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Mark the settingsRestoredOnClose property deprecated since 5.3

Commit bc0a65234440b6a08d862840a48ebae0d3421fbc incorrectly
marked this api as deprecated since 5.2

Change-Id: Ia4ea3d7a394376a16511a3bf2ad8ba6e051bc24d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Enable QtSerialPort on QNX

On QNX, the combination (IHFLOW | OHFLOW) is equivalent to the CRTSCTS flag.
Only /dev/ser* ports can be enumerated.

Tested on SVTronics UEVM5432 Omap5 board with QNX 6.6

Change-Id: I64b149258a525835e63f231b5291fa86637e3d2a
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Fix the serial number display in the terminal example

The display code was left out in commit
959775c41683033adbd99faab7e3d70e0009c143.

Tested using FTDI device on Windows 8 with Qt5 and
then on Windows 7 with Qt4.

Change-Id: I9f665b2826ba03877346b25a569ca89b6a3dc4af
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Idadda494181f643ef1b7fc2b2fb16dc5d215e83a