Small refactor in TextDocumentGeneratorPrivate
add const to a few variables
Make two functions return a qlist instead of using a member qlist to return the results in them