summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webview.cpp26
-rw-r--r--src/webview.h8
2 files changed, 3 insertions, 31 deletions
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