QDir::tempPath: make fallback code more readable.

This is a no-op because QDir::cleanPath() already takes care of removing
the trailing slash.

Change-Id: Ic19d9a9dd7e377e04447c3ebc776b025f5f0c43a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
David Faure 2014-02-07 14:14:25 +01:00 committed by The Qt Project
parent 6f5db32abe
commit 36af7fe678

View File

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