Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android access filesystem crash



  • I have a crash with my app on android.
    I have a custom model based on QFileSystemModel. This is causing the crash.
    I have the android permissions setup fine.
    The problem seems to be that no matter what I use for the rootPath, it always uses "/" which causes a segmentation fault. I assume this needs root access obviously...

    Any idea how I can debug the QFileSystemModel to see why its no accepting my path?

        mFileSystemModel = new QFileSystemModel();
        mFileSystemModel->setFilter(QDir::AllDirs | QDir::NoDot);
        mFileSystemModel->setRootPath(Util::getHomeLocation()); // crash using QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString(), QStandardPaths::LocateDirectory)
    

  • Qt Champions 2019

    @Gibbz said in Android access filesystem crash:

    Util::getHomeLocation()

    What does it return?


Log in to reply