Commit a4c0712c authored by hjk's avatar hjk

Debugger: Add a message when trying to evaluate a bad expression

Change-Id: Id10f11876e9b6c852a04add6bd75aec7e8337891
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 58282bda
......@@ -920,8 +920,12 @@ public:
else
exp = fixCppExpression(exp);
exp = exp.trimmed();
if (exp.isEmpty())
if (exp.isEmpty()) {
// Happens e.g. when trying to evaluate 'char' or 'return'.
AsynchronousMessageBox::warning(tr("Warning"),
tr("Select a valid expression to evaluate."));
return;
}
currentEngine()->watchHandler()->watchVariable(exp);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment