code format

This commit is contained in:
王劲鹏
2019-12-13 17:48:37 +08:00
parent 3fdedb6240
commit 4610e71f42
8 changed files with 23 additions and 23 deletions

View File

@@ -15,8 +15,8 @@ void NativeDriver::destroyContext(int contextId) {
jsEngine->destroyContext(contextId);
}
void NativeDriver::invokeContextEntityMethod(int contextId, QString* method, ...) {
QJSValueList* arguments = new QJSValueList();
void NativeDriver::invokeContextEntityMethod(int contextId, QString *method, ...) {
QJSValueList *arguments = new QJSValueList();
arguments->append(QJSValue(QString::number(contextId)));
arguments->append(QJSValue(*method));
@@ -25,8 +25,8 @@ void NativeDriver::invokeContextEntityMethod(int contextId, QString* method, ...
auto argument = va_arg(vaList, QVariant*);
while (argument != nullptr) {
if (QString(typeid(QJsonObject).name()).contains(QString(argument->typeName()))) {
QJsonObject* jsonObject = static_cast<QJsonObject*>(argument->data());
QJsonValue* jsonValue = new QJsonValue(*jsonObject);
QJsonObject *jsonObject = static_cast<QJsonObject*>(argument->data());
QJsonValue *jsonValue = new QJsonValue(*jsonObject);
QJSValue jsValue = Utility::convert(jsEngine->engine, *jsonValue);
delete jsonValue;
arguments->append(jsValue);