summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2014-02-07 14:14:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-10 11:00:41 +0100
commit36af7fe678f41bbff2598b1e681a4a02ec3e2291 (patch)
treebfb8adf1c18ad8dab93898fda3c7f5fa4db3e686
parent6f5db32abee3826151b9230ee7dca56ada4a3a89 (diff)
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>
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index e6b4e5f754..2327c11c69 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -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
}