From 73d93e1e3c85ad4b6857631a40a62a6dbf1647bd Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 7 Dec 2015 12:41:07 +0100 Subject: [PATCH] Don't assert when Shift+LeftClick on a link in frame --- src/lib/webengine/webpage.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp index d1c2c6cf5..24b617ae9 100644 --- a/src/lib/webengine/webpage.cpp +++ b/src/lib/webengine/webpage.cpp @@ -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; }