Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79927

Improve QtTemporaryFile documentation regarding templates

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Documentation
    • 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:

      1. What happens, if BaseName also contains XXXXXX? Which of the patterns will be replaced? First, second or both?
      2. 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...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            docteam Qt Documentation Team
            eswcvlad eswcvlad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes