[Qt] Fix build in Qt 5 of QDeclarativeWebView
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2011 15:20:43 +0000 (15:20 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2011 15:20:43 +0000 (15:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=65258

Reviewed by Andreas Kling.

In Qt 5, the QGraphicsView-based classes for QtQuick are in the
qtquick1 module, including QDeclarativeItem and QDeclarativeView.

.:

* Source/WebKit.pro:

Source/WebKit/qt:

* declarative/qdeclarativewebview_p.h:
* tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:
* tests/tests.pri:
* tests/tests.pro:

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

ChangeLog
Source/WebKit.pro
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/declarative/qdeclarativewebview_p.h
Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp
Source/WebKit/qt/tests/tests.pri
Source/WebKit/qt/tests/tests.pro

index 7da5a44..9f51f69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-07-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
+
+        [Qt] Fix build in Qt 5 of QDeclarativeWebView
+        https://bugs.webkit.org/show_bug.cgi?id=65258
+
+        Reviewed by Andreas Kling.
+
+        In Qt 5, the QGraphicsView-based classes for QtQuick are in the
+        qtquick1 module, including QDeclarativeItem and QDeclarativeView.
+
+        * Source/WebKit.pro:
+
 2011-07-26  Andras Becsi  <abecsi@webkit.org>
 
         [Qt] [WK2] Disable the build with Qt versions older than 5.0
index 0c541e3..46b10f3 100644 (file)
@@ -25,8 +25,12 @@ webkit2 {
     exists($$PWD/WebKit2/UIProcess/API/qt/tests): SUBDIRS += WebKit2/UIProcess/API/qt/tests
 }
 
-contains(QT_CONFIG, declarative) {
-    exists($$PWD/WebKit/qt/declarative): SUBDIRS += WebKit/qt/declarative
+exists($$PWD/WebKit/qt/declarative) {
+    lessThan(QT_MAJOR_VERSION, 5) {
+        contains(QT_CONFIG, declarative): SUBDIRS += WebKit/qt/declarative
+    } else {
+        contains(QT_CONFIG, qtquick1): SUBDIRS += WebKit/qt/declarative
+    }
 }
 
 exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests
index 235a238..c122dfc 100644 (file)
@@ -1,3 +1,18 @@
+2011-07-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
+
+        [Qt] Fix build in Qt 5 of QDeclarativeWebView
+        https://bugs.webkit.org/show_bug.cgi?id=65258
+
+        Reviewed by Andreas Kling.
+
+        In Qt 5, the QGraphicsView-based classes for QtQuick are in the
+        qtquick1 module, including QDeclarativeItem and QDeclarativeView.
+
+        * declarative/qdeclarativewebview_p.h:
+        * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:
+        * tests/tests.pri:
+        * tests/tests.pro:
+
 2011-07-26  Sadrul Habib Chowdhury  <sadrul@chromium.org>
 
         Add support for download='filename' attribute in anchors.
index 2f0c59c..9fcd3ef 100644 (file)
 
 #include <QtCore/QBasicTimer>
 #include <QtCore/QUrl>
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtQuick1/QDeclarativeItem>
+#else
 #include <QtDeclarative/QDeclarativeItem>
+#endif
+
 #include <QtGui/QAction>
 #include <QtNetwork/QNetworkAccessManager>
 #include "qgraphicswebview.h"
index c6e9f7d..24fbcee 100644 (file)
@@ -2,11 +2,16 @@
 #include <QAction>
 #include <QColor>
 #include <QDebug>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtQuick1/QDeclarativeItem>
+#include <QtQuick1/QDeclarativeView>
+#else
+#include <QDeclarativeItem>
+#include <QDeclarativeView>
+#endif
 #include <QDeclarativeComponent>
 #include <QDeclarativeEngine>
-#include <QDeclarativeItem>
 #include <QDeclarativeProperty>
-#include <QDeclarativeView>
 #include <QDir>
 #include <QGraphicsWebView>
 #include <QTest>
index 812fe93..2b0c347 100644 (file)
@@ -21,7 +21,12 @@ INCLUDEPATH += \
 
 include(../../../WebKit.pri)
 QT += testlib network
-contains(QT_CONFIG, declarative): QT += declarative
+
+lessThan(QT_MAJOR_VERSION, 5) {
+    contains(QT_CONFIG, declarative): QT += declarative
+} else {
+    contains(QT_CONFIG, qtquick1): QT += declarative qtquick1
+}
 
 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
 
index a1a7ae8..4196ea0 100644 (file)
@@ -8,7 +8,13 @@ linux-* {
     SUBDIRS += MIMESniffing
 }
 
-contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativewebview
+lessThan(QT_MAJOR_VERSION, 5) {
+    contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativewebview
+} else {
+    contains(QT_CONFIG, qtquick1): SUBDIRS += qdeclarativewebview
+}
+
+
 SUBDIRS += benchmarks/painting benchmarks/loading
 contains(DEFINES, ENABLE_WEBGL=1) {
     SUBDIRS += benchmarks/webgl