summaryrefslogtreecommitdiff
path: root/src/webview.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview.h')
-rw-r--r--src/webview.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/webview.h b/src/webview.h
index f81544a0..b2e97efb 100644
--- a/src/webview.h
+++ b/src/webview.h
@@ -21,6 +21,8 @@
#ifndef WEBVIEW_H
#define WEBVIEW_H
+#include <KUrl>
+
#include <QWebView>
QT_BEGIN_NAMESPACE
@@ -33,12 +35,13 @@ QT_END_NAMESPACE
class BrowserMainWindow;
+
class WebPage : public QWebPage
{
Q_OBJECT
signals:
- void loadingUrl(const QUrl &url);
+ void loadingUrl(const QUrl &url); // WARNING has to be QUrl!!
public:
WebPage(QObject *parent = 0);
@@ -58,9 +61,12 @@ private:
Qt::KeyboardModifiers m_keyboardModifiers;
Qt::MouseButtons m_pressedButtons;
bool m_openInNewTab;
- QUrl m_loadingUrl;
+ KUrl m_loadingUrl;
};
+
+// ---------------------------------------------------------------------------------------------------------------------------------------
+
class WebView : public QWebView
{
Q_OBJECT
@@ -69,8 +75,8 @@ public:
WebView(QWidget *parent = 0);
WebPage *webPage() const { return m_page; }
- void loadUrl(const QUrl &url);
- QUrl url() const;
+ void loadUrl(const KUrl &url);
+ KUrl url() const;
QString lastStatusBarText() const;
inline int progress() const { return m_progress; }
@@ -90,7 +96,7 @@ private slots:
private:
QString m_statusBarText;
- QUrl m_initialUrl;
+ KUrl m_initialUrl;
int m_progress;
WebPage *m_page;
};