Skip to content

Commit

Permalink
Using mApp->tempPath() everywhere. (PROFILEDIR/temp)
Browse files Browse the repository at this point in the history
  • Loading branch information
nowrep committed Jan 29, 2013
1 parent d5ce0cf commit 570ecf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/downloads/downloadfilehelper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2012 David Rosca <[email protected]>
* Copyright (C) 2010-2013 David Rosca <[email protected]>
*
* 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
Expand Down Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion src/lib/tools/qztools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 570ecf3

Please sign in to comment.