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>
commita7b5893d3d22602e765d02621e9f7790cfc23abe
parent2674ab9e4fcc970f62075a8364702910f8594616
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeMon, 27 Apr 2026 09:04:42 +0000