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 and Tizen compatability in Qt5

Android and Tizen compatability in Qt5

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 393 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
    Gourmet
    wrote on last edited by
    #1

    Tizen is different OS to Android but can run Android apps. I develop and test my apps in Android only cause do not have Samsung phone with Tizen. In my app I need use QFile::exists() method to check for some folder. The file name for QFile constructor does not have option for case insensitive exists() check. Android uses YAFFS2 as file system for internal storage and FAT(32) or exFAT for external. All three file system types are case insensitive. I confirm this - my app when checks for QFile( "/mnt/music" ) folder gets true from exists(). But the actual folder name is Music.

    But... Tizen type of file system is not known (at least widely...). Probably this is EXT4 or something. The only one thing I have found - it IS case sensitive. That means - the code with QFile::exists() function can not work on Tizen smartphone properly. If only Qt operations with file names could be turned to be case insensitive - it could be some way around. But now I am frustrated...

    Is here anybody having Tizen driving device and able to make Qt5 app and run on it? Can you check if QFile::exists() function is case sensitive or not?

    J.HilkJ 1 Reply Last reply
    0
    • G Gourmet

      Tizen is different OS to Android but can run Android apps. I develop and test my apps in Android only cause do not have Samsung phone with Tizen. In my app I need use QFile::exists() method to check for some folder. The file name for QFile constructor does not have option for case insensitive exists() check. Android uses YAFFS2 as file system for internal storage and FAT(32) or exFAT for external. All three file system types are case insensitive. I confirm this - my app when checks for QFile( "/mnt/music" ) folder gets true from exists(). But the actual folder name is Music.

      But... Tizen type of file system is not known (at least widely...). Probably this is EXT4 or something. The only one thing I have found - it IS case sensitive. That means - the code with QFile::exists() function can not work on Tizen smartphone properly. If only Qt operations with file names could be turned to be case insensitive - it could be some way around. But now I am frustrated...

      Is here anybody having Tizen driving device and able to make Qt5 app and run on it? Can you check if QFile::exists() function is case sensitive or not?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @gourmet
      you can do it via QDir:

      QDir d("folderPath");
      auto entries = d.entryList(QDir::Files);
      return entries.contains(fileName, Qt::CaseSensitive);
      

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      G 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @gourmet
        you can do it via QDir:

        QDir d("folderPath");
        auto entries = d.entryList(QDir::Files);
        return entries.contains(fileName, Qt::CaseSensitive);
        
        G Offline
        G Offline
        Gourmet
        wrote on last edited by Gourmet
        #3

        @j-hilk this is not best solution for me. I need check for existing folders with different pathnames dynamically assembled. In your case I must for each folder parse it's pathname, get path, create QDir with this path, then do what you suggest. Instead of just write:

        if( QFile::exists( fullpath() ) )
            ......
        

        Better solution should be:

        if( QFile::exists( fullpath(),  Qt::CaseInsensitive ) )
            ......
        
        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