[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:57:21 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit e2852aeb225512560d2ca5f4c5feac619aaca255
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 23 20:39:30 2010 +0000

    2010-02-23  Jesus Sanchez-Palencia  <jesus.palencia at openbossa.org>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Need a final integration between QtLauncher and QGVLauncher
            https://bugs.webkit.org/show_bug.cgi?id=35292
    
            Add cloneWindow feature to QtLauncher, when running on QGraphicsView mode.
    
            * QtLauncher/main.cpp:
            (LauncherWindow::LauncherWindow):
            (LauncherWindow::~LauncherWindow):
            (LauncherWindow::init):
            (LauncherWindow::cloneWindow):
            (LauncherWindow::setupUI):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55163 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c6bff39..7111b85 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-23  Jesus Sanchez-Palencia  <jesus.palencia at openbossa.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Need a final integration between QtLauncher and QGVLauncher
+        https://bugs.webkit.org/show_bug.cgi?id=35292
+
+        Add cloneWindow feature to QtLauncher, when running on QGraphicsView mode.
+
+        * QtLauncher/main.cpp:
+        (LauncherWindow::LauncherWindow):
+        (LauncherWindow::~LauncherWindow):
+        (LauncherWindow::init):
+        (LauncherWindow::cloneWindow):
+        (LauncherWindow::setupUI):
+
 2010-02-23  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp
index 1203ce7..af99487 100644
--- a/WebKitTools/QtLauncher/main.cpp
+++ b/WebKitTools/QtLauncher/main.cpp
@@ -83,6 +83,7 @@ class LauncherWindow : public MainWindow {
 
 public:
     LauncherWindow(QString url = QString());
+    LauncherWindow(QGraphicsScene* scene);
     virtual ~LauncherWindow();
 
     virtual void keyPressEvent(QKeyEvent* event);
@@ -120,6 +121,7 @@ protected slots:
 
 public slots:
     void newWindow(const QString& url = QString());
+    void cloneWindow();
 
 private:
     // create the status bar, tool bar & menu
@@ -140,6 +142,8 @@ private:
     QList<QTouchEvent::TouchPoint> touchPoints;
     bool touchMocking;
 #endif
+
+    void init(bool useGraphicsView = false);
 };
 
 
@@ -147,6 +151,26 @@ LauncherWindow::LauncherWindow(QString url)
     : MainWindow(url)
     , currentZoom(100)
 {
+    init();
+    load(url);
+}
+
+LauncherWindow::LauncherWindow(QGraphicsScene* scene)
+    : MainWindow()
+    , currentZoom(100)
+{
+    init(true); // use QGraphicsView
+    QGraphicsView* view = static_cast<QGraphicsView*>(m_view);
+    view->setScene(scene);
+}
+
+LauncherWindow::~LauncherWindow()
+{
+    grabZoomKeys(false);
+}
+
+void LauncherWindow::init(bool useGraphicsView)
+{
     QSplitter* splitter = new QSplitter(Qt::Vertical, this);
     setCentralWidget(splitter);
 
@@ -157,7 +181,8 @@ LauncherWindow::LauncherWindow(QString url)
 #endif
 
     m_view = 0;
-    initializeView();
+
+    initializeView(useGraphicsView);
 
     connect(page(), SIGNAL(loadStarted()), this, SLOT(loadStarted()));
     connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));
@@ -177,13 +202,6 @@ LauncherWindow::LauncherWindow(QString url)
     zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300;
 
     grabZoomKeys(true);
-
-    load(url);
-}
-
-LauncherWindow::~LauncherWindow()
-{
-    grabZoomKeys(false);
 }
 
 void LauncherWindow::keyPressEvent(QKeyEvent* event)
@@ -485,6 +503,14 @@ void LauncherWindow::newWindow(const QString& url)
     mw->show();
 }
 
+void LauncherWindow::cloneWindow()
+{
+    QGraphicsView* view = static_cast<QGraphicsView*>(m_view);
+
+    LauncherWindow* mw = new LauncherWindow(view->scene());
+    mw->show();
+}
+
 void LauncherWindow::setupUI()
 {
     QMenu* fileMenu = menuBar()->addMenu("&File");
@@ -569,6 +595,12 @@ void LauncherWindow::setupUI()
     flipYAnimated = graphicsViewMenu->addAction("Animated Y-Flip");
     flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
     flipYAnimated->setEnabled(false);
+
+    graphicsViewMenu->addSeparator();
+
+    QAction* cloneWindow = graphicsViewMenu->addAction("Clone Window", this, SLOT(cloneWindow()));
+    cloneWindow->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
+    cloneWindow->setEnabled(false);
 }
 
 QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list