All were targeting the same running engine, doing the same thing.
Change-Id: If1186f6467cde6b44a051ea5845d4528917ca8f9
Reviewed-by: David Schulz <david.schulz@qt.io>
Keep strings in lambdas instead of WatchItem pointers that
might get deleted while the menu is open.
Change-Id: Iec65924696da9754ffbbbb833ae0db990598c8e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If the list of partial expressions is empty we need to tell the watch
handler that we are only updating the locals view, not e.g. the
inspector view.
Change-Id: Iedc74ffc66a8435faa272d053849b831f6b8cbbe
Task-number: QTCREATORBUG-16692
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Double clicking watch handler window without hitting an item
used to trigger 'Add New Expression Evaluator...'.
Change-Id: I452eb56476f7186ac36f7a9f1e9d2a43c109a9b1
Reviewed-by: hjk <hjk@qt.io>
In case a dumper explicitly reports the presence of children
but fails to extract them, remove the model's desire to
see them by re-setting the 'wantsChildren' hint explicitly
after a full update.
Change-Id: I09d3d3dd67067d22d39f7685b57570ecb42984d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Lately it was only set and read for debugging purposes. A mechanism
similar to the ChildrenNeeded state is still needed and available
through WatchItem::wantsChildren.
Change-Id: I78c85d65bc35810be420bd0418db9675473697cd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.
BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.
Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Make use of recent TreeModel improvements in various
tool views, push more operations into the engine-
owned data models, specifically context menu creation.
Change-Id: I479c97102b9fb81611c6461c6df1cec59295179a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
We never used the possibility to overload the virtual child() and
rowCount() functions, it's unlikely to be needed in future.
Change-Id: I7ebdf4dfc70bb0bcadea9ef3fb88f16632a95696
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
TreeModel::forAllChildren and TreeModel::walkTree differ
in the handling of the topmost item.
Change-Id: Id2032f69bb47218292507d33ed00935874afa73f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Only first level items (.local, .watch, ...) are meant to stay,
so all items below the first level needs to get the outdated
marker, not items below the second level.
Change-Id: I78097905fce1898e16f297982eec5974b2465b0c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
For better typesafety on the user side (and optional) for items with uniformly
typed children. Use it for UniformTreeModels, and consequently WatchModel
to get rid of some of the static_casts there.
Change-Id: Ic20e507036e180c24997b236230f0f71b285202c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In uniform trees the type of the items is fixed and known,
no need for user code to cast around.
Change-Id: Id20e507036e180c24997b236230f0f71b285202c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.
Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
QmlEngine::pdateCurrentContext() currently relies on being able to
access the 'name' member.
Change-Id: I75675681407402667da1cb82d3589980d92554a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This adds a templated layer on top of TreeModel that can specify
item types for the top three layers in the model, relieving user
code from some of the previously necessary type casting.
Two common setups get an extra layer with convenience functions
on top: TwoLevelTreeModel for two-level model with a first level
of static headers and a uniform second level, and UniformTreeModel
where all non-root nodes are the same.
"Untyped" plain TreeModels are still possible.
The walkTree() feature and untyped iteration in the base
TreeItem and TreeModel is retained for now to ease transition
in downstream modules, but is planned to be removed soon.
Change-Id: I67d75a1a4e18e8f254dbfb458db03510d8990d8b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
There are cases like changing an Evaluated Expression that make
re-evaluation necessary.
Change-Id: I51fe46b67399a59aebbdeb9c3e778795b1c52cf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use function objects to apply directly during a depth-first
walk of the tree instead of faking a flat container of tree
nodes. Less code, and allows even some non-const operations.
Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Easier to coordinate between dumpers and watchhandler
Change-Id: Ide191a5786dc04ef22c3e9c8b0bec39f8f8c0f1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
It was there for GDB at a time, but never for the other backends.
Fix the GDB regression and make the sorting consistent across
backends.
Task-number: QTCREATORBUG-15296
Change-Id: If728c65f0c8ca4a8378c7cf5e53f1dadbfb72b29
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
In 7de7eb6bca the behavior on Unrunnable
state was changed, probably by mistake.
AddWatcherWhileRunningCapability should allow adding watchers while
running, but it should not prevent selection when not supported and
the inferior is not running.
Another missing part was that Unrunnable was considered running,
although it shouldn't.
Change-Id: I7d27b81977a6921919327b3122a865b7ffa2d0bd
Reviewed-by: hjk <hjk@theqtcompany.com>