creadersync: do not return successful read for empty data
authorDenis Shienkov <denis.shienkov@gmail.com>
Wed, 25 Dec 2013 12:14:12 +0000 (16:14 +0400)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 8 Jan 2014 12:26:15 +0000 (13:26 +0100)
commitd5658bd0ced4a1eb0703d3cb1b566025d610fbdd
tree8a8c263d3a472fa98155745b8e3d5186eb7f0be5
parent007e8063946e66d32e4ab7e345472036517135ff
creadersync: do not return successful read for empty data

In case of handling of the TimeoutError it is necessary to check on
existence of the read data (for this concrete implementation of the
example). Otherwise the application always return the TimeoutError
even if a data was successfully read.

Change-Id: I2437461f2ed2806bb7d7e16deb6925df035f62a1
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
examples/serialport/creadersync/main.cpp