diff options
author | David Faure <faure@kde.org> | 2012-12-06 00:02:31 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-06 18:40:29 +0100 |
commit | ce556dfcbc9eeb8d993fa8ce9c9fac6cfb71d2be (patch) | |
tree | 0dff27f5ea8cad7094fd87ac06415c33e3ff5777 /src/corelib/io/qstandardpaths_unix.cpp | |
parent | a79b898299108ad9b6ffa9aab024d74e4f6432bc (diff) |
Warn when XDG_RUNTIME_DIR isn't set, as per XDG Base Dir Spec
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
says: "If $XDG_RUNTIME_DIR is not set applications should fall back to a
replacement directory with similar capabilities and print a warning message."
Better warn that not all the guarantees of XDG_RUNTIME_DIR are available,
and push unixes who haven't done so yet, to set things up correctly.
Change-Id: Ie3998e8c1d14e4fdf8d58dfb2932f0ad708fba50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_unix.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_unix.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp index 3fb36589d2..932ae6b6cc 100644 --- a/src/corelib/io/qstandardpaths_unix.cpp +++ b/src/corelib/io/qstandardpaths_unix.cpp @@ -127,6 +127,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) return QString(); } } + qWarning("QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '%s'", qPrintable(xdgRuntimeDir)); } // "The directory MUST be owned by the user" QFileInfo fileInfo(xdgRuntimeDir); |