Title: [138142] trunk/Source/WebKit2
Revision
138142
Author
zeno.albis...@digia.com
Date
2012-12-19 04:49:16 -0800 (Wed, 19 Dec 2012)

Log Message

[Qt] Missing vtable for LoadStartedCatcher.
https://bugs.webkit.org/show_bug.cgi?id=105313

Properly splitting class declarations and function
definitions into headers/cpp-files.
This makes including util.moc redundant
and avoids the well known vtable issues with QObject classes.

Reviewed by Simon Hausmann.

* UIProcess/API/qt/tests/util.cpp:
(LoadSpy::LoadSpy):
(LoadSpy::onLoadingChanged):
* UIProcess/API/qt/tests/util.h:
(LoadSpy):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (138141 => 138142)


--- trunk/Source/WebKit2/ChangeLog	2012-12-19 11:56:08 UTC (rev 138141)
+++ trunk/Source/WebKit2/ChangeLog	2012-12-19 12:49:16 UTC (rev 138142)
@@ -1,3 +1,21 @@
+2012-12-19  Zeno Albisser  <z...@webkit.org>
+
+        [Qt] Missing vtable for LoadStartedCatcher.
+        https://bugs.webkit.org/show_bug.cgi?id=105313
+
+        Properly splitting class declarations and function
+        definitions into headers/cpp-files.
+        This makes including util.moc redundant
+        and avoids the well known vtable issues with QObject classes.
+
+        Reviewed by Simon Hausmann.
+
+        * UIProcess/API/qt/tests/util.cpp:
+        (LoadSpy::LoadSpy):
+        (LoadSpy::onLoadingChanged):
+        * UIProcess/API/qt/tests/util.h:
+        (LoadSpy):
+
 2012-12-19  KyungTae Kim  <ktf....@samsung.com>
 
         Unused parameters on WebContext.cpp

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/util.cpp (138141 => 138142)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/util.cpp	2012-12-19 11:56:08 UTC (rev 138141)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/util.cpp	2012-12-19 12:49:16 UTC (rev 138142)
@@ -74,26 +74,6 @@
 }
 
 #if defined(HAVE_QTQUICK) && HAVE_QTQUICK
-class LoadSpy : public QEventLoop {
-    Q_OBJECT
-public:
-    LoadSpy(QQuickWebView* webView)
-    {
-        connect(webView, SIGNAL(loadingChanged(QWebLoadRequest*)), SLOT(onLoadingChanged(QWebLoadRequest*)));
-    }
-Q_SIGNALS:
-    void loadSucceeded();
-    void loadFailed();
-private Q_SLOTS:
-    void onLoadingChanged(QWebLoadRequest* loadRequest)
-    {
-        if (loadRequest->status() == QQuickWebView::LoadSucceededStatus)
-            emit loadSucceeded();
-        else if (loadRequest->status() == QQuickWebView::LoadFailedStatus)
-            emit loadFailed();
-    }
-};
-
 bool waitForLoadSucceeded(QQuickWebView* webView, int timeout)
 {
     QEventLoop loop;
@@ -133,6 +113,19 @@
     return waitForSignal(webView->experimental(), SIGNAL(loadVisuallyCommitted()), timeout);
 }
 
+LoadSpy::LoadSpy(QQuickWebView* webView)
+{
+    connect(webView, SIGNAL(loadingChanged(QWebLoadRequest*)), SLOT(onLoadingChanged(QWebLoadRequest*)));
+}
+
+void LoadSpy::onLoadingChanged(QWebLoadRequest* loadRequest)
+{
+    if (loadRequest->status() == QQuickWebView::LoadSucceededStatus)
+        emit loadSucceeded();
+    else if (loadRequest->status() == QQuickWebView::LoadFailedStatus)
+        emit loadFailed();
+}
+
 LoadStartedCatcher::LoadStartedCatcher(QQuickWebView* webView)
     : m_webView(webView)
 {
@@ -148,5 +141,3 @@
     }
 }
 #endif
-
-#include "util.moc"

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/util.h (138141 => 138142)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/util.h	2012-12-19 11:56:08 UTC (rev 138141)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/util.h	2012-12-19 12:49:16 UTC (rev 138142)
@@ -38,6 +38,17 @@
 bool waitForLoadFailed(QQuickWebView* webView, int timeout = 10000);
 bool waitForViewportReady(QQuickWebView* webView, int timeout = 10000);
 
+class LoadSpy : public QEventLoop {
+    Q_OBJECT
+public:
+    LoadSpy(QQuickWebView* webView);
+Q_SIGNALS:
+    void loadSucceeded();
+    void loadFailed();
+private Q_SLOTS:
+    void onLoadingChanged(QWebLoadRequest* loadRequest);
+};
+
 class LoadStartedCatcher : public QObject {
     Q_OBJECT
 public:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to