From 7da5ba30ec8bd1ba0fb2c22a299f149092ddf885 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@digia.com> Date: Wed, 26 Sep 2012 13:53:31 +0200 Subject: [PATCH] QmlDesigner: remove hard webkit dependency in qmlpuppet and Qt 5 Change-Id: Ie198a0e3d8342fb62ff51ec2475134cdf4f9dcea Reviewed-by: Marco Bubke <marco.bubke@digia.com> (cherry picked from commit ad535b5b62603b291d3cb7df7a357bdf0799b897) --- .../qml/qmlpuppet/instances/objectnodeinstance.cpp | 4 ++-- share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp index ad48548cbe1..9162b39f3ea 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp @@ -43,7 +43,7 @@ #include <QFileInfo> #include <QFileSystemWatcher> #include <QPixmapCache> -#ifndef QT_NO_WEBKIT +#if !defined(QT_NO_WEBKIT) && QT_VERSION < 0x050000 #include <QGraphicsWebView> #endif #include <QGraphicsObject> @@ -801,7 +801,7 @@ void allSubObject(QObject *object, QObjectList &objectList) static void disableTiledBackingStore(QObject *object) { -#ifndef QT_NO_WEBKIT +#if !defined(QT_NO_WEBKIT) && QT_VERSION < 0x050000 QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(object); if (webView) webView->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, false); diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri b/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri index 81ed4cfb00e..168a2688365 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri @@ -6,8 +6,12 @@ greaterThan(QT_MAJOR_VERSION, 4) { QT += declarative } -contains (QT_CONFIG, webkit) { - QT += webkit + +greaterThan(QT_MAJOR_VERSION, 4) { +} else { + contains (QT_CONFIG, webkit) { + QT += webkit + } } DEFINES += QWEAKPOINTER_ENABLE_ARROW -- GitLab