| 213 | } |
| 214 | |
| 215 | void JSGlobalFunction::print(QJSValue args) |
| 216 | { |
| 217 | if (args.isArray()) { |
| 218 | const int length = args.property("length").toInt(); |
| 219 | if (length == 1) { |
| 220 | Q_EMIT printRequested(args.property(0)); |
| 221 | return; |
| 222 | } |
| 223 | |
| 224 | QJSValueList jvlist; |
| 225 | for (int i = 0; i < length; ++i) |
| 226 | jvlist.append(args.property(i)); |
| 227 | |
| 228 | Q_EMIT printRequested(jvlist); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | void JSGlobalFunction::help() |
| 233 | { |
no test coverage detected