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>
This commit is contained in:
parent
a79b898299
commit
ce556dfcbc
@ -127,6 +127,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
qWarning("QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '%s'", qPrintable(xdgRuntimeDir));
|
||||||
}
|
}
|
||||||
// "The directory MUST be owned by the user"
|
// "The directory MUST be owned by the user"
|
||||||
QFileInfo fileInfo(xdgRuntimeDir);
|
QFileInfo fileInfo(xdgRuntimeDir);
|
||||||
|
Loading…
Reference in New Issue
Block a user