1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Fixed showing download item not in download manager when downloading

page + added TODO list
This commit is contained in:
nowrep 2011-10-08 12:10:25 +02:00
parent 4b036cbd54
commit d097a06b2e
4 changed files with 22 additions and 4 deletions

14
TODO Normal file
View File

@ -0,0 +1,14 @@
#######################
## TODO List ##
#######################
There are some features, which I plan to implement
in future.
Note: They are not sorted by priority.
1. OpenSearch support
2. Import / Export Bookmarks
3. Speed Dial
4. FTP Protocol support
5. Zoom Widget in statusbar
6. Save more than one account for site + input completer

View File

@ -40,7 +40,7 @@ DownloadFileHelper::DownloadFileHelper(const QString &lastDownloadPath, const QS
//// Getting where to download requested file //// Getting where to download requested file
//// in 3 functions, as we are using non blocking //// in 3 functions, as we are using non blocking
//// dialogs ( this is important to make secure downloading //// dialogs ( this is important to make secure downloading
//// on windows working properly ) //// on Windows working properly )
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, bool askWhatToDo) void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, bool askWhatToDo)
@ -51,7 +51,7 @@ void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, bool ask
m_reply = reply; m_reply = reply;
QFileInfo info(reply->url().toString()); QFileInfo info(reply->url().toString());
QTemporaryFile tempFile("XXXXXX."+info.suffix()); QTemporaryFile tempFile("XXXXXX." + info.suffix());
tempFile.open(); tempFile.open();
QFileInfo tempInfo(tempFile.fileName()); QFileInfo tempInfo(tempFile.fileName());
m_fileIcon = m_iconProvider->icon(tempInfo).pixmap(30,30); m_fileIcon = m_iconProvider->icon(tempInfo).pixmap(30,30);
@ -124,6 +124,7 @@ void DownloadFileHelper::fileNameChoosed(const QString &name, bool fileNameAutoG
return; return;
} }
int pos = m_userFileName.lastIndexOf("/"); int pos = m_userFileName.lastIndexOf("/");
if (pos != -1) { if (pos != -1) {
int size = m_userFileName.size(); int size = m_userFileName.size();

View File

@ -156,12 +156,15 @@ void DownloadManager::download(const QNetworkRequest &request, bool askWhatToDo)
void DownloadManager::handleUnsupportedContent(QNetworkReply* reply, bool askWhatToDo) void DownloadManager::handleUnsupportedContent(QNetworkReply* reply, bool askWhatToDo)
{ {
if (reply->url().scheme() == "qupzilla")
return;
DownloadFileHelper* h = new DownloadFileHelper(m_lastDownloadPath, m_downloadPath, m_useNativeDialog); DownloadFileHelper* h = new DownloadFileHelper(m_lastDownloadPath, m_downloadPath, m_useNativeDialog);
connect(h, SIGNAL(itemCreated(QListWidgetItem*,DownloadItem*)), this, SLOT(itemCreated(QListWidgetItem*,DownloadItem*)));
h->setDownloadManager(this); h->setDownloadManager(this);
h->setListWidget(ui->list); h->setListWidget(ui->list);
h->handleUnsupportedContent(reply, askWhatToDo); h->handleUnsupportedContent(reply, askWhatToDo);
connect(h, SIGNAL(itemCreated(QListWidgetItem*,DownloadItem*)), this, SLOT(itemCreated(QListWidgetItem*,DownloadItem*)));
} }
void DownloadManager::itemCreated(QListWidgetItem *item, DownloadItem *downItem) void DownloadManager::itemCreated(QListWidgetItem *item, DownloadItem *downItem)