diff options
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index aeaf92b7..2c0b59ea 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -35,6 +35,7 @@ // Local Includes #include "application.h" #include "bookmarkprovider.h" +#include "bookmarkowner.h" #include "iconmanager.h" #include "mainview.h" #include "mainwindow.h" @@ -453,6 +454,27 @@ void WebView::mouseMoveEvent(QMouseEvent *event) } +void WebView::dropEvent(QDropEvent *event) +{ + if (event->mimeData()->hasFormat("application/rekonq-bookmark")) + { + QByteArray addresses = event->mimeData()->data("application/rekonq-bookmark"); + KBookmark bookmark = Application::bookmarkProvider()->bookmarkManager()->findByAddress(QString::fromLatin1(addresses.data())); + if (bookmark.isGroup()) + { + Application::bookmarkProvider()->bookmarkOwner()->openFolderinTabs(bookmark.toGroup()); + } + else + { + emit loadUrl(bookmark.url(), Rekonq::CurrentTab); + } + } + else + { + KWebView::dropEvent(event); + } +} + void WebView::search() { KAction *a = qobject_cast<KAction*>(sender()); |