summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/urlbar/urlbar.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 4d53e175..0a6783af 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -302,6 +302,20 @@ void UrlBar::focusInEvent(QFocusEvent *event)
void UrlBar::dropEvent(QDropEvent *event)
{
+ //handles only plain-text with url format
+ if (event->mimeData()->hasFormat("text/plain") && event->source() != this)
+ {
+ QUrl url = QUrl::fromUserInput(event->mimeData()->data("text/plain"));
+
+ if (url.isValid())
+ {
+ setQUrl(url);
+ activated(text());
+ return;
+ }
+ }
+
+ //handles everything else
KLineEdit::dropEvent(event);
activated(text());
}