Qt 4.8
qdeclarativeenginedebug.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtDeclarative module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "private/qdeclarativeenginedebug_p.h"
43 
44 #include "private/qdeclarativedebugclient_p.h"
45 
47 
48 #include <private/qobject_p.h>
49 
51 
53 {
54 public:
56 
57 protected:
58  virtual void statusChanged(Status status);
59  virtual void messageReceived(const QByteArray &);
60 
61 private:
64 };
65 
67 {
69 public:
72 
74  void message(const QByteArray &);
75 
77  int nextId;
78  int getId();
79 
81  void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple);
82 
84  static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugRootContextQuery *);
85  static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugObjectQuery *);
86  static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugExpressionQuery *);
87  static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugWatch *);
88 
93 
95 };
96 
99 : QDeclarativeDebugClient(QLatin1String("DeclarativeDebugger"), client), priv(p)
100 {
101 }
102 
104 {
105  if (priv)
106  priv->statusChanged(static_cast<QDeclarativeEngineDebug::Status>(status));
107 }
108 
110 {
111  if (priv)
112  priv->message(data);
113 }
114 
116 : client(new QDeclarativeEngineDebugClient(c, this)), nextId(0)
117 {
118 }
119 
121 {
122  if (client)
123  client->priv = 0;
124  delete client;
125 
127  for (; enginesIter != enginesQuery.end(); ++enginesIter) {
128  enginesIter.value()->m_client = 0;
129  if (enginesIter.value()->state() == QDeclarativeDebugQuery::Waiting)
130  enginesIter.value()->setState(QDeclarativeDebugQuery::Error);
131  }
132 
134  for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) {
135  rootContextIter.value()->m_client = 0;
136  if (rootContextIter.value()->state() == QDeclarativeDebugQuery::Waiting)
137  rootContextIter.value()->setState(QDeclarativeDebugQuery::Error);
138  }
139 
141  for (; objectIter != objectQuery.end(); ++objectIter) {
142  objectIter.value()->m_client = 0;
143  if (objectIter.value()->state() == QDeclarativeDebugQuery::Waiting)
144  objectIter.value()->setState(QDeclarativeDebugQuery::Error);
145  }
146 
148  for (; exprIter != expressionQuery.end(); ++exprIter) {
149  exprIter.value()->m_client = 0;
150  if (exprIter.value()->state() == QDeclarativeDebugQuery::Waiting)
151  exprIter.value()->setState(QDeclarativeDebugQuery::Error);
152  }
153 
155  for (; watchIter != watched.end(); ++watchIter) {
156  watchIter.value()->m_client = 0;
157  watchIter.value()->setState(QDeclarativeDebugWatch::Dead);
158  }
159 }
160 
162 {
163  return nextId++;
164 }
165 
167 {
168  if (c && q) {
171  }
172 }
173 
176 {
177  if (c && q) {
180  }
181 }
182 
184 {
185  if (c && q) {
188  }
189 }
190 
192 {
193  if (c && q) {
196  }
197 }
198 
200 {
201  if (c && w) {
203  p->watched.remove(w->m_queryId);
204  }
205 }
206 
208  bool simple)
209 {
211  ds >> 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;
220  o.m_parentId = data.parentId;
221  o.m_needsMoreData = simple;
222 
223  if (simple)
224  return;
225 
226  int childCount;
227  bool recur;
228  ds >> childCount >> recur;
229 
230  for (int ii = 0; ii < childCount; ++ii) {
232  decode(ds, o.m_children.last(), !recur);
233  }
234 
235  int propCount;
236  ds >> propCount;
237 
238  for (int ii = 0; ii < propCount; ++ii) {
240  ds >> data;
242  prop.m_objectDebugId = o.m_debugId;
243  prop.m_name = data.name;
244  prop.m_binding = data.binding;
245  prop.m_hasNotifySignal = data.hasNotifySignal;
246  prop.m_valueTypeName = data.valueTypeName;
247  switch (data.type) {
252  {
253  prop.m_value = data.value;
254  break;
255  }
257  {
259  obj.m_debugId = prop.m_value.toInt();
260  prop.m_value = QVariant::fromValue(obj);
261  break;
262  }
264  break;
265  }
266  o.m_properties << prop;
267  }
268 }
269 
271 {
272  ds >> c.m_name >> c.m_debugId;
273 
274  int contextCount;
275  ds >> contextCount;
276 
277  for (int ii = 0; ii < contextCount; ++ii) {
279  decode(ds, c.m_contexts.last());
280  }
281 
282  int objectCount;
283  ds >> objectCount;
284 
285  for (int ii = 0; ii < objectCount; ++ii) {
287  decode(ds, obj, true);
288 
289  obj.m_contextDebugId = c.m_debugId;
290  c.m_objects << obj;
291  }
292 }
293 
295 {
296  emit q_func()->statusChanged(status);
297 }
298 
300 {
301  QDataStream ds(data);
302 
304  ds >> type;
305 
306  //qDebug() << "QDeclarativeEngineDebugPrivate::message()" << type;
307 
308  if (type == "LIST_ENGINES_R") {
309  int queryId;
310  ds >> queryId;
311 
313  if (!query)
314  return;
315  enginesQuery.remove(queryId);
316 
317  int count;
318  ds >> count;
319 
320  for (int ii = 0; ii < count; ++ii) {
322  ds >> ref.m_name;
323  ds >> ref.m_debugId;
324  query->m_engines << ref;
325  }
326 
327  query->m_client = 0;
328  query->setState(QDeclarativeDebugQuery::Completed);
329  } else if (type == "LIST_OBJECTS_R") {
330  int queryId;
331  ds >> queryId;
332 
334  if (!query)
335  return;
336  rootContextQuery.remove(queryId);
337 
338  if (!ds.atEnd())
339  decode(ds, query->m_context);
340 
341  query->m_client = 0;
342  query->setState(QDeclarativeDebugQuery::Completed);
343  } else if (type == "FETCH_OBJECT_R") {
344  int queryId;
345  ds >> queryId;
346 
348  if (!query)
349  return;
350  objectQuery.remove(queryId);
351 
352  if (!ds.atEnd())
353  decode(ds, query->m_object, false);
354 
355  query->m_client = 0;
356  query->setState(QDeclarativeDebugQuery::Completed);
357  } else if (type == "EVAL_EXPRESSION_R") {
358  int queryId;
359  QVariant result;
360  ds >> queryId >> result;
361 
363  if (!query)
364  return;
365  expressionQuery.remove(queryId);
366 
367  query->m_result = result;
368  query->m_client = 0;
369  query->setState(QDeclarativeDebugQuery::Completed);
370  } else if (type == "WATCH_PROPERTY_R") {
371  int queryId;
372  bool ok;
373  ds >> queryId >> ok;
374 
375  QDeclarativeDebugWatch *watch = watched.value(queryId);
376  if (!watch)
377  return;
378 
380  } else if (type == "WATCH_OBJECT_R") {
381  int queryId;
382  bool ok;
383  ds >> queryId >> ok;
384 
385  QDeclarativeDebugWatch *watch = watched.value(queryId);
386  if (!watch)
387  return;
388 
390  } else if (type == "WATCH_EXPR_OBJECT_R") {
391  int queryId;
392  bool ok;
393  ds >> queryId >> ok;
394 
395  QDeclarativeDebugWatch *watch = watched.value(queryId);
396  if (!watch)
397  return;
398 
400  } else if (type == "UPDATE_WATCH") {
401  int queryId;
402  int debugId;
404  QVariant value;
405  ds >> queryId >> debugId >> name >> value;
406 
407  QDeclarativeDebugWatch *watch = watched.value(queryId, 0);
408  if (!watch)
409  return;
410  emit watch->valueChanged(name, value);
411  } else if (type == "OBJECT_CREATED") {
412  emit q_func()->newObjects();
413  }
414 }
415 
417 : QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent)
418 {
419 }
420 
422 {
424 
425  return static_cast<QDeclarativeEngineDebug::Status>(d->client->status());
426 }
427 
429 {
431 
433  if (d->client->status() == QDeclarativeDebugClient::Enabled) {
434  int queryId = d->getId();
435  watch->m_queryId = queryId;
436  watch->m_client = this;
437  watch->m_objectDebugId = property.objectDebugId();
438  watch->m_name = property.name();
439  d->watched.insert(queryId, watch);
440 
441  QByteArray message;
442  QDataStream ds(&message, QIODevice::WriteOnly);
443  ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8();
444  d->client->sendMessage(message);
445  } else {
446  watch->m_state = QDeclarativeDebugWatch::Dead;
447  }
448 
449  return watch;
450 }
451 
453 {
454  qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented");
455  return 0;
456 }
457 
459 {
462  if (d->client->status() == QDeclarativeDebugClient::Enabled) {
463  int queryId = d->getId();
464  watch->m_queryId = queryId;
465  watch->m_client = this;
466  watch->m_objectDebugId = object.debugId();
467  watch->m_expr = expr;
468  d->watched.insert(queryId, watch);
469 
470  QByteArray message;
471  QDataStream ds(&message, QIODevice::WriteOnly);
472  ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr;
473  d->client->sendMessage(message);
474  } else {
475  watch->m_state = QDeclarativeDebugWatch::Dead;
476  }
477  return watch;
478 }
479 
481 {
483 
484  QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent);
485  if (d->client->status() == QDeclarativeDebugClient::Enabled) {
486  int queryId = d->getId();
487  watch->m_queryId = queryId;
488  watch->m_client = this;
489  watch->m_objectDebugId = object.debugId();
490  d->watched.insert(queryId, watch);
491 
492  QByteArray message;
493  QDataStream ds(&message, QIODevice::WriteOnly);
494  ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId();
495  d->client->sendMessage(message);
496  } else {
498  }
499 
500  return watch;
501 }
502 
504 {
505  qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented");
506  return 0;
507 }
508 
510 {
512 
513  if (!watch || !watch->m_client)
514  return;
515 
516  watch->m_client = 0;
518 
519  d->watched.remove(watch->queryId());
520 
521  if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) {
522  QByteArray message;
523  QDataStream ds(&message, QIODevice::WriteOnly);
524  ds << QByteArray("NO_WATCH") << watch->queryId();
525  d->client->sendMessage(message);
526  }
527 }
528 
530 {
532 
534  if (d->client->status() == QDeclarativeDebugClient::Enabled) {
535  query->m_client = this;
536  int queryId = d->getId();
537  query->m_queryId = queryId;
538  d->enginesQuery.insert(queryId, query);
539 
540  QByteArray message;
541  QDataStream ds(&message, QIODevice::WriteOnly);
542  ds << QByteArray("LIST_ENGINES") << queryId;
543  d->client->sendMessage(message);
544  } else {
545  query->m_state = QDeclarativeDebugQuery::Error;
546  }
547 
548  return query;
549 }
550 
552 {
554 
556  if (d->client->status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) {
557  query->m_client = this;
558  int queryId = d->getId();
559  query->m_queryId = queryId;
560  d->rootContextQuery.insert(queryId, query);
561 
562  QByteArray message;
563  QDataStream ds(&message, QIODevice::WriteOnly);
564  ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId();
565  d->client->sendMessage(message);
566  } else {
567  query->m_state = QDeclarativeDebugQuery::Error;
568  }
569 
570  return query;
571 }
572 
574 {
576 
578  if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) {
579  query->m_client = this;
580  int queryId = d->getId();
581  query->m_queryId = queryId;
582  d->objectQuery.insert(queryId, query);
583 
584  QByteArray message;
585  QDataStream ds(&message, QIODevice::WriteOnly);
586  ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
587  << false << true;
588  d->client->sendMessage(message);
589  } else {
590  query->m_state = QDeclarativeDebugQuery::Error;
591  }
592 
593  return query;
594 }
595 
597 {
599 
601  if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) {
602  query->m_client = this;
603  int queryId = d->getId();
604  query->m_queryId = queryId;
605  d->objectQuery.insert(queryId, query);
606 
607  QByteArray message;
608  QDataStream ds(&message, QIODevice::WriteOnly);
609  ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
610  << true << true;
611  d->client->sendMessage(message);
612  } else {
613  query->m_state = QDeclarativeDebugQuery::Error;
614  }
615 
616  return query;
617 }
618 
620 {
622 
624  if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
625  query->m_client = this;
626  query->m_expr = expr;
627  int queryId = d->getId();
628  query->m_queryId = queryId;
629  d->expressionQuery.insert(queryId, query);
630 
631  QByteArray message;
632  QDataStream ds(&message, QIODevice::WriteOnly);
633  ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr;
634  d->client->sendMessage(message);
635  } else {
636  query->m_state = QDeclarativeDebugQuery::Error;
637  }
638 
639  return query;
640 }
641 
642 bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName,
643  const QVariant &bindingExpression,
644  bool isLiteralValue,
645  QString source, int line)
646 {
648 
649  if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
650  QByteArray message;
651  QDataStream ds(&message, QIODevice::WriteOnly);
652  ds << QByteArray("SET_BINDING") << d->getId() << objectDebugId << propertyName <<
653  bindingExpression << isLiteralValue << source << line;
654  d->client->sendMessage(message);
655  return true;
656  } else {
657  return false;
658  }
659 }
660 
661 bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName)
662 {
664 
665  if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
666  QByteArray message;
667  QDataStream ds(&message, QIODevice::WriteOnly);
668  ds << QByteArray("RESET_BINDING") << d->getId() << objectDebugId << propertyName;
669  d->client->sendMessage(message);
670  return true;
671  } else {
672  return false;
673  }
674 }
675 
677  const QString &methodBody)
678 {
680 
681  if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
682  QByteArray message;
683  QDataStream ds(&message, QIODevice::WriteOnly);
684  ds << QByteArray("SET_METHOD_BODY") << d->getId() << objectDebugId << methodName
685  << methodBody;
686  d->client->sendMessage(message);
687  return true;
688  } else {
689  return false;
690  }
691 }
692 
694 : QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1)
695 {
696 }
697 
699 {
700  if (m_client && m_queryId != -1)
702 }
703 
705 {
706  return m_queryId;
707 }
708 
710 {
711  return m_objectDebugId;
712 }
713 
715 {
716  return m_state;
717 }
718 
720 {
721  if (m_state == s)
722  return;
723  m_state = s;
725 }
726 
728  : QDeclarativeDebugWatch(parent)
729 {
730 }
731 
733 {
734  return m_name;
735 }
736 
737 
739  : QDeclarativeDebugWatch(parent)
740 {
741 }
742 
744 {
745  return m_expr;
746 }
747 
748 
750 : QObject(parent), m_state(Waiting)
751 {
752 }
753 
755 {
756  return m_state;
757 }
758 
760 {
761  return m_state == Waiting;
762 }
763 
765 {
766  if (m_state == s)
767  return;
768  m_state = s;
770 }
771 
773 : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
774 {
775 }
776 
778 {
779  if (m_client && m_queryId != -1)
781 }
782 
784 {
785  return m_engines;
786 }
787 
789 : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
790 {
791 }
792 
794 {
795  if (m_client && m_queryId != -1)
797 }
798 
800 {
801  return m_context;
802 }
803 
805 : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
806 {
807 }
808 
810 {
811  if (m_client && m_queryId != -1)
813 }
814 
816 {
817  return m_object;
818 }
819 
821 : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
822 {
823 }
824 
826 {
827  if (m_client && m_queryId != -1)
829 }
830 
832 {
833  return m_expr;
834 }
835 
837 {
838  return m_result;
839 }
840 
842 : m_debugId(-1)
843 {
844 }
845 
847 : m_debugId(debugId)
848 {
849 }
850 
853 {
854 }
855 
858 {
859  m_debugId = o.m_debugId; m_name = o.m_name;
860  return *this;
861 }
862 
864 {
865  return m_debugId;
866 }
867 
869 {
870  return m_name;
871 }
872 
874  : m_debugId(-1), m_parentId(-1), m_contextDebugId(-1), m_needsMoreData(false)
875 {
876 }
877 
879 : m_debugId(debugId), m_parentId(-1), m_contextDebugId(-1), m_needsMoreData(false)
880 {
881 }
882 
887 {
888 }
889 
892 {
897  return *this;
898 }
899 
901 {
902  return m_debugId;
903 }
904 
906 {
907  return m_parentId;
908 }
909 
911 {
912  return m_class;
913 }
914 
916 {
917  return m_idString;
918 }
919 
921 {
922  return m_name;
923 }
924 
926 {
927  return m_source;
928 }
929 
931 {
932  return m_contextDebugId;
933 }
934 
936 {
937  return m_needsMoreData;
938 }
939 
941 {
942  return m_properties;
943 }
944 
946 {
947  return m_children;
948 }
949 
951 : m_debugId(-1)
952 {
953 }
954 
957 {
958 }
959 
961 {
964  return *this;
965 }
966 
968 {
969  return m_debugId;
970 }
971 
973 {
974  return m_name;
975 }
976 
978 {
979  return m_objects;
980 }
981 
983 {
984  return m_contexts;
985 }
986 
988 : m_lineNumber(-1), m_columnNumber(-1)
989 {
990 }
991 
994 {
995 }
996 
998 {
1000  return *this;
1001 }
1002 
1004 {
1005  return m_url;
1006 }
1007 
1009 {
1010  m_url = u;
1011 }
1012 
1014 {
1015  return m_lineNumber;
1016 }
1017 
1019 {
1020  m_lineNumber = l;
1021 }
1022 
1024 {
1025  return m_columnNumber;
1026 }
1027 
1029 {
1030  m_columnNumber = c;
1031 }
1032 
1034 : m_objectDebugId(-1), m_hasNotifySignal(false)
1035 {
1036 }
1037 
1042 {
1043 }
1044 
1046 {
1050  return *this;
1051 }
1052 
1054 {
1055  return m_objectDebugId;
1056 }
1057 
1059 {
1060  return m_name;
1061 }
1062 
1064 {
1065  return m_valueTypeName;
1066 }
1067 
1069 {
1070  return m_value;
1071 }
1072 
1074 {
1075  return m_binding;
1076 }
1077 
1079 {
1080  return m_hasNotifySignal;
1081 }
1082 
1084 
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
QDeclarativeDebugExpressionQuery * queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent=0)
double d
Definition: qnumeric_p.h:62
QHash< int, QDeclarativeDebugEnginesQuery * > enginesQuery
int type
Definition: qmetatype.cpp:239
QHash< int, QDeclarativeDebugExpressionQuery * > expressionQuery
unsigned char c[8]
Definition: qnumeric_p.h:62
QList< QDeclarativeDebugEngineReference > m_engines
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QDeclarativeDebugObjectQuery * queryObjectRecursive(const QDeclarativeDebugObjectReference &, QObject *parent=0)
QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p)
QDeclarativeDebugFileReference source() const
int remove(const Key &key)
Removes all the items that have the key from the hash.
Definition: qhash.h:784
static QBasicAtomicInt objectCount
Definition: qobject.cpp:98
QDeclarativeDebugFileReference & operator=(const QDeclarativeDebugFileReference &)
bool atEnd() const
Returns true if the I/O device has reached the end position (end of the stream or file) or if there i...
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
void stateChanged(QDeclarativeDebugQuery::State)
QDeclarativeDebugContextReference rootContext() const
void decode(QDataStream &, QDeclarativeDebugContextReference &)
static LibLoadStatus status
Definition: qlocale_icu.cpp:69
QDeclarativeDebugPropertyReference & operator=(const QDeclarativeDebugPropertyReference &)
quint16 u
void stateChanged(QDeclarativeDebugWatch::State)
QHash< int, QDeclarativeDebugRootContextQuery * > rootContextQuery
QDeclarativeDebugObjectReference m_object
void removeWatch(QDeclarativeDebugWatch *watch)
T & value() const
Returns a modifiable reference to the current item&#39;s value.
Definition: qhash.h:348
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
QDeclarativeDebugObjectReference & operator=(const QDeclarativeDebugObjectReference &)
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
QList< QDeclarativeDebugContextReference > m_contexts
#define Q_D(Class)
Definition: qglobal.h:2482
static QObjectPrivate * get(QObject *o)
Definition: qobject_p.h:177
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
QHash< int, QDeclarativeDebugWatch * > watched
QHash< int, QDeclarativeDebugObjectQuery * > objectQuery
QDeclarativeDebugContextReference m_context
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
Definition: qvariant.cpp:2625
QDeclarativeDebugObjectQuery * queryObject(const QDeclarativeDebugObjectReference &, QObject *parent=0)
QDeclarativeDebugObjectReference object() const
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QList< QDeclarativeDebugObjectReference > m_objects
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QDeclarativeEngineDebug * m_client
virtual void statusChanged(Status status)
QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *)
const char * name
#define emit
Definition: qobjectdefs.h:76
QDeclarativeDebugEnginesQuery * queryAvailableEngines(QObject *parent=0)
Q_CORE_EXPORT void qWarning(const char *,...)
bool resetBindingForObject(int objectDebugId, const QString &propertyName)
static const char * data(const QByteArray &arr)
QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject *=0)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
QDeclarativeEngineDebug * m_client
void statusChanged(QDeclarativeEngineDebug::Status status)
QList< QDeclarativeDebugContextReference > contexts() const
virtual void messageReceived(const QByteArray &)
QDeclarativeDebugPropertyWatch * addWatch(const QDeclarativeDebugPropertyReference &, QObject *parent=0)
The State element defines configurations of objects and properties.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
Definition: qvariant.h:336
bool setBindingForObject(int objectDebugId, const QString &propertyName, const QVariant &bindingExpression, bool isLiteralValue, QString source=QString(), int line=-1)
void valueChanged(const QByteArray &name, const QVariant &value)
static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugEnginesQuery *)
QDeclarativeDebugFileReference m_source
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
Definition: qhash.h:467
QList< QDeclarativeDebugObjectReference > m_children
QList< QDeclarativeDebugPropertyReference > properties() const
QList< QDeclarativeDebugEngineReference > engines() const
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
T & last()
Returns a reference to the last item in the list.
Definition: qlist.h:284
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
Definition: qhash.h:330
static QByteArray methodName(const char *signature, int nameLength)
Makes a deep copy of the first nameLength characters of the given method signature and returns the co...
QList< QDeclarativeDebugPropertyReference > m_properties
QDeclarativeEngineDebugClient * client
QFactoryLoader * l
iterator begin()
Returns an STL-style iterator pointing to the first item in the hash.
Definition: qhash.h:464
QDeclarativeDebugRootContextQuery * queryRootContexts(const QDeclarativeDebugEngineReference &, QObject *parent=0)
QVariant property(const char *name) const
Returns the value of the object&#39;s name property.
Definition: qobject.cpp:3807
QObject * parent
Definition: qobject.h:92
QList< QDeclarativeDebugObjectReference > objects() const
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
QDeclarativeDebugEngineReference & operator=(const QDeclarativeDebugEngineReference &)
T value() const
Returns the stored value converted to the template type T.
Definition: qvariant.h:332
bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody)
QList< QDeclarativeDebugObjectReference > children() const
QDeclarativeEngineDebugPrivate * priv
QDeclarativeDebugContextReference & operator=(const QDeclarativeDebugContextReference &)