summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-11-03 16:25:34 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-11-03 16:25:34 +0100
commitbec0deb0925091d2b26038deed730c72af9c0a37 (patch)
tree0db8d5ced1763084ff645e88f3bb22bea8e1c44c /src/mainwindow.cpp
parentalso take 'application/futuresplash' mimetype in account for clickToFlash (diff)
downloadrekonq-bec0deb0925091d2b26038deed730c72af9c0a37.tar.xz
Let rekonq save file remotely
Andreas's comment was helpful: rekonq COULD save file remotely, but for same strange reason, KFileDialog::getSaveFileName() could not select remote files. Switching to getSaveUrl seems fixing the problem Ah... also a style clean up here. Sorry for the merged commit... BUG: 242675
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 23ccf25d..beab3afc 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -669,14 +669,14 @@ void MainWindow::fileSaveAs()
name = srcUrl.host() + QString(".html");
}
- const QString destUrl = KFileDialog::getSaveFileName(name, QString(), this);
+ const KUrl destUrl = KFileDialog::getSaveUrl(name, QString(), this);
if (destUrl.isEmpty())
return;
if (w->page()->isContentEditable())
{
QString code = w->page()->mainFrame()->toHtml();
- QFile file(destUrl);
+ QFile file(destUrl.url());
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
@@ -686,7 +686,7 @@ void MainWindow::fileSaveAs()
return;
}
- KIO::Job *job = KIO::file_copy(srcUrl, KUrl(destUrl), -1, KIO::Overwrite);
+ KIO::Job *job = KIO::file_copy(srcUrl, 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);