summaryrefslogtreecommitdiff
path: root/src/webchannel
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-02 13:58:07 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-02 13:58:07 +0200
commit459a6ad0ae963b30c484a14b8cb910a29e1b1dcb (patch)
tree29b74bb9ad4f19e0b445361daf61d14e23e4764a /src/webchannel
parent7561e51004e94cff4fcf2b10acfd2d1ddb2a29a3 (diff)
parent906d910415454d64ff0b021b06f0df422a8c82bd (diff)
downloadqtwebchannel-459a6ad0ae963b30c484a14b8cb910a29e1b1dcb.tar.gz
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts: src/webchannel/qmetaobjectpublisher.cpp src/webchannel/webchannel.pro Change-Id: Ia573d780424399a8fa6e5a809148c888b223446a
Diffstat (limited to 'src/webchannel')
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp4
-rw-r--r--src/webchannel/webchannel.pro4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 61c5144..324191e 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -41,7 +41,7 @@
#include <QDebug>
#include <QJsonObject>
#include <QJsonArray>
-#ifdef QT_HAVE_QML
+#ifndef QT_NO_JSVALUE
#include <QJSValue>
#endif
#include <QUuid>
@@ -491,7 +491,7 @@ QJsonValue QMetaObjectPublisher::wrapResult(const QVariant &result, QWebChannelA
objectInfo[KEY_DATA] = classInfo;
return objectInfo;
-#ifdef QT_HAVE_QML
+#ifndef QT_NO_JSVALUE
} else if (result.canConvert<QJSValue>()) {
// Workaround for keeping QJSValues from QVariant.
// Calling QJSValue::toVariant() converts JS-objects/arrays to QVariantMap/List
diff --git a/src/webchannel/webchannel.pro b/src/webchannel/webchannel.pro
index edaac13..931ee03 100644
--- a/src/webchannel/webchannel.pro
+++ b/src/webchannel/webchannel.pro
@@ -30,8 +30,6 @@ SOURCES += \
qtHaveModule(qml) {
QT += qml
- DEFINES += "QT_HAVE_QML"
-
SOURCES += \
qqmlwebchannel.cpp \
qqmlwebchannelattached.cpp
@@ -41,6 +39,8 @@ qtHaveModule(qml) {
PRIVATE_HEADERS += \
qqmlwebchannelattached_p.h
+} else {
+ DEFINES += QT_NO_JSVALUE
}
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS