tst_QLinkedList: move undef QT_NO_JAVA_STYLE_ITERATORS into the .cpp


We can better comment it there, it's more visible, and changing
something doesn't require a full qt5.git reconfigure (which clock in
at almost 4min these days).

Amends 9464b6de231a40c4c6a2197b57ecabf092c11ae4 (picked to 6.2).

Pick-to: 6.11 6.10 6.8
Change-Id: I5fdb1421c56ae534dcf332e75c70fb9db2f887d8
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
commitb9a9a222649284a0cd835cb3ee715a312736114a
parentfa0f807c1f8f5af04ef272af87de915343345404
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 25 Mar 2026 00:16:47 +0100