diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-05 09:38:41 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-06 09:06:17 (GMT) |
commit | 4232955aa9498a5e1e4e4b3fb4662222acffe70f (patch) | |
tree | 7c1710aadf6a405c540f537596340581bc491102 /src/scripttools | |
parent | 6f09167b4fde25e04611557549a0d0d0cfd6a6ae (diff) | |
download | Qt-4232955aa9498a5e1e4e4b3fb4662222acffe70f.zip Qt-4232955aa9498a5e1e4e4b3fb4662222acffe70f.tar.gz Qt-4232955aa9498a5e1e4e4b3fb4662222acffe70f.tar.bz2 |
Remove usage of deprecated QScriptValue* function
Tests were untouched.
Regexp used:
git grep -O"sed -i 's/qScriptValueFromQMetaObject *<\([^>]*\)> *(\([^&*\(),]*\))/\\2->scriptValueFromQMetaObject<\\1>()/g'" qScriptValueFromQMetaObject
git grep -O"sed -i 's/qScriptValueFromValue(this, */toScriptValue(/'" qScriptValueFromValue
git grep -O"sed -i 's/qScriptValueFromValue(\([^&*\(),]*\), */\\1->toScriptValue(/'" qScriptValueFromValue
git grep -O"sed -i 's/qScriptValueFromValue(&\([^&*\(),]*\), */\\1.toScriptValue(/'" qScriptValueFromValue
git grep -O"sed -i 's/qScriptValueToValue</qscriptvalue_cast</'" qScriptValueToValue
Rev-by: dev mailing list
Diffstat (limited to 'src/scripttools')
-rw-r--r-- | src/scripttools/debugging/qscriptdebuggerconsole.cpp | 14 | ||||
-rw-r--r-- | src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp index 2f7a998..268b30e 100644 --- a/src/scripttools/debugging/qscriptdebuggerconsole.cpp +++ b/src/scripttools/debugging/qscriptdebuggerconsole.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE static QScriptValue debuggerResponseToScriptValue(QScriptEngine *eng, const QScriptDebuggerResponse &in) { QScriptValue out = eng->newObject(); - out.setProperty(QString::fromLatin1("result"), qScriptValueFromValue(eng, in.result())); + out.setProperty(QString::fromLatin1("result"), eng->toScriptValue(in.result())); out.setProperty(QString::fromLatin1("error"), QScriptValue(eng, in.error())); out.setProperty(QString::fromLatin1("async"), QScriptValue(eng, in.async())); return out; @@ -122,7 +122,7 @@ static QScriptValue breakpointMapToScriptValue(QScriptEngine *eng, const QScript QScriptValue out = eng->newObject(); QScriptBreakpointMap::const_iterator it; for (it = in.constBegin(); it != in.constEnd(); ++it) { - out.setProperty(QString::number(it.key()), qScriptValueFromValue(eng, it.value())); + out.setProperty(QString::number(it.key()), eng->toScriptValue(it.value())); } return out; } @@ -155,7 +155,7 @@ static QScriptValue scriptMapToScriptValue(QScriptEngine *eng, const QScriptScri QScriptValue out = eng->newObject(); QScriptScriptMap::const_iterator it; for (it = in.constBegin(); it != in.constEnd(); ++it) { - out.setProperty(QString::number(it.key()), qScriptValueFromValue(eng, it.value())); + out.setProperty(QString::number(it.key()), eng->toScriptValue(it.value())); } return out; } @@ -175,8 +175,8 @@ static QScriptValue consoleCommandToScriptValue( out.setProperty(QString::fromLatin1("group"), QScriptValue(eng, in->group())); out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in->shortDescription())); out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in->longDescription())); - out.setProperty(QString::fromLatin1("aliases"), qScriptValueFromValue(eng, in->aliases())); - out.setProperty(QString::fromLatin1("seeAlso"), qScriptValueFromValue(eng, in->seeAlso())); + out.setProperty(QString::fromLatin1("aliases"), eng->toScriptValue(in->aliases())); + out.setProperty(QString::fromLatin1("seeAlso"), eng->toScriptValue(in->seeAlso())); return out; } @@ -207,7 +207,7 @@ static QScriptValue consoleCommandGroupMapToScriptValue( QScriptValue out = eng->newObject(); QScriptDebuggerConsoleCommandGroupMap::const_iterator it; for (it = in.constBegin(); it != in.constEnd(); ++it) { - out.setProperty(it.key(), qScriptValueFromValue(eng, it.value())); + out.setProperty(it.key(), eng->toScriptValue(it.value())); } return out; } @@ -238,7 +238,7 @@ static QScriptValue debuggerScriptValuePropertyToScriptValue(QScriptEngine *eng, { QScriptValue out = eng->newObject(); out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in.name())); - out.setProperty(QString::fromLatin1("value"), qScriptValueFromValue(eng, in.value())); + out.setProperty(QString::fromLatin1("value"), eng->toScriptValue(in.value())); out.setProperty(QString::fromLatin1("valueAsString"), QScriptValue(eng, in.valueAsString())); out.setProperty(QString::fromLatin1("flags"), QScriptValue(eng, static_cast<int>(in.flags()))); return out; diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp index 117c2d6..83cabfd 100644 --- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp +++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp @@ -227,7 +227,7 @@ void QScriptDebuggerScriptedConsoleCommandJob::handleResponse( QScriptEngine *engine = d->command->globalObject.engine(); engine->setGlobalObject(d->command->globalObject); QScriptValueList args; - args.append(qScriptValueFromValue(engine, response)); + args.append(engine->toScriptValue(response)); args.append(QScriptValue(engine, commandId)); QScriptDebuggerConsoleGlobalObject *global; global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(d->command->globalObject.toQObject()); |