diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 43418ed3..dc29d2eb 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()) { @@ -669,7 +680,7 @@ void MainWindow::updateActions() if (am->menu()) am->menu()->clear(); - foreach (HistoryItem item, mainView()->recentlyClosedTabs()) + foreach (const HistoryItem &item, mainView()->recentlyClosedTabs()) { KAction *a = new KAction(Application::icon(item.url), item.title, this); a->setData(item.url); @@ -895,7 +906,7 @@ void MainWindow::setZoomFactor(int factor) void MainWindow::setZoomSliderFactor(qreal factor) { - m_zoomSlider->setValue(factor*10); + m_zoomSlider->setValue(factor * 10); } |