simplify index access of QByteArray in processDatagram