From e161e45c4135556b91d41fc8e4280a4c550eb774 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 4 Oct 2015 19:51:39 +0200 Subject: [PATCH] WebPage: Add Q_UNREACHABLE to createWindow(WebBrowserWindow) --- src/lib/webengine/webpage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp index 047c60f77..800f95dec 100644 --- a/src/lib/webengine/webpage.cpp +++ b/src/lib/webengine/webpage.cpp @@ -592,8 +592,11 @@ QWebEnginePage* WebPage::createWindow(QWebEnginePage::WebWindowType type) switch (type) { case QWebEnginePage::WebBrowserWindow: - // TODO: Investigate when this is called from html - qDebug() << "WebBrowserWindow"; + // WebBrowserWindow is only called after Shift+LeftClick on link, but we handle + // this case ourselves, so it should never be called. + qWarning() << "Asked to created WebBrowserWindow!"; + Q_UNREACHABLE(); + case QWebEnginePage::WebBrowserTab: { int index = window->tabWidget()->addView(QUrl(), Qz::NT_CleanSelectedTab); TabbedWebView* view = window->weView(index);