The properties of the engines themselves are interesting. However, in
order to properly display the engines, we need to always update the root
context for an engine after we update its properties. This is a good
idea anyway because there might be a reference to the engine somewhere
else in the object tree, and accidentally updating the engine would
clear its root context.
Change-Id: If905f4c32ba37106b5620b5af0e157e19ef8b295
Reviewed-by: hjk <hjk@qt.io>
Make sure to always find the correct parent and engine IDs for objects
to be inserted, and that root objects are always added as children of
their engines. As the root objects don't show up in the engine's
children(), but we adjust the root objects' parent IDs to point to the
engines, the root objects were sometimes shown as children of the
engines, and sometimes as top level root objects.
Furthermore, make sure not to fetch any parents of engines. Otherwise we
get a much more complicated object hierarchy than what we actually want
to see, and the invariant that each engine is at the root of the tree
breaks.
Change-Id: I6967f0b369149a8d6db3ab89f1479c942f6fcbf7
Reviewed-by: hjk <hjk@qt.io>
The engines are listed as virtual root items for their contents. This
way, when we need an engineID we can walk up the tree of watch items and
the last valid one will be the engine.
Fixes: QTCREATORBUG-21486
Change-Id: Ib110457dc65523c1e2b75aa073f6cd399bbc9532
Reviewed-by: hjk <hjk@qt.io>
The inspector service natively supports multi-selection. Instead of
converting between multi and single selection all the time, just use the
multi selections and only collapse to one row when interacting with the
view.
Change-Id: Ie969225f955c61b306cfbec4973ffc724ef1e224
Reviewed-by: hjk <hjk@qt.io>
Since we don't need to support the Qt Quick 1 clients anymore, we can
drop some code.
Change-Id: I7afcad8024392f058a35b3ed0d28d2172587552a
Reviewed-by: hjk <hjk@qt.io>
The declarative* clients are only used with Qt Quick 1. We don't need
them anymore.
Change-Id: I102fe93b3acd4b23cc01aff5eb9f12540625fe5e
Reviewed-by: hjk <hjk@qt.io>
Instead, set the default level of all logs to QtWarningMsg.
The call to setFilterRules overrides the user preferences in qtlogging.ini.
Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
There are various ways to generate nested arrays and objects in the QML
engine debug service. We can easily show them.
Task-number: QTBUG-68474
Change-Id: I3511a3f6f7631de4ab6a9d4b13ba9392ba4173dc
Reviewed-by: hjk <hjk@qt.io>
Make it return 'this' if 'this' is the master engine itself.
Adapt users.
Also do not let the QmlEngine try to beginConnection() when
the combined engine was isDying() already.
Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The quotes are stripped when the string is presented for editing, so
they have to be added back when we're done editing.
This is what we already did if we were talking to the inspector rather
than the V4 debugger.
In order for this to work, JS numbers need to be identified as numbers,
rather than strings. So, we have to add "number" to the types recognized
as float.
Change-Id: I2054f4ad36ec1d14fb2dfee3705a80c8ec84d5ac
Task-number: QTCREATORBUG-19032
Reviewed-by: hjk <hjk@qt.io>
Apparently the inspector service does not send a type string for all
objects. As the id string and the object name can also be empty, those
objects are anonymous then. Try to identify them by their source
location and if that doesn't work, just call them "<anonymous>".
Change-Id: I3bd3bad8b78c81ace95bfd7813cdd8bb0f5e14f2
Task-number: QTCREATORBUG-17741
Reviewed-by: hjk <hjk@qt.io>
This has the effect of sorting the members immediately, rather than
the next time something else changes.
Change-Id: I3f3cb261f1fb69b6b36914b811a431b045bb49ae
Task-number: QTCREATORBUG-16645
Reviewed-by: hjk <hjk@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>
There is no + operator that takes a QByteArray and a QString (or vice
versa).
Change-Id: I8734923cbbb0360bc20f9775d57801803782716f
Reviewed-by: hjk <hjk@theqtcompany.com>
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>
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).
This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.
For a plain std::vector<int> with 1 mio items this reduces
extraction time from more than 2 minutes to about 3 seconds.
Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The invalid ID is -1 and we shouldn't send 0 to the engine debug
service by default as that will select some random object as context
for expression evaluation.
Change-Id: Ide245468f787cc449ff50ac846c7ff31620c01b4
Task-number: QTCREATORBUG-14931
Reviewed-by: hjk <hjk@theqtcompany.com>
This way the items highlighted in Qt Creator are also marked in the
application when the inspector is active.
Change-Id: I89c3270cf5c108c1549ea01704bfd0e4b7a44ca5
Reviewed-by: hjk <hjk@theqtcompany.com>
This is to adopt the naming to the code in src/qmldebug in
qtdeclarative. Once we can require a version of Qt that has qmldebug
for building QtCreator we can then remove our own version of this code.
Change-Id: I573f0703871b5812789c5c7a6287567d5c2875e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
There's a 1:1 relation, and the abstraction is not needed anymore.
Also remove some unused code.
Change-Id: I09a2522deb5d522f46ec7518d19978a038032fbb
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
... in WatchHandler and DebuggerEngine interface.
Adjust using code.
Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Rename the list overload. Make the single item overload use
the direct path to insertItem, hook the column resize requests
to the showing/hiding of the watchers pane.
Change-Id: I0a1940c8e1919341a815e6bccbcf55d989d663da
Reviewed-by: hjk <hjk@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I1aa1a2b6ccbafeb1a8f3053fffa39b3f96992591
Reviewed-by: hjk <hjk@theqtcompany.com>