Refactor the availablePortsByUdev() in favor to readability
Implementation of the availablePortsByUdev() function is a little
complicated by excess "if/else" conditions and also too long lines,
that worsens readability.
It is reasonable to make the following:
* To get rid of the big "if {...}" blocks in favor to immediate return
from function in case of an error. It will allow to reduce a quantity
of lines and will shift code alignment to the left.
* To split declaration of some long variables and functions into separate
lines, with length at least up to 80~100 characters.
* To drop of the 'struct' keywords and the '::' global namespace
operator for variables.
Tested on ArchLinux 64 bit with the on-board and PL2303 serial ports
using Qt4 and then Qt5.
Tested build on Android x86 using Qt5.
Change-Id: Iddc2a9511230e56e4a9d01a4c22af7b2eaeae60c
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>