forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.5' into master
Change-Id: Ibcdd1230b40d1ca7a414843ee0f9ae4cddb29f6f
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user