Linguist: Report every validation violation, not just one per type
Validator::validate() and validateTranslation() collect translation
violations in a QMap keyed by the error type. A QMap holds only one
value per key, so several violations of the same type collapse into a
single entry and only the last one survives. In lcheck a file with many
violations of the same kind reports only one of them. The collapsing
also hides violations across the numerus forms of a plural
message.
Return a QList<Validator::Error> from these functions
instead of the QMap.
lcheck now reports each violation with its location, context, source
text and the failing check, followed by a total count.
Also guard the plural forms loop in validate() against an empty
countRefNeeds list. lcheck leaves it empty with --no-place-marker, which
made the loop read past the end of the list and crash.
Fixes: QTBUG-148562
Pick-to: 6.11 6.12
Change-Id: If609f922936e76b7b96a39b71217f1d7e1f83c75
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>