forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.5' into master
Change-Id: Ibcdd1230b40d1ca7a414843ee0f9ae4cddb29f6f
This commit is contained in:
@@ -337,13 +337,7 @@ void QmlCppEngine::continueInferior()
|
||||
void QmlCppEngine::interruptInferior()
|
||||
{
|
||||
EDEBUG("\nMASTER INTERRUPT INFERIOR");
|
||||
m_cppEngine->requestInterruptInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::requestInterruptInferior()
|
||||
{
|
||||
EDEBUG("\nMASTER REQUEST INTERRUPT INFERIOR");
|
||||
DebuggerEngine::requestInterruptInferior();
|
||||
m_activeEngine->interruptInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeRunToLine(const ContextData &data)
|
||||
@@ -380,8 +374,8 @@ void QmlCppEngine::setupEngine()
|
||||
void QmlCppEngine::setupInferior()
|
||||
{
|
||||
EDEBUG("\nMASTER SETUP INFERIOR");
|
||||
m_qmlEngine->setupSlaveInferior();
|
||||
m_cppEngine->setupSlaveInferior();
|
||||
m_qmlEngine->setupInferior();
|
||||
m_cppEngine->setupInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::runEngine()
|
||||
|
||||
@@ -98,7 +98,6 @@ protected:
|
||||
void executeReturn() override;
|
||||
void continueInferior() override;
|
||||
void interruptInferior() override;
|
||||
void requestInterruptInferior() override;
|
||||
|
||||
void executeRunToLine(const ContextData &data) override;
|
||||
void executeRunToFunction(const QString &functionName) override;
|
||||
|
||||
@@ -871,9 +871,13 @@ bool QmlEngine::canHandleToolTip(const DebuggerToolTipContext &) const
|
||||
}
|
||||
|
||||
void QmlEngine::assignValueInDebugger(WatchItem *item,
|
||||
const QString &expression, const QVariant &value)
|
||||
const QString &expression, const QVariant &editValue)
|
||||
{
|
||||
if (!expression.isEmpty()) {
|
||||
QVariant value = (editValue.type() == QVariant::String)
|
||||
? QVariant('"' + editValue.toString().replace('"', "\\\"") + '"')
|
||||
: editValue;
|
||||
|
||||
if (item->isInspect()) {
|
||||
d->inspectorAgent.assignValue(item, expression, value);
|
||||
} else {
|
||||
@@ -882,7 +886,7 @@ void QmlEngine::assignValueInDebugger(WatchItem *item,
|
||||
if (handler->isContentsValid() && handler->currentFrame().isUsable()) {
|
||||
d->evaluate(exp, -1, [this](const QVariantMap &) { d->updateLocals(); });
|
||||
} else {
|
||||
showMessage(QString("Cannot evaluate %1 in current stack frame")
|
||||
showMessage(tr("Cannot evaluate %1 in current stack frame.")
|
||||
.arg(expression), ConsoleOutput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,10 +176,6 @@ void QmlInspectorAgent::assignValue(const WatchItem *data,
|
||||
|
||||
if (data->id != WatchItem::InvalidId) {
|
||||
QString val(valueV.toString());
|
||||
if (valueV.type() == QVariant::String) {
|
||||
val = val.replace(QLatin1Char('\"'), QLatin1String("\\\""));
|
||||
val = QLatin1Char('\"') + val + QLatin1Char('\"');
|
||||
}
|
||||
QString expression = QString("%1 = %2;").arg(expr).arg(val);
|
||||
queryExpressionResult(data->id, expression);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user