Fix compilation on minGW


* Add missing qflags.h include
* Update the warnings that are passed from Java to also properly
  escape '\r', otherwise it ended up in code as '^M' (which is a
  carriage return symbol).

Task-number: QTBUG-138968
Pick-to: 6.11
Change-Id: I81e521a8992d7ac962af4508b9d7ab6c372a0c39
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit5c6390cc65b30bf97af53f2f545ec2ce46a63363
parent9c13d84d1f6f81df87f6bbebb800cc5162df5ee3
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeThu, 8 Jan 2026 09:42:20 +0100