1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

[Fix:] Ctrl+click / middle mouse click opening new window, fixed bug

with encoded url string
This commit is contained in:
nowrep 2011-03-16 18:35:31 +01:00
parent 7649df8752
commit d7ba5c1b08

View File

@ -334,11 +334,11 @@ void WebView::mousePressEvent(QMouseEvent *event)
break;
case Qt::MiddleButton:
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;
case Qt::LeftButton:
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;
}
default: