Index: sources/utility/format.cpp =================================================================== diff -u -rc6a09899d2e46dc0bda5a6b994aa257953626f97 -rbb8f39a014644c70b832dd2a784f62fa9f6b6106 --- sources/utility/format.cpp (.../format.cpp) (revision c6a09899d2e46dc0bda5a6b994aa257953626f97) +++ sources/utility/format.cpp (.../format.cpp) (revision bb8f39a014644c70b832dd2a784f62fa9f6b6106) @@ -13,12 +13,8 @@ */ #include "format.h" -Format::Format() -{ +Format::Format() { } -} - - QString Format::toHexString(quint16 vValue, bool vWith0x, quint8 vLen) { if ( vWith0x ) { return "0x" + QString("%1").arg(vValue,0,16).rightJustified(vLen, '0').toUpper(); @@ -43,9 +39,15 @@ QByteArray mData; if(vData.type() == QVariant::String) { mData += vData.toByteArray(); - } else { - mData += vData.toUInt(); + return mData; } + + if(vData.type() == QVariant::ByteArray) { + mData += vData.toByteArray(); + return mData; + } + + mData += vData.toUInt(); return mData; }