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. QStandardPaths::AppDataLocation returns only \u0011 under FreeBSD
Forum Updated to NodeBB v4.3 + New Features

QStandardPaths::AppDataLocation returns only \u0011 under FreeBSD

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 874 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.
  • nulluseN Offline
    nulluseN Offline
    nulluse
    wrote on last edited by
    #1

    According to documentation of QStandardPaths its AppDataLocation should resolve to either of

    "~/.local/share/<APPNAME>",
    "/usr/local/share/<APPNAME>",
    "/usr/share/<APPNAME>"

    under Linux. I was expecting that under FreeBSD it would resolve to something similar.
    But all I am getting back is a Unicode symbol \u0011

    QString defpath = "";
    ...
    defpath.append(QStandardPaths::AppDataLocation); // this is where defpath == \u0011
    

    Am I misusing the class/member or is its implementation broken under FreeBSD?

    1 Reply Last reply
    0
    • Paul ColbyP Offline
      Paul ColbyP Offline
      Paul Colby
      wrote on last edited by
      #2

      QStandardPaths::AppDataLocation is an enumerator value, so:

      defpath.append(QStandardPaths::AppDataLocation);
      

      is actually saying: append an integer to the string.

      I think you want to do something like this instead:

      defpath.append(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first());
      

      or

      defpath.append(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
      

      Cheers.

      1 Reply Last reply
      1
      • nulluseN Offline
        nulluseN Offline
        nulluse
        wrote on last edited by
        #3

        Who in their twisted mind?.. Oh, same old.

        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