Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
Consider the following example of creating a QTemporaryFile with a dynamic explicit template:
QTemporaryFile tmp(DirPath + "/" + BaseName + ".XXXXXX");
In the current state the documentation fails to answer the following questions:
- What happens, if BaseName also contains XXXXXX? Which of the patterns will be replaced? First, second or both?
- What happens, if DirPath contains XXXXXX? Will it be also replaced or dirname is considered static and the pattern will be searched only in the file name part?
Currently only the explicitly added pattern will be replaced, since pattern is searched from the end of the string, and the search stops as soon as any pattern was found. Also no pattern will be searched in the DirPath, since search also stops at /. But as it stands, this cannot be relied upon, since this is not documented...