1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Using mApp->tempPath() everywhere. (PROFILEDIR/temp)

This commit is contained in:
nowrep 2013-01-29 13:16:24 +01:00
parent d5ce0cf33f
commit 570ecf36cd
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -69,7 +69,7 @@ void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, const Do
m_reply = reply;
QFileInfo fileInfo(m_h_fileName);
QTemporaryFile tempFile(QDir::tempPath()+"/XXXXXX." + fileInfo.suffix());
QTemporaryFile tempFile(mApp->tempPath() + "/XXXXXX." + fileInfo.suffix());
tempFile.open();
tempFile.write(m_reply->peek(1024 * 1024));
QFileInfo tempInfo(tempFile.fileName());

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ============================================================ */
#include "qztools.h"
#include "mainapplication.h"
#include <QTextDocument>
#include <QDateTime>
@ -432,7 +433,7 @@ QString QzTools::buildSystem()
QIcon QzTools::iconFromFileName(const QString &fileName)
{
QFileInfo tempInfo(fileName);
QTemporaryFile tempFile(QDir::tempPath() + "/XXXXXX." + tempInfo.suffix());
QTemporaryFile tempFile(mApp->tempPath() + "/XXXXXX." + tempInfo.suffix());
tempFile.open();
tempInfo.setFile(tempFile.fileName());
return QFileIconProvider().icon(tempInfo);