[Qt] Make it possible to build without QtQuick
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Aug 2012 15:04:25 +0000 (15:04 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Aug 2012 15:04:25 +0000 (15:04 +0000)
Patch by No'am Rosenthal <noam.rosenthal@nokia.com> on 2012-08-07
Reviewed by Simon Hausmann.

.:

* Source/QtWebKit.pro:
* Source/tests.pri:

Source/WebKit:

* WebKit1.pri:

Source/WebKit2:

* Target.pri:
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/API/qt/tests/util.cpp:
* UIProcess/API/qt/tests/util.h:
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
(WebKit::WebFullScreenManagerProxy::invalidate):
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::resolveApplicationSchemeRequest):
(WebKit::WebPageProxy::sendApplicationSchemeReply):
* WebKit2.pri:

Tools:

* Tools.pro:
* qmake/mkspecs/features/features.prf:

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

16 files changed:
ChangeLog
Source/QtWebKit.pro
Source/WebKit/ChangeLog
Source/WebKit/WebKit1.pri
Source/WebKit2/ChangeLog
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/API/qt/tests/tests.pri
Source/WebKit2/UIProcess/API/qt/tests/util.cpp
Source/WebKit2/UIProcess/API/qt/tests/util.h
Source/WebKit2/UIProcess/qt/WebFullScreenManagerProxyQt.cpp
Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
Source/WebKit2/WebKit2.pri
Source/tests.pri
Tools/ChangeLog
Tools/Tools.pro
Tools/qmake/mkspecs/features/features.prf

index c69f74d..dcfcc8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-08-07  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Make it possible to build without QtQuick
+
+        Reviewed by Simon Hausmann.
+
+        * Source/QtWebKit.pro:
+        * Source/tests.pri:
+
 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
 
         [Qt] Remove Qt 4 specific code paths
index 1cc44a8..e0fcb71 100644 (file)
@@ -23,7 +23,7 @@ include(WebKit/qt/docs/docs.pri)
 
 declarative.file = WebKit/qt/declarative/declarative.pro
 declarative.makefile = Makefile.declarative
-SUBDIRS += declarative
+contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += declarative
 
 !no_webkit1 {
     tests.file = tests.pri
index 3e4f464..4cddd57 100644 (file)
@@ -1,3 +1,11 @@
+2012-08-07  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Make it possible to build without QtQuick
+
+        Reviewed by Simon Hausmann.
+
+        * WebKit1.pri:
+
 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
 
         [Qt] Remove Qt 4 specific code paths
index 2bde0a3..992fb56 100644 (file)
@@ -39,7 +39,8 @@ contains(CONFIG, texmap): DEFINES += WTF_USE_TEXTURE_MAPPER=1
 
 plugin_backend_xlib: PKGCONFIG += x11
 
-QT += network widgets printsupport quick
+QT += network widgets printsupport
+contains(DEFINES, HAVE_QTQUICK=1): QT += quick
 
 contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1)|contains(DEFINES, ENABLE_WEBGL=1) {
     QT *= opengl
index 3e73ee8..da7926e 100644 (file)
@@ -1,3 +1,22 @@
+2012-08-07  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Make it possible to build without QtQuick
+
+        Reviewed by Simon Hausmann.
+
+        * Target.pri:
+        * UIProcess/API/qt/tests/tests.pri:
+        * UIProcess/API/qt/tests/util.cpp:
+        * UIProcess/API/qt/tests/util.h:
+        * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
+        (WebKit::WebFullScreenManagerProxy::invalidate):
+        (WebKit::WebFullScreenManagerProxy::enterFullScreen):
+        (WebKit::WebFullScreenManagerProxy::exitFullScreen):
+        * UIProcess/qt/WebPageProxyQt.cpp:
+        (WebKit::WebPageProxy::resolveApplicationSchemeRequest):
+        (WebKit::WebPageProxy::sendApplicationSchemeReply):
+        * WebKit2.pri:
+
 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
 
         [Qt] Remove Qt 4 specific code paths
index cfd5708..e0fa6ea 100644 (file)
@@ -10,7 +10,6 @@ TARGET = WebKit2
 include(WebKit2.pri)
 
 WEBKIT += wtf javascriptcore webcore
-QT += qml quick quick-private
 
 CONFIG += staticlib
 
@@ -188,24 +187,6 @@ HEADERS += \
     UIProcess/API/cpp/WKRetainPtr.h \
     UIProcess/API/cpp/qt/WKStringQt.h \
     UIProcess/API/cpp/qt/WKURLQt.h \
-    UIProcess/API/qt/qwebpreferences_p.h \
-    UIProcess/API/qt/qwebpreferences_p_p.h \
-    UIProcess/API/qt/qwebdownloaditem_p.h \
-    UIProcess/API/qt/qwebdownloaditem_p_p.h \
-    UIProcess/API/qt/qwebpermissionrequest_p.h \
-    UIProcess/API/qt/qtwebsecurityorigin_p.h \
-    UIProcess/API/qt/qwebloadrequest_p.h \
-    UIProcess/API/qt/qwebnavigationrequest_p.h \
-    UIProcess/API/qt/qquickwebpage_p.h \
-    UIProcess/API/qt/qquickwebpage_p_p.h \
-    UIProcess/API/qt/qwebnavigationhistory_p.h \
-    UIProcess/API/qt/qwebnavigationhistory_p_p.h \
-    UIProcess/API/qt/qquickwebview_p.h \
-    UIProcess/API/qt/qquickwebview_p_p.h \
-    UIProcess/API/qt/qquicknetworkreply_p.h \
-    UIProcess/API/qt/qquicknetworkrequest_p.h \
-    UIProcess/API/qt/qquickurlschemedelegate_p.h \
-    UIProcess/API/qt/qwebkittest_p.h \
     UIProcess/API/qt/raw/qrawwebview_p.h \
     UIProcess/API/qt/raw/qrawwebview_p_p.h \
     UIProcess/Authentication/AuthenticationChallengeProxy.h \
@@ -285,26 +266,6 @@ HEADERS += \
     UIProcess/WebUIClient.h \
     UIProcess/WebVibrationProvider.h \
     UIProcess/WebVibrationProxy.h \
-    UIProcess/qt/QtWebContext.h \
-    UIProcess/qt/QtWebPageEventHandler.h \
-    UIProcess/qt/QtGestureRecognizer.h \
-    UIProcess/qt/QtPanGestureRecognizer.h \
-    UIProcess/qt/QtPinchGestureRecognizer.h \
-    UIProcess/qt/QtTapGestureRecognizer.h \
-    UIProcess/qt/QtWebError.h \
-    UIProcess/qt/QtDialogRunner.h \
-    UIProcess/qt/QtDownloadManager.h \
-    UIProcess/qt/QtPageClient.h \
-    UIProcess/qt/QtWebPageLoadClient.h \
-    UIProcess/qt/QtWebPagePolicyClient.h \
-    UIProcess/qt/QtWebPageSGNode.h \
-    UIProcess/qt/QtWebPageUIClient.h \
-    UIProcess/qt/QtViewportHandler.h \
-    UIProcess/qt/QtWebUndoController.h \
-    UIProcess/qt/QtWebIconDatabaseClient.h \
-    UIProcess/qt/WebContextMenuProxyQt.h \
-    UIProcess/qt/WebGeolocationProviderQt.h \
-    UIProcess/qt/WebPopupMenuProxyQt.h \
     WebProcess/ApplicationCache/WebApplicationCacheManager.h \
     WebProcess/Authentication/AuthenticationManager.h \
     WebProcess/Battery/WebBatteryManager.h \
@@ -564,20 +525,6 @@ SOURCES += \
     UIProcess/API/C/WKVibration.cpp \
     UIProcess/API/cpp/qt/WKStringQt.cpp \
     UIProcess/API/cpp/qt/WKURLQt.cpp \
-    UIProcess/API/qt/qwebdownloaditem.cpp \
-    UIProcess/API/qt/qwebpermissionrequest.cpp \
-    UIProcess/API/qt/qtwebsecurityorigin.cpp \
-    UIProcess/API/qt/qwebloadrequest.cpp \
-    UIProcess/API/qt/qwebnavigationrequest.cpp \
-    UIProcess/API/qt/qquickwebpage.cpp \
-    UIProcess/API/qt/qwebnavigationhistory.cpp \
-    UIProcess/API/qt/qquickwebview.cpp \
-    UIProcess/API/qt/qwebiconimageprovider.cpp \
-    UIProcess/API/qt/qquicknetworkreply.cpp \
-    UIProcess/API/qt/qquicknetworkrequest.cpp \
-    UIProcess/API/qt/qquickurlschemedelegate.cpp \
-    UIProcess/API/qt/qwebpreferences.cpp \
-    UIProcess/API/qt/qwebkittest.cpp \
     UIProcess/API/qt/raw/qrawwebview.cpp \
     UIProcess/Authentication/AuthenticationChallengeProxy.cpp \
     UIProcess/Authentication/AuthenticationDecisionListener.cpp \
@@ -591,7 +538,6 @@ SOURCES += \
     UIProcess/Downloads/DownloadProxy.cpp \
     UIProcess/DrawingAreaProxy.cpp \
     UIProcess/DrawingAreaProxyImpl.cpp \
-    UIProcess/qt/QtWebUndoController.cpp \
     UIProcess/FindIndicator.cpp \
     UIProcess/GeolocationPermissionRequestManagerProxy.cpp \
     UIProcess/GeolocationPermissionRequestProxy.cpp \
@@ -660,30 +606,13 @@ SOURCES += \
     UIProcess/WebVibrationProvider.cpp \
     UIProcess/WebVibrationProxy.cpp \
     UIProcess/qt/QtWebContext.cpp \
-    UIProcess/qt/QtWebPageEventHandler.cpp \
-    UIProcess/qt/QtGestureRecognizer.cpp \
-    UIProcess/qt/QtPanGestureRecognizer.cpp \
-    UIProcess/qt/QtPinchGestureRecognizer.cpp \
-    UIProcess/qt/QtTapGestureRecognizer.cpp \
-    UIProcess/qt/QtWebError.cpp \
-    UIProcess/qt/QtDialogRunner.cpp \
-    UIProcess/qt/QtDownloadManager.cpp \
-    UIProcess/qt/QtPageClient.cpp \
-    UIProcess/qt/QtWebPageLoadClient.cpp \
-    UIProcess/qt/QtWebPagePolicyClient.cpp \
-    UIProcess/qt/QtWebPageSGNode.cpp \
-    UIProcess/qt/QtWebPageUIClient.cpp \
+    UIProcess/qt/QtWebUndoController.cpp \
     UIProcess/qt/TextCheckerQt.cpp \
-    UIProcess/qt/QtViewportHandler.cpp \
-    UIProcess/qt/WebContextMenuProxyQt.cpp \
     UIProcess/qt/WebContextQt.cpp \
-    UIProcess/qt/WebGeolocationProviderQt.cpp \
     UIProcess/qt/WebFullScreenManagerProxyQt.cpp \
     UIProcess/qt/WebInspectorProxyQt.cpp \
     UIProcess/qt/WebPageProxyQt.cpp \
-    UIProcess/qt/WebPopupMenuProxyQt.cpp \
     UIProcess/qt/WebPreferencesQt.cpp \
-    UIProcess/qt/QtWebIconDatabaseClient.cpp \
     WebProcess/ApplicationCache/WebApplicationCacheManager.cpp \
     WebProcess/Authentication/AuthenticationManager.cpp \
     WebProcess/Battery/WebBatteryManager.cpp \
@@ -808,8 +737,92 @@ SOURCES += \
     WebProcess/qt/WebProcessMainQt.cpp \
     WebProcess/qt/WebProcessQt.cpp
 
-mac: {
+contains(DEFINES, HAVE_QTQUICK=1) {
+    QT += qml quick quick-private
+
+    HEADERS += \
+        UIProcess/API/qt/qwebpreferences_p.h \
+        UIProcess/API/qt/qwebpreferences_p_p.h \
+        UIProcess/API/qt/qwebdownloaditem_p.h \
+        UIProcess/API/qt/qwebdownloaditem_p_p.h \
+        UIProcess/API/qt/qwebpermissionrequest_p.h \
+        UIProcess/API/qt/qtwebsecurityorigin_p.h \
+        UIProcess/API/qt/qwebloadrequest_p.h \
+        UIProcess/API/qt/qwebnavigationrequest_p.h \
+        UIProcess/API/qt/qquickwebpage_p.h \
+        UIProcess/API/qt/qquickwebpage_p_p.h \
+        UIProcess/API/qt/qwebnavigationhistory_p.h \
+        UIProcess/API/qt/qwebnavigationhistory_p_p.h \
+        UIProcess/API/qt/qquickwebview_p.h \
+        UIProcess/API/qt/qquickwebview_p_p.h \
+        UIProcess/API/qt/qquicknetworkreply_p.h \
+        UIProcess/API/qt/qquicknetworkrequest_p.h \
+        UIProcess/API/qt/qquickurlschemedelegate_p.h \
+        UIProcess/API/qt/qwebkittest_p.h \
+        UIProcess/qt/QtWebContext.h \
+        UIProcess/qt/QtWebPageEventHandler.h \
+        UIProcess/qt/QtGestureRecognizer.h \
+        UIProcess/qt/QtPanGestureRecognizer.h \
+        UIProcess/qt/QtPinchGestureRecognizer.h \
+        UIProcess/qt/QtTapGestureRecognizer.h \
+        UIProcess/qt/QtWebError.h \
+        UIProcess/qt/QtDialogRunner.h \
+        UIProcess/qt/QtDownloadManager.h \
+        UIProcess/qt/QtPageClient.h \
+        UIProcess/qt/QtWebPageLoadClient.h \
+        UIProcess/qt/QtWebPagePolicyClient.h \
+        UIProcess/qt/QtWebPageSGNode.h \
+        UIProcess/qt/QtWebPageUIClient.h \
+        UIProcess/qt/QtViewportHandler.h \
+        UIProcess/qt/QtWebUndoController.h \
+        UIProcess/qt/QtWebIconDatabaseClient.h \
+        UIProcess/qt/WebContextMenuProxyQt.h \
+        UIProcess/qt/WebGeolocationProviderQt.h \
+        UIProcess/qt/WebPopupMenuProxyQt.h
+
+    SOURCES += \
+        UIProcess/API/qt/qwebdownloaditem.cpp \
+        UIProcess/API/qt/qwebpermissionrequest.cpp \
+        UIProcess/API/qt/qtwebsecurityorigin.cpp \
+        UIProcess/API/qt/qwebloadrequest.cpp \
+        UIProcess/API/qt/qwebnavigationrequest.cpp \
+        UIProcess/API/qt/qquickwebpage.cpp \
+        UIProcess/API/qt/qwebnavigationhistory.cpp \
+        UIProcess/API/qt/qquickwebview.cpp \
+        UIProcess/API/qt/qwebiconimageprovider.cpp \
+        UIProcess/API/qt/qquicknetworkreply.cpp \
+        UIProcess/API/qt/qquicknetworkrequest.cpp \
+        UIProcess/API/qt/qquickurlschemedelegate.cpp \
+        UIProcess/API/qt/qwebpreferences.cpp \
+        UIProcess/API/qt/qwebkittest.cpp \
+        UIProcess/qt/QtWebError.cpp \
+        UIProcess/qt/QtDialogRunner.cpp \
+        UIProcess/qt/QtDownloadManager.cpp \
+        UIProcess/qt/QtPageClient.cpp \
+        UIProcess/qt/QtWebPageLoadClient.cpp \
+        UIProcess/qt/QtWebPagePolicyClient.cpp \
+        UIProcess/qt/QtWebPageSGNode.cpp \
+        UIProcess/qt/QtWebPageEventHandler.cpp \
+        UIProcess/qt/QtGestureRecognizer.cpp \
+        UIProcess/qt/QtPanGestureRecognizer.cpp \
+        UIProcess/qt/QtPinchGestureRecognizer.cpp \
+        UIProcess/qt/QtTapGestureRecognizer.cpp \
+        UIProcess/qt/QtViewportHandler.cpp \
+        UIProcess/qt/WebContextMenuProxyQt.cpp \
+        UIProcess/qt/WebGeolocationProviderQt.cpp \
+        UIProcess/qt/WebPopupMenuProxyQt.cpp \
+        UIProcess/qt/QtWebIconDatabaseClient.cpp \
+        UIProcess/qt/QtWebPageUIClient.cpp
+
+    contains(DEFINES, ENABLE_INPUT_TYPE_COLOR=1) {
+        HEADERS += \
+            UIProcess/qt/WebColorChooserProxyQt.h
+        SOURCES += \
+            UIProcess/qt/WebColorChooserProxyQt.cpp
+    }
+}
 
+mac: {
     contains(DEFINES, WTF_USE_QTKIT=1) {
         DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
         INCLUDEPATH += \
@@ -864,12 +877,6 @@ contains(DEFINES, ENABLE_TOUCH_EVENTS=1) {
         Shared/qt/NativeWebTouchEventQt.cpp
 }
 
-contains(DEFINES, ENABLE_INPUT_TYPE_COLOR=1) {
-    HEADERS += \
-        UIProcess/qt/WebColorChooserProxyQt.h
-    SOURCES += \
-        UIProcess/qt/WebColorChooserProxyQt.cpp
-}
 
 contains(DEFINES, ENABLE_GEOLOCATION=1): QT += location
 
index 2704efe..b87659b 100644 (file)
@@ -3,14 +3,17 @@ TEMPLATE = app
 VPATH += $$_PRO_FILE_PWD_
 TARGET = tst_$$TARGET
 
-HEADERS += ../bytearraytestdata.h \
-           ../util.h
-
-SOURCES += ../util.cpp \
-           ../bytearraytestdata.cpp
 INCLUDEPATH += $$PWD
+SOURCES +=  ../util.cpp
+
+QT += testlib webkit
+contains(DEFINES, HAVE_QTQUICK=1) {
+    QT += qml quick quick-private
+    HEADERS += ../bytearraytestdata.h \
+               ../util.h
 
-QT += testlib qml quick quick-private webkit
+    SOURCES += ../bytearraytestdata.cpp
+}
 WEBKIT += wtf # For platform macros
 
 DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD\\\" \
index 2582848..cdd1f99 100644 (file)
 */
 
 #include "util.h"
-#include "private/qquickwebview_p.h"
-#include "private/qwebloadrequest_p.h"
+
 #include <QtTest/QtTest>
 #include <stdio.h>
 
+#if defined(HAVE_QTQUICK) && HAVE_QTQUICK
+#include "private/qquickwebview_p.h"
+#include "private/qwebloadrequest_p.h"
+#endif
+
 void addQtWebProcessToPath()
 {
     // Since tests won't find ./QtWebProcess, add it to PATH (at the end to prevent surprises).
@@ -53,6 +57,7 @@ bool waitForSignal(QObject* obj, const char* signal, int timeout)
     return timeoutSpy.isEmpty();
 }
 
+#if defined(HAVE_QTQUICK) && HAVE_QTQUICK
 class LoadSpy : public QEventLoop {
     Q_OBJECT
 public:
@@ -136,5 +141,6 @@ void LoadStartedCatcher::onLoadingChanged(QWebLoadRequest* loadRequest)
         QCOMPARE(m_webView->loading(), true);
     }
 }
+#endif
 
 #include "util.moc"
index 9d076f1..907ddb0 100644 (file)
@@ -30,6 +30,7 @@ class QWebLoadRequest;
 #endif
 
 void addQtWebProcessToPath();
+#if defined(HAVE_QTQUICK) && HAVE_QTQUICK
 bool waitForSignal(QObject*, const char* signal, int timeout = 10000);
 bool waitForLoadSucceeded(QQuickWebView* webView, int timeout = 10000);
 bool waitForLoadFailed(QQuickWebView* webView, int timeout = 10000);
@@ -46,3 +47,4 @@ signals:
 private:
     QQuickWebView* m_webView;
 };
+#endif
index 91d962e..7d19da5 100644 (file)
 #include "WebFullScreenManagerMessages.h"
 #include "WebFullScreenManagerProxyMessages.h"
 #include "WebProcess.h"
-#include "qquickwebview_p.h"
 #include <WebCore/NotImplemented.h>
 
+#if HAVE(QTQUICK)
+#include "qquickwebview_p.h"
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
 
 void WebFullScreenManagerProxy::invalidate()
 {
+#if HAVE(QTQUICK)
     m_webView = 0;
+#endif
 }
 
 void WebFullScreenManagerProxy::close()
@@ -52,14 +57,18 @@ bool WebFullScreenManagerProxy::isFullScreen()
 void WebFullScreenManagerProxy::enterFullScreen()
 {
     willEnterFullScreen();
+#if HAVE(QTQUICK)
     emit m_webView->experimental()->enterFullScreenRequested();
+#endif
     didEnterFullScreen();
 }
 
 void WebFullScreenManagerProxy::exitFullScreen()
 {
     willExitFullScreen();
+#if HAVE(QTQUICK)
     emit m_webView->experimental()->exitFullScreenRequested();
+#endif
     didExitFullScreen();
 }
 
index fa2c74f..558d47d 100644 (file)
 #include "WebPageProxy.h"
 
 #include "PageClient.h"
-#include "QtNetworkReplyData.h"
-#include "QtPageClient.h"
-#include "qquicknetworkreply_p.h"
 #include "WebPageMessages.h"
 #include "WebProcessProxy.h"
 #include <WebCore/Editor.h>
 #include <WebCore/NotImplemented.h>
 
+#if HAVE(QTQUICK)
+#include "QtNetworkReplyData.h"
+#include "QtPageClient.h"
+#include "qquicknetworkreply_p.h"
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -87,19 +90,23 @@ void WebPageProxy::registerApplicationScheme(const String& scheme)
 
 void WebPageProxy::resolveApplicationSchemeRequest(QtNetworkRequestData request)
 {
+#if HAVE(QTQUICK)
     RefPtr<QtRefCountedNetworkRequestData> requestData = adoptRef(new QtRefCountedNetworkRequestData(request));
     m_applicationSchemeRequests.add(requestData);
     static_cast<QtPageClient*>(m_pageClient)->handleApplicationSchemeRequest(requestData);
+#endif
 }
 
 void WebPageProxy::sendApplicationSchemeReply(const QQuickNetworkReply* reply)
 {
+#if HAVE(QTQUICK)
     RefPtr<QtRefCountedNetworkRequestData> requestData = reply->networkRequestData();
     if (m_applicationSchemeRequests.contains(requestData)) {
         RefPtr<QtRefCountedNetworkReplyData> replyData = reply->networkReplyData();
         process()->send(Messages::WebPage::ApplicationSchemeReply(replyData->data()), pageID());
         m_applicationSchemeRequests.remove(requestData);
     }
+#endif
 }
 
 void WebPageProxy::setUserScripts(const Vector<String>& scripts)
index 575caef..9166874 100644 (file)
@@ -75,6 +75,6 @@ linux-*: {
     LIBS += -lrt
 }
 
-QT += qml quick
+contains(DEFINES, HAVE_QTQUICK=1): QT += qml quick
 
 contains(DEFINES, ENABLE_GEOLOCATION=1): QT += location
index 0042fc5..3c09864 100644 (file)
@@ -44,10 +44,12 @@ SUBDIRS += \
 !no_webkit2 {
     WEBKIT2_TESTS_DIR = $$PWD/WebKit2/UIProcess/API/qt/tests
 
-    SUBDIRS += \
+    contains(DEFINES, HAVE_QTQUICK=1):SUBDIRS += \
         $$WEBKIT2_TESTS_DIR/inspectorserver \
         $$WEBKIT2_TESTS_DIR/publicapi \
         $$WEBKIT2_TESTS_DIR/qquickwebview \
-        $$WEBKIT2_TESTS_DIR/qmltests \
+        $$WEBKIT2_TESTS_DIR/qmltests
+
+    SUBDIRS += \
         $$WEBKIT2_TESTS_DIR/qrawwebview
 }
index 2c70587..532d5c8 100644 (file)
@@ -1,3 +1,12 @@
+2012-08-07  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Make it possible to build without QtQuick
+
+        Reviewed by Simon Hausmann.
+
+        * Tools.pro:
+        * qmake/mkspecs/features/features.prf:
+
 2012-08-02  Simon Hausmann  <simon.hausmann@nokia.com>
 
         [Qt] Remove Qt 4 specific code paths
index 6cb07d8..9590c53 100644 (file)
@@ -15,9 +15,9 @@ CONFIG += ordered
 
 !no_webkit2 {
     # WTR's InjectedBundle depends currently on WK1's DumpRenderTreeSupport
-    !no_webkit1: SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
+    !no_webkit1:contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
 
-    SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
+    contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
     SUBDIRS += MiniBrowser/qt/raw/MiniBrowserRaw.pro
 }
 
index 117cc43..d4aa8bb 100644 (file)
@@ -44,6 +44,10 @@ config_fontconfig:!mac {
     DEFINES += HAVE_FONTCONFIG=1
 }
 
+!contains(DEFINES, HAVE_QTQUICK=.) {
+    haveQtModule(quick): DEFINES += HAVE_QTQUICK=1
+}
+
 # We need libxml2 config test to determine to use libxml2 or not
 !contains(DEFINES, WTF_USE_LIBXML2=.) {
     config_libxml2: DEFINES += WTF_USE_LIBXML2=1