From d361249be9ec31d575713739f032394383052705 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 22 May 2009 15:42:00 +0200 Subject: Compiles && link with webkitKDE modulo the load method --- src/webview.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index eba02505..6cddf77f 100644 --- a/src/webview.h +++ b/src/webview.h @@ -27,6 +27,9 @@ // KDE Includes #include +#include +#include + // Qt Includes #include @@ -44,7 +47,7 @@ class QNetworkReply; class QSslError; -class WebPage : public QWebPage +class WebPage : public KWebPage { Q_OBJECT @@ -60,7 +63,7 @@ protected: const QNetworkRequest &request, NavigationType type); - QWebPage *createWindow(QWebPage::WebWindowType type); + KWebPage *createWindow(QWebPage::WebWindowType type); QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, @@ -85,7 +88,7 @@ private: #include -class WebView : public QWebView +class WebView : public KWebView { Q_OBJECT @@ -130,4 +133,3 @@ private: }; #endif - -- cgit v1.2.1 From 2e66b40db71b99220754c126a8e4e3606c3505f2 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 23 May 2009 01:22:31 +0200 Subject: Fixing new AccessManager. Removed webpage createPlugin slot --- src/webview.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 6cddf77f..eff5f98b 100644 --- a/src/webview.h +++ b/src/webview.h @@ -56,7 +56,7 @@ signals: public: WebPage(QObject *parent = 0); - ~WebPage(); + protected: bool acceptNavigationRequest(QWebFrame *frame, @@ -64,10 +64,6 @@ protected: NavigationType type); KWebPage *createWindow(QWebPage::WebWindowType type); - QObject *createPlugin(const QString &classId, - const QUrl &url, - const QStringList ¶mNames, - const QStringList ¶mValues); private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1 From e6752ba908497ae0c3756315b75509efb2fdbf26 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 23 May 2009 01:28:39 +0200 Subject: splitted web classes --- src/webview.h | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index eff5f98b..cef46a80 100644 --- a/src/webview.h +++ b/src/webview.h @@ -45,40 +45,7 @@ class QMouseEvent; class QNetworkProxy; class QNetworkReply; class QSslError; - - -class WebPage : public KWebPage -{ - Q_OBJECT - -signals: - void loadingUrl(const QUrl &url); // WARNING has to be QUrl!! - -public: - WebPage(QObject *parent = 0); - - -protected: - bool acceptNavigationRequest(QWebFrame *frame, - const QNetworkRequest &request, - NavigationType type); - - KWebPage *createWindow(QWebPage::WebWindowType type); - -private slots: - void handleUnsupportedContent(QNetworkReply *reply); - -private: - friend class WebView; - - // set the webview mousepressedevent - Qt::KeyboardModifiers m_keyboardModifiers; - Qt::MouseButtons m_pressedButtons; - KUrl m_loadingUrl; -}; - - -// ---------------------------------------------------------------------------------------------------- +class WebPage; // Qt Includes #include -- cgit v1.2.1 From ca917ecc5a7b3fc69fcb5682466c421d56627aec Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 23 May 2009 01:42:26 +0200 Subject: Initial kdewebkit porting. STEP 1 DONE --- src/webview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index cef46a80..d2dc2bad 100644 --- a/src/webview.h +++ b/src/webview.h @@ -64,6 +64,9 @@ public: QString lastStatusBarText() const { return m_statusBarText; } int progress() const { return m_progress; } +public Q_SLOTS: + void load(const KUrl &url); + signals: // switching tabs void ctrlTabPressed(); -- cgit v1.2.1 From fca022bc0c708f82871850eaab94839c37c2013f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 25 May 2009 00:05:16 +0200 Subject: no inline functions, as suggested --- src/webview.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index d2dc2bad..56693597 100644 --- a/src/webview.h +++ b/src/webview.h @@ -58,11 +58,10 @@ class WebView : public KWebView public: WebView(QWidget *parent = 0); - // 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; } + WebPage *webPage() const; + KUrl url() const; + QString lastStatusBarText() const; + int progress() const; public Q_SLOTS: void load(const KUrl &url); @@ -85,9 +84,9 @@ protected: void keyPressEvent(QKeyEvent *event); private slots: - void setProgress(int progress) { m_progress = progress; } + void setProgress(int progress); void loadFinished(); - void setStatusBarText(const QString &string) { m_statusBarText = string; } + void setStatusBarText(const QString &string); void downloadRequested(const QNetworkRequest &request); void openLinkInNewTab(); -- cgit v1.2.1 From 2ad17fa1cb5309172899cd8159d247071d6cd3e4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 25 May 2009 10:51:21 +0200 Subject: Refactored page/setNewPage KWebPage methods --- src/webview.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 56693597..19fd9517 100644 --- a/src/webview.h +++ b/src/webview.h @@ -58,7 +58,6 @@ class WebView : public KWebView public: WebView(QWidget *parent = 0); - WebPage *webPage() const; KUrl url() const; QString lastStatusBarText() const; int progress() const; @@ -83,6 +82,9 @@ protected: */ void keyPressEvent(QKeyEvent *event); + // to reimplement from KWebView + virtual void setNewPage(); + private slots: void setProgress(int progress); void loadFinished(); -- cgit v1.2.1 From 974058301ed0911bc8bd15a957548ce0771851aa Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 25 May 2009 16:47:37 +0200 Subject: WebkitKDE porting. I'm working on a big refactoring of the webview/webpage classes. This is (obviously) a work in progress. Perhaps ~50% of the porting.. --- src/webview.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 19fd9517..ab69f799 100644 --- a/src/webview.h +++ b/src/webview.h @@ -32,6 +32,7 @@ // Qt Includes #include +#include // Forward Declarations class MainWindow; @@ -45,10 +46,6 @@ class QMouseEvent; class QNetworkProxy; class QNetworkReply; class QSslError; -class WebPage; - -// Qt Includes -#include class WebView : public KWebView @@ -56,7 +53,7 @@ class WebView : public KWebView Q_OBJECT public: - WebView(QWidget *parent = 0); + explicit WebView(QWidget *parent = 0); KUrl url() const; QString lastStatusBarText() const; @@ -71,10 +68,9 @@ signals: void shiftCtrlTabPressed(); protected: - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); +// void mousePressEvent(QMouseEvent *event); +// void mouseReleaseEvent(QMouseEvent *event); void contextMenuEvent(QContextMenuEvent *event); - void wheelEvent(QWheelEvent *event); /** * Filters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed() @@ -89,8 +85,9 @@ private slots: void setProgress(int progress); void loadFinished(); void setStatusBarText(const QString &string); - void downloadRequested(const QNetworkRequest &request); - void openLinkInNewTab(); + +// void downloadRequested(const QNetworkRequest &request); +// void open LinkInNewTab(); private: WebPage *m_page; -- cgit v1.2.1 From ccb09a51449cfac70cedf33875e317b4005263f4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 26 May 2009 14:29:42 +0200 Subject: Fixing Compilation --- src/webview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index ab69f799..ae420de4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -45,7 +45,7 @@ class QAuthenticator; class QMouseEvent; class QNetworkProxy; class QNetworkReply; -class QSslError; +class WebPage; class WebView : public KWebView -- cgit v1.2.1 From 8c5f265d22bd4590612b426ebb9d984b8e49f24c Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 28 May 2009 01:55:25 +0200 Subject: working on error messages & openLinkInNewTab slot --- src/webview.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index ae420de4..2ac018d7 100644 --- a/src/webview.h +++ b/src/webview.h @@ -68,8 +68,6 @@ signals: void shiftCtrlTabPressed(); protected: -// void mousePressEvent(QMouseEvent *event); -// void mouseReleaseEvent(QMouseEvent *event); void contextMenuEvent(QContextMenuEvent *event); /** @@ -86,8 +84,7 @@ private slots: void loadFinished(); void setStatusBarText(const QString &string); -// void downloadRequested(const QNetworkRequest &request); -// void open LinkInNewTab(); + void openLinkInNewTab(const KUrl &); private: WebPage *m_page; -- cgit v1.2.1