33QQmlDebugService::QQmlDebugService(
const QString &name,
float version, QObject *parent)
34 : QObject(*(
new QQmlDebugServicePrivate(name, version)), parent)
36 Q_D(QQmlDebugService);
37 QQmlDebugConnector *server = QQmlDebugConnector::instance();
42 if (server->service(d->name)) {
43 qWarning() <<
"QQmlDebugService: Conflicting plugin name" << d->name;
45 server->addService(d->name,
this);
117int QQmlDebugService::idForObject(QObject *object)
122 ObjectReferenceHash *hash = objectReferenceHash();
123 auto iter = hash->objects.constFind(object);
125 if (iter == hash->objects.cend()) {
126 int id = hash->nextId++;
127 hash->ids.insert(id, object);
128 iter = hash->objects.insert(object, id);
129 connect(object, &QObject::destroyed, hash, &ObjectReferenceHash::remove);