Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to handle if standard path not available on linux?
Forum Updated to NodeBB v4.3 + New Features

How to handle if standard path not available on linux?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 817 Views 1 Watching
  • 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.
  • A Offline
    A Offline
    av2306
    wrote on last edited by
    #1

    Hi,

    Deleted 'Music'(~/Music) folder on linux. When I try to find music standard location from qt apis( statndard paths:: standard location), returns home directory.

    How will application know standard path doesn't exist?

    Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I'm not really sure to understand your question correctly. Since you deleted the Music folder, then AFAIK the new "standard" path is the home directory.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        av2306
        wrote on last edited by
        #3

        Hi SGaist,

        I thought it would return error or empty string.

        Just to confirm: If standard path of music directory is home directory, then there is no music directory on that computer.

        Thank you.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          No, you can't presume that. Your user might have put his music in another path called e.g. Audio or my_music or even things.

          If your application should find the music from a user, use the standard path as default and let the user modify the path in order to accommodate unusual folders.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - 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