mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
[Fix:] Ctrl+click / middle mouse click opening new window, fixed bug
with encoded url string
This commit is contained in:
parent
7649df8752
commit
d7ba5c1b08
@ -334,11 +334,11 @@ void WebView::mousePressEvent(QMouseEvent *event)
|
|||||||
break;
|
break;
|
||||||
case Qt::MiddleButton:
|
case Qt::MiddleButton:
|
||||||
if (isUrlValid(QUrl(m_hoveredLink)))
|
if (isUrlValid(QUrl(m_hoveredLink)))
|
||||||
tabWidget()->addView(QUrl(m_hoveredLink),tr("New tab"), TabWidget::NewNotSelectedTab);
|
tabWidget()->addView(QUrl::fromEncoded(m_hoveredLink.toAscii()),tr("New tab"), TabWidget::NewNotSelectedTab);
|
||||||
break;
|
break;
|
||||||
case Qt::LeftButton:
|
case Qt::LeftButton:
|
||||||
if (event->modifiers() == Qt::ControlModifier && isUrlValid(QUrl(m_hoveredLink))) {
|
if (event->modifiers() == Qt::ControlModifier && isUrlValid(QUrl(m_hoveredLink))) {
|
||||||
tabWidget()->addView(QUrl(m_hoveredLink),tr("New tab"), TabWidget::NewNotSelectedTab);
|
tabWidget()->addView(QUrl::fromEncoded(m_hoveredLink.toAscii()),tr("New tab"), TabWidget::NewNotSelectedTab);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user