Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android access filesystem crash
Forum Updated to NodeBB v4.3 + New Features

Android access filesystem crash

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 300 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gibbz
    wrote on last edited by
    #1

    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)
    
    jsulmJ 1 Reply Last reply
    0
    • G Gibbz

      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)
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Gibbz said in Android access filesystem crash:

      Util::getHomeLocation()

      What does it return?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved