summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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