| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a means of instrumenting any pure-QML application to generate an
object diagram showing the items and related objects belonging to the
first top-level window that can be found.
Using a Timer for that is kindof crude; perhaps we should rather
have a separate WindowFinder object that can emit a signal when a
new top-level window is discovered, or something like that. Or use
a Shortcut to trigger it manually. But it works well enough for now.
Change-Id: Ib2d82dfd6fbd4da4b46fbaadb08de2c5e649ffe6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes care of many common 2D and 3D use cases, and probably other
scenarios with QObjects too:
- root can be any QObject
- different shapes for Items, Handlers, 3D objects, QAIM and
DeliveryAgents
- shows objectName, text/label/title
- shape (outline) color can correspond to item (fill) color if desired
- several new working examples
Change-Id: Ica9a312ee6ad7e49c872ea52e6e8ab03fc41bc63
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
The plan is to add more code to generate other types of UML diagrams.
They can probably all be in the same module, because you anyway need to
instantiate MessageTrace or something else to instrument the application.
Change-Id: I602dea7fdfce57b5e1f05c9a43c25d5eb73f0a5d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two modules: one to generate traces at runtime, and one
containing components used in the generated QML, needed to view the
traces. We use add_subdirectory; there is some redundancy between the
CMakeLists.txt in the subdirectories, but they are difficult to combine
because of the use of per-module variables like module_dir, module_uri
and module_version.
We use PLUGIN_TARGET to get the backing code linked into the plugins (as
was normal in Qt 5): Qt.labs.UmlQuick.Trace is a development-oriented
module, generally used with temporarily-instrumented QML files, not
meant for application deployment. Generated QML traces are generally
viewed with the qml tool, so again it doesn't seem beneficial to have
Qt.labs.UmlQuick.Sequence available in a separate backing library.
Task-number: QTBUG-111946
Change-Id: Ia0f0b3bd43f64d0e0cfc67dd1e93165626a8c28b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
It's ok for the plantuml tool, and doesn't look so out-of-place when
brought inline in doc comments, because even for doxygen we tend to use
qdoc-style command syntax.
Change-Id: I44ada32e940eebe8a2d1ffe6a6632986536d6af0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
We always want to see objectName if possible, or object hash if not,
rather than a hex pointer as the participant name.
Change-Id: I133475807b3747ca106d231c5d8fb1352cbc0c95
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should not rely on destruction order. When the application is
quitting, it may be that by the time the QmlMessageTrace dtor is called,
other objects are already destroyed, and thus introspecting object
pointers stored in struct Message instances will be dangerous (for
example calling o->metaObject()->className() crashed in one case).
The aboutToQuit signal is emitted a bit earlier.
Change-Id: I4e6bf73586f39ff24f825fb9ce2c8f56d4a02ee7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
...and use that by default. QML can be obtained by setting the new
MessageTrace.outputFormat property.
Change-Id: I9a8a8caa8ed2c993c8681bfd50be74f1ec99738c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I60ce11416216f138802adb8716ae78cf13bdf4c3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Strictly maybe QObject::objectName() itself should check for this; but
in Qt 6 at least, crashes were happening here.
Change-Id: I5666ee0291f7757b0b0aff8d789a8626a6197f62
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Explicitly rather than initializing QString directly from char*.
Change-Id: I2148fd914a6eed5e887d50da0ef6d66a9d02678f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
QString::SkipEmptyParts -> Qt::SkipEmptyParts
Change-Id: I4e149735361f42322a977c49917873a18a86b7b3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
No need to scroll horizontally if the diagram fits.
Change-Id: I9b5cbd4c13af42b9db2e7e50e9ca4f40b5971730
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now you can simply view the diagram QML with the qml runtime.
The module is now renamed to Qt.labs.UmlQuick, with the Sequence
(MessageTrace) diagram components being in Qt.labs.UmlQuick.Sequence
and the trace instrumentation being in Qt.labs.UmlQuick.Trace.
The diagram in UML terminology is called simply a Sequence diagram,
whereas the act of generating one is to trace messages.
Change-Id: I4d7db9eecc32af8b57c2c4242bb7d4568b777e28
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there are multiple tracepoints, it happens quite often that the
most recent backtrace contains the backtrace that we already captured
in handling the previous tracepoint. If the time difference is small
enough and we find such a duplicated sequence of methods, don't repeat
the Message output in the trace QML: pick up where the previous trace
left off.
Change-Id: I32f47430ab44fd7570569e0f347784d23197a3bc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
A utility to be instantiated in the application-under-test, which will
install itself as the message handler, parse the output of the requested
logging categories for tracing, and generate a message trace in QML.
Change-Id: I3961c27d00ecead5a1204cb2f6928af4f9da26aa
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
Also a Quit shortcut, and better zooming behavior, and some simplification.
Change-Id: I6a14639c0c555692e862298815c719008a4e9668
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
We used to think that qml ought to always be BSD. But now following
the example of the QtQuick Controls 2 project. The date and
Digia -> Qt Company needed to be updated anyway.
Change-Id: I487fe4b1ce093abef2902ff7bcf087a43ff7f5fd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
try ./uq examples/flickable.qml
Change-Id: Id684edaf55155fcd32fc535f16f3145d945a2697
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
|
|
|