diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-05-26 12:10:17 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-05-26 12:10:17 +0200 |
commit | 436ff1dd4bfc42605f8c4e13b3a4bfecf33e1c31 (patch) | |
tree | 3deddac08b151731485b53717231b961d21be95b | |
parent | Merge commit 'refs/merge-requests/2277' of git://gitorious.org/rekonq/mainlin... (diff) | |
download | rekonq-436ff1dd4bfc42605f8c4e13b3a4bfecf33e1c31.tar.xz |
Save right files when being on "rekonq pages"
eg: KParts
-rw-r--r-- | src/mainwindow.cpp | 15 |
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()) { |