The code is sth like this:
void WebPage::handleFileDownload(QNetworkReply *reply)
{
PromptDownloadDialog dlg;
dlg.m_fileName=path.fileName();
dlg.m_url=url.toString();
dlg.m_saveFolder=g_pApp->m_downloadDirectory;
{
downloadFile(reply,dlg.m_fileName,dlg.m_url,dlg.m_saveFolder);
}
}
void WebPage::handleFileDownload(QNetworkReply *reply)
{
PromptDownloadDialog dlg;
QUrl url=reply->url();
QFileInfo path=url.path();
dlg.m_fileName=path.fileName();
dlg.m_url=url.toString();
dlg.m_saveFolder=g_pApp->m_downloadDirectory;
if (dlg.exec()==QDialog::Accepted)
{
downloadFile(reply,dlg.m_fileName,dlg.m_url,dlg.m_saveFolder);
}
}
To copy to clipboard, switch view to plain text mode
The code inside the actual download manager is too much to post here and I believe that is irrelevant either.
The point is that if I remove the prompting dialog, the download is completed just fine.
Bookmarks