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

QFile resize() not working on UWP

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12
    • Fix Version/s: 5.12.5, 5.13.1, 5.14.0 Alpha
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      WinRT
    • Commits:
      7138d6fd6bba2c2e55d02bccf7fd0c6c287eab29

      Description

      open an existing file with content as below:

      1.  QFile aFile(myFilePath);   
      2.  if(!aFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) 
      3.   {        qDebug() << aFile.errorString();    }   
      4. qDebug() << "Pos " << aFile.pos();
      5. qDebug() << "File Size write " << aFile.size();
      6. aFile.resize(0);   // bug, the size remain the old size.
      7. qDebug() << "Pos " << aFile.pos();
      8. qDebug() << "File Size write " << aFile.size();

        Attachments

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

          Activity

            People

            • Assignee:
              owolff Oliver Wolff
              Reporter:
              bugman Vico Liang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes