Pass a length of string to QString::fromWCharArray
Pass a length of string to QString::fromWCharArray

Using of the QString::fromWCharArray() we didn't pass length of a string,
hoping that all WCHAR strings are terminated by the null-character.

But it can lead to the wrong results if the initial WCHAR string has no
null character. Therefore it is reasonable to pass length of a string to
exclude an error.

Besides, to do not break of the algorithm of string comparison it is
necessary to return not null-terminated strings. Also now there is no need
to initialize of some allocated arrays by zero values.

Tested on Windows 7/8 with the on-board, the virtual com0com, the USB FTDI
and the PL2303 serial ports, using Qt4 and then Qt5.

Change-Id: I382cf8eacf4ab4d21c54de17fcdd6b9fcfa3d02c
Reviewed-by: Konstantin Ritt <a3e8aa2315dc46d9b56a8ceeac5344d6e6fc5115@gmail.com>
Reviewed-by: Denis Shienkov <6a9c747bd2ba446682324cf340d3b86f30cf4d55@gmail.com>

RoadWorksSoftware/QtSerialPort-OS2,RoadWorksSoftware/QtSerialPort-OS2