예제 #1
0
QJSValue EnginioQmlClientPrivate::fromJson(const QByteArray &value)
{
    (void)jsengine();
    return _parse.call(QJSValueList() << jsengine()->toScriptValue(value));
}
예제 #2
0
QByteArray EnginioQmlClientPrivate::toJson(const QJSValue &value)
{
    (void)jsengine();
    return _stringify.call(QJSValueList() << value).toString().toUtf8();
}
예제 #3
0
void URLOpener::replyFinished(QNetworkReply *reply)
{
    this->callback.call(QJSValueList() << QJSValue(QString(reply->readAll())));
}
예제 #4
0
			DebugOut(DebugOut::Error)<<"bluemoney get history call failed"<<endl;
			return;
		}

		if(cbFunction.isCallable())
		{
			QVariantList list;

			for(auto val : reply->values)
			{
				list.append(toQVariant(val));
			}

			QJSValue val = cbFunction.engine()->toScriptValue<QVariantList>(list);

			cbFunction.call(QJSValueList()<<val);

		}

		delete reply;
	};

	routingEngine->getRangePropertyAsync(request);
}

void BluemonkeySink::createCustomProperty(QString name, QJSValue defaultValue, int zone)
{
	QVariant var = defaultValue.toVariant();

	DebugOut() << "Variant value for: " << name.toStdString() << " is " << defaultValue.toString().toStdString() << endl;
static void deepFreeze(QJSEngine *jsEngine, const QJSValue &obj)
{
    QJSValue freezeFunc = jsEngine->evaluate(QString::fromUtf8(FREEZE_SOURCE));
    freezeFunc.call(QJSValueList() << obj);
}