[Qt] Fix includes after QtDeclarative -> QtQML renaming
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2012 16:50:32 +0000 (16:50 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2012 16:50:32 +0000 (16:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82195

Relanding r112651, because Qt5 is updated everywhere.

Source/WebKit/qt:

* declarative/experimental/plugin.cpp:
* declarative/plugin.cpp:
(WebKitQmlPlugin::initializeEngine):

Source/WebKit2:

* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebiconimageprovider_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp:
* UIProcess/API/qt/qwebnavigationhistory_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/qt/QtDialogRunner.cpp:
(QtDialogRunner::initForAlert):
(QtDialogRunner::initForConfirm):
(QtDialogRunner::initForPrompt):
(QtDialogRunner::initForAuthentication):
(QtDialogRunner::initForProxyAuthentication):
(QtDialogRunner::initForCertificateVerification):
(QtDialogRunner::initForFilePicker):
(QtDialogRunner::initForDatabaseQuotaDialog):
(QtDialogRunner::createDialog):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::createItem):
(WebKit::WebPopupMenuProxyQt::createContext):

Tools:

* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::updateVisualMockTouchPoints):
* MiniBrowser/qt/main.cpp:
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::WrapperWindow::handleStatusChanged):
* qmake/mkspecs/features/unix/default_post.prf:

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

19 files changed:
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/declarative/experimental/plugin.cpp
Source/WebKit/qt/declarative/plugin.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h
Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider_p.h
Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp
Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp
Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
Tools/ChangeLog
Tools/MiniBrowser/qt/BrowserWindow.cpp
Tools/MiniBrowser/qt/main.cpp
Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
Tools/qmake/mkspecs/features/unix/default_post.prf

index b51844c..29171ae 100644 (file)
@@ -1,3 +1,14 @@
+2012-04-05  Csaba Osztrogonác  <ossy@webkit.org>
+
+        [Qt] Fix includes after QtDeclarative -> QtQML renaming
+        https://bugs.webkit.org/show_bug.cgi?id=82195
+
+        Relanding r112651, because Qt5 is updated everywhere.
+
+        * declarative/experimental/plugin.cpp:
+        * declarative/plugin.cpp:
+        (WebKitQmlPlugin::initializeEngine):
+
 2012-04-04  Andras Becsi  <andras.becsi@nokia.com>
 
         [Qt][WK2] Make the WebView a subclass of Flickable
index 7d380e6..d33a479 100644 (file)
@@ -30,8 +30,8 @@
 #include "private/qwebpreferences_p.h"
 #include "private/qwebviewportinfo_p.h"
 
-#include <QtDeclarative/qdeclarative.h>
-#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlextensionplugin.h>
 
 QT_BEGIN_NAMESPACE
 
index 968b1fe..08532bf 100644 (file)
     Boston, MA 02110-1301, USA.
 */
 
+#include "qglobal.h"
+
 #if defined(HAVE_QQUICK1)
 #include "qdeclarativewebview_p.h"
 #endif
 
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlextensionplugin.h>
+#else
 #include <QtDeclarative/qdeclarative.h>
 #include <QtDeclarative/qdeclarativeextensionplugin.h>
+#endif
 
 #if defined(HAVE_WEBKIT2)
 #include "private/qquickwebpage_p.h"
@@ -31,8 +38,8 @@
 #include "private/qwebloadrequest_p.h"
 #include "private/qwebnavigationrequest_p.h"
 
-#include <QtDeclarative/qdeclarativeengine.h>
 #include <QtNetwork/qnetworkreply.h>
+#include <QtQml/qqmlengine.h>
 #endif
 
 QT_BEGIN_NAMESPACE
@@ -41,7 +48,7 @@ class WebKitQmlPlugin : public QDeclarativeExtensionPlugin {
     Q_OBJECT
 public:
 #if defined(HAVE_WEBKIT2)
-    virtual void initializeEngine(QDeclarativeEngine* engine, const char* uri)
+    virtual void initializeEngine(QQmlEngine* engine, const char* uri)
     {
         Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit"));
         engine->addImageProvider(QLatin1String("webicon"), new QWebIconImageProvider);
index 009a2b1..f8cf8bf 100644 (file)
@@ -1,3 +1,32 @@
+2012-04-05  Csaba Osztrogonác  <ossy@webkit.org>
+
+        [Qt] Fix includes after QtDeclarative -> QtQML renaming
+        https://bugs.webkit.org/show_bug.cgi?id=82195
+
+        Relanding r112651, because Qt5 is updated everywhere.
+
+        * UIProcess/API/qt/qquicknetworkreply_p.h:
+        * UIProcess/API/qt/qquicknetworkrequest_p.h:
+        * UIProcess/API/qt/qquickwebview.cpp:
+        * UIProcess/API/qt/qquickwebview_p.h:
+        * UIProcess/API/qt/qwebiconimageprovider_p.h:
+        * UIProcess/API/qt/qwebnavigationhistory.cpp:
+        * UIProcess/API/qt/qwebnavigationhistory_p.h:
+        * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
+        * UIProcess/qt/QtDialogRunner.cpp:
+        (QtDialogRunner::initForAlert):
+        (QtDialogRunner::initForConfirm):
+        (QtDialogRunner::initForPrompt):
+        (QtDialogRunner::initForAuthentication):
+        (QtDialogRunner::initForProxyAuthentication):
+        (QtDialogRunner::initForCertificateVerification):
+        (QtDialogRunner::initForFilePicker):
+        (QtDialogRunner::initForDatabaseQuotaDialog):
+        (QtDialogRunner::createDialog):
+        * UIProcess/qt/WebPopupMenuProxyQt.cpp:
+        (WebKit::WebPopupMenuProxyQt::createItem):
+        (WebKit::WebPopupMenuProxyQt::createContext):
+
 2012-04-04  Hayato Ito  <hayato@chromium.org>
 
         Remove ReifiedTreeTraversal.
index 1007f3a..4c32d0f 100644 (file)
@@ -29,7 +29,7 @@
 #include <QNetworkAccessManager>
 #include <QObject>
 #include <QWeakPointer>
-#include <QtDeclarative/qdeclarativelist.h>
+#include <QtQml/qqmllist.h>
 #include <QtQuick/qquickitem.h>
 
 class QWEBKIT_EXPORT QQuickNetworkReply : public QObject {
index 42511d7..69a2d48 100644 (file)
@@ -25,7 +25,7 @@
 #include "wtf/RefPtr.h"
 #include "qwebkitglobal.h"
 #include <QObject>
-#include <QtDeclarative/qdeclarativelist.h>
+#include <QtQml/qqmllist.h>
 #include <QtQuick/qquickitem.h>
 
 class QWEBKIT_EXPORT QQuickNetworkRequest : public QObject {
index 2f59353..ce33516 100644 (file)
@@ -45,7 +45,7 @@
 #include "qwebviewportinfo_p.h"
 
 #include <JavaScriptCore/InitializeThreading.h>
-#include <QDeclarativeEngine>
+#include <QtQml/QQmlEngine>
 #include <QtQuick/QQuickCanvas>
 #include <WebCore/IntPoint.h>
 #include <WebCore/IntRect.h>
index a623486..fc8e3b3 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "qquickurlschemedelegate_p.h"
 #include "qwebkitglobal.h"
-#include <QtDeclarative/qdeclarativelist.h>
+#include <QtQml/qqmllist.h>
 #include <QtQuick/qquickitem.h>
 #include <private/qquickflickable_p.h>
 
index 8815d7b..6ad98d0 100644 (file)
@@ -21,7 +21,7 @@
 #define qwebiconimageprovider_p_h
 
 #include "qwebkitglobal.h"
-#include <QtDeclarative/QDeclarativeImageProvider>
+#include <QtQml/QQmlImageProvider>
 
 class QWEBKIT_EXPORT QWebIconImageProvider : public QDeclarativeImageProvider {
 public:
index ff77dae..b057526 100644 (file)
@@ -33,9 +33,9 @@
 #include "WebBackForwardList.h"
 
 #include "qwebnavigationhistory_p_p.h"
-#include <QDeclarativeEngine>
 #include <QString>
 #include <QUrl>
+#include <QtQml/QQmlEngine>
 #include <WebKit2/WKArray.h>
 #include <WebKit2/WKBackForwardListItem.h>
 #include <WebKit2/WKBase.h>
index 9291144..5cb3611 100644 (file)
@@ -31,7 +31,7 @@
 #include <QObject>
 #include <QUrl>
 #include <QVariant>
-#include <qdeclarative.h>
+#include <qqml.h>
 
 class QAbstractListModel;
 class QWebNavigationHistoryPrivate;
index b31a7f0..4ae3f5b 100644 (file)
@@ -20,8 +20,8 @@
 #include "../testwindow.h"
 #include "../util.h"
 
-#include <QDeclarativeEngine>
 #include <QScopedPointer>
+#include <QtQml/QQmlEngine>
 #include <QtTest/QtTest>
 #include <private/qquickwebpage_p.h>
 #include <private/qquickwebview_p.h>
index 8f62896..a9940a3 100644 (file)
@@ -24,9 +24,9 @@
 #include "WKStringQt.h"
 #include "qwebpermissionrequest_p.h"
 
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeContext>
-#include <QtDeclarative/QDeclarativeEngine>
+#include <QtQml/QQmlComponent>
+#include <QtQml/QQmlContext>
+#include <QtQml/QQmlEngine>
 #include <QtQuick/QQuickItem>
 #include <wtf/PassOwnPtr.h>
 
@@ -250,7 +250,7 @@ private:
     QtWebSecurityOrigin m_securityOrigin;
 };
 
-bool QtDialogRunner::initForAlert(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& message)
+bool QtDialogRunner::initForAlert(QQmlComponent* component, QQuickItem* dialogParent, const QString& message)
 {
     DialogContextObject* contextObject = new DialogContextObject(message);
     if (!createDialog(component, dialogParent, contextObject))
@@ -260,7 +260,7 @@ bool QtDialogRunner::initForAlert(QDeclarativeComponent* component, QQuickItem*
     return true;
 }
 
-bool QtDialogRunner::initForConfirm(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& message)
+bool QtDialogRunner::initForConfirm(QQmlComponent* component, QQuickItem* dialogParent, const QString& message)
 {
     DialogContextObject* contextObject = new DialogContextObject(message);
     if (!createDialog(component, dialogParent, contextObject))
@@ -272,7 +272,7 @@ bool QtDialogRunner::initForConfirm(QDeclarativeComponent* component, QQuickItem
     return true;
 }
 
-bool QtDialogRunner::initForPrompt(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& message, const QString& defaultValue)
+bool QtDialogRunner::initForPrompt(QQmlComponent* component, QQuickItem* dialogParent, const QString& message, const QString& defaultValue)
 {
     DialogContextObject* contextObject = new DialogContextObject(message, defaultValue);
     if (!createDialog(component, dialogParent, contextObject))
@@ -284,7 +284,7 @@ bool QtDialogRunner::initForPrompt(QDeclarativeComponent* component, QQuickItem*
     return true;
 }
 
-bool QtDialogRunner::initForAuthentication(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& hostname, const QString& realm, const QString& prefilledUsername)
+bool QtDialogRunner::initForAuthentication(QQmlComponent* component, QQuickItem* dialogParent, const QString& hostname, const QString& realm, const QString& prefilledUsername)
 {
     HttpAuthenticationDialogContextObject* contextObject = new HttpAuthenticationDialogContextObject(hostname, realm, prefilledUsername);
     if (!createDialog(component, dialogParent, contextObject))
@@ -297,7 +297,7 @@ bool QtDialogRunner::initForAuthentication(QDeclarativeComponent* component, QQu
     return true;
 }
 
-bool QtDialogRunner::initForProxyAuthentication(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& hostname, uint16_t port, const QString& prefilledUsername)
+bool QtDialogRunner::initForProxyAuthentication(QQmlComponent* component, QQuickItem* dialogParent, const QString& hostname, uint16_t port, const QString& prefilledUsername)
 {
     ProxyAuthenticationDialogContextObject* contextObject = new ProxyAuthenticationDialogContextObject(hostname, port, prefilledUsername);
     if (!createDialog(component, dialogParent, contextObject))
@@ -310,7 +310,7 @@ bool QtDialogRunner::initForProxyAuthentication(QDeclarativeComponent* component
     return true;
 }
 
-bool QtDialogRunner::initForCertificateVerification(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& hostname)
+bool QtDialogRunner::initForCertificateVerification(QQmlComponent* component, QQuickItem* dialogParent, const QString& hostname)
 {
     CertificateVerificationDialogContextObject* contextObject = new CertificateVerificationDialogContextObject(hostname);
     if (!createDialog(component, dialogParent, contextObject))
@@ -323,7 +323,7 @@ bool QtDialogRunner::initForCertificateVerification(QDeclarativeComponent* compo
     return true;
 }
 
-bool QtDialogRunner::initForFilePicker(QDeclarativeComponent* component, QQuickItem* dialogParent, const QStringList& selectedFiles, bool allowMultiple)
+bool QtDialogRunner::initForFilePicker(QQmlComponent* component, QQuickItem* dialogParent, const QStringList& selectedFiles, bool allowMultiple)
 {
     FilePickerContextObject* contextObject = new FilePickerContextObject(selectedFiles, allowMultiple);
     if (!createDialog(component, dialogParent, contextObject))
@@ -336,7 +336,7 @@ bool QtDialogRunner::initForFilePicker(QDeclarativeComponent* component, QQuickI
     return true;
 }
 
-bool QtDialogRunner::initForDatabaseQuotaDialog(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& databaseName, const QString& displayName, WKSecurityOriginRef securityOrigin, quint64 currentQuota, quint64 currentOriginUsage, quint64 currentDatabaseUsage, quint64 expectedUsage)
+bool QtDialogRunner::initForDatabaseQuotaDialog(QQmlComponent* component, QQuickItem* dialogParent, const QString& databaseName, const QString& displayName, WKSecurityOriginRef securityOrigin, quint64 currentQuota, quint64 currentOriginUsage, quint64 currentDatabaseUsage, quint64 expectedUsage)
 {
     DatabaseQuotaDialogContextObject* contextObject = new DatabaseQuotaDialogContextObject(databaseName, displayName, securityOrigin, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
     if (!createDialog(component, dialogParent, contextObject))
@@ -349,12 +349,12 @@ bool QtDialogRunner::initForDatabaseQuotaDialog(QDeclarativeComponent* component
     return true;
 }
 
-bool QtDialogRunner::createDialog(QDeclarativeComponent* component, QQuickItem* dialogParent, QObject* contextObject)
+bool QtDialogRunner::createDialog(QQmlComponent* component, QQuickItem* dialogParent, QObject* contextObject)
 {
-    QDeclarativeContext* baseContext = component->creationContext();
+    QQmlContext* baseContext = component->creationContext();
     if (!baseContext)
-        baseContext = QDeclarativeEngine::contextForObject(dialogParent);
-    m_dialogContext = adoptPtr(new QDeclarativeContext(baseContext));
+        baseContext = QQmlEngine::contextForObject(dialogParent);
+    m_dialogContext = adoptPtr(new QQmlContext(baseContext));
 
     // This makes both "message" and "model.message" work for the dialog, just like QtQuick's ListView delegates.
     contextObject->setParent(m_dialogContext.get());
index 28b8acc..9f9100a 100644 (file)
@@ -32,8 +32,8 @@
 #include "qquickwebview_p.h"
 #include "qquickwebview_p_p.h"
 #include <QtCore/QAbstractListModel>
-#include <QtDeclarative/QDeclarativeContext>
-#include <QtDeclarative/QDeclarativeEngine>
+#include <QtQml/QQmlContext>
+#include <QtQml/QQmlEngine>
 
 using namespace WebCore;
 
@@ -257,7 +257,7 @@ void WebPopupMenuProxyQt::selectIndex(int index)
 
 void WebPopupMenuProxyQt::createItem(QObject* contextObject)
 {
-    QDeclarativeComponent* component = m_webView->experimental()->itemSelector();
+    QQmlComponent* component = m_webView->experimental()->itemSelector();
     if (!component) {
         delete contextObject;
         return;
@@ -289,12 +289,12 @@ void WebPopupMenuProxyQt::createItem(QObject* contextObject)
     m_itemSelector->setParentItem(m_webView);
 }
 
-void WebPopupMenuProxyQt::createContext(QDeclarativeComponent* component, QObject* contextObject)
+void WebPopupMenuProxyQt::createContext(QQmlComponent* component, QObject* contextObject)
 {
-    QDeclarativeContext* baseContext = component->creationContext();
+    QQmlContext* baseContext = component->creationContext();
     if (!baseContext)
-        baseContext = QDeclarativeEngine::contextForObject(m_webView);
-    m_context = adoptPtr(new QDeclarativeContext(baseContext));
+        baseContext = QQmlEngine::contextForObject(m_webView);
+    m_context = adoptPtr(new QQmlContext(baseContext));
 
     contextObject->setParent(m_context.get());
     m_context->setContextProperty(QLatin1String("model"), contextObject);
index 0199d54..e9e9c43 100644 (file)
@@ -1,3 +1,17 @@
+2012-04-05  Csaba Osztrogonác  <ossy@webkit.org>
+
+        [Qt] Fix includes after QtDeclarative -> QtQML renaming
+        https://bugs.webkit.org/show_bug.cgi?id=82195
+
+        Relanding r112651, because Qt5 is updated everywhere.
+
+        * MiniBrowser/qt/BrowserWindow.cpp:
+        (BrowserWindow::updateVisualMockTouchPoints):
+        * MiniBrowser/qt/main.cpp:
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::WrapperWindow::handleStatusChanged):
+        * qmake/mkspecs/features/unix/default_post.prf:
+
 2012-04-05  Pierre Rossi  <pierre.rossi@gmail.com>
 
         [Qt] WK1/WK2 layout test results are diverging
index c5bdefc..e03271e 100644 (file)
@@ -32,7 +32,7 @@
 #include "private/qquickwebview_p.h"
 #include "utils.h"
 
-#include <QDeclarativeEngine>
+#include <QQmlEngine>
 #include <QDir>
 #include <QPointF>
 
@@ -108,7 +108,7 @@ void BrowserWindow::updateVisualMockTouchPoints(const QList<QTouchEvent::TouchPo
         QQuickItem* mockTouchPointItem = rootObject()->findChild<QQuickItem*>(mockTouchPointIdentifier, Qt::FindDirectChildrenOnly);
 
         if (!mockTouchPointItem) {
-            QDeclarativeComponent touchMockPointComponent(engine(), QUrl("qrc:/qml/MockTouchPoint.qml"));
+            QQmlComponent touchMockPointComponent(engine(), QUrl("qrc:/qml/MockTouchPoint.qml"));
             mockTouchPointItem = qobject_cast<QQuickItem*>(touchMockPointComponent.create());
             mockTouchPointItem->setObjectName(mockTouchPointIdentifier);
             mockTouchPointItem->setProperty("pointId", QVariant(touchPoint.id()));
index 3663773..4c8cd92 100644 (file)
@@ -31,7 +31,7 @@
 #include "MiniBrowserApplication.h"
 #include "UrlLoader.h"
 
-#include <qdeclarative.h>
+#include <qqml.h>
 
 #include <QDir>
 #include <QLatin1String>
index 7f51239..f65ff19 100644 (file)
@@ -31,8 +31,8 @@
 #include "qquickwebview_p.h"
 
 #include <QCoreApplication>
-#include <QDeclarativeProperty>
 #include <QEventLoop>
+#include <QQmlProperty>
 #include <QtQuick/QQuickView>
 #include <qwindowsysteminterface_qpa.h>
 
@@ -58,7 +58,7 @@ private slots:
 
         setResizeMode(QQuickView::SizeRootObjectToView);
         m_view->setParentItem(rootObject());
-        QDeclarativeProperty::write(m_view, "anchors.fill", qVariantFromValue(rootObject()));
+        QQmlProperty::write(m_view, "anchors.fill", qVariantFromValue(rootObject()));
 
         QWindowSystemInterface::handleWindowActivated(this);
         m_view->page()->setFocus(true);
index 706c8c2..ce8eecc 100644 (file)
@@ -14,11 +14,7 @@ linux-g++*:isEqual(QT_ARCH,i386) {
 
 # Treat warnings as errors on x86/Linux/GCC
 linux-g++* {
-    isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386) {
-        # Disable -Werror for declarative stuff until we _require_ a Qt 5 with the new names.
-        !contains(QT, declarative): QMAKE_CXXFLAGS += -Werror
-    }
-
+    isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
     greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
         if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
             # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).