1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Don't assert when Shift+LeftClick on a link in frame

This commit is contained in:
David Rosca 2015-12-07 12:41:07 +01:00
parent 4144fc9827
commit 73d93e1e3c

View File

@ -583,8 +583,10 @@ QWebEnginePage* WebPage::createWindow(QWebEnginePage::WebWindowType type)
case QWebEnginePage::WebBrowserWindow:
// WebBrowserWindow is only called after Shift+LeftClick on link, but we handle
// this case ourselves, so it should never be called.
// There is currently one case where it will be called, and that is when Shift+LeftClick
// on a link in a frame because WebHitTestResult doesn't work with frames yet.
qWarning() << "Asked to created WebBrowserWindow!";
Q_UNREACHABLE();
break;
case QWebEnginePage::WebBrowserTab: {
int index = window->tabWidget()->addView(QUrl(), Qz::NT_CleanSelectedTab);
@ -603,6 +605,8 @@ QWebEnginePage* WebPage::createWindow(QWebEnginePage::WebWindowType type)
}
default:
return 0;
break;
}
return Q_NULLPTR;
}