mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Using mApp->tempPath() everywhere. (PROFILEDIR/temp)
This commit is contained in:
parent
d5ce0cf33f
commit
570ecf36cd
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* 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
|
* 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
|
* 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;
|
m_reply = reply;
|
||||||
|
|
||||||
QFileInfo fileInfo(m_h_fileName);
|
QFileInfo fileInfo(m_h_fileName);
|
||||||
QTemporaryFile tempFile(QDir::tempPath()+"/XXXXXX." + fileInfo.suffix());
|
QTemporaryFile tempFile(mApp->tempPath() + "/XXXXXX." + fileInfo.suffix());
|
||||||
tempFile.open();
|
tempFile.open();
|
||||||
tempFile.write(m_reply->peek(1024 * 1024));
|
tempFile.write(m_reply->peek(1024 * 1024));
|
||||||
QFileInfo tempInfo(tempFile.fileName());
|
QFileInfo tempInfo(tempFile.fileName());
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* ============================================================ */
|
* ============================================================ */
|
||||||
#include "qztools.h"
|
#include "qztools.h"
|
||||||
|
#include "mainapplication.h"
|
||||||
|
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
@ -432,7 +433,7 @@ QString QzTools::buildSystem()
|
|||||||
QIcon QzTools::iconFromFileName(const QString &fileName)
|
QIcon QzTools::iconFromFileName(const QString &fileName)
|
||||||
{
|
{
|
||||||
QFileInfo tempInfo(fileName);
|
QFileInfo tempInfo(fileName);
|
||||||
QTemporaryFile tempFile(QDir::tempPath() + "/XXXXXX." + tempInfo.suffix());
|
QTemporaryFile tempFile(mApp->tempPath() + "/XXXXXX." + tempInfo.suffix());
|
||||||
tempFile.open();
|
tempFile.open();
|
||||||
tempInfo.setFile(tempFile.fileName());
|
tempInfo.setFile(tempFile.fileName());
|
||||||
return QFileIconProvider().icon(tempInfo);
|
return QFileIconProvider().icon(tempInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user