summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-03 02:29:43 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-03 02:29:43 +0200
commitaae68198fa2c046d63d5c5674a4a096b11f744da (patch)
tree44d6fa03dcd8f44a1bc3bb406741ba16686f0f27 /src/mainwindow.cpp
parentImproved contextual menu following my ideas and Henry de Valence (diff)
downloadrekonq-aae68198fa2c046d63d5c5674a4a096b11f744da.tar.xz
Improved a bit "Save As" slot
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 31a47033..2e8852f0 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -499,7 +499,12 @@ void MainWindow::slotFileSaveAs()
{
KUrl srcUrl = currentTab()->url();
- const QString destUrl = KFileDialog::getSaveFileName(srcUrl.fileName(), QString(), this);
+ QString name = srcUrl.fileName();
+ if(name.isNull())
+ {
+ name = srcUrl.host() + QString(".html");
+ }
+ const QString destUrl = KFileDialog::getSaveFileName(name, 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.