diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-04 16:29:09 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-06 09:06:17 (GMT) |
commit | 633f3f45e5420663cf4ceadea79e62fea44cd2eb (patch) | |
tree | 1b2c0d8b5dc0746a51c2ea4bf542845273cf7006 /src/scripttools/debugging | |
parent | 7b5e37cab738804d47b78582aa3d0f3bb6933e70 (diff) | |
download | Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.zip Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.gz Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.bz2 |
Remove the use of deprecated qVariant*
Test directory untouched.
This just apply those regexp:
git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue
git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue
git checkout src/corelib/kernal/qvariant*
Rev-by: dev mailing list
Diffstat (limited to 'src/scripttools/debugging')
4 files changed, 16 insertions, 16 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggercommand.cpp b/src/scripttools/debugging/qscriptdebuggercommand.cpp index fa223ec..5ca0535 100644 --- a/src/scripttools/debugging/qscriptdebuggercommand.cpp +++ b/src/scripttools/debugging/qscriptdebuggercommand.cpp @@ -256,7 +256,7 @@ QScriptBreakpointData QScriptDebuggerCommand::breakpointData() const void QScriptDebuggerCommand::setBreakpointData(const QScriptBreakpointData &data) { Q_D(QScriptDebuggerCommand); - d->attributes[BreakpointData] = qVariantFromValue(data); + d->attributes[BreakpointData] = QVariant::fromValue(data); } QScriptDebuggerValue QScriptDebuggerCommand::scriptValue() const @@ -268,7 +268,7 @@ QScriptDebuggerValue QScriptDebuggerCommand::scriptValue() const void QScriptDebuggerCommand::setScriptValue(const QScriptDebuggerValue &value) { Q_D(QScriptDebuggerCommand); - d->attributes[ScriptValue] = qVariantFromValue(value); + d->attributes[ScriptValue] = QVariant::fromValue(value); } int QScriptDebuggerCommand::contextIndex() const @@ -316,7 +316,7 @@ QScriptDebuggerValue QScriptDebuggerCommand::subordinateScriptValue() const void QScriptDebuggerCommand::setSubordinateScriptValue(const QScriptDebuggerValue &value) { Q_D(QScriptDebuggerCommand); - d->attributes[SubordinateScriptValue] = qVariantFromValue(value); + d->attributes[SubordinateScriptValue] = QVariant::fromValue(value); } int QScriptDebuggerCommand::snapshotId() const diff --git a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp index 568af59..7616148 100644 --- a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp +++ b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp @@ -229,11 +229,11 @@ QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute( case QScriptDebuggerCommand::ScriptsCheckpoint: backend->scriptsCheckpoint(); - response.setResult(qVariantFromValue(backend->scriptsDelta())); + response.setResult(QVariant::fromValue(backend->scriptsDelta())); break; case QScriptDebuggerCommand::GetScriptsDelta: - response.setResult(qVariantFromValue(backend->scriptsDelta())); + response.setResult(QVariant::fromValue(backend->scriptsDelta())); break; case QScriptDebuggerCommand::ResolveScript: @@ -302,7 +302,7 @@ QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute( } break; case QScriptDebuggerCommand::ContextsCheckpoint: { - response.setResult(qVariantFromValue(backend->contextsCheckpoint())); + response.setResult(QVariant::fromValue(backend->contextsCheckpoint())); } break; case QScriptDebuggerCommand::GetPropertyExpressionValue: { @@ -441,7 +441,7 @@ QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute( result.addedProperties.append(dest); } backend->setIgnoreExceptions(didIgnoreExceptions); - response.setResult(qVariantFromValue(result)); + response.setResult(QVariant::fromValue(result)); } break; case QScriptDebuggerCommand::DeleteScriptObjectSnapshot: { diff --git a/src/scripttools/debugging/qscriptdebuggerevent.cpp b/src/scripttools/debugging/qscriptdebuggerevent.cpp index f5f20cf..55df35b 100644 --- a/src/scripttools/debugging/qscriptdebuggerevent.cpp +++ b/src/scripttools/debugging/qscriptdebuggerevent.cpp @@ -216,7 +216,7 @@ QScriptDebuggerValue QScriptDebuggerEvent::scriptValue() const void QScriptDebuggerEvent::setScriptValue(const QScriptDebuggerValue &value) { Q_D(QScriptDebuggerEvent); - d->attributes[Value] = qVariantFromValue(value); + d->attributes[Value] = QVariant::fromValue(value); } void QScriptDebuggerEvent::setNestedEvaluate(bool nested) diff --git a/src/scripttools/debugging/qscriptdebuggerresponse.cpp b/src/scripttools/debugging/qscriptdebuggerresponse.cpp index 0caa3e2..382e604e 100644 --- a/src/scripttools/debugging/qscriptdebuggerresponse.cpp +++ b/src/scripttools/debugging/qscriptdebuggerresponse.cpp @@ -162,49 +162,49 @@ void QScriptDebuggerResponse::setResult(const QString &value) void QScriptDebuggerResponse::setResult(const QScriptBreakpointData &data) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(data); + d->result = QVariant::fromValue(data); } void QScriptDebuggerResponse::setResult(const QScriptBreakpointMap &breakpoints) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(breakpoints); + d->result = QVariant::fromValue(breakpoints); } void QScriptDebuggerResponse::setResult(const QScriptScriptMap &scripts) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(scripts); + d->result = QVariant::fromValue(scripts); } void QScriptDebuggerResponse::setResult(const QScriptScriptData &data) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(data); + d->result = QVariant::fromValue(data); } void QScriptDebuggerResponse::setResult(const QScriptDebuggerValue &value) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(value); + d->result = QVariant::fromValue(value); } void QScriptDebuggerResponse::setResult(const QScriptDebuggerValueList &values) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(values); + d->result = QVariant::fromValue(values); } void QScriptDebuggerResponse::setResult(const QScriptDebuggerValuePropertyList &props) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(props); + d->result = QVariant::fromValue(props); } void QScriptDebuggerResponse::setResult(const QScriptContextInfo &info) { Q_D(QScriptDebuggerResponse); - d->result = qVariantFromValue(info); + d->result = QVariant::fromValue(info); } int QScriptDebuggerResponse::resultAsInt() const |