changed fromHex() in parser to (char)0x
This commit is contained in:
parent
b682b46631
commit
e03ebc31f4
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue