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_p.h"
46 #include "qqmlenginedebugservice_p.h"
48 #include <private/qobject_p.h>
52 class QQmlEngineDebugClient : public QQmlDebugClient
55 QQmlEngineDebugClient(QQmlDebugConnection *client, QQmlEngineDebugPrivate *p);
58 virtual void stateChanged(State state);
59 virtual void messageReceived(const QByteArray &);
62 QQmlEngineDebugPrivate *priv;
63 friend class QQmlEngineDebugPrivate;
66 class QQmlEngineDebugPrivate : public QObjectPrivate
68 Q_DECLARE_PUBLIC(QQmlEngineDebug)
70 QQmlEngineDebugPrivate(QQmlDebugConnection *);
71 ~QQmlEngineDebugPrivate();
73 void stateChanged(QQmlEngineDebug::State status);
74 void message(const QByteArray &);
76 QQmlEngineDebugClient *client;
80 void decode(QDataStream &, QQmlDebugContextReference &);
81 void decode(QDataStream &, QQmlDebugObjectReference &, bool simple);
83 static void remove(QQmlEngineDebug *, QQmlDebugEnginesQuery *);
84 static void remove(QQmlEngineDebug *, QQmlDebugRootContextQuery *);
85 static void remove(QQmlEngineDebug *, QQmlDebugObjectQuery *);
86 static void remove(QQmlEngineDebug *, QQmlDebugExpressionQuery *);
87 static void remove(QQmlEngineDebug *, QQmlDebugWatch *);
89 QHash<int, QQmlDebugEnginesQuery *> enginesQuery;
90 QHash<int, QQmlDebugRootContextQuery *> rootContextQuery;
91 QHash<int, QQmlDebugObjectQuery *> objectQuery;
92 QHash<int, QQmlDebugExpressionQuery *> expressionQuery;
94 QHash<int, QQmlDebugWatch *> watched;
97 QQmlEngineDebugClient::QQmlEngineDebugClient(QQmlDebugConnection *client,
98 QQmlEngineDebugPrivate *p)
99 : QQmlDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p)
103 void QQmlEngineDebugClient::stateChanged(State status)
106 priv->stateChanged(static_cast<QQmlEngineDebug::State>(status));
109 void QQmlEngineDebugClient::messageReceived(const QByteArray &data)
115 QQmlEngineDebugPrivate::QQmlEngineDebugPrivate(QQmlDebugConnection *c)
116 : client(new QQmlEngineDebugClient(c, this)), nextId(0)
120 QQmlEngineDebugPrivate::~QQmlEngineDebugPrivate()
126 QHash<int, QQmlDebugEnginesQuery*>::iterator enginesIter = enginesQuery.begin();
127 for (; enginesIter != enginesQuery.end(); ++enginesIter) {
128 enginesIter.value()->m_client = 0;
129 if (enginesIter.value()->state() == QQmlDebugQuery::Waiting)
130 enginesIter.value()->setState(QQmlDebugQuery::Error);
133 QHash<int, QQmlDebugRootContextQuery*>::iterator rootContextIter = rootContextQuery.begin();
134 for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) {
135 rootContextIter.value()->m_client = 0;
136 if (rootContextIter.value()->state() == QQmlDebugQuery::Waiting)
137 rootContextIter.value()->setState(QQmlDebugQuery::Error);
140 QHash<int, QQmlDebugObjectQuery*>::iterator objectIter = objectQuery.begin();
141 for (; objectIter != objectQuery.end(); ++objectIter) {
142 objectIter.value()->m_client = 0;
143 if (objectIter.value()->state() == QQmlDebugQuery::Waiting)
144 objectIter.value()->setState(QQmlDebugQuery::Error);
147 QHash<int, QQmlDebugExpressionQuery*>::iterator exprIter = expressionQuery.begin();
148 for (; exprIter != expressionQuery.end(); ++exprIter) {
149 exprIter.value()->m_client = 0;
150 if (exprIter.value()->state() == QQmlDebugQuery::Waiting)
151 exprIter.value()->setState(QQmlDebugQuery::Error);
154 QHash<int, QQmlDebugWatch*>::iterator watchIter = watched.begin();
155 for (; watchIter != watched.end(); ++watchIter) {
156 watchIter.value()->m_client = 0;
157 watchIter.value()->setState(QQmlDebugWatch::Dead);
161 int QQmlEngineDebugPrivate::getId()
166 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugEnginesQuery *q)
169 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
170 p->enginesQuery.remove(q->m_queryId);
174 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c,
175 QQmlDebugRootContextQuery *q)
178 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
179 p->rootContextQuery.remove(q->m_queryId);
183 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugObjectQuery *q)
186 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
187 p->objectQuery.remove(q->m_queryId);
191 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugExpressionQuery *q)
194 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
195 p->expressionQuery.remove(q->m_queryId);
199 void QQmlEngineDebugPrivate::remove(QQmlEngineDebug *c, QQmlDebugWatch *w)
202 QQmlEngineDebugPrivate *p = (QQmlEngineDebugPrivate *)QObjectPrivate::get(c);
203 p->watched.remove(w->m_queryId);
207 void QQmlEngineDebugPrivate::decode(QDataStream &ds, QQmlDebugObjectReference &o,
210 QQmlEngineDebugService::QQmlObjectData data;
212 o.m_debugId = data.objectId;
213 o.m_class = data.objectType;
214 o.m_idString = data.idString;
215 o.m_name = data.objectName;
216 o.m_source.m_url = data.url;
217 o.m_source.m_lineNumber = data.lineNumber;
218 o.m_source.m_columnNumber = data.columnNumber;
219 o.m_contextDebugId = data.contextId;
226 ds >> childCount >> recur;
228 for (int ii = 0; ii < childCount; ++ii) {
229 o.m_children.append(QQmlDebugObjectReference());
230 decode(ds, o.m_children.last(), !recur);
236 for (int ii = 0; ii < propCount; ++ii) {
237 QQmlEngineDebugService::QQmlObjectProperty data;
239 QQmlDebugPropertyReference prop;
240 prop.m_objectDebugId = o.m_debugId;
241 prop.m_name = data.name;
242 prop.m_binding = data.binding;
243 prop.m_hasNotifySignal = data.hasNotifySignal;
244 prop.m_valueTypeName = data.valueTypeName;
246 case QQmlEngineDebugService::QQmlObjectProperty::Basic:
247 case QQmlEngineDebugService::QQmlObjectProperty::List:
248 case QQmlEngineDebugService::QQmlObjectProperty::SignalProperty:
250 prop.m_value = data.value;
253 case QQmlEngineDebugService::QQmlObjectProperty::Object:
255 QQmlDebugObjectReference obj;
256 obj.m_debugId = prop.m_value.toInt();
257 prop.m_value = QVariant::fromValue(obj);
260 case QQmlEngineDebugService::QQmlObjectProperty::Unknown:
263 o.m_properties << prop;
267 void QQmlEngineDebugPrivate::decode(QDataStream &ds, QQmlDebugContextReference &c)
269 ds >> c.m_name >> c.m_debugId;
274 for (int ii = 0; ii < contextCount; ++ii) {
275 c.m_contexts.append(QQmlDebugContextReference());
276 decode(ds, c.m_contexts.last());
282 for (int ii = 0; ii < objectCount; ++ii) {
283 QQmlDebugObjectReference obj;
284 decode(ds, obj, true);
286 obj.m_contextDebugId = c.m_debugId;
291 void QQmlEngineDebugPrivate::stateChanged(QQmlEngineDebug::State status)
293 emit q_func()->stateChanged(status);
296 void QQmlEngineDebugPrivate::message(const QByteArray &data)
298 QDataStream ds(data);
303 //qDebug() << "QQmlEngineDebugPrivate::message()" << type;
305 if (type == "LIST_ENGINES_R") {
309 QQmlDebugEnginesQuery *query = enginesQuery.value(queryId);
312 enginesQuery.remove(queryId);
317 for (int ii = 0; ii < count; ++ii) {
318 QQmlDebugEngineReference ref;
321 query->m_engines << ref;
325 query->setState(QQmlDebugQuery::Completed);
326 } else if (type == "LIST_OBJECTS_R") {
330 QQmlDebugRootContextQuery *query = rootContextQuery.value(queryId);
333 rootContextQuery.remove(queryId);
336 decode(ds, query->m_context);
339 query->setState(QQmlDebugQuery::Completed);
340 } else if (type == "FETCH_OBJECT_R") {
344 QQmlDebugObjectQuery *query = objectQuery.value(queryId);
347 objectQuery.remove(queryId);
350 decode(ds, query->m_object, false);
353 query->setState(QQmlDebugQuery::Completed);
354 } else if (type == "EVAL_EXPRESSION_R") {
357 ds >> queryId >> result;
359 QQmlDebugExpressionQuery *query = expressionQuery.value(queryId);
362 expressionQuery.remove(queryId);
364 query->m_result = result;
366 query->setState(QQmlDebugQuery::Completed);
367 } else if (type == "WATCH_PROPERTY_R") {
372 QQmlDebugWatch *watch = watched.value(queryId);
376 watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive);
377 } else if (type == "WATCH_OBJECT_R") {
382 QQmlDebugWatch *watch = watched.value(queryId);
386 watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive);
387 } else if (type == "WATCH_EXPR_OBJECT_R") {
392 QQmlDebugWatch *watch = watched.value(queryId);
396 watch->setState(ok ? QQmlDebugWatch::Active : QQmlDebugWatch::Inactive);
397 } else if (type == "UPDATE_WATCH") {
402 ds >> queryId >> debugId >> name >> value;
404 QQmlDebugWatch *watch = watched.value(queryId, 0);
407 emit watch->valueChanged(name, value);
408 } else if (type == "OBJECT_CREATED") {
409 emit q_func()->newObjects();
413 QQmlEngineDebug::QQmlEngineDebug(QQmlDebugConnection *client, QObject *parent)
414 : QObject(*(new QQmlEngineDebugPrivate(client)), parent)
418 QQmlEngineDebug::~QQmlEngineDebug()
422 QQmlEngineDebug::State QQmlEngineDebug::state() const
424 Q_D(const QQmlEngineDebug);
426 return static_cast<QQmlEngineDebug::State>(d->client->state());
429 QQmlDebugPropertyWatch *QQmlEngineDebug::addWatch(const QQmlDebugPropertyReference &property, QObject *parent)
431 Q_D(QQmlEngineDebug);
433 QQmlDebugPropertyWatch *watch = new QQmlDebugPropertyWatch(parent);
434 if (d->client->state() == QQmlDebugClient::Enabled) {
435 int queryId = d->getId();
436 watch->m_queryId = queryId;
437 watch->m_client = this;
438 watch->m_objectDebugId = property.objectDebugId();
439 watch->m_name = property.name();
440 d->watched.insert(queryId, watch);
443 QDataStream ds(&message, QIODevice::WriteOnly);
444 ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8();
445 d->client->sendMessage(message);
447 watch->m_state = QQmlDebugWatch::Dead;
453 QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugContextReference &, const QString &, QObject *)
455 qWarning("QQmlEngineDebug::addWatch(): Not implemented");
459 QQmlDebugObjectExpressionWatch *QQmlEngineDebug::addWatch(const QQmlDebugObjectReference &object, const QString &expr, QObject *parent)
461 Q_D(QQmlEngineDebug);
462 QQmlDebugObjectExpressionWatch *watch = new QQmlDebugObjectExpressionWatch(parent);
463 if (d->client->state() == QQmlDebugClient::Enabled) {
464 int queryId = d->getId();
465 watch->m_queryId = queryId;
466 watch->m_client = this;
467 watch->m_objectDebugId = object.debugId();
468 watch->m_expr = expr;
469 d->watched.insert(queryId, watch);
472 QDataStream ds(&message, QIODevice::WriteOnly);
473 ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr;
474 d->client->sendMessage(message);
476 watch->m_state = QQmlDebugWatch::Dead;
481 QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugObjectReference &object, QObject *parent)
483 Q_D(QQmlEngineDebug);
485 QQmlDebugWatch *watch = new QQmlDebugWatch(parent);
486 if (d->client->state() == QQmlDebugClient::Enabled) {
487 int queryId = d->getId();
488 watch->m_queryId = queryId;
489 watch->m_client = this;
490 watch->m_objectDebugId = object.debugId();
491 d->watched.insert(queryId, watch);
494 QDataStream ds(&message, QIODevice::WriteOnly);
495 ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId();
496 d->client->sendMessage(message);
498 watch->m_state = QQmlDebugWatch::Dead;
504 QQmlDebugWatch *QQmlEngineDebug::addWatch(const QQmlDebugFileReference &, QObject *)
506 qWarning("QQmlEngineDebug::addWatch(): Not implemented");
510 void QQmlEngineDebug::removeWatch(QQmlDebugWatch *watch)
512 Q_D(QQmlEngineDebug);
514 if (!watch || !watch->m_client)
518 watch->setState(QQmlDebugWatch::Inactive);
520 d->watched.remove(watch->queryId());
522 if (d->client && d->client->state() == QQmlDebugClient::Enabled) {
524 QDataStream ds(&message, QIODevice::WriteOnly);
525 ds << QByteArray("NO_WATCH") << watch->queryId();
526 d->client->sendMessage(message);
530 QQmlDebugEnginesQuery *QQmlEngineDebug::queryAvailableEngines(QObject *parent)
532 Q_D(QQmlEngineDebug);
534 QQmlDebugEnginesQuery *query = new QQmlDebugEnginesQuery(parent);
535 if (d->client->state() == QQmlDebugClient::Enabled) {
536 query->m_client = this;
537 int queryId = d->getId();
538 query->m_queryId = queryId;
539 d->enginesQuery.insert(queryId, query);
542 QDataStream ds(&message, QIODevice::WriteOnly);
543 ds << QByteArray("LIST_ENGINES") << queryId;
544 d->client->sendMessage(message);
546 query->m_state = QQmlDebugQuery::Error;
552 QQmlDebugRootContextQuery *QQmlEngineDebug::queryRootContexts(const QQmlDebugEngineReference &engine, QObject *parent)
554 Q_D(QQmlEngineDebug);
556 QQmlDebugRootContextQuery *query = new QQmlDebugRootContextQuery(parent);
557 if (d->client->state() == QQmlDebugClient::Enabled && engine.debugId() != -1) {
558 query->m_client = this;
559 int queryId = d->getId();
560 query->m_queryId = queryId;
561 d->rootContextQuery.insert(queryId, query);
564 QDataStream ds(&message, QIODevice::WriteOnly);
565 ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId();
566 d->client->sendMessage(message);
568 query->m_state = QQmlDebugQuery::Error;
574 QQmlDebugObjectQuery *QQmlEngineDebug::queryObject(const QQmlDebugObjectReference &object, QObject *parent)
576 Q_D(QQmlEngineDebug);
578 QQmlDebugObjectQuery *query = new QQmlDebugObjectQuery(parent);
579 if (d->client->state() == QQmlDebugClient::Enabled && object.debugId() != -1) {
580 query->m_client = this;
581 int queryId = d->getId();
582 query->m_queryId = queryId;
583 d->objectQuery.insert(queryId, query);
586 QDataStream ds(&message, QIODevice::WriteOnly);
587 ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
589 d->client->sendMessage(message);
591 query->m_state = QQmlDebugQuery::Error;
597 QQmlDebugObjectQuery *QQmlEngineDebug::queryObjectRecursive(const QQmlDebugObjectReference &object, QObject *parent)
599 Q_D(QQmlEngineDebug);
601 QQmlDebugObjectQuery *query = new QQmlDebugObjectQuery(parent);
602 if (d->client->state() == QQmlDebugClient::Enabled && object.debugId() != -1) {
603 query->m_client = this;
604 int queryId = d->getId();
605 query->m_queryId = queryId;
606 d->objectQuery.insert(queryId, query);
609 QDataStream ds(&message, QIODevice::WriteOnly);
610 ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
612 d->client->sendMessage(message);
614 query->m_state = QQmlDebugQuery::Error;
620 QQmlDebugExpressionQuery *QQmlEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
622 Q_D(QQmlEngineDebug);
624 QQmlDebugExpressionQuery *query = new QQmlDebugExpressionQuery(parent);
625 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
626 query->m_client = this;
627 query->m_expr = expr;
628 int queryId = d->getId();
629 query->m_queryId = queryId;
630 d->expressionQuery.insert(queryId, query);
633 QDataStream ds(&message, QIODevice::WriteOnly);
634 ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr;
635 d->client->sendMessage(message);
637 query->m_state = QQmlDebugQuery::Error;
643 bool QQmlEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName,
644 const QVariant &bindingExpression,
646 QString source, int line)
648 Q_D(QQmlEngineDebug);
650 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
652 QDataStream ds(&message, QIODevice::WriteOnly);
653 ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line;
654 d->client->sendMessage(message);
661 bool QQmlEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName)
663 Q_D(QQmlEngineDebug);
665 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
667 QDataStream ds(&message, QIODevice::WriteOnly);
668 ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName;
669 d->client->sendMessage(message);
676 bool QQmlEngineDebug::setMethodBody(int objectDebugId, const QString &methodName,
677 const QString &methodBody)
679 Q_D(QQmlEngineDebug);
681 if (d->client->state() == QQmlDebugClient::Enabled && objectDebugId != -1) {
683 QDataStream ds(&message, QIODevice::WriteOnly);
684 ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody;
685 d->client->sendMessage(message);
692 QQmlDebugWatch::QQmlDebugWatch(QObject *parent)
693 : QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1)
697 QQmlDebugWatch::~QQmlDebugWatch()
699 if (m_client && m_queryId != -1)
700 QQmlEngineDebugPrivate::remove(m_client, this);
703 int QQmlDebugWatch::queryId() const
708 int QQmlDebugWatch::objectDebugId() const
710 return m_objectDebugId;
713 QQmlDebugWatch::State QQmlDebugWatch::state() const
718 void QQmlDebugWatch::setState(State s)
723 emit stateChanged(m_state);
726 QQmlDebugPropertyWatch::QQmlDebugPropertyWatch(QObject *parent)
727 : QQmlDebugWatch(parent)
731 QString QQmlDebugPropertyWatch::name() const
737 QQmlDebugObjectExpressionWatch::QQmlDebugObjectExpressionWatch(QObject *parent)
738 : QQmlDebugWatch(parent)
742 QString QQmlDebugObjectExpressionWatch::expression() const
748 QQmlDebugQuery::QQmlDebugQuery(QObject *parent)
749 : QObject(parent), m_state(Waiting)
753 QQmlDebugQuery::State QQmlDebugQuery::state() const
758 bool QQmlDebugQuery::isWaiting() const
760 return m_state == Waiting;
763 void QQmlDebugQuery::setState(State s)
768 emit stateChanged(m_state);
771 QQmlDebugEnginesQuery::QQmlDebugEnginesQuery(QObject *parent)
772 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
776 QQmlDebugEnginesQuery::~QQmlDebugEnginesQuery()
778 if (m_client && m_queryId != -1)
779 QQmlEngineDebugPrivate::remove(m_client, this);
782 QList<QQmlDebugEngineReference> QQmlDebugEnginesQuery::engines() const
787 QQmlDebugRootContextQuery::QQmlDebugRootContextQuery(QObject *parent)
788 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
792 QQmlDebugRootContextQuery::~QQmlDebugRootContextQuery()
794 if (m_client && m_queryId != -1)
795 QQmlEngineDebugPrivate::remove(m_client, this);
798 QQmlDebugContextReference QQmlDebugRootContextQuery::rootContext() const
803 QQmlDebugObjectQuery::QQmlDebugObjectQuery(QObject *parent)
804 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
808 QQmlDebugObjectQuery::~QQmlDebugObjectQuery()
810 if (m_client && m_queryId != -1)
811 QQmlEngineDebugPrivate::remove(m_client, this);
814 QQmlDebugObjectReference QQmlDebugObjectQuery::object() const
819 QQmlDebugExpressionQuery::QQmlDebugExpressionQuery(QObject *parent)
820 : QQmlDebugQuery(parent), m_client(0), m_queryId(-1)
824 QQmlDebugExpressionQuery::~QQmlDebugExpressionQuery()
826 if (m_client && m_queryId != -1)
827 QQmlEngineDebugPrivate::remove(m_client, this);
830 QVariant QQmlDebugExpressionQuery::expression() const
835 QVariant QQmlDebugExpressionQuery::result() const
840 QQmlDebugEngineReference::QQmlDebugEngineReference()
845 QQmlDebugEngineReference::QQmlDebugEngineReference(int debugId)
850 QQmlDebugEngineReference::QQmlDebugEngineReference(const QQmlDebugEngineReference &o)
851 : m_debugId(o.m_debugId), m_name(o.m_name)
855 QQmlDebugEngineReference &
856 QQmlDebugEngineReference::operator=(const QQmlDebugEngineReference &o)
858 m_debugId = o.m_debugId; m_name = o.m_name;
862 int QQmlDebugEngineReference::debugId() const
867 QString QQmlDebugEngineReference::name() const
872 QQmlDebugObjectReference::QQmlDebugObjectReference()
873 : m_debugId(-1), m_contextDebugId(-1)
877 QQmlDebugObjectReference::QQmlDebugObjectReference(int debugId)
878 : m_debugId(debugId), m_contextDebugId(-1)
882 QQmlDebugObjectReference::QQmlDebugObjectReference(const QQmlDebugObjectReference &o)
883 : m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString),
884 m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId),
885 m_properties(o.m_properties), m_children(o.m_children)
889 QQmlDebugObjectReference &
890 QQmlDebugObjectReference::operator=(const QQmlDebugObjectReference &o)
892 m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString;
893 m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId;
894 m_properties = o.m_properties; m_children = o.m_children;
898 int QQmlDebugObjectReference::debugId() const
903 QString QQmlDebugObjectReference::className() const
908 QString QQmlDebugObjectReference::idString() const
913 QString QQmlDebugObjectReference::name() const
918 QQmlDebugFileReference QQmlDebugObjectReference::source() const
923 int QQmlDebugObjectReference::contextDebugId() const
925 return m_contextDebugId;
928 QList<QQmlDebugPropertyReference> QQmlDebugObjectReference::properties() const
933 QList<QQmlDebugObjectReference> QQmlDebugObjectReference::children() const
938 QQmlDebugContextReference::QQmlDebugContextReference()
943 QQmlDebugContextReference::QQmlDebugContextReference(const QQmlDebugContextReference &o)
944 : m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts)
948 QQmlDebugContextReference &QQmlDebugContextReference::operator=(const QQmlDebugContextReference &o)
950 m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects;
951 m_contexts = o.m_contexts;
955 int QQmlDebugContextReference::debugId() const
960 QString QQmlDebugContextReference::name() const
965 QList<QQmlDebugObjectReference> QQmlDebugContextReference::objects() const
970 QList<QQmlDebugContextReference> QQmlDebugContextReference::contexts() const
975 QQmlDebugFileReference::QQmlDebugFileReference()
976 : m_lineNumber(-1), m_columnNumber(-1)
980 QQmlDebugFileReference::QQmlDebugFileReference(const QQmlDebugFileReference &o)
981 : m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber)
985 QQmlDebugFileReference &QQmlDebugFileReference::operator=(const QQmlDebugFileReference &o)
987 m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber;
991 QUrl QQmlDebugFileReference::url() const
996 void QQmlDebugFileReference::setUrl(const QUrl &u)
1001 int QQmlDebugFileReference::lineNumber() const
1003 return m_lineNumber;
1006 void QQmlDebugFileReference::setLineNumber(int l)
1011 int QQmlDebugFileReference::columnNumber() const
1013 return m_columnNumber;
1016 void QQmlDebugFileReference::setColumnNumber(int c)
1021 QQmlDebugPropertyReference::QQmlDebugPropertyReference()
1022 : m_objectDebugId(-1), m_hasNotifySignal(false)
1026 QQmlDebugPropertyReference::QQmlDebugPropertyReference(const QQmlDebugPropertyReference &o)
1027 : m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value),
1028 m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding),
1029 m_hasNotifySignal(o.m_hasNotifySignal)
1033 QQmlDebugPropertyReference &QQmlDebugPropertyReference::operator=(const QQmlDebugPropertyReference &o)
1035 m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value;
1036 m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding;
1037 m_hasNotifySignal = o.m_hasNotifySignal;
1041 int QQmlDebugPropertyReference::objectDebugId() const
1043 return m_objectDebugId;
1046 QString QQmlDebugPropertyReference::name() const
1051 QString QQmlDebugPropertyReference::valueTypeName() const
1053 return m_valueTypeName;
1056 QVariant QQmlDebugPropertyReference::value() const
1061 QString QQmlDebugPropertyReference::binding() const
1066 bool QQmlDebugPropertyReference::hasNotifySignal() const
1068 return m_hasNotifySignal;