From c6f90e575e2e261f7fa50f951b6fc1824ae5c12f Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 19 Jan 2017 16:44:22 +0100 Subject: Utils: Introduce a TemporaryDirectory and TemporaryFile class Both wrap the corresponding Qt class, but make sure all temporary files or directories are created inside a "master temporary directory". Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498 Reviewed-by: Tim Jenssen --- src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/debugger/shared') diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp index 9abfca53414..c5ad4146333 100644 --- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp +++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp @@ -30,6 +30,7 @@ #include #include +#include #include "symbolpathsdialog.h" @@ -139,7 +140,7 @@ CdbSymbolPathListEditor::CdbSymbolPathListEditor(QWidget *parent) : bool CdbSymbolPathListEditor::promptCacheDirectory(QWidget *parent, QString *cacheDirectory) { CacheDirectoryDialog dialog(parent); - dialog.setPath(QDir::tempPath() + QDir::separator() + QLatin1String("symbolcache")); + dialog.setPath(Utils::TemporaryDirectory::masterDirectoryPath() + "/symbolcache"); if (dialog.exec() != QDialog::Accepted) return false; *cacheDirectory = dialog.path(); @@ -165,7 +166,7 @@ void CdbSymbolPathListEditor::setupSymbolPaths() if (path.isEmpty() && indexOfSymbolCache != -1) path = currentPaths.at(indexOfSymbolCache); if (path.isEmpty()) - path = QDir::tempPath() + QDir::separator() + QLatin1String("symbolcache"); + path = Utils::TemporaryDirectory::masterDirectoryPath() + "/symbolcache"; bool useSymbolServer = true; bool useSymbolCache = true; -- cgit v1.2.3