From 5128265f02e16f40dd3df044eb86c147b76513a4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 1 Apr 2009 23:42:57 +0200 Subject: 99% fixed target _blank issue.. --- src/webview.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/webview.cpp b/src/webview.cpp index 1057a5ef..4cb146f6 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -97,7 +97,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r if(m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton) { - kWarning() << "ControlModifiers clicked.."; webView = Application::instance()->newWebView(); webView->setFocus(); webView->load(request); @@ -113,11 +112,14 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r } else { - kWarning() << "NO Main Frame, creating a new WebView.."; - webView = Application::instance()->newWebView(); - webView->setFocus(); - webView->load(request); - return false; + // if frame doesn't exists (perhaps) we are pointing to a blank target.. + if(!frame) + { + webView = Application::instance()->newWebView(); + webView->setFocus(); + webView->load(request); + return false; + } } break; -- cgit v1.2.1