diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-03 02:29:43 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-03 02:29:43 +0200 |
commit | aae68198fa2c046d63d5c5674a4a096b11f744da (patch) | |
tree | 44d6fa03dcd8f44a1bc3bb406741ba16686f0f27 /src/mainwindow.cpp | |
parent | Improved contextual menu following my ideas and Henry de Valence (diff) | |
download | rekonq-aae68198fa2c046d63d5c5674a4a096b11f744da.tar.xz |
Improved a bit "Save As" slot
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 7 |
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. |