1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the QtQml module of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
42 #include "qqmlenginedebug_p.h"
44 #include "qqmldebugclient.h"
46 #include <private/qqmlenginedebugservice_p.h>
48 #include <QtCore/private/qobject_p.h>
50 class QQmlEngineDebugClient : public QQmlDebugClient
53 QQmlEngineDebugClient(QQmlDebugConnection *client, QQmlEngineDebugPrivate *p);
56 virtual void stateChanged(State state);
57 virtual void messageReceived(const QByteArray &);
60 QQmlEngineDebugPrivate *priv;
61 friend class QQmlEngineDebugPrivate;
64 class QQmlEngineDebugPrivate : public QObjectPrivate
66 Q_DECLARE_PUBLIC(QQmlEngineDebug)
68 QQmlEngineDebugPrivate(QQmlDebugConnection *);
69 ~QQmlEngineDebugPrivate();
71 void stateChanged(QQmlEngineDebug::State status);
72 void message(const QByteArray &);
74 QQmlEngineDebugClient *client;
78 void decode(QDataStream &, QQmlDebugContextReference &);
79 void decode(QDataStream &, QQmlDebugObjectReference &, bool simple);
81 static void remove(QQmlEngineDebug *, QQmlDebugEnginesQuery *);
82 static void remove(QQmlEngineDebug *, QQmlDebugRootContextQuery *);
83 static void remove(QQmlEngineDebug *, QQmlDebugObjectQuery *);
84 static void remove(QQmlEngineDebug *, QQmlDebugExpressionQuery *);
85 static void remove(QQmlEngineDebug *, QQmlDebugWatch *);
87 QHash<int, QQmlDebugEnginesQuery *> enginesQuery;
88 QHash<int, QQmlDebugRootContextQuery *> rootContextQuery;
89 QHash<int, QQmlDebugObjectQuery *> objectQuery;
90 QHash<int, QQmlDebugExpressionQuery *> expressionQuery;
92 QHash<int, QQmlDebugWatch *> watched;
95 QQmlEngineDebugClient::QQmlEngineDebugClient(QQmlDebugConnection *client,
96 QQmlEngineDebugPrivate *p)
97 : QQmlDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p)
101 void QQmlEngineDebugClient::stateChanged(State status)
104 priv->stateChanged(static_cast<QQmlEngineDebug::State>(status));
107 void QQmlEngineDebugClient::messageReceived(const QByteArray &data)
113 QQmlEngineDebugPrivate::QQmlEngineDebugPrivate(QQmlDebugConnection *c)
114 : client(new QQmlEngineDebugClient(c, this)), nextId(0)
118 QQmlEngineDebugPrivate::~QQmlEngineDebugPrivate()
124 QHash<int, QQmlDebugEnginesQuery*>::iterator enginesIter = enginesQuery.begin();
125 for (; enginesIter != enginesQuery.end(); ++enginesIter) {
126 enginesIter.value()->m_client = 0;
127 if (enginesIter.value()->state() == QQmlDebugQuery::Waiting)
128 enginesIter.value()->setState(QQmlDebugQuery::Error);
131 QHash<int, QQmlDebugRootContextQuery*>::iterator rootContextIter = rootContextQuery.begin();
132 for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) {
133 rootContextIter.value()->m_client = 0;
134 if (rootContextIter.value()->state() == QQmlDebugQuery::Waiting)
135 rootContextIter.value()->setState(QQmlDebugQuery::Error);
138 QHash<int, QQmlDebugObjectQuery*>::iterator objectIter = objectQuery.begin();
139 for (; objectIter != objectQuery.end(); ++objectIter) {
140 objectIter.value()->m_client = 0;
141 if (objectIter.value()->state() == QQmlDebugQuery::Waiting)
142 objectIter.value()->setState(QQmlDebugQuery::Error);
145 QHash<int, QQmlDebugExpressionQuery*>::iterator exprIter = expressionQuery.begin();
146 for (; exprIter != expressionQuery.end(); ++exprIter) {
147 exprIter.value()->m_client = 0;
148 if (exprIter.value()->state() == QQmlDebugQuery::Waiting)
149 exprIter.value()->setState(QQmlDebugQuery::Error);
152 QHash<int, QQmlDebugWatch*>::iterator watchIter = watched.begin();
153 for (; watchIter != watched.end(); ++watchIter) {
154 watchIter.value()->m_client = 0;
155 watchIter.value()->setState(QQmlDebugWatch::Dead);
159 int QQmlEngineDebugPrivate::getId()
164 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugEnginesQuery *q)
167 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
168 p->enginesQuery.remove(q->m_queryId);
172 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c,
173 QQmlDebugRootContextQuery *q)
176 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
177 p->rootContextQuery.remove(q->m_queryId);
181 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugObjectQuery *q)
184 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
185 p->objectQuery.remove(q->m_queryId);
189 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugExpressionQuery *q)
192 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
193 p->expressionQuery.remove(q->m_queryId);
197 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugWatch *w)
200 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
201 p->watched.remove(w->m_queryId);
205 void QQmlEngineDebugPrivate::decode(QDataStream &ds, QQmlDebugObjectReference &o,
208 QQmlEngineDebugService::QQmlObjectData data;
210 o.m_debugId = data.objectId;
211 o.m_class = data.objectType;
212 o.m_idString = data.idString;
213 o.m_name = data.objectName;
214 o.m_source.m_url = data.url;
215 o.m_source.m_lineNumber = data.lineNumber;
216 o.m_source.m_columnNumber = data.columnNumber;
217 o.m_contextDebugId = data.contextId;
224 ds >> childCount >> recur;
226 for (int ii = 0; ii < childCount; ++ii) {
227 o.m_children.append(QQmlDebugObjectReference());
228 decode(ds, o.m_children.last(), !recur);
234 for (int ii = 0; ii < propCount; ++ii) {
235 QQmlEngineDebugService::QQmlObjectProperty data;
237 QQmlDebugPropertyReference prop;
238 prop.m_objectDebugId = o.m_debugId;
239 prop.m_name = data.name;
240 prop.m_binding = data.binding;
241 prop.m_hasNotifySignal = data.hasNotifySignal;
242 prop.m_valueTypeName = data.valueTypeName;
244 case QQmlEngineDebugService::QQmlObjectProperty::Basic:
245 case QQmlEngineDebugService::QQmlObjectProperty::List:
246 case QQmlEngineDebugService::QQmlObjectProperty::SignalProperty:
248 prop.m_value = data.value;
251 case QQmlEngineDebugService::QQmlObjectProperty::Object:
253 QQmlDebugObjectReference obj;
254 obj.m_debugId = prop.m_value.toInt();
255 prop.m_value = QVariant::fromValue(obj);
258 case QQmlEngineDebugService::QQmlObjectProperty::Unknown:
261 o.m_properties << prop;
265 void QQmlEngineDebugPrivate::decode(QDataStream &ds, QQmlDebugContextReference &c)
267 ds >> c.m_name >> c.m_debugId;
272 for (int ii = 0; ii < contextCount; ++ii) {
273 c.m_contexts.append(QQmlDebugContextReference());
274 decode(ds, c.m_contexts.last());
280 for (int ii = 0; ii < objectCount; ++ii) {
281 QQmlDebugObjectReference obj;
282 decode(ds, obj, true);
284 obj.m_contextDebugId = c.m_debugId;
289 void QQmlEngineDebugPrivate::stateChanged(QQmlEngineDebug::State status)
291 emit q_func()->stateChanged(status);
294 void QQmlEngineDebugPrivate::message(const QByteArray &data)
296 QDataStream ds(data);
301 //qDebug() << "QQmlEngineDebugPrivate::message()" << type;
303 if (type == "LIST_ENGINES_R") {
307 QQmlDebugEnginesQuery *query = enginesQuery.value(queryId);
310 enginesQuery.remove(queryId);
315 for (int ii = 0; ii < count; ++ii) {
316 QQmlDebugEngineReference ref;
319 query->m_engines << ref;
323 query->setState(QQmlDebugQuery::Completed);
324 } else if (type == "LIST_OBJECTS_R") {
328 QQmlDebugRootContextQuery *query = rootContextQuery.value(queryId);
331 rootContextQuery.remove(queryId);
334 decode(ds, query->m_context);
337 query->setState(QQmlDebugQuery::Completed);
338 } else if (type == "FETCH_OBJECT_R") {
342 QQmlDebugObjectQuery *query = objectQuery.value(queryId);
345 objectQuery.remove(queryId);
348 decode(ds, query->m_object, false);
351 query->setState(QQmlDebugQuery::Completed);
352 } else if (type == "EVAL_EXPRESSION_R") {
355 ds >> queryId >> result;
357 QQmlDebugExpressionQuery *query = expressionQuery.value(queryId);
360 expressionQuery.remove(queryId);
362 query->m_result = result;
364 query->setState(QQmlDebugQuery::Completed);
365 } else if (type == "WATCH_PROPERTY_R") {
370 QQmlDebugWatch *watch = watched.value(queryId);
374 watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive);
375 } else if (type == "WATCH_OBJECT_R") {
380 QQmlDebugWatch *watch = watched.value(queryId);
384 watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive);
385 } else if (type == "WATCH_EXPR_OBJECT_R") {
390 QQmlDebugWatch *watch = watched.value(queryId);
394 watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive);
395 } else if (type == "UPDATE_WATCH") {
400 ds >> queryId >> debugId >> name >> value;
402 QQmlDebugWatch *watch = watched.value(queryId, 0);
405 emit watch->valueChanged(name, value);
406 } else if (type == "OBJECT_CREATED") {
407 emit q_func()->newObjects();
411 QQmlEngineDebug::QQmlEngineDebug(QQmlDebugConnection *client, QObject *parent)
412 : QObject(*(new QQmlEngineDebugPrivate(client)), parent)
416 QQmlEngineDebug::~QQmlEngineDebug()
420 QQmlEngineDebug::State QQmlEngineDebug::state() const
422 Q_D(const QQmlEngineDebug);
424 return static_cast<QQmlEngineDebug::State>(d->client->state());
427 QQmlDebugPropertyWatch *QQmlEngineDebug::addWatch(const QQmlDebugPropertyReference &property, QObject *parent)
429 Q_D(QQmlEngineDebug);
431 QQmlDebugPropertyWatch *watch = new QQmlDebugPropertyWatch(parent);
432 if (d->client->state() == QQmlDebugClient::Enabled) {
433 int queryId = d->getId();
434 watch->m_queryId = queryId;
435 watch->m_client = this;
436 watch->m_objectDebugId = property.objectDebugId();
437 watch->m_name = property.name();
438 d->watched.insert(queryId, watch);
441 QDataStream ds(&message, QIODevice::WriteOnly);
442 ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8();
443 d->client->sendMessage(message);
445 watch->m_state = QQmlDebugWatch::Dead;
451 QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugContextReference &, const QString &, QObject *)
453 qWarning("QQmlEngineDebug::addWatch(): Not implemented");
457 QQmlDebugObjectExpressionWatch *QQmlEngineDebug::addWatch(const QQmlDebugObjectReference &object, const QString &expr, QObject *parent)
459 Q_D(QQmlEngineDebug);
460 QQmlDebugObjectExpressionWatch *watch = new QQmlDebugObjectExpressionWatch(parent);
461 if (d->client->state() == QQmlDebugClient::Enabled) {
462 int queryId = d->getId();
463 watch->m_queryId = queryId;
464 watch->m_client = this;
465 watch->m_objectDebugId = object.debugId();
466 watch->m_expr = expr;
467 d->watched.insert(queryId, watch);
470 QDataStream ds(&message, QIODevice::WriteOnly);
471 ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr;
472 d->client->sendMessage(message);
474 watch->m_state = QQmlDebugWatch::Dead;
479 QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugObjectReference &object, QObject *parent)
481 Q_D(QQmlEngineDebug);
483 QQmlDebugWatch *watch = new QQmlDebugWatch(parent);
484 if (d->client->state() == QQmlDebugClient::Enabled) {
485 int queryId = d->getId();
486 watch->m_queryId = queryId;
487 watch->m_client = this;
488 watch->m_objectDebugId = object.debugId();
489 d->watched.insert(queryId, watch);
492 QDataStream ds(&message, QIODevice::WriteOnly);
493 ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId();
494 d->client->sendMessage(message);
496 watch->m_state = QQmlDebugWatch::Dead;
502 QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugFileReference &, QObject *)
504 qWarning("QQmlEngineDebug::addWatch(): Not implemented");
508 void QQmlEngineDebug::removeWatch(QQmlDebugWatch *watch)
510 Q_D(QQmlEngineDebug);
512 if (!watch || !watch->m_client)
516 watch->setState(QQmlDebugWatch::Inactive);
518 d->watched.remove(watch->queryId());
520 if (d->client && d->client->state() == QQmlDebugClient::Enabled) {
522 QDataStream ds(&message, QIODevice::WriteOnly);
523 ds << QByteArray("NO_WATCH") << watch->queryId();
524 d->client->sendMessage(message);
528 QQmlDebugEnginesQuery *QQmlEngineDebug::queryAvailableEngines(QObject *parent)
530 Q_D(QQmlEngineDebug);
532 QQmlDebugEnginesQuery *query = new QQmlDebugEnginesQuery(parent);
533 if (d->client->state() == QQmlDebugClient::Enabled) {
534 query->m_client = this;
535 int queryId = d->getId();
536 query->m_queryId = queryId;
537 d->enginesQuery.insert(queryId, query);
540 QDataStream ds(&message, QIODevice::WriteOnly);
541 ds << QByteArray("LIST_ENGINES") << queryId;
542 d->client->sendMessage(message);
544 query->m_state = QQmlDebugQuery::Error;
550 QQmlDebugRootContextQuery *QQmlEngineDebug::queryRootContexts(const QQmlDebugEngineReference &engine, QObject *parent)
552 Q_D(QQmlEngineDebug);
554 QQmlDebugRootContextQuery *query = new QQmlDebugRootContextQuery(parent);
555 if (d->client->state() == QQmlDebugClient::Enabled && engine.debugId() != -1) {
556 query->m_client = this;
557 int queryId = d->getId();
558 query->m_queryId = queryId;
559 d->rootContextQuery.insert(queryId, query);
562 QDataStream ds(&message, QIODevice::WriteOnly);
563 ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId();
564 d->client->sendMessage(message);
566 query->m_state = QQmlDebugQuery::Error;
572 QQmlDebugObjectQuery *QQmlEngineDebug::queryObject(const QQmlDebugObjectReference &object, QObject *parent)
574 Q_D(QQmlEngineDebug);
576 QQmlDebugObjectQuery *query = new QQmlDebugObjectQuery(parent);
577 if (d->client->state() == QQmlDebugClient::Enabled && object.debugId() != -1) {
578 query->m_client = this;
579 int queryId = d->getId();
580 query->m_queryId = queryId;
581 d->objectQuery.insert(queryId, query);
584 QDataStream ds(&message, QIODevice::WriteOnly);
585 ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
587 d->client->sendMessage(message);
589 query->m_state = QQmlDebugQuery::Error;
595 QQmlDebugObjectQuery *QQmlEngineDebug::queryObjectRecursive(const QQmlDebugObjectReference &object, QObject *parent)
597 Q_D(QQmlEngineDebug);
599 QQmlDebugObjectQuery *query = new QQmlDebugObjectQuery(parent);
600 if (d->client->state() == QQmlDebugClient::Enabled && object.debugId() != -1) {
601 query->m_client = this;
602 int queryId = d->getId();
603 query->m_queryId = queryId;
604 d->objectQuery.insert(queryId, query);
607 QDataStream ds(&message, QIODevice::WriteOnly);
608 ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
610 d->client->sendMessage(message);
612 query->m_state = QQmlDebugQuery::Error;
618 QQmlDebugExpressionQuery *QQmlEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
620 Q_D(QQmlEngineDebug);
622 QQmlDebugExpressionQuery *query = new QQmlDebugExpressionQuery(parent);
623 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
624 query->m_client = this;
625 query->m_expr = expr;
626 int queryId = d->getId();
627 query->m_queryId = queryId;
628 d->expressionQuery.insert(queryId, query);
631 QDataStream ds(&message, QIODevice::WriteOnly);
632 ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr;
633 d->client->sendMessage(message);
635 query->m_state = QQmlDebugQuery::Error;
641 bool QQmlEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName,
642 const QVariant &bindingExpression,
644 QString source, int line)
646 Q_D(QQmlEngineDebug);
648 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
650 QDataStream ds(&message, QIODevice::WriteOnly);
651 ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line;
652 d->client->sendMessage(message);
659 bool QQmlEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName)
661 Q_D(QQmlEngineDebug);
663 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
665 QDataStream ds(&message, QIODevice::WriteOnly);
666 ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName;
667 d->client->sendMessage(message);
674 bool QQmlEngineDebug::setMethodBody(int objectDebugId, const QString &methodName,
675 const QString &methodBody)
677 Q_D(QQmlEngineDebug);
679 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
681 QDataStream ds(&message, QIODevice::WriteOnly);
682 ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody;
683 d->client->sendMessage(message);
690 QQmlDebugWatch::QQmlDebugWatch(QObject *parent)
691 : QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1)
695 QQmlDebugWatch::~QQmlDebugWatch()
697 if (m_client && m_queryId != -1)
698 QQmlEngineDebugPrivate::remove(m_client, this);
701 int QQmlDebugWatch::queryId() const
706 int QQmlDebugWatch::objectDebugId() const
708 return m_objectDebugId;
711 QQmlDebugWatch::State QQmlDebugWatch::state() const
716 void QQmlDebugWatch::setState(State s)
721 emit stateChanged(m_state);
724 QQmlDebugPropertyWatch::QQmlDebugPropertyWatch(QObject *parent)
725 : QQmlDebugWatch(parent)
729 QString QQmlDebugPropertyWatch::name() const
735 QQmlDebugObjectExpressionWatch::QQmlDebugObjectExpressionWatch(QObject *parent)
736 : QQmlDebugWatch(parent)
740 QString QQmlDebugObjectExpressionWatch::expression() const
746 QQmlDebugQuery::QQmlDebugQuery(QObject *parent)
747 : QObject(parent), m_state(Waiting)
751 QQmlDebugQuery::State QQmlDebugQuery::state() const
756 bool QQmlDebugQuery::isWaiting() const
758 return m_state == Waiting;
761 void QQmlDebugQuery::setState(State s)
766 emit stateChanged(m_state);
769 QQmlDebugEnginesQuery::QQmlDebugEnginesQuery(QObject *parent)
770 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
774 QQmlDebugEnginesQuery::~QQmlDebugEnginesQuery()
776 if (m_client && m_queryId != -1)
777 QQmlEngineDebugPrivate::remove(m_client, this);
780 QList<QQmlDebugEngineReference> QQmlDebugEnginesQuery::engines() const
785 QQmlDebugRootContextQuery::QQmlDebugRootContextQuery(QObject *parent)
786 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
790 QQmlDebugRootContextQuery::~QQmlDebugRootContextQuery()
792 if (m_client && m_queryId != -1)
793 QQmlEngineDebugPrivate::remove(m_client, this);
796 QQmlDebugContextReference QQmlDebugRootContextQuery::rootContext() const
801 QQmlDebugObjectQuery::QQmlDebugObjectQuery(QObject *parent)
802 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
806 QQmlDebugObjectQuery::~QQmlDebugObjectQuery()
808 if (m_client && m_queryId != -1)
809 QQmlEngineDebugPrivate::remove(m_client, this);
812 QQmlDebugObjectReference QQmlDebugObjectQuery::object() const
817 QQmlDebugExpressionQuery::QQmlDebugExpressionQuery(QObject *parent)
818 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
822 QQmlDebugExpressionQuery::~QQmlDebugExpressionQuery()
824 if (m_client && m_queryId != -1)
825 QQmlEngineDebugPrivate::remove(m_client, this);
828 QVariant QQmlDebugExpressionQuery::expression() const
833 QVariant QQmlDebugExpressionQuery::result() const
838 QQmlDebugEngineReference::QQmlDebugEngineReference()
843 QQmlDebugEngineReference::QQmlDebugEngineReference(int debugId)
848 QQmlDebugEngineReference::QQmlDebugEngineReference(const QQmlDebugEngineReference &o)
849 : m_debugId(o.m_debugId), m_name(o.m_name)
853 QQmlDebugEngineReference &
854 QQmlDebugEngineReference::operator=(const QQmlDebugEngineReference &o)
856 m_debugId = o.m_debugId; m_name = o.m_name;
860 int QQmlDebugEngineReference::debugId() const
865 QString QQmlDebugEngineReference::name() const
870 QQmlDebugObjectReference::QQmlDebugObjectReference()
871 : m_debugId(-1), m_contextDebugId(-1)
875 QQmlDebugObjectReference::QQmlDebugObjectReference(int debugId)
876 : m_debugId(debugId), m_contextDebugId(-1)
880 QQmlDebugObjectReference::QQmlDebugObjectReference(const QQmlDebugObjectReference &o)
881 : m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString),
882 m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId),
883 m_properties(o.m_properties), m_children(o.m_children)
887 QQmlDebugObjectReference &
888 QQmlDebugObjectReference::operator=(const QQmlDebugObjectReference &o)
890 m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString;
891 m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId;
892 m_properties = o.m_properties; m_children = o.m_children;
896 int QQmlDebugObjectReference::debugId() const
901 QString QQmlDebugObjectReference::className() const
906 QString QQmlDebugObjectReference::idString() const
911 QString QQmlDebugObjectReference::name() const
916 QQmlDebugFileReference QQmlDebugObjectReference::source() const
921 int QQmlDebugObjectReference::contextDebugId() const
923 return m_contextDebugId;
926 QList<QQmlDebugPropertyReference> QQmlDebugObjectReference::properties() const
931 QList<QQmlDebugObjectReference> QQmlDebugObjectReference::children() const
936 QQmlDebugContextReference::QQmlDebugContextReference()
941 QQmlDebugContextReference::QQmlDebugContextReference(const QQmlDebugContextReference &o)
942 : m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts)
946 QQmlDebugContextReference &QQmlDebugContextReference::operator=(const QQmlDebugContextReference &o)
948 m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects;
949 m_contexts = o.m_contexts;
953 int QQmlDebugContextReference::debugId() const
958 QString QQmlDebugContextReference::name() const
963 QList<QQmlDebugObjectReference> QQmlDebugContextReference::objects() const
968 QList<QQmlDebugContextReference> QQmlDebugContextReference::contexts() const
973 QQmlDebugFileReference::QQmlDebugFileReference()
974 : m_lineNumber(-1), m_columnNumber(-1)
978 QQmlDebugFileReference::QQmlDebugFileReference(const QQmlDebugFileReference &o)
979 : m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber)
983 QQmlDebugFileReference &QQmlDebugFileReference::operator=(const QQmlDebugFileReference &o)
985 m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber;
989 QUrl QQmlDebugFileReference::url() const
994 void QQmlDebugFileReference::setUrl(const QUrl &u)
999 int QQmlDebugFileReference::lineNumber() const
1001 return m_lineNumber;
1004 void QQmlDebugFileReference::setLineNumber(int l)
1009 int QQmlDebugFileReference::columnNumber() const
1011 return m_columnNumber;
1014 void QQmlDebugFileReference::setColumnNumber(int c)
1019 QQmlDebugPropertyReference::QQmlDebugPropertyReference()
1020 : m_objectDebugId(-1), m_hasNotifySignal(false)
1024 QQmlDebugPropertyReference::QQmlDebugPropertyReference(const QQmlDebugPropertyReference &o)
1025 : m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value),
1026 m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding),
1027 m_hasNotifySignal(o.m_hasNotifySignal)
1031 QQmlDebugPropertyReference &QQmlDebugPropertyReference::operator=(const QQmlDebugPropertyReference &o)
1033 m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value;
1034 m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding;
1035 m_hasNotifySignal = o.m_hasNotifySignal;
1039 int QQmlDebugPropertyReference::objectDebugId() const
1041 return m_objectDebugId;
1044 QString QQmlDebugPropertyReference::name() const
1049 QString QQmlDebugPropertyReference::valueTypeName() const
1051 return m_valueTypeName;
1054 QVariant QQmlDebugPropertyReference::value() const
1059 QString QQmlDebugPropertyReference::binding() const
1064 bool QQmlDebugPropertyReference::hasNotifySignal() const
1066 return m_hasNotifySignal;