Browse Source

Put temporary files in qbt own temp folder

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
9612a75faa
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/bittorrent/session.cpp
  2. 3
      src/gui/guiiconprovider.cpp

2
src/base/bittorrent/session.cpp

@ -2300,7 +2300,7 @@ bool Session::loadMetadata(const MagnetUri &magnetUri) @@ -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

3
src/gui/guiiconprovider.cpp

@ -37,6 +37,7 @@ @@ -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 @@ -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())

Loading…
Cancel
Save