tst_QMessageBox: test staticsSourceCompat() also with a parent
The old tests only ever passed nullptr parents, but to fix
QTBUG-150912 (crash on parent deletion while dialog is in exec()), we
need a to hae a variant that has a non-null parent.
Since the goal is to fix a crash on deleted parent, prepare the code
for that already, but using a QAutoPointer for the parent, and
re-checking for every individual test whether it needs to be
re-created.
Pick-to: 6.12 6.8
Task-number: QTBUG-150912
Task-number: QTBUG-54693
Change-Id: Ia3197c6de73aa383218d8e58d814b424ac8c2db6
Reviewed-by: Qt Review Bot <qt_reviewbot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>