QSerialPortInfo: handle {QString,QBA}::indexOf() returning -1
The algorithms in platform-specific QSerialPortInfo implementations
had the same problem of not checking that indexOf() could return -1.
Update the code to read until the end of the data in such cases,
instead of providing a negative second parameter to the following
mid() calls.
Amends 8975c4ad32a8244a0eadc2d0c6bb49ea489ac57a and at least
02e4a66a8bd9ce4d2f7f8c89cd1bddf4b6385b5f (although that patch just
moved things around).
Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I80711d17f1d54523ea37a0552336591e841a7a3e
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>