QDoc: Improve handling of hyphens in titles
QDoc uses hyphens as placeholders for non-alphanumeric characters in its
internal representation for titles. Titles are also simplified to remove
redundant hyphens.
As a result, titles originally containing hyphens can be converted to
internal representations that are shared with other titles, making it
impossible to distinguish between them and make links to specific
resources.
This change includes hyphens with alphanumeric characters in the set of
characters to retain, relying on spaces to represent other characters
before converting them to hyphens in the internal representation of
titles.
Fixes: QTBUG-136247
Change-Id: I90512a961ee9b1e56bfd53df4d1950f4daf22b82
Reviewed-by: Topi Reinio <topi.reinio@qt.io>