forked from qt-creator/qt-creator
Debugger: Add a message when trying to evaluate a bad expression
Change-Id: Id10f11876e9b6c852a04add6bd75aec7e8337891 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user