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

QStandardPaths::PicturesLocation invalid on iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.0 Beta
    • 5.4.0 Beta
    • QPA
    • None
    • Tested in iOS 8.1.1, Qt 5.4.0 Beta

    Description

      QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);

      return a non empty path on iOS, but that is not writable, nor can one create the path.

      some test code below to past into hello world:

      QString _savePath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);

      QDir dir(_savePath);
      if (!dir.exists()) {
      if (!dir.mkpath(_savePath))

      { qDebug() << "can't make" << _savePath; }

      }
      QFile f(_savePath+"/test.tmp");
      if (f.open(QIODevice::WriteOnly))

      { f.write("does this work on iOS?"); f.close(); }

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            grego Harri Pasanen
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes