mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[WebView] Don't clear selection when right clicking on selected link
This removes a workaround for a very old QtWebKit (<= 2.0) that actually caused unwanted behavior with newer QtWebKit versions. Closes #1377 [ci-skip]
This commit is contained in:
parent
0af8f45a5f
commit
dc1b5931ea
|
@ -1072,11 +1072,6 @@ void WebView::createPageContextMenu(QMenu* menu, const QPoint &pos)
|
||||||
|
|
||||||
void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTest)
|
void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTest)
|
||||||
{
|
{
|
||||||
// Workaround for QtWebKit <= 2.0 when selecting link text on right click
|
|
||||||
if (page()->selectedText() == hitTest.linkText()) {
|
|
||||||
findText(QString());
|
|
||||||
}
|
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
Action* act = new Action(IconProvider::newTabIcon(), tr("Open link in new &tab"));
|
Action* act = new Action(IconProvider::newTabIcon(), tr("Open link in new &tab"));
|
||||||
act->setData(hitTest.linkUrl());
|
act->setData(hitTest.linkUrl());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user