diff options
Diffstat (limited to 'src/scripttools')
10 files changed, 37 insertions, 37 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggercommand.cpp b/src/scripttools/debugging/qscriptdebuggercommand.cpp index 15a5969..f026c93 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 a555eba..adc5d6d 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/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp index a2a7cf2..bab3c9f 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/qscriptdebuggerconsolewidget.cpp b/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp index 88dffc2..8824d48 100644 --- a/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp @@ -163,10 +163,10 @@ private: InputEdit *inputEdit; }; -class OutputEdit : public QPlainTextEdit +class QScriptDebuggerConsoleWidgetOutputEdit : public QPlainTextEdit { public: - OutputEdit(QWidget *parent = 0) + QScriptDebuggerConsoleWidgetOutputEdit(QWidget *parent = 0) : QPlainTextEdit(parent) { setFrameShape(QFrame::NoFrame); @@ -206,7 +206,7 @@ public: void _q_onCompletionTaskFinished(); CommandLine *commandLine; - OutputEdit *outputEdit; + QScriptDebuggerConsoleWidgetOutputEdit *outputEdit; int historyIndex; QString newInput; }; @@ -320,7 +320,7 @@ QScriptDebuggerConsoleWidget::QScriptDebuggerConsoleWidget(QWidget *parent) Q_D(QScriptDebuggerConsoleWidget); d->commandLine = new CommandLine(); d->commandLine->setPrompt(QString::fromLatin1("qsdb>")); - d->outputEdit = new OutputEdit(); + d->outputEdit = new QScriptDebuggerConsoleWidgetOutputEdit(); QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setSpacing(0); vbox->setMargin(0); diff --git a/src/scripttools/debugging/qscriptdebuggerevent.cpp b/src/scripttools/debugging/qscriptdebuggerevent.cpp index 9d3bc99..26a1c26 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 46cec56..af338f2 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 diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp index 348e912..37634c8 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()); diff --git a/src/scripttools/debugging/qscriptdebugoutputwidget.cpp b/src/scripttools/debugging/qscriptdebugoutputwidget.cpp index c2bdc22..5bd3d48 100644 --- a/src/scripttools/debugging/qscriptdebugoutputwidget.cpp +++ b/src/scripttools/debugging/qscriptdebugoutputwidget.cpp @@ -51,10 +51,10 @@ QT_BEGIN_NAMESPACE namespace { -class OutputEdit : public QPlainTextEdit +class QScriptDebugOutputWidgetOutputEdit : public QPlainTextEdit { public: - OutputEdit(QWidget *parent = 0) + QScriptDebugOutputWidgetOutputEdit(QWidget *parent = 0) : QPlainTextEdit(parent) { setReadOnly(true); @@ -85,7 +85,7 @@ public: QScriptDebugOutputWidgetPrivate(); ~QScriptDebugOutputWidgetPrivate(); - OutputEdit *outputEdit; + QScriptDebugOutputWidgetOutputEdit *outputEdit; }; QScriptDebugOutputWidgetPrivate::QScriptDebugOutputWidgetPrivate() @@ -100,7 +100,7 @@ QScriptDebugOutputWidget::QScriptDebugOutputWidget(QWidget *parent) : QScriptDebugOutputWidgetInterface(*new QScriptDebugOutputWidgetPrivate, parent, 0) { Q_D(QScriptDebugOutputWidget); - d->outputEdit = new OutputEdit(); + d->outputEdit = new QScriptDebugOutputWidgetOutputEdit(); QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); vbox->setSpacing(0); diff --git a/src/scripttools/debugging/qscripterrorlogwidget.cpp b/src/scripttools/debugging/qscripterrorlogwidget.cpp index a4851c0..904cb90 100644 --- a/src/scripttools/debugging/qscripterrorlogwidget.cpp +++ b/src/scripttools/debugging/qscripterrorlogwidget.cpp @@ -52,10 +52,10 @@ QT_BEGIN_NAMESPACE namespace { -class OutputEdit : public QTextEdit +class QScriptErrorLogWidgetOutputEdit : public QTextEdit { public: - OutputEdit(QWidget *parent = 0) + QScriptErrorLogWidgetOutputEdit(QWidget *parent = 0) : QTextEdit(parent) { setReadOnly(true); @@ -80,7 +80,7 @@ public: QScriptErrorLogWidgetPrivate(); ~QScriptErrorLogWidgetPrivate(); - OutputEdit *outputEdit; + QScriptErrorLogWidgetOutputEdit *outputEdit; }; QScriptErrorLogWidgetPrivate::QScriptErrorLogWidgetPrivate() @@ -95,7 +95,7 @@ QScriptErrorLogWidget::QScriptErrorLogWidget(QWidget *parent) : QScriptErrorLogWidgetInterface(*new QScriptErrorLogWidgetPrivate, parent, 0) { Q_D(QScriptErrorLogWidget); - d->outputEdit = new OutputEdit(); + d->outputEdit = new QScriptErrorLogWidgetOutputEdit(); QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); vbox->setSpacing(0); diff --git a/src/scripttools/scripttools.pro b/src/scripttools/scripttools.pro index b1df7aa..061dea5 100644 --- a/src/scripttools/scripttools.pro +++ b/src/scripttools/scripttools.pro @@ -5,7 +5,7 @@ DEFINES += QT_BUILD_SCRIPTTOOLS_LIB DEFINES += QT_NO_USING_NAMESPACE #win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000 -unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtScript +unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtScript include(../qbase.pri) |