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

QStandardPaths::AppDataLocation is worong ("/") in Android Debug builds with Qt 5.9.4 snapshot

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.5, 5.10.1, 5.11.0 Beta 2
    • 5.9.4
    • Core: I/O
    • None
    • Qt 5.9.4 snapshot on macOS

      Android:

      Tested on Google Pixel, Google Pixel XL, Huawei Nexus 6P, LGE LG V20, Motorola Moto G 4, Motorola Nexus 6, Samsung Galaxy S6, Samsung Galaxy S7, Samsung Galaxy S6

       
    • Android
    • eadf9e542fcc42597bfe02df065fc4cefa94cd56

    Description

       Adding

      [...]
      QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
      qDebug() << "QStandardPaths::AppDataLocation is"; 
      qDebug() << path;
      [...]

      in main() after `QGuiApplication app(argc, argv);` in the "Qt Quick Controls 2 - Gallery" example returns:

      D Gallery : ../gallery/gallery.cpp:67 (int main(int, char**)): QStandardPaths::AppDataLocation is
      D Gallery : ../gallery/gallery.cpp:68 (int main(int, char**)): "/"

      when deploying Debug builds for Android .

      In Release builds:

      D Gallery : (null):0 ((null)): QStandardPaths::AppDataLocation is
      D Gallery : (null):0 ((null)): "/data/user/0/org.qtproject.example.gallery/files"
      

      which is correct.

       

      This issue was also present when I built Qt for Android from source at commit 1c1557aa93cd139688ebfe5a9922a60ef2b2d8c6 in qt5.git in the middle of December 2017. Additionally, iOS and OS X Debug builds do not have this issue.

      Attachments

        Issue Links

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

          Activity

            People

              stromme Christian
              tomana Tom Nœrland
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes