summaryrefslogtreecommitdiff
path: root/src/webchannel
diff options
context:
space:
mode:
Diffstat (limited to 'src/webchannel')
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp19
-rw-r--r--src/webchannel/webchannel.pro1
2 files changed, 1 insertions, 19 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 5201a4a..27eb134 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -43,11 +43,6 @@
#include <QJsonArray>
#include <QUuid>
-#if HAVE_QML
-#include <QtQml/QJSValue>
-#include <QtQml/QJSEngine>
-#endif
-
QT_BEGIN_NAMESPACE
namespace {
@@ -380,19 +375,7 @@ void QMetaObjectPublisher::signalEmitted(const QObject *object, const int signal
message[KEY_SIGNAL] = signalIndex;
if (!arguments.isEmpty()) {
// TODO: wrap (new) objects on the fly
- QJsonArray args;
-#if HAVE_QML
- foreach (const QVariant &arg, arguments) {
- if (arg.canConvert<QJSValue>()) {
- const QJSValue &jsValue = arg.value<QJSValue>();
- args.append(qjsvalue_cast<QJsonValue>(jsValue));
- } else {
- args.append(QJsonValue::fromVariant(arg));
- }
- }
-#else
- args = QJsonArray::fromVariantList(arguments);
-#endif
+ QJsonArray args = QJsonArray::fromVariantList(arguments);
message[KEY_ARGS] = args;
}
message[KEY_TYPE] = TypeSignal;
diff --git a/src/webchannel/webchannel.pro b/src/webchannel/webchannel.pro
index 024956e..eba8123 100644
--- a/src/webchannel/webchannel.pro
+++ b/src/webchannel/webchannel.pro
@@ -29,7 +29,6 @@ SOURCES += \
qtHaveModule(qml) {
QT += qml
- DEFINES += HAVE_QML=1
SOURCES += \
qqmlwebchannel.cpp \