* Make the InspectorClientView inherit from QWebView instead of QWidget. This
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2008 09:37:48 +0000 (09:37 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2008 09:37:48 +0000 (09:37 +0000)
  way paintEvent, mouse{Press,Release}Event and other events get forwarded to
  the QWebPage/WebInspector automatically.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/InspectorClientQt.cpp

index 57cb4cf36ee3d9e8ac845783140d48e15d3a41ff..8b26d2676821ffcae9b4cf96b28ec01ac81abc9a 100644 (file)
@@ -1,3 +1,16 @@
+2008-01-16  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
+
+        Reviewed by Lars.
+
+        * Make the InspectorClientView inherit from QWebView instead of QWidget. This
+        way paintEvent, mouse{Press,Release}Event and other events get forwarded to
+        the QWebPage/WebInspector automatically.
+        
+
+        * WebCoreSupport/InspectorClientQt.cpp:
+        (WebCore::InspectorClientWebPage::createWindow):
+        (WebCore::InspectorClientView::InspectorClientView):
+
 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Sam.
 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Sam.
index 9968bd7cef4117c6778079ad9347dac2be753bb4..4e8f5a5c20dba36e04e3efef980029b309aaced3 100644 (file)
@@ -32,6 +32,8 @@
 
 #include "qwebpage.h"
 #include "qwebpage_p.h"
 
 #include "qwebpage.h"
 #include "qwebpage_p.h"
+#include "qwebview.h"
+
 #include <QtCore/QCoreApplication>
 
 #include "InspectorController.h"
 #include <QtCore/QCoreApplication>
 
 #include "InspectorController.h"
@@ -46,27 +48,25 @@ class InspectorClientWebPage : public QWebPage
 public:
     QWebPage* createWindow()
     {
 public:
     QWebPage* createWindow()
     {
-        QWidget *w = new QWidget(0);
+        QWidget *w = new QWebView(0);
         QWebPage *page = new QWebPage(w);
         page->setView(w);
         connect(page, SIGNAL(destroyed()), w, SLOT(deleteLater()));
         return page;
     }
 };
         QWebPage *page = new QWebPage(w);
         page->setView(w);
         connect(page, SIGNAL(destroyed()), w, SLOT(deleteLater()));
         return page;
     }
 };
-    
 
 
-class InspectorClientView : public QWidget {
+
+class InspectorClientView : public QWebView {
 public:
     InspectorClientView(InspectorController* controller)
 public:
     InspectorClientView(InspectorController* controller)
-        : QWidget(0)
+        : QWebView(0)
         , m_controller(controller)
         , m_controller(controller)
-        , m_page(new InspectorClientWebPage)
     {
     {
-        m_page->setView(this);
-        connect(m_page, SIGNAL(destroyed()), SLOT(deleteLater()));
+        setPage(new InspectorClientWebPage);
+        connect(page(), SIGNAL(destroyed()), SLOT(deleteLater()));
     }
 
     }
 
-    QWebPage* page() const { return m_page; }
 protected:
     void hideEvent(QHideEvent* ev)
     {
 protected:
     void hideEvent(QHideEvent* ev)
     {
@@ -82,7 +82,6 @@ protected:
 
 private:
     InspectorController* m_controller;
 
 private:
     InspectorController* m_controller;
-    QWebPage* m_page;
 };
 
 
 };