changed fromHex() in parser to (char)0x

This commit is contained in:
Rafael 2016-03-29 13:27:21 +02:00
parent b682b46631
commit e03ebc31f4

View file

@ -180,16 +180,16 @@ bool SnapmaticPicture::readingPicture()
QString SnapmaticPicture::getSnapmaticPictureString(QByteArray snapmaticHeader) QString SnapmaticPicture::getSnapmaticPictureString(QByteArray snapmaticHeader)
{ {
QByteArray snapmaticUsefulBytes = snapmaticHeader.left(snapmaticUsefulLength); QByteArray snapmaticUsefulBytes = snapmaticHeader.left(snapmaticUsefulLength);
snapmaticUsefulBytes.replace(QByteArray::fromHex("00"),""); snapmaticUsefulBytes.replace((char)0x00, "");
snapmaticUsefulBytes.replace(QByteArray::fromHex("01"),""); snapmaticUsefulBytes.replace((char)0x01, "");
return QString::fromLatin1(snapmaticUsefulBytes); return QString::fromLatin1(snapmaticUsefulBytes);
} }
QString SnapmaticPicture::getSnapmaticJSONString(QByteArray jsonBytes) QString SnapmaticPicture::getSnapmaticJSONString(QByteArray jsonBytes)
{ {
QByteArray jsonUsefulBytes = jsonBytes; QByteArray jsonUsefulBytes = jsonBytes;
jsonUsefulBytes.replace(QByteArray::fromHex("00"),""); jsonUsefulBytes.replace((char)0x00, "");
jsonUsefulBytes.replace(QByteArray::fromHex("0C"),""); jsonUsefulBytes.replace((char)0x0c, "");
return QString::fromLatin1(jsonUsefulBytes); return QString::fromLatin1(jsonUsefulBytes);
} }