Bitwise shifts replaced with QDataStream operations