QStandardPaths::AppDataLocation returns only \u0011 under FreeBSD
-
According to documentation of
QStandardPathsitsAppDataLocationshould 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\u0011QString defpath = ""; ... defpath.append(QStandardPaths::AppDataLocation); // this is where defpath == \u0011Am I misusing the class/member or is its implementation broken under FreeBSD?
-
QStandardPaths::AppDataLocationis 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.