Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
Sonde::QmlDebug::anonymous_namespace{qmldebugclient.cpp} Namespace Reference

Classes

class  Client
 The client: the socket, the handshake, and the queries in flight. More...
class  Lookup
 Finds an object's debug id, then fetches it with its properties. More...

Functions

QString serverId ()
 The control channel's name, client to server.
QString clientId ()
 The control channel's name, server to client.
QString serviceName ()
 The engine debug service's name.
void readObjectData (QDataStream &ds, ServiceObject *o)
 Reads one object's own data (no children, no properties).
void readObject (QDataStream &ds, ServiceObject *o, QList< ServiceObject > *children)
 Reads an object as FETCH_OBJECT_R sends it: its data, its children (only their data: fetches don't recurse) and its properties.
void readContext (QDataStream &ds, QList< ServiceObject > *objects, int depth=0)
 Reads a context as LIST_OBJECTS_R sends it, adding every object in it, and in its child contexts, to objects.
QString qmlId (const QObject *object)
 The QML id of object, or an empty string.
int serviceChildIndex (const QObject *object)
 The position of object among its parent's children, as the service counts them (it leaves out QQmlContext children), or -1.
Client & client ()
 The process-wide client, created on first use. Main thread only.
QHash< QObject *, std::pair< QPointer< QObject >, int > > & knownIds ()
 Debug ids already found, by object: they stay the same while the object lives.
bool isComponentRoot (const QObject *object)
 Whether object is the root of a component instance: those are the objects the service lists (LIST_OBJECTS), each the context object of its own context.
bool sameValues (const ServiceObject &entry, const QObject *object)
 Whether the simple property values the service sent for entry are object's.

Variables

constexpr int kConnectTimeoutMs = 5000
 How long the connector may take to connect.
constexpr int kQueryTimeoutMs = 5000
 How long an answer may take.
constexpr qint32 kProtocolVersion = 1
 The debug protocol's version.
constexpr qint32 kSignalProperty = 4
 The service's property type for signal handlers.

Function Documentation

◆ sameValues()

bool Sonde::QmlDebug::anonymous_namespace{qmldebugclient.cpp}::sameValues ( const ServiceObject & entry,
const QObject * object )

Whether the simple property values the service sent for entry are object's.

Tells apart component instances that look the same by name, id and file (delegates). Only values the service sent as they are count: it sends an object property as the object's name, for example.