Debugger: Prevent editing of elided items in Locals view

For a long string, only the parts needed to fill the Value column is
retrieved. Trying to edit (double click on Value entry) this resulted
in truncation of the string.

Change-Id: I1e993bfe52cee933bd32c866448eedc788807bd3
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
hjk
2015-08-14 09:47:55 +02:00
parent 2bc96c7621
commit e6b2426b89

View File

@@ -949,13 +949,13 @@ Qt::ItemFlags WatchItem::flags(int column) const
// FIXME: Forcing types is not implemented yet.
//if (idx.column() == 2)
// return editable; // Watcher types can be set by force.
if (column == 1 && valueEditable)
if (column == 1 && valueEditable && !elided)
return editable; // Watcher values are sometimes editable.
}
} else if (isLocal()) {
if (state != InferiorStopOk && !engine->hasCapability(AddWatcherWhileRunningCapability))
return Qt::ItemFlags();
if (column == 1 && valueEditable)
if (column == 1 && valueEditable && !elided)
return editable; // Locals values are sometimes editable.
} else if (isInspect()) {
if (column == 1 && valueEditable)