mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed problem with urls containings extra characters dropped to
navigation bar
This commit is contained in:
parent
8ab4dc75df
commit
d3f997a121
@ -226,7 +226,7 @@ void LocationBar::dropEvent(QDropEvent* event)
|
|||||||
if (event->mimeData()->hasUrls()) {
|
if (event->mimeData()->hasUrls()) {
|
||||||
QUrl dropUrl = event->mimeData()->urls().at(0);
|
QUrl dropUrl = event->mimeData()->urls().at(0);
|
||||||
if (WebView::isUrlValid(dropUrl)) {
|
if (WebView::isUrlValid(dropUrl)) {
|
||||||
setText(dropUrl.toEncoded());
|
setText(dropUrl.toString());
|
||||||
p_QupZilla->loadAddress(dropUrl);
|
p_QupZilla->loadAddress(dropUrl);
|
||||||
QLineEdit::focusOutEvent(new QFocusEvent(QFocusEvent::FocusOut));
|
QLineEdit::focusOutEvent(new QFocusEvent(QFocusEvent::FocusOut));
|
||||||
return;
|
return;
|
||||||
@ -235,7 +235,7 @@ void LocationBar::dropEvent(QDropEvent* event)
|
|||||||
if (event->mimeData()->hasText()) {
|
if (event->mimeData()->hasText()) {
|
||||||
QUrl dropUrl = QUrl(event->mimeData()->text());
|
QUrl dropUrl = QUrl(event->mimeData()->text());
|
||||||
if (WebView::isUrlValid(dropUrl)) {
|
if (WebView::isUrlValid(dropUrl)) {
|
||||||
setText(dropUrl.toEncoded());
|
setText(dropUrl.toString());
|
||||||
p_QupZilla->loadAddress(dropUrl);
|
p_QupZilla->loadAddress(dropUrl);
|
||||||
QLineEdit::focusOutEvent(new QFocusEvent(QFocusEvent::FocusOut));
|
QLineEdit::focusOutEvent(new QFocusEvent(QFocusEvent::FocusOut));
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user