summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-26 12:10:17 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-26 12:10:17 +0200
commit436ff1dd4bfc42605f8c4e13b3a4bfecf33e1c31 (patch)
tree3deddac08b151731485b53717231b961d21be95b /src
parentMerge commit 'refs/merge-requests/2277' of git://gitorious.org/rekonq/mainlin... (diff)
downloadrekonq-436ff1dd4bfc42605f8c4e13b3a4bfecf33e1c31.tar.xz
Save right files when being on "rekonq pages"
eg: KParts
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 43418ed3..95fbd92d 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -609,8 +609,19 @@ void MainWindow::openLocation()
void MainWindow::fileSaveAs()
{
- KUrl srcUrl = currentTab()->url();
-
+ KUrl srcUrl;
+ WebTab *w = currentTab();
+ if (w->page()->isOnRekonqPage())
+ {
+ QWebElement el = w->page()->mainFrame()->documentElement();
+ srcUrl = KUrl( el.findFirst("object").attribute("data") );
+ }
+ else
+ {
+ srcUrl = w->url();
+ }
+ kDebug() << "URL to save: " << srcUrl;
+
QString name = srcUrl.fileName();
if (name.isNull())
{