Details
Description
When doing QStandardPaths::writableLocation(...) with CacheLocation or DataLocation, Qt properly appends applicationName if we didn't pass a Generic(Cache|Data)Location argument.
However with ConfigLocation, the same path gets returned with ConfigLocation and GenericLocation. From qt5/qtbase/src/corelib/io/qstandardpaths_unix.cpp:
case DataLocation: case GenericDataLocation: { QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME")); if (isTestModeEnabled()) xdgDataHome = QDir::homePath() + QLatin1String("/.qttest/share"); if (xdgDataHome.isEmpty()) xdgDataHome = QDir::homePath() + QLatin1String("/.local/share"); if (type == QStandardPaths::DataLocation) appendOrganizationAndApp(xdgDataHome); return xdgDataHome; } case ConfigLocation: case GenericConfigLocation: { // http://standards.freedesktop.org/basedir-spec/latest/ QString xdgConfigHome = QFile::decodeName(qgetenv("XDG_CONFIG_HOME")); if (isTestModeEnabled()) xdgConfigHome = QDir::homePath() + QLatin1String("/.qttest/config"); if (xdgConfigHome.isEmpty()) xdgConfigHome = QDir::homePath() + QLatin1String("/.config"); return xdgConfigHome; }
As you can see, appendOrganizationAndApp(xdgConfigHome) is missing in that case.
In Windows this works correctly, so this is inconsistent with that too.