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

no way to copy a file to overwrite an exist file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      All

      Description

      copy function of QFile don't support to overwrite an exist file. But in most cases, we need to copy an file to overwrite an exist file. This is an essential function of QFile.

      [static] bool QFile::copy(const QString &fileName, const QString &newName)

      This is an overloaded function.

      Copies the file fileName to newName. Returns true if successful; otherwise returns false.

      If a file with the name newName already exists, copy() returns false (i.e., QFile will not overwrite it).

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            bugman Vico Liang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes