From 23a16726a8ab28b8e946757833eea6033f066bd6 Mon Sep 17 00:00:00 2001 From: "S. Razi Alavizadeh" Date: Tue, 29 Jan 2013 05:22:08 +0330 Subject: [PATCH] Fixed bug about incorrect icon returned by QFileIconProvider() for the file that is going to download. -and added the missing include --- src/lib/autofill/pageformcompleter.cpp | 3 +++ src/lib/downloads/downloadfilehelper.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/autofill/pageformcompleter.cpp b/src/lib/autofill/pageformcompleter.cpp index e45ad5bb0..a7ba4ef3f 100644 --- a/src/lib/autofill/pageformcompleter.cpp +++ b/src/lib/autofill/pageformcompleter.cpp @@ -20,6 +20,9 @@ #include #include #include +#if QT_VERSION >= 0x050000 +#include +#endif #include PageFormCompleter::PageFormCompleter(QWebPage* page) diff --git a/src/lib/downloads/downloadfilehelper.cpp b/src/lib/downloads/downloadfilehelper.cpp index efc980f24..8fc4d4305 100644 --- a/src/lib/downloads/downloadfilehelper.cpp +++ b/src/lib/downloads/downloadfilehelper.cpp @@ -69,7 +69,7 @@ void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, const Do m_reply = reply; QFileInfo fileInfo(m_h_fileName); - QTemporaryFile tempFile("XXXXXX." + fileInfo.suffix()); + QTemporaryFile tempFile(QDir::tempPath()+"/XXXXXX." + fileInfo.suffix()); tempFile.open(); tempFile.write(m_reply->peek(1024 * 1024)); QFileInfo tempInfo(tempFile.fileName());