1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +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: case QWebEnginePage::WebBrowserWindow:
// WebBrowserWindow is only called after Shift+LeftClick on link, but we handle // WebBrowserWindow is only called after Shift+LeftClick on link, but we handle
// this case ourselves, so it should never be called. // 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!"; qWarning() << "Asked to created WebBrowserWindow!";
Q_UNREACHABLE(); break;
case QWebEnginePage::WebBrowserTab: { case QWebEnginePage::WebBrowserTab: {
int index = window->tabWidget()->addView(QUrl(), Qz::NT_CleanSelectedTab); int index = window->tabWidget()->addView(QUrl(), Qz::NT_CleanSelectedTab);
@ -603,6 +605,8 @@ QWebEnginePage* WebPage::createWindow(QWebEnginePage::WebWindowType type)
} }
default: default:
return 0; break;
} }
return Q_NULLPTR;
} }