It might be null. We wrap the retrieval of the data stream version in
QmlDebugClient and return the minimum if connection is null. The extra
copy of the connection QmlEngine is dropped as QmlDebugClient already
has one and we don't want to hit a dangling pointer.
Change-Id: Ida8c45d357d46b4942eea99b77065d3c51c7edb9
Reviewed-by: hjk <hjk@qt.io>
Host and port reasonably belong together, using a QUrl makes that more
explicit and follows the lead of the Qml profiler in that area.
Change-Id: I754cb17d165ce6b2f25c655eeebfd8ac8f5a93c7
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Specify the qml server address and use correct default loop back
address in qmlengine
Change-Id: I9b77cb3385041bbe79900e7f7a188ca26124bacc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
... and replace it by direct uses of ProcessHandle::activate().
Change-Id: I7beffba7bfbeff72a81b8699ff54a311a74ce1a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and make use of it.
With gcc 7, the new option -Wimplicit-fallthrough is introduced and
added to the -Wextra set, triggering dozens of warnings in our sources.
Therefore, we annotate all obviously intended fall-throughs. The ones
that are still left are unclear and need to be checked by the respective
maintainer.
Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Not needed anymore in the world of RunWorkers.
Change-Id: Id7fb24fece6acb03de12f2677dd99a05c513e7a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
The parameters belong to the run control, they should not
be triplicated in case of a combined engine.
Change-Id: I4dd84220edbd7a44b902cc52627fe01d0568db75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add some customization hooks to make tools aware of target errors
and vice versa.
Change-Id: I4d815087297a3fa1d1d6d52daeed7c4ae0f624bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Less debugger specific code and less convoluted paths in debugger
message handling.
Change-Id: Ib298889c386d65f17acbdfc585188097bb20ed74
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The QML engine might (in the future) actually send the right message
to indicate a JavaScript null, that is:
{ type: "object", value: null }
This piece of JSON is then transformed into a QVariantMap. The QVariant
that signifies the null is unfortunately different across various Qt
versions. We can, however, detect it.
Change-Id: I3db42bb35a936bc02c749ab3a136b1d297aefdfe
Reviewed-by: hjk <hjk@qt.io>
The QmlDebugConnection can be quite spammy as it repeatedly tries to
connect to the application. Show error messages from this process in the
debugger log and only output a line in the status bar if the connection
is considered to have permanently failed.
Change-Id: I4a5715d9acdac47f690cb8aa67adb5cccff76e11
Task-number: QTCREATORBUG-17492
Reviewed-by: hjk <hjk@qt.io>
The v4 debug service doesn't understand "sanity" after all, but wants
to know the features we support. So state that we don't need redundant
references and that we understand names when sent as strings.
Change-Id: Ie973dd8002935a113a367d098337983d61663265
Reviewed-by: hjk <hjk@qt.io>
This signals that we understand packages without extra "handles",
that we can deal with only one level of nesting on replies to lookups
and expression evaluations, and that we can understand script and
function names transmitted as plain strings rather than refs.
Change-Id: Iffdd50179b8f9374e2fc8ad3a03cf44fbc627bf1
Task-number: QTBUG-42435
Reviewed-by: hjk <hjk@qt.io>
The QML engine will send the number of children in an object as the
"value" property together with the ref. We can use that to determine
if an object has children without actually fetching it.
Also, always save the type of a ref, even if we don't know the value
yet. This avoids redundant lookups.
Task-number: QTBUG-42435
Change-Id: Ia423b661187dc054fb5782349d1256711ee11265
Reviewed-by: hjk <hjk@qt.io>
For some of those it doesn't make much sense to assign a ref and the
refs are not stable anyway.
Change-Id: I7b6855225f883b93930b8d501495ef9dd62be7a2
Reviewed-by: hjk <hjk@qt.io>
Instead of letting the launcher decide to raise something when
started (and only then) leave it to the RunControl to trigger
(and for now also to implement) as response to the application
launcher start (or possibly now, in other circumstances).
Change-Id: I0ac8f1e633981f7bf316c88e83c208765886d9a1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
android app in mixed mode debugging sometimes keeps waiting for the
qml engine connection.
Task-number: QTCREATORBUG-17718
Change-Id: Iee87cd0a6d67babaf08e62a6e106ec22fda430cd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If the engine is running and no specific context is selected, then it's
the global QML context. The same holds if the engine is running, but
the server doesn't support contextual evaluation. If the engine is
stopped, then it's a frame in the stack trace. Otherwise we don't have
a context and clear the label.
Change-Id: I5a322098f3297895e07bcc96ee4a5f351423c206
Reviewed-by: hjk <hjk@qt.io>
As we can have a context again now, we should be able to show it.
This reverts commit 8679a7caa6.
Task-number: QTCREATORBUG-17177
Change-Id: I221628dc91af839be867cc1bf8dfe5d5163fd321
Reviewed-by: hjk <hjk@qt.io>
Newer V4 debug servers will accept a "context" parameter which
specifies the ID of an object which is then used to look up a QML
context to inject when evaluating expressions.
Change-Id: I9d2a2226559380550308cacfe559e079291c14b5
Task-number: QTCREATORBUG-17177
Reviewed-by: hjk <hjk@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>
This allows us to sort the locals by name immediately when the action
is triggered.
Task-number: QTCREATORBUG-16645
Change-Id: Ifd24f49e66523af5e988065c9a33aae00e7fb290
Reviewed-by: hjk <hjk@qt.io>
Will be triggered in handleScope()/insertSubItems() anyway.
Change-Id: Id5e236c231558c819398b38a13fb06def9ae39a6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
There is no point in trying to "gracefully" shutdown by waiting for the
application to hit the next line of JavaScript. The application might
never execute any more JavaScript.
Change-Id: Id531a2b23ce9aa12462e308f29106f8cefa67092
Task-number: QTCREATORBUG-16709
Reviewed-by: hjk <hjk@qt.io>
There is no reason to clear all the other views, too. The inspector
view stays valid across interruptions and the C++ views have nothing
to do with this at all.
Change-Id: I7a0bfe160a6b3c0134d592abef9c10f95fcfcd3f
Task-number: QTCREATORBUG-16692
Reviewed-by: hjk <hjk@qt.io>
After sending the interrupt request the application will continue to
the next line of JavaScript and only interrupt then. There is no way
to interrupt the application via the JS debugger as long as no JS
engine is active.
The downside of this is that the pause/continue/stop icons are disabled
until the application actually interrupts. The user might not
understand this.
Change-Id: I355de52f65898d6bdcd437675adba368662f3c13
Task-number: QTCREATORBUG-16646
Reviewed-by: hjk <hjk@qt.io>
A socket error is not the only possible reason for a connection failure
and exposing socket error codes to the upper layers is unnecessary.
Change-Id: I27e9f21160ecea5b0d811b83b7ab0ab9071cacff
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The main idea is to start using ProjectExplorer::Connection later.
Change-Id: Ie91eacdfb0e93ae142fec7ce32bcf554a5282122
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>
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>
You can now interact with QML objects selected with the "select" tool
again, when unpausedEvaluate is off.
Change-Id: If6b4a55193a8949b2e3048fe78443c5df6710885
Task-number: QTCREATORBUG-16300
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This solves the ambiguity between 0 and -1 being the "invalid" port.
Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
Multiple copies of lookup requests may accumulate when stepping
too quickly, outsmarting the 'all updates done' logic, keeping
Locals&Expressions in the grey 'update ongoing' state.
Change-Id: Icec24ce1af8d273c3439ee91800ed1f4381ee19a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
(cherry picked from commit c1de315d6c)