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>
commit32d7ca78fefc45f4fa16a062e4a87ccb0a8aecc5
parent43e0d68d2784e73eeefc918bafea943d215f8332
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeFri, 25 Apr 2025 10:40:04 +0200