From 2af233a6d06eb15034ab03c376e126031495df53 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 29 Apr 2009 01:24:56 +0200 Subject: Removed loadUrl method from WebView --- src/webview.cpp | 26 -------------------------- src/webview.h | 8 +++----- 2 files changed, 3 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/webview.cpp b/src/webview.cpp index 78f0e734..61eb051a 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -454,32 +454,6 @@ void WebView::loadFinished() } -void WebView::loadUrl(const KUrl &url) -{ - m_initialUrl = url; - - if (m_initialUrl.isRelative()) - { - QString fn = m_initialUrl.url(KUrl::RemoveTrailingSlash); - m_initialUrl.setUrl("//" + fn); - m_initialUrl.setScheme("http"); - } - - load(m_initialUrl); -} - - -KUrl WebView::url() const -{ - KUrl url = QWebView::url(); - if (!url.isEmpty()) - { - return url; - } - return m_initialUrl; -} - - void WebView::mousePressEvent(QMouseEvent *event) { m_page->m_pressedButtons = event->buttons(); diff --git a/src/webview.h b/src/webview.h index 2cebfb2d..0a46f1e5 100644 --- a/src/webview.h +++ b/src/webview.h @@ -92,13 +92,12 @@ class WebView : public QWebView public: WebView(QWidget *parent = 0); - WebPage *webPage() const { return m_page; } KActionCollection* webActions(); - - void loadUrl(const KUrl &url); - KUrl url() const; + // inline + WebPage *webPage() const { return m_page; } + KUrl url() const { return KUrl(QWebView::url()); } QString lastStatusBarText() const { return m_statusBarText; } int progress() const { return m_progress; } @@ -133,7 +132,6 @@ private: int m_progress; QString m_statusBarText; - KUrl m_initialUrl; }; #endif -- cgit v1.2.1