summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-01 23:42:57 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-01 23:42:57 +0200
commit5128265f02e16f40dd3df044eb86c147b76513a4 (patch)
tree0221911a5fa0f45f9f2ecf09b33180a914beb7d5
parentupdated TODO. 2 (diff)
downloadrekonq-5128265f02e16f40dd3df044eb86c147b76513a4.tar.xz
99% fixed target _blank issue..
-rw-r--r--src/webview.cpp14
1 files changed, 8 insertions, 6 deletions
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;