Blackberry: Fix QFileSystemEngine::tempPath()

Fall back to /var/tmp instead of /tmp if neither TMPDIR nor TEMP are set.

/tmp is not a true filesystem on BB10 but rather a symbolic link to /dev/shmem

For more info see
http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/user_guide/fsystems.html#RAM

Change-Id: Ie690ed74ffd81b52ef4623458c3ff88629aee00a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Sergio Ahumada 2014-02-18 12:08:19 +01:00 committed by The Qt Project
parent 121e712935
commit ac127a8c09

View File

@ -720,8 +720,8 @@ QString QFileSystemEngine::tempPath()
temp = QFile::decodeName(qgetenv("TMPDIR")); temp = QFile::decodeName(qgetenv("TMPDIR"));
if (temp.isEmpty()) { if (temp.isEmpty()) {
qWarning("Neither the TEMP nor the TMPDIR environment variable is set, falling back to /tmp."); qWarning("Neither the TEMP nor the TMPDIR environment variable is set, falling back to /var/tmp.");
temp = QLatin1String("/tmp"); temp = QLatin1String("/var/tmp");
} }
return QDir::cleanPath(temp); return QDir::cleanPath(temp);
#else #else