From 1f9c6c5e02f2b3689195bd3523d8378c4e9153bd Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 16 Mar 2009 16:42:14 +0100 Subject: Fixing No Scheme Loading Url. Try 1.. --- src/webview.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/webview.cpp b/src/webview.cpp index b9af551d..b8db6825 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -274,10 +274,22 @@ void WebView::loadFinished() } +// FIXME: load http by default!! void WebView::loadUrl(const KUrl &url) { m_initialUrl = url; - load(url); + + if( m_initialUrl.isRelative() ) + { + kWarning() << "1: " << m_initialUrl.url(); + QString fn = m_initialUrl.url( KUrl::RemoveTrailingSlash ); + kWarning() << "2: " << fn; + m_initialUrl.setUrl( "//" + fn ); + m_initialUrl.setScheme("http"); + kWarning() << "3: " << m_initialUrl.url(); + } + + load(m_initialUrl); } -- cgit v1.2.1