|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
An in-process client of the QML engine debug service (design 0022, step 2a). More...
#include <QtCore/QList>#include <QtCore/QObject>#include <QtCore/QString>#include <QtCore/QUrl>#include <QtCore/QVariant>#include <functional>Go to the source code of this file.
Classes | |
| struct | Sonde::QmlDebug::ServiceProperty |
| A property as the engine debug service reports it. More... | |
| struct | Sonde::QmlDebug::ServiceObject |
| An object as the engine debug service reports it. More... | |
Namespaces | |
| namespace | Sonde |
| Embeddable Model Context Protocol server for Qt applications. | |
Typedefs | |
| using | Sonde::QmlDebug::FetchCallback = std::function<void(const ServiceObject *object, const QString &error)> |
| Called with the object (properties included), or nullptr and why not. | |
Functions | |
| void | Sonde::QmlDebug::start () |
| Turns on QML debugging, with only the engine debug service, connected to a local socket Sonde opened itself. | |
| bool | Sonde::QmlDebug::isAvailable () |
| Whether the engine debug service is connected and answering. | |
| QString | Sonde::QmlDebug::status () |
| What binding inspection through the service can do now, for app_info and qml_binding: "available", or why not. | |
| void | Sonde::QmlDebug::fetchProperties (QObject *object, QObject *context, const FetchCallback &done) |
Asks the service for object and its properties, each with whether it is bound now. | |
An in-process client of the QML engine debug service (design 0022, step 2a).
| void Sonde::QmlDebug::fetchProperties | ( | QObject * | object, |
| QObject * | context, | ||
| const FetchCallback & | done ) |
Asks the service for object and its properties, each with whether it is bound now.
Answers later, on the main thread, through done, unless context is destroyed first. The service names objects by ids of its own; object is matched to one by its objectName, QML id and parents, and by its position among its parent's children when siblings look the same.
| void Sonde::QmlDebug::start | ( | ) |
Turns on QML debugging, with only the engine debug service, connected to a local socket Sonde opened itself.
Does nothing after the first call.
Must run before the first QQmlEngine is created: the service doesn't learn about engines created earlier. It is off when SONDE_QML_DEBUG is 0, when the application was started with -qmljsdebugger (Qt Creator's QML debugger, which takes the process's only debug connector), and when Qt was built without QML debugging. status() says which.