summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-14 14:43:09 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-14 14:44:26 (GMT)
commitd7b24639a40706f75071640eefa11adf5902e0ed (patch)
treedf212377dc2dd9614355eb9b1abbdea2b70d083b /src/script
parentb1574e4845d657673e178b892ba57e398984e0b3 (diff)
downloadQt-d7b24639a40706f75071640eefa11adf5902e0ed.zip
Qt-d7b24639a40706f75071640eefa11adf5902e0ed.tar.gz
Qt-d7b24639a40706f75071640eefa11adf5902e0ed.tar.bz2
More polishing on the backtrace
change the coding style of function from foo (arg=text) to foo(arg = 'text')
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptcontext.cpp10
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(')'));