diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2017-01-19 16:44:22 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2017-01-20 12:17:10 +0000 |
commit | c6f90e575e2e261f7fa50f951b6fc1824ae5c12f (patch) | |
tree | 7f3564ad1491a5f40e64bcee89d70b884409885f /src/plugins/help/helpviewer.cpp | |
parent | e6017c40fca059b27e449f0605f4d79b78de0ff3 (diff) | |
download | qt-creator-c6f90e575e2e261f7fa50f951b6fc1824ae5c12f.tar.gz |
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 <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/help/helpviewer.cpp')
-rw-r--r-- | src/plugins/help/helpviewer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/help/helpviewer.cpp b/src/plugins/help/helpviewer.cpp index ceb3e75680..964235d736 100644 --- a/src/plugins/help/helpviewer.cpp +++ b/src/plugins/help/helpviewer.cpp @@ -30,10 +30,10 @@ #include <coreplugin/icore.h> #include <utils/fileutils.h> +#include <utils/temporarydirectory.h> #include <QFileInfo> #include <QStringBuilder> -#include <QDir> #include <QUrl> #include <QApplication> @@ -135,7 +135,7 @@ bool HelpViewer::launchWithExternalApp(const QUrl &url) const QString& path = resolvedUrl.path(); if (!canOpenPage(path)) { - Utils::TempFileSaver saver(QDir::tempPath() + Utils::TempFileSaver saver(Utils::TemporaryDirectory::masterDirectoryPath() + "/qtchelp_XXXXXX." + QFileInfo(path).completeSuffix()); saver.setAutoRemove(false); if (!saver.hasError()) |