diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/history.cpp | 4 | ||||
-rw-r--r-- | src/tabbar.cpp | 5 | ||||
-rw-r--r-- | src/webview.cpp | 18 |
3 files changed, 20 insertions, 7 deletions
diff --git a/src/history.cpp b/src/history.cpp index 12a9d57f..dedabfdd 100644 --- a/src/history.cpp +++ b/src/history.cpp @@ -18,9 +18,11 @@ * * ============================================================ */ -// Local Includes +// Self Includes #include "history.h" +#include "history.moc" +// Local Includes #include "autosaver.h" #include "browserapplication.h" diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 9aae3644..bf63db03 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -18,10 +18,11 @@ * * ============================================================ */ - -// Local Includes +//Self Includes #include "tabbar.h" +#include "tabbar.moc" +// Local Includes #include "browserapplication.h" #include "mainwindow.h" #include "history.h" diff --git a/src/webview.cpp b/src/webview.cpp index 96167816..62acbba6 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -29,6 +29,7 @@ #include <KStandardDirs> #include <KDebug> +#include <kio/netaccess.h> #include <QClipboard> #include <QMenu> @@ -189,12 +190,12 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) KMenu menu(this); KAction *a = new KAction( KIcon("tab-new"), i18n("Open in New Tab"), this); connect( a, SIGNAL( triggered() ), this , SLOT( openLinkInNewTab() ) ); - menu.addAction( a ); + menu.addAction(a); menu.addSeparator(); - menu.addAction(pageAction(QWebPage::DownloadLinkToDisk)); + menu.addAction( pageAction(QWebPage::DownloadLinkToDisk) ); // Add link to bookmarks... menu.addSeparator(); - menu.addAction(pageAction(QWebPage::CopyLinkToClipboard)); + menu.addAction( pageAction(QWebPage::CopyLinkToClipboard) ); if ( page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled) ) { menu.addAction(pageAction(QWebPage::InspectElement)); @@ -298,7 +299,16 @@ void WebView::setStatusBarText(const QString &string) void WebView::downloadRequested(const QNetworkRequest &request) { - BrowserApplication::downloadManager()->download(request); +// BrowserApplication::downloadManager()->download(request); + + // FIXME --- FIXME --- FIXME --- FIXME --- FIXME + const KUrl url = KUrl( request.url() ); + + KConfig config("rekonqrc"); + KConfigGroup group1 = config.group("Global Settings"); + QString path = group1.readEntry(QString("downloadDirectory")) + QString("/") + url.fileName(); + + KIO::NetAccess::download( url , path , this ); } |