Optimization of a Qt QByteArray conversion
Try to avoid deep copying of source array, this can be achived with right method:

QByteArray restoreData(const QByteArray &amp;data, char prepender = 'x')
{
    return QByteArray::fromHex(data.right(data.size() - data.indexOf(prepender) - 1);
}