Fix cast from ASCII in library code
Fix cast from ASCII in library code

Must always declare the source encoding. QtSerialPort must still compile
with Qt 4, so #define QStringLiteral to be QLatin1String there (even
though QStringLiteral is supposed to be UTF-8).

Note: this code is bad. It's not thread-safe outside of GCC. It should
use Q_GLOBAL_STATIC.

Change-Id: I938c2f836f9c3c1d2beaade20e67ce5ef142741e
Reviewed-by: Laszlo Papp <2164cc32668ec579454611fc5261234262c80421@kde.org>
Reviewed-by: Sergey Belyashov <8871b4c2d635fca691211507eadbac3d0bc2695a@gmail.com>

kobolabs/qtserialport,RoadWorksSoftware/QtSerialPort-OS2,RoadWorksSoftware/QtSerialPort-OS2,kobolabs/qtserialport