diff options
author | Aurindam Jana <[email protected]> | 2012-05-23 14:55:48 +0200 |
---|---|---|
committer | Aurindam Jana <[email protected]> | 2012-05-25 11:20:49 +0200 |
commit | a79e38ac6f59bf3a8398e807dac64b2265e466be (patch) | |
tree | 88168223a02a1823e1ab5f74587d0c16e74e7c20 /src/plugins/debugger/watchhandler.cpp | |
parent | 023deff47467f0966c21e8f1929b703f0be8c145 (diff) |
QmlJSInspector: Set property values
QML property values could be set in the inspector.
Regression introduced by 7f09d0b756ff3f9bb52737d4aaf65ed84d751316.
This patch is a partial fix. Only values can be assigned currently.
For expressions, use the console.
Change-Id: I945b11109cd7788dd0f5277af206bf9658844aee
Reviewed-by: Christiaan Janssen <[email protected]>
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r-- | src/plugins/debugger/watchhandler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 71e97113b85..890f68456f1 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -1139,12 +1139,13 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const = Qt::ItemIsSelectable | Qt::ItemIsEnabled; static const Qt::ItemFlags editable = notEditable | Qt::ItemIsEditable; - // Disable editing if debuggee is positively running. + // Disable editing if debuggee is positively running except for Inspector data + const WatchData &data = *watchItem(idx); const bool isRunning = engine() && engine()->state() == InferiorRunOk; - if (isRunning && engine() && !engine()->hasCapability(AddWatcherWhileRunningCapability)) + if (isRunning && engine() && !engine()->hasCapability(AddWatcherWhileRunningCapability) && + !data.isInspect()) return notEditable; - const WatchData &data = *watchItem(idx); if (data.isWatcher()) { if (idx.column() == 0 && data.iname.count('.') == 1) return editable; // Watcher names are editable. @@ -1159,6 +1160,9 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const } else if (data.isLocal()) { if (idx.column() == 1 && data.valueEditable) return editable; // Locals values are sometimes editable. + } else if (data.isInspect()) { + if (idx.column() == 1 && data.valueEditable) + return editable; // Inspector values are sometimes editable. } return notEditable; } |