diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2014-10-16 17:10:41 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2014-10-17 15:22:54 +0200 |
commit | 86d77a900852691267f556fbde98406a12ee4310 (patch) | |
tree | 9b5d132abb90d9a590b18625c16defa6bb712882 /src/webchannel/qmetaobjectpublisher.cpp | |
parent | efbc8e0066f82ee530b4770e4484d6372e5e7cc1 (diff) | |
download | qtwebchannel-86d77a900852691267f556fbde98406a12ee4310.tar.gz |
Remove obsolete conversion work-around.5.4.0
The conversion from QJSValue to QJsonArray seems to work just fine
with Qt 5.4. Originally, this work-around was introduced to fix the QML
tests, which still pass without this code now.
Change-Id: Id52a5a16ebe25914f01d597778152e0595c9f1f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher.cpp')
-rw-r--r-- | src/webchannel/qmetaobjectpublisher.cpp | 19 |
1 files changed, 1 insertions, 18 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; |