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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.4.1, 5.5.0
    • Fix Version/s: 5.5.0 Beta
    • Labels:
      None
    • Environment:
      Qt 5.4.1 (git), WinRT 8.1, Visual Studio 2013
    • Platform/s:
      WinRT
    • Commits:
      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

        For Gerrit Dashboard: QTBUG-44969
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            wupeng PengWu
            Reporter:
            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