Message loss in QgroundControl

I would like to know the MAVLink message loss criteria for Qgroundcontrol.

Mavlink header has an 8-bit sequence number field. The source of the message is expected to increment the sequence number for each successive message. If the received seq no is not equal to expected seq no, the message loss counter is set to the received_msg_seq - expected_msg_seq.

You can find the same here in QGroundControl source code.

            // And if we didn't encounter that sequence number, record the error
            //int foo = 0;
            if (_message.seq != expectedSeq)
                //foo = 1;
                int lostMessages = 0;
                //-- Account for overflow during packet loss
                if(_message.seq < expectedSeq) {
                    lostMessages = (_message.seq + 255) - expectedSeq;
                } else {
                    lostMessages = _message.seq - expectedSeq;
                // Log how many were lost
                totalLossCounter[mavlinkChannel] += static_cast<uint64_t>(lostMessages);