diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2009-06-20 19:33:09 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2009-06-20 19:33:09 +0200 | 
| commit | 9f9f30aec59b16b94711b3fdd3729b2ea160456d (patch) | |
| tree | a339d843855a35c044794028785bb3a5e8399bec | |
| parent | Finally fixed F5 shortcut (diff) | |
| download | rekonq-9f9f30aec59b16b94711b3fdd3729b2ea160456d.tar.xz | |
slot Save File As
| -rw-r--r-- | src/mainwindow.cpp | 14 | 
1 files changed, 8 insertions, 6 deletions
| diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2e2cc6cd..4e6ff643 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -57,6 +57,7 @@  #include <KGlobalSettings>  #include <KPushButton>  #include <KTemporaryFile> +#include <KJobUiDelegate>  #include <kdeprintdialog.h>  #include <kprintpreview.h> @@ -425,13 +426,14 @@ void MainWindow::slotOpenLocation()  void MainWindow::slotFileSaveAs()  { -    QWebFrame* frame = m_view->currentWebView()->page()->currentFrame(); - -    QString title = frame->title(); -    QString content = frame->toPlainText(); -      KUrl srcUrl = currentTab()->url(); -    // FIXME implement download file  +     +    const QString destUrl = KFileDialog::getSaveFileName(srcUrl.fileName(), QString(), this); +    if (destUrl.isEmpty()) return; +    KIO::Job *job = KIO::file_copy(srcUrl, KUrl(destUrl), -1, KIO::Overwrite); +    job->addMetaData("MaxCacheSize", "0");  // Don't store in http cache. +    job->addMetaData("cache", "cache");     // Use entry from cache if available. +    job->uiDelegate()->setAutoErrorHandlingEnabled(true);  } | 
