diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptcontext.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 01ccb6d..689ad66 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -631,17 +631,21 @@ QString QScriptContext::toString() const } QStringList parameterNames = info.functionParameterNames(); - result.append(QLatin1String(" (")); + result.append(QLatin1Char('(')); for (int i = 0; i < argumentCount(); ++i) { if (i > 0) result.append(QLatin1String(", ")); if (i < parameterNames.count()) { result.append(parameterNames.at(i)); - result.append(QLatin1Char('=')); + result.append(QLatin1String(" = ")); } QScriptValue arg = argument(i); -// result.append(safeValueToString(arg)); ### + if (arg.isString()) + result.append(QLatin1Char('\'')); result.append(arg.toString()); + if (arg.isString()) + result.append(QLatin1Char('\'')); + } result.append(QLatin1Char(')')); |