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

QFileDialog::getSaveFileName with QFile::write do not work on WinRT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.5.0 Beta
    • 5.4.1, 5.5.0
    • None
    • Qt 5.4.1 (git), WinRT 8.1, Visual Studio 2013
    • WinRT
    • c5fd30b

    Description

      The file picked from the save file picker cannot be written to (both QFile::copy and QFile::write fail):

      QString fileName = QFileDialog::getSaveFileName(0, "Save to", "", "doc (*.doc)");
      QFile targetFile(fileName);
      
      if (targetFile.open(QFile:WriteOnly))
      {
      	targetFile.write(QString("Some string").toUtf8()); // returns -1
      	targetFile.close();
      }
      

      The corresponding QWinRTFileEngine::write and QWinRTFileEngine::copy functions are not called.

      Attachments

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

        Activity

          People

            wupeng PengWu
            DanielSt Peter Staab
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes