qtprotobuftestscommon.h: simplify compareSerializedChunks()
The function checks whether its first argument is a concatenation of any
permutation of the remaining three arguments. It did that by forming all
3! = 6 possible combinations as QStrings (via QLatin1StringView
concatenation) and comparing against the 1st argument.
Replace this with: locate each chunk in `actual` via indexOf(), then
sort the three resulting [start, end) intervals and verify they form a
contiguous, non-overlapping tiling of `actual`, starting at 0 and ending
at actual.size().
This is correct without any assumptions on the chunks, avoids allocating
the candidate strings, and avoids the overhead of transforming binary
data through QLatin1StringView to UTF-16 for comparison.
Pick-to: 6.11 6.8
Change-Id: I8818f9a81b2e9afdc67df5d2d355acbad251dc96
Reviewed-by: Marc Mutz <marc.mutz@qt.io>