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

QFile::rename() description incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.6.3
    • Documentation
    • None
    • All
    • DaVinci 96

    Description

      Doc says "The file is closed before it is renamed."

      I think it is not right because my code example produce message

      QFile::open: File (1.txt) already open

          QFile tmp;
          tmp.setFileName("1.txt");
          tmp.open(QIODevice::WriteOnly);
          tmp.write("1.txt");
          tmp.rename("1tmp.txt"); //looks like rename don't do tmp.close()
          tmp.open(QIODevice::WriteOnly);

      Attachments

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

        Activity

          People

            safiyyah Safiyyah Moosa
            dungeonlords Andrei Cherniaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes