Debugger: Disable # characters in watched expression

They are not useful and break the dumper protocol.

Change-Id: Ice7e21575e371ee3f8bb8cfb80b73aed47542932
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
hjk
2013-08-10 21:22:02 +02:00
committed by Kai Koehne
parent 0bf0cc41ad
commit f6ffd2b1ae

View File

@@ -1562,14 +1562,18 @@ QByteArray WatchHandler::watcherName(const QByteArray &exp)
return "watch." + QByteArray::number(theWatcherNames[exp]);
}
void WatchHandler::watchExpression(const QString &exp, const QString &name)
void WatchHandler::watchExpression(const QString &exp0, const QString &name)
{
QString exp = exp0;
QTC_ASSERT(m_engine, return);
// Do not insert the same entry more then once.
if (theWatcherNames.value(exp.toLatin1()))
return;
// FIXME: 'exp' can contain illegal characters
exp.replace(QLatin1Char('#'), QString());
WatchData data;
data.exp = exp.toLatin1();
data.name = name.isEmpty() ? exp : name;