Put temporary files in qbt own temp folder

This commit is contained in:
Chocobo1 2018-07-31 01:23:35 +08:00
parent e1727c9a6a
commit 9612a75faa
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
2 changed files with 3 additions and 2 deletions

View File

@ -2300,7 +2300,7 @@ bool Session::loadMetadata(const MagnetUri &magnetUri)
p.max_connections = maxConnectionsPerTorrent();
p.max_uploads = maxUploadsPerTorrent();
QString savePath = QString("%1/%2").arg(QDir::tempPath(), hash);
QString savePath = QString("%1/%2").arg(Utils::Fs::tempPath(), hash);
p.save_path = Utils::Fs::toNativePath(savePath).toStdString();
// Forced start

View File

@ -37,6 +37,7 @@
#endif
#include "base/preferences.h"
#include "base/utils/fs.h"
GuiIconProvider::GuiIconProvider(QObject *parent)
: IconProvider(parent)
@ -124,7 +125,7 @@ QString GuiIconProvider::getIconPath(const QString &iconId) const
{
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
if (m_useSystemTheme) {
QString path = QDir::temp().absoluteFilePath(iconId + ".png");
QString path = Utils::Fs::tempPath() + iconId + ".png";
if (!QFile::exists(path)) {
const QIcon icon = QIcon::fromTheme(iconId);
if (!icon.isNull())