summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMartin Schulze <schulmar@hrz.tu-chemnitz.de>2016-03-29 16:47:06 +0200
committerJose Fonseca <jfonseca@vmware.com>2016-04-13 10:42:49 +0100
commit88148591255e397d7d6a11ed05858152e0143184 (patch)
tree0aef97d71accdda129910226b39f250b242151b1 /gui
parent686fc5a2922090e12ae742b0d17b841d2d77a7e3 (diff)
gui: Simplify edited (temp) filepath creation.
Diffstat (limited to 'gui')
-rw-r--r--gui/apitrace.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/gui/apitrace.cpp b/gui/apitrace.cpp
index 18556173..69425a39 100644
--- a/gui/apitrace.cpp
+++ b/gui/apitrace.cpp
@@ -178,11 +178,8 @@ void ApiTrace::callEdited(ApiTraceCall *call)
if (!m_editedCalls.contains(call)) {
// Lets generate a temp filename
QFileInfo fileInfo(m_fileName);
- QString tempPath = QDir::tempPath();
- m_tempFileName = QDir::tempPath();
- m_tempFileName += QDir::separator();
- m_tempFileName += fileInfo.fileName();
- m_tempFileName += QString::fromLatin1(".edited");
+ m_tempFileName = QDir::temp().filePath(fileInfo.fileName() +
+ QString::fromLatin1(".edited"));
}
m_editedCalls.insert(call);
m_needsSaving = true;