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

no way to copy a file to overwrite an exist file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.3
    • Core: I/O
    • None
    • 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

            thiago Thiago Macieira
            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