Fix flaky modelview test by checking that ports are free before starting


Probe for a free port pair with a throwaway QTcpServer before
configuring the real host/registry objects, retrying with a new pair on
failure, and QVERIFY the setup calls so any remaining failure becomes a
clean test failure instead of a crash.

Fixes: QTBUG-150497
Change-Id: Icfba24c2a0ebd9b6836447e22d3bf06b4aed5ebd
Reviewed-by: Qt Review Bot <qt_reviewbot@qt-project.org>
Reviewed-by: Frederic Lefebvre <frederic.lefebvre@qt.io>
commit0739994b046b1607582072660d7ced0f32df8f81
parent51070e25ec0f15a2fd1c4eddc54eb5a037caa9cf
authorJukka Jokiniva <jukka.jokiniva@qt.io>
committerJukka Jokiniva <jukka.jokiniva@qt.io>
commit timeSat, 10 Oct 2026 12:12:28 +0000