Qt 4.8
Classes | Public Functions | Static Public Functions | Protected Functions | Private Slots | Private Functions | Properties | List of all members
QDeclarativeEngineDebugService Class Reference

#include <qdeclarativeenginedebugservice_p.h>

Inheritance diagram for QDeclarativeEngineDebugService:
QDeclarativeDebugService QObject

Classes

struct  QDeclarativeObjectData
 
struct  QDeclarativeObjectProperty
 

Public Functions

void addEngine (QDeclarativeEngine *)
 
void objectCreated (QDeclarativeEngine *, QObject *)
 
 QDeclarativeEngineDebugService (QObject *=0)
 
void remEngine (QDeclarativeEngine *)
 
- Public Functions inherited from QDeclarativeDebugService
QString name () const
 
 QDeclarativeDebugService (const QString &, QObject *parent=0)
 
void sendMessage (const QByteArray &)
 
Status status () const
 
bool waitForMessage ()
 
 ~QDeclarativeDebugService ()
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool event (QEvent *)
 This virtual function receives events to an object and should return true if the event e was recognized and processed. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Static Public Functions

static QDeclarativeEngineDebugServiceinstance ()
 
- Static Public Functions inherited from QDeclarativeDebugService
static bool hasDebuggingClient ()
 
static int idForObject (QObject *)
 Returns a unique id for object. More...
 
static bool isDebuggingEnabled ()
 
static QObjectobjectForId (int)
 Returns the object for unique id. More...
 
static QString objectToString (QObject *obj)
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 

Protected Functions

virtual void messageReceived (const QByteArray &)
 
- Protected Functions inherited from QDeclarativeDebugService
virtual void statusChanged (Status)
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *)
 This event handler can be reimplemented in a subclass to receive timer events for the object. More...
 

Private Slots

void propertyChanged (int id, int objectId, const QMetaProperty &property, const QVariant &value)
 

Private Functions

void buildObjectDump (QDataStream &, QObject *, bool, bool)
 
void buildObjectList (QDataStream &, QDeclarativeContext *)
 
void buildStatesList (QDeclarativeContext *, bool)
 
void buildStatesList (QObject *obj)
 
QDeclarativeObjectData objectData (QObject *)
 
void prepareDeferredObjects (QObject *)
 
QDeclarativeObjectProperty propertyData (QObject *, int)
 
void resetBinding (int objectId, const QString &propertyName)
 
void setBinding (int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename=QString(), int line=-1)
 
void setMethodBody (int objectId, const QString &method, const QString &body)
 
QVariant valueContents (const QVariant &defaultValue) const
 

Properties

QList< QWeakPointer< QDeclarativeState > > m_allStates
 
QList< QDeclarativeEngine * > m_engines
 
QDeclarativeWatcherm_watch
 

Additional Inherited Members

- Public Types inherited from QDeclarativeDebugService
enum  Status { NotConnected, Unavailable, Enabled }
 
- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

Definition at line 70 of file qdeclarativeenginedebugservice_p.h.

Constructors and Destructors

◆ QDeclarativeEngineDebugService()

QDeclarativeEngineDebugService::QDeclarativeEngineDebugService ( QObject parent = 0)

Definition at line 69 of file qdeclarativeenginedebugservice.cpp.

70 : QDeclarativeDebugService(QLatin1String("DeclarativeDebugger"), parent),
71  m_watch(new QDeclarativeWatcher(this))
72 {
74  this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant)));
75 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
#define SLOT(a)
Definition: qobjectdefs.h:226
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
QDeclarativeDebugService(const QString &, QObject *parent=0)
The QMetaProperty class provides meta-data about a property.
Definition: qmetaobject.h:176

Functions

◆ addEngine()

void QDeclarativeEngineDebugService::addEngine ( QDeclarativeEngine engine)

Definition at line 718 of file qdeclarativeenginedebugservice.cpp.

Referenced by QDeclarativeEnginePrivate::init().

719 {
720  Q_ASSERT(engine);
721  Q_ASSERT(!m_engines.contains(engine));
722 
723  m_engines.append(engine);
724 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880

◆ buildObjectDump()

void QDeclarativeEngineDebugService::buildObjectDump ( QDataStream message,
QObject object,
bool  recur,
bool  dumpProperties 
)
private

Definition at line 210 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived().

212 {
213  message << objectData(object);
214 
215  QObjectList children = object->children();
216 
217  int childrenCount = children.count();
218  for (int ii = 0; ii < children.count(); ++ii) {
219  if (qobject_cast<QDeclarativeContext*>(children[ii]) || QDeclarativeBoundSignal::cast(children[ii]))
220  --childrenCount;
221  }
222 
223  message << childrenCount << recur;
224 
225  QList<QDeclarativeObjectProperty> fakeProperties;
226 
227  for (int ii = 0; ii < children.count(); ++ii) {
228  QObject *child = children.at(ii);
229  if (qobject_cast<QDeclarativeContext*>(child))
230  continue;
231  if (!QDeclarativeBoundSignal::cast(child)) {
232  if (recur)
233  buildObjectDump(message, child, recur, dumpProperties);
234  else
235  message << objectData(child);
236  }
237  }
238 
239  if (!dumpProperties) {
240  message << 0;
241  return;
242  }
243 
244  QList<int> propertyIndexes;
245  for (int ii = 0; ii < object->metaObject()->propertyCount(); ++ii) {
246  if (object->metaObject()->property(ii).isScriptable())
247  propertyIndexes << ii;
248  }
249 
250  for (int ii = 0; ii < children.count(); ++ii) {
251  QObject *child = children.at(ii);
252  if (qobject_cast<QDeclarativeContext*>(child))
253  continue;
255  if (signal) {
256  QDeclarativeObjectProperty prop;
258  prop.hasNotifySignal = false;
259  QDeclarativeExpression *expr = signal->expression();
260  if (expr) {
261  prop.value = expr->expression();
262  QObject *scope = expr->scopeObject();
263  if (scope) {
264  QString sig = QLatin1String(scope->metaObject()->method(signal->index()).signature());
265  int lparen = sig.indexOf(QLatin1Char('('));
266  if (lparen >= 0) {
267  QString methodName = sig.mid(0, lparen);
268  prop.name = QLatin1String("on") + methodName[0].toUpper()
269  + methodName.mid(1);
270  }
271  }
272  }
273  fakeProperties << prop;
274  }
275  }
276 
277  message << propertyIndexes.size() + fakeProperties.count();
278 
279  for (int ii = 0; ii < propertyIndexes.size(); ++ii)
280  message << propertyData(object, propertyIndexes.at(ii));
281 
282  for (int ii = 0; ii < fakeProperties.count(); ++ii)
283  message << fakeProperties[ii];
284 }
bool isScriptable(const QObject *obj=0) const
Returns true if the property is scriptable for the given object; otherwise returns false...
static QDeclarativeBoundSignal * cast(QObject *)
QString toUpper() const Q_REQUIRED_RESULT
Returns an uppercase copy of the string.
Definition: qstring.cpp:5483
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
QDeclarativeObjectProperty propertyData(QObject *, int)
QDeclarativeObjectData objectData(QObject *)
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:2838
QDeclarativeExpression * expression() const
Returns the signal expression.
QString expression() const
Returns the expression string.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Definition: qstring.cpp:3706
QObject * scopeObject() const
Returns the expression&#39;s scope object, if provided, otherwise 0.
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
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...
const QObjectList & children() const
Returns a list of child objects.
Definition: qobject.h:197
QMetaMethod method(int index) const
Returns the meta-data for the method with the given index.
The QDeclarativeExpression class evaluates JavaScript in a QML context.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
QMetaProperty property(int index) const
Returns the meta-data for the property with the given index.
void buildObjectDump(QDataStream &, QObject *, bool, bool)

◆ buildObjectList()

void QDeclarativeEngineDebugService::buildObjectList ( QDataStream message,
QDeclarativeContext ctxt 
)
private

Definition at line 298 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived().

299 {
301 
302  QString ctxtName = ctxt->objectName();
303  int ctxtId = QDeclarativeDebugService::idForObject(ctxt);
304 
305  message << ctxtName << ctxtId;
306 
307  int count = 0;
308 
310  while (child) {
311  ++count;
312  child = child->nextChild;
313  }
314 
315  message << count;
316 
317  child = p->childContexts;
318  while (child) {
319  buildObjectList(message, child->asQDeclarativeContext());
320  child = child->nextChild;
321  }
322 
323  // Clean deleted objects
325  for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) {
326  if (!ctxtPriv->instances.at(ii)) {
327  ctxtPriv->instances.removeAt(ii);
328  --ii;
329  }
330  }
331 
332  message << ctxtPriv->instances.count();
333  for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) {
334  message << objectData(ctxtPriv->instances.at(ii));
335  }
336 }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
The QString class provides a Unicode character string.
Definition: qstring.h:83
void buildObjectList(QDataStream &, QDeclarativeContext *)
QDeclarativeObjectData objectData(QObject *)
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QDeclarativeContextData * nextChild
QList< QPointer< QObject > > instances
static QDeclarativeContextPrivate * get(QDeclarativeContext *context)
static int idForObject(QObject *)
Returns a unique id for object.
QDeclarativeContext * asQDeclarativeContext()
QString objectName() const
QDeclarativeContextData * childContexts
static QDeclarativeContextData * get(QDeclarativeContext *context)
void removeAt(int i)
Removes the item at index position i.
Definition: qlist.h:480

◆ buildStatesList() [1/2]

void QDeclarativeEngineDebugService::buildStatesList ( QDeclarativeContext ctxt,
bool  cleanList = false 
)
private

Definition at line 338 of file qdeclarativeenginedebugservice.cpp.

Referenced by buildStatesList(), and messageReceived().

339 {
340  if (cleanList)
341  m_allStates.clear();
342 
344  for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) {
345  buildStatesList(ctxtPriv->instances.at(ii));
346  }
347 
349  while (child) {
350  buildStatesList(child->asQDeclarativeContext());
351  child = child->nextChild;
352  }
353 }
void buildStatesList(QDeclarativeContext *, bool)
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
void clear()
Removes all items from the list.
Definition: qlist.h:764
QList< QPointer< QObject > > instances
static QDeclarativeContextPrivate * get(QDeclarativeContext *context)
QList< QWeakPointer< QDeclarativeState > > m_allStates
QDeclarativeContextData * childContexts
static QDeclarativeContextData * get(QDeclarativeContext *context)

◆ buildStatesList() [2/2]

void QDeclarativeEngineDebugService::buildStatesList ( QObject obj)
private

Definition at line 355 of file qdeclarativeenginedebugservice.cpp.

356 {
357  if (QDeclarativeState *state = qobject_cast<QDeclarativeState *>(obj)) {
358  m_allStates.append(state);
359  }
360 
361  QObjectList children = obj->children();
362  for (int ii = 0; ii < children.count(); ++ii) {
363  buildStatesList(children.at(ii));
364  }
365 }
void buildStatesList(QDeclarativeContext *, bool)
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
const QObjectList & children() const
Returns a list of child objects.
Definition: qobject.h:197
QList< QWeakPointer< QDeclarativeState > > m_allStates

◆ instance()

QDeclarativeEngineDebugService * QDeclarativeEngineDebugService::instance ( )
static

Definition at line 64 of file qdeclarativeenginedebugservice.cpp.

Referenced by QDeclarativeComponentPrivate::begin(), QDeclarativeEnginePrivate::init(), and QDeclarativeEngine::~QDeclarativeEngine().

65 {
66  return qmlEngineDebugService();
67 }

◆ messageReceived()

void QDeclarativeEngineDebugService::messageReceived ( const QByteArray message)
protectedvirtual

Reimplemented from QDeclarativeDebugService.

Definition at line 408 of file qdeclarativeenginedebugservice.cpp.

409 {
410  QDataStream ds(message);
411 
412  int queryId;
414  ds >> type >> queryId;
415 
416  QByteArray reply;
417  QDataStream rs(&reply, QIODevice::WriteOnly);
418 
419  if (type == "LIST_ENGINES") {
420 
421  rs << QByteArray("LIST_ENGINES_R");
422  rs << queryId << m_engines.count();
423 
424  for (int ii = 0; ii < m_engines.count(); ++ii) {
425  QDeclarativeEngine *engine = m_engines.at(ii);
426 
427  QString engineName = engine->objectName();
428  int engineId = QDeclarativeDebugService::idForObject(engine);
429  rs << engineName << engineId;
430  }
431 
432  } else if (type == "LIST_OBJECTS") {
433  int engineId = -1;
434  ds >> engineId;
435 
436  QDeclarativeEngine *engine =
438 
439  rs << QByteArray("LIST_OBJECTS_R") << queryId;
440 
441  if (engine) {
442  buildObjectList(rs, engine->rootContext());
443  buildStatesList(engine->rootContext(), true);
444  }
445 
446  } else if (type == "FETCH_OBJECT") {
447  int objectId;
448  bool recurse;
449  bool dumpProperties = true;
450 
451  ds >> objectId >> recurse >> dumpProperties;
452 
454 
455  rs << QByteArray("FETCH_OBJECT_R") << queryId;
456 
457  if (object) {
458  if (recurse)
459  prepareDeferredObjects(object);
460  buildObjectDump(rs, object, recurse, dumpProperties);
461  }
462 
463  } else if (type == "WATCH_OBJECT") {
464  int objectId;
465 
466  ds >> objectId;
467  bool ok = m_watch->addWatch(queryId, objectId);
468 
469  rs << QByteArray("WATCH_OBJECT_R") << queryId << ok;
470 
471  } else if (type == "WATCH_PROPERTY") {
472  int objectId;
474 
475  ds >> objectId >> property;
476  bool ok = m_watch->addWatch(queryId, objectId, property);
477 
478  rs << QByteArray("WATCH_PROPERTY_R") << queryId << ok;
479 
480  } else if (type == "WATCH_EXPR_OBJECT") {
481  int debugId;
482  QString expr;
483 
484  ds >> debugId >> expr;
485  bool ok = m_watch->addWatch(queryId, debugId, expr);
486 
487  rs << QByteArray("WATCH_EXPR_OBJECT_R") << queryId << ok;
488 
489  } else if (type == "NO_WATCH") {
490 
491  m_watch->removeWatch(queryId);
492  } else if (type == "EVAL_EXPRESSION") {
493  int objectId;
494  QString expr;
495 
496  ds >> objectId >> expr;
497 
499  QDeclarativeContext *context = qmlContext(object);
500  QVariant result;
501  if (object && context) {
502  QDeclarativeExpression exprObj(context, object, expr);
503  bool undefined = false;
504  QVariant value = exprObj.evaluate(&undefined);
505  if (undefined)
506  result = QLatin1String("<undefined>");
507  else
508  result = valueContents(value);
509  } else {
510  result = QLatin1String("<unknown context>");
511  }
512 
513  rs << QByteArray("EVAL_EXPRESSION_R") << queryId << result;
514 
515  } else if (type == "SET_BINDING") {
516  int objectId;
517  QString propertyName;
518  QVariant expr;
519  bool isLiteralValue;
520  QString filename;
521  int line;
522  ds >> objectId >> propertyName >> expr >> isLiteralValue;
523  if (!ds.atEnd()) { // backward compatibility from 2.1, 2.2
524  ds >> filename >> line;
525  }
526  setBinding(objectId, propertyName, expr, isLiteralValue, filename, line);
527 
528  rs << QByteArray("SET_BINDING_R") << queryId;
529 
530  } else if (type == "RESET_BINDING") {
531  int objectId;
532  QString propertyName;
533  ds >> objectId >> propertyName;
534  resetBinding(objectId, propertyName);
535 
536  rs << QByteArray("SET_BINDING_R") << queryId;
537 
538  } else if (type == "SET_METHOD_BODY") {
539  int objectId;
541  QString methodBody;
542  ds >> objectId >> methodName >> methodBody;
543  setMethodBody(objectId, methodName, methodBody);
544 
545  rs << QByteArray("SET_BINDING_R") << queryId;
546  }
547  sendMessage(reply);
548 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
int type
Definition: qmetatype.cpp:239
static QObject * objectForId(int)
Returns the object for unique id.
void buildStatesList(QDeclarativeContext *, bool)
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QVariant valueContents(const QVariant &defaultValue) const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
The QString class provides a Unicode character string.
Definition: qstring.h:83
T * qobject_cast(QObject *object)
Definition: qobject.h:375
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
bool addWatch(int id, quint32 objectId)
void buildObjectList(QDataStream &, QDeclarativeContext *)
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QDeclarativeContext * rootContext() const
Returns the engine&#39;s root context.
void resetBinding(int objectId, const QString &propertyName)
static int idForObject(QObject *)
Returns a unique id for object.
void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename=QString(), int line=-1)
The QDeclarativeEngine class provides an environment for instantiating QML components.
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...
QString objectName() const
void setMethodBody(int objectId, const QString &method, const QString &body)
The QDeclarativeContext class defines a context within a QML engine.
QVariant property(const char *name) const
Returns the value of the object&#39;s name property.
Definition: qobject.cpp:3807
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
The QDeclarativeExpression class evaluates JavaScript in a QML context.
void sendMessage(const QByteArray &)
void buildObjectDump(QDataStream &, QObject *, bool, bool)

◆ objectCreated()

void QDeclarativeEngineDebugService::objectCreated ( QDeclarativeEngine engine,
QObject object 
)

Definition at line 734 of file qdeclarativeenginedebugservice.cpp.

Referenced by QDeclarativeComponentPrivate::begin().

735 {
736  Q_ASSERT(engine);
737  Q_ASSERT(m_engines.contains(engine));
738 
739  int engineId = QDeclarativeDebugService::idForObject(engine);
740  int objectId = QDeclarativeDebugService::idForObject(object);
741  int parentId = QDeclarativeDebugService::idForObject(object->parent());
742 
743  QByteArray reply;
744  QDataStream rs(&reply, QIODevice::WriteOnly);
745 
746  rs << QByteArray("OBJECT_CREATED") << -1 << engineId << objectId << parentId;
747  sendMessage(reply);
748 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
static int idForObject(QObject *)
Returns a unique id for object.
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
void sendMessage(const QByteArray &)

◆ objectData()

QDeclarativeEngineDebugService::QDeclarativeObjectData QDeclarativeEngineDebugService::objectData ( QObject object)
private

Definition at line 368 of file qdeclarativeenginedebugservice.cpp.

Referenced by buildObjectDump(), and buildObjectList().

369 {
370  QDeclarativeData *ddata = QDeclarativeData::get(object);
371  QDeclarativeObjectData rv;
372  if (ddata && ddata->outerContext) {
373  rv.url = ddata->outerContext->url;
374  rv.lineNumber = ddata->lineNumber;
375  rv.columnNumber = ddata->columnNumber;
376  } else {
377  rv.lineNumber = -1;
378  rv.columnNumber = -1;
379  }
380 
381  QDeclarativeContext *context = qmlContext(object);
382  if (context) {
384  if (cdata)
385  rv.idString = cdata->findObjectId(object);
386  }
387 
388  rv.objectName = object->objectName();
389  rv.objectId = QDeclarativeDebugService::idForObject(object);
390  rv.contextId = QDeclarativeDebugService::idForObject(qmlContext(object));
391  rv.parentId = QDeclarativeDebugService::idForObject(object->parent());
392 
394  if (type) {
395  QString typeName = QLatin1String(type->qmlTypeName());
396  int lastSlash = typeName.lastIndexOf(QLatin1Char('/'));
397  rv.objectType = lastSlash < 0 ? typeName : typeName.mid(lastSlash+1);
398  } else {
399  rv.objectType = QString::fromUtf8(object->metaObject()->className());
400  int marker = rv.objectType.indexOf(QLatin1String("_QMLTYPE_"));
401  if (marker != -1)
402  rv.objectType = rv.objectType.left(marker);
403  }
404 
405  return rv;
406 }
QDeclarativeContextData * outerContext
static QDeclarativeData * get(const QObject *object, bool create=false)
int type
Definition: qmetatype.cpp:239
static QDeclarativeType * qmlType(const QByteArray &, int, int)
Returns the type (if any) of URI-qualified named name in version specified by version_major and versi...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
const char * typeName
Definition: qmetatype.cpp:239
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:2838
QString findObjectId(const QObject *obj) const
static int idForObject(QObject *)
Returns a unique id for object.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Definition: qstring.cpp:3706
int lastIndexOf(QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:3000
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
const char * className() const
Returns the class name.
Definition: qobjectdefs.h:491
The QDeclarativeContext class defines a context within a QML engine.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
static QDeclarativeContextData * get(QDeclarativeContext *context)

◆ prepareDeferredObjects()

void QDeclarativeEngineDebugService::prepareDeferredObjects ( QObject obj)
private

Definition at line 286 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived().

287 {
288  qmlExecuteDeferred(obj);
289 
290  QObjectList children = obj->children();
291  for (int ii = 0; ii < children.count(); ++ii) {
292  QObject *child = children.at(ii);
293  prepareDeferredObjects(child);
294  }
295 
296 }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *)
const QObjectList & children() const
Returns a list of child objects.
Definition: qobject.h:197

◆ propertyChanged

void QDeclarativeEngineDebugService::propertyChanged ( int  id,
int  objectId,
const QMetaProperty property,
const QVariant value 
)
privateslot

Definition at line 708 of file qdeclarativeenginedebugservice.cpp.

Referenced by QDeclarativeEngineDebugService().

709 {
710  QByteArray reply;
711  QDataStream rs(&reply, QIODevice::WriteOnly);
712 
713  rs << QByteArray("UPDATE_WATCH") << id << objectId << QByteArray(property.name()) << valueContents(value);
714 
715  sendMessage(reply);
716 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QVariant valueContents(const QVariant &defaultValue) const
const char * name() const
Returns this property&#39;s name.
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
void sendMessage(const QByteArray &)

◆ propertyData()

QDeclarativeEngineDebugService::QDeclarativeObjectProperty QDeclarativeEngineDebugService::propertyData ( QObject obj,
int  propIdx 
)
private

Definition at line 137 of file qdeclarativeenginedebugservice.cpp.

Referenced by buildObjectDump().

138 {
139  QDeclarativeObjectProperty rv;
140 
141  QMetaProperty prop = obj->metaObject()->property(propIdx);
142 
144  rv.valueTypeName = QString::fromUtf8(prop.typeName());
145  rv.name = QString::fromUtf8(prop.name());
146  rv.hasNotifySignal = prop.hasNotifySignal();
147  QDeclarativeAbstractBinding *binding =
149  if (binding)
150  rv.binding = binding->expression();
151 
154  } else if (QDeclarativeMetaType::isQObject(prop.userType())) {
156  } else if (QDeclarativeMetaType::isList(prop.userType())) {
158  } else if (prop.userType() == QMetaType::QVariant) {
160  }
161 
162  QVariant value;
163  if (rv.type != QDeclarativeObjectProperty::Unknown && prop.userType() != 0) {
164  value = prop.read(obj);
165  }
166  rv.value = valueContents(value);
167 
168  return rv;
169 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
QVariant valueContents(const QVariant &defaultValue) const
static QDeclarativeAbstractBinding * binding(QObject *, int coreIndex, int valueTypeIndex)
int userType() const
Returns this property&#39;s user type.
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
const char * name() const
Returns this property&#39;s name.
virtual QString expression() const
QVariant read(const QObject *obj) const
Reads the property&#39;s value from the given object.
The QDeclarativeProperty class abstracts accessing properties on objects created from QML...
The QMetaProperty class provides meta-data about a property.
Definition: qmetaobject.h:176
T value() const
Returns the stored value converted to the template type T.
Definition: qvariant.h:332
bool hasNotifySignal() const
Returns true if this property has a corresponding change notify signal; otherwise returns false...
const char * typeName() const
Returns the name of this property&#39;s type.
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
QMetaProperty property(int index) const
Returns the meta-data for the property with the given index.
QVariant::Type type() const
Returns this property&#39;s type.

◆ remEngine()

void QDeclarativeEngineDebugService::remEngine ( QDeclarativeEngine engine)

Definition at line 726 of file qdeclarativeenginedebugservice.cpp.

Referenced by QDeclarativeEngine::~QDeclarativeEngine().

727 {
728  Q_ASSERT(engine);
729  Q_ASSERT(m_engines.contains(engine));
730 
731  m_engines.removeAll(engine);
732 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Definition: qlist.h:770

◆ resetBinding()

void QDeclarativeEngineDebugService::resetBinding ( int  objectId,
const QString propertyName 
)
private

Definition at line 624 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived().

625 {
626  QObject *object = objectForId(objectId);
627  QDeclarativeContext *context = qmlContext(object);
628 
629  if (object && context) {
630  if (object->property(propertyName.toLatin1()).isValid()) {
631  QDeclarativeProperty property(object, propertyName);
633  if (oldBinding) {
635  if (oldBinding)
636  oldBinding->destroy();
637  }
638  if (property.isResettable()) {
639  // Note: this will reset the property in any case, without regard to states
640  // Right now almost no QDeclarativeItem has reset methods for its properties (with the
641  // notable exception of QDeclarativeAnchors), so this is not a big issue
642  // later on, setBinding does take states into account
643  property.reset();
644  } else {
645  // overwrite with default value
646  if (QDeclarativeType *objType = QDeclarativeMetaType::qmlType(object->metaObject())) {
647  if (QObject *emptyObject = objType->create()) {
648  if (emptyObject->property(propertyName.toLatin1()).isValid()) {
649  QVariant defaultValue = QDeclarativeProperty(emptyObject, propertyName).read();
650  if (defaultValue.isValid()) {
651  setBinding(objectId, propertyName, defaultValue, true);
652  }
653  }
654  delete emptyObject;
655  }
656  }
657  }
658  } else if (hasValidSignal(object, propertyName)) {
659  QDeclarativeProperty property(object, propertyName, context);
661  } else {
662  if (QDeclarativePropertyChanges *propertyChanges = qobject_cast<QDeclarativePropertyChanges *>(object)) {
663  propertyChanges->removeProperty(propertyName);
664  }
665  }
666  }
667 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
static QObject * objectForId(int)
Returns the object for unique id.
virtual void destroy(DestroyMode mode=DisconnectBinding)
Destroy the binding.
static QDeclarativeAbstractBinding * binding(QObject *, int coreIndex, int valueTypeIndex)
static QDeclarativeType * qmlType(const QByteArray &, int, int)
Returns the type (if any) of URI-qualified named name in version specified by version_major and versi...
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
static bool hasValidSignal(QObject *object, const QString &propertyName)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
static QDeclarativeAbstractBinding * setBinding(QObject *, int coreIndex, int valueTypeIndex, QDeclarativeAbstractBinding *, WriteFlags flags=DontRemoveBinding)
void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename=QString(), int line=-1)
The QDeclarativeContext class defines a context within a QML engine.
QVariant property(const char *name) const
Returns the value of the object&#39;s name property.
Definition: qobject.cpp:3807
The QDeclarativeProperty class abstracts accessing properties on objects created from QML...
static QDeclarativeExpression * setSignalExpression(const QDeclarativeProperty &that, QDeclarativeExpression *)
Set the signal expression associated with this signal property to expr.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
Definition: qvariant.h:485
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
QVariant read() const
Returns the property value.

◆ setBinding()

void QDeclarativeEngineDebugService::setBinding ( int  objectId,
const QString propertyName,
const QVariant expression,
bool  isLiteralValue,
QString  filename = QString(),
int  line = -1 
)
private

Definition at line 550 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived(), and resetBinding().

556 {
557  QObject *object = objectForId(objectId);
558  QDeclarativeContext *context = qmlContext(object);
559 
560  if (object && context) {
561  QDeclarativeProperty property(object, propertyName, context);
562  if (property.isValid()) {
563 
564  bool inBaseState = true;
565 
566  foreach(QWeakPointer<QDeclarativeState> statePointer, m_allStates) {
567  if (QDeclarativeState *state = statePointer.data()) {
568  // here we assume that the revert list on itself defines the base state
569  if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) {
570  inBaseState = false;
571 
572  QDeclarativeBinding *newBinding = 0;
573  if (!isLiteralValue) {
574  newBinding = new QDeclarativeBinding(expression.toString(), object, context);
575  newBinding->setTarget(property);
576  newBinding->setNotifyOnValueChanged(true);
577  newBinding->setSourceLocation(filename, line);
578  }
579 
580  state->changeBindingInRevertList(object, propertyName, newBinding);
581 
582  if (isLiteralValue)
583  state->changeValueInRevertList(object, propertyName, expression);
584  }
585  }
586  }
587 
588  if (inBaseState) {
589  if (isLiteralValue) {
590  property.write(expression);
591  } else if (hasValidSignal(object, propertyName)) {
592  QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
594  declarativeExpression->setSourceLocation(filename, line);
595  } else if (property.isProperty()) {
596  QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
597  binding->setTarget(property);
598  binding->setSourceLocation(filename, line);
599  binding->setNotifyOnValueChanged(true);
601  if (oldBinding)
602  oldBinding->destroy();
603  binding->update();
604  } else {
605  qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object;
606  }
607  }
608 
609  } else {
610  // not a valid property
611  if (QDeclarativePropertyChanges *propertyChanges = qobject_cast<QDeclarativePropertyChanges *>(object)) {
612  if (isLiteralValue) {
613  propertyChanges->changeValue(propertyName, expression);
614  } else {
615  propertyChanges->changeExpression(propertyName, expression.toString());
616  }
617  } else {
618  qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object;
619  }
620  }
621  }
622 }
static QObject * objectForId(int)
Returns the object for unique id.
void setTarget(const QDeclarativeProperty &)
virtual void destroy(DestroyMode mode=DisconnectBinding)
Destroy the binding.
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
Definition: qvariant.cpp:2270
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
T * data() const
void setNotifyOnValueChanged(bool)
Sets whether the valueChanged() signal is emitted when the expression&#39;s evaluated value changes...
virtual void update(QDeclarativePropertyPrivate::WriteFlags flags)
static bool hasValidSignal(QObject *object, const QString &propertyName)
Q_CORE_EXPORT void qWarning(const char *,...)
static QDeclarativeAbstractBinding * setBinding(QObject *, int coreIndex, int valueTypeIndex, QDeclarativeAbstractBinding *, WriteFlags flags=DontRemoveBinding)
The QDeclarativeContext class defines a context within a QML engine.
void setSourceLocation(const QString &fileName, int line)
Set the location of this expression to line of url.
QVariant property(const char *name) const
Returns the value of the object&#39;s name property.
Definition: qobject.cpp:3807
The QDeclarativeProperty class abstracts accessing properties on objects created from QML...
static QDeclarativeExpression * setSignalExpression(const QDeclarativeProperty &that, QDeclarativeExpression *)
Set the signal expression associated with this signal property to expr.
The QDeclarativeExpression class evaluates JavaScript in a QML context.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
Definition: qvariant.h:485
The QWeakPointer class holds a weak reference to a shared pointer.
QList< QWeakPointer< QDeclarativeState > > m_allStates

◆ setMethodBody()

void QDeclarativeEngineDebugService::setMethodBody ( int  objectId,
const QString method,
const QString body 
)
private

Definition at line 669 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived().

670 {
671  QObject *object = objectForId(objectId);
672  QDeclarativeContext *context = qmlContext(object);
673  if (!object || !context || !context->engine())
674  return;
676  if (!contextData)
677  return;
678 
681  QDeclarativePropertyCache::property(context->engine(), object, method, dummy);
682 
684  return;
685 
686  QMetaMethod metaMethod = object->metaObject()->method(prop->coreIndex);
687  QList<QByteArray> paramNames = metaMethod.parameterNames();
688 
689  QString paramStr;
690  for (int ii = 0; ii < paramNames.count(); ++ii) {
691  if (ii != 0) paramStr.append(QLatin1String(","));
692  paramStr.append(QString::fromUtf8(paramNames.at(ii)));
693  }
694 
695  QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr +
696  QLatin1String(") {");
697  jsfunction += body;
698  jsfunction += QLatin1String("\n})");
699 
700  QDeclarativeVMEMetaObject *vmeMetaObject =
702  Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this
703 
704  int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex);
705  vmeMetaObject->setVmeMethod(prop->coreIndex, QDeclarativeExpressionPrivate::evalInObjectScope(contextData, object, jsfunction, contextData->url.toString(), lineNumber, 0));
706 }
static QObject * objectForId(int)
Returns the object for unique id.
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
Definition: qurl.cpp:5896
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
void setVmeMethod(int index, const QScriptValue &)
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
static QObjectPrivate * get(QObject *o)
Definition: qobject_p.h:177
static QScriptValue evalInObjectScope(QDeclarativeContextData *, QObject *, const QString &, const QString &, int, QScriptValue *)
QList< QByteArray > parameterNames() const
Returns a list of parameter names.
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
Data * property(const QScriptDeclarativeClass::Identifier &id) const
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
static QMetaMethod metaMethod(const QMetaObject *meta, QMetaMethod::MethodType type, int index)
QString & append(QChar c)
Definition: qstring.cpp:1777
QMetaObject * metaObject
Definition: qobject.h:107
The QDeclarativeContext class defines a context within a QML engine.
QDeclarativeEngine * engine() const
Return the context&#39;s QDeclarativeEngine, or 0 if the context has no QDeclarativeEngine or the QDeclar...
The QMetaMethod class provides meta-data about a member function.
Definition: qmetaobject.h:56
static QDeclarativeContextData * get(QDeclarativeContext *context)

◆ valueContents()

QVariant QDeclarativeEngineDebugService::valueContents ( const QVariant defaultValue) const
private

Definition at line 171 of file qdeclarativeenginedebugservice.cpp.

Referenced by messageReceived(), propertyChanged(), and propertyData().

172 {
173  int userType = value.userType();
174 
175  if (value.type() == QVariant::List) {
176  QVariantList contents;
177  QVariantList list = value.toList();
178  int count = list.size();
179  for (int i = 0; i < count; i++)
180  contents << valueContents(list.at(i));
181  return contents;
182  }
183 
184  if (value.type() == QVariant::Map) {
185  QVariantMap contents;
186  QMapIterator<QString, QVariant> i(value.toMap());
187  while (i.hasNext()) {
188  i.next();
189  contents.insert(i.key(), valueContents(i.value()));
190  }
191  return contents;
192  }
193 
195  return value;
196 
197  if (QDeclarativeMetaType::isQObject(userType)) {
199  if (o) {
200  QString name = o->objectName();
201  if (name.isEmpty())
202  name = QLatin1String("<unnamed object>");
203  return name;
204  }
205  }
206 
207  return QLatin1String("<unknown value>");
208 }
static QObject * toQObject(const QVariant &, bool *ok=0)
QString objectName
the name of this object
Definition: qobject.h:114
QVariant valueContents(const QVariant &defaultValue) const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
Definition: qmap.h:559
int size() const
Returns the number of items in the list.
Definition: qlist.h:137

Properties

◆ m_allStates

QList<QWeakPointer<QDeclarativeState> > QDeclarativeEngineDebugService::m_allStates
private

Definition at line 125 of file qdeclarativeenginedebugservice_p.h.

Referenced by buildStatesList(), and setBinding().

◆ m_engines

QList<QDeclarativeEngine *> QDeclarativeEngineDebugService::m_engines
private

◆ m_watch

QDeclarativeWatcher* QDeclarativeEngineDebugService::m_watch
private

The documentation for this class was generated from the following files: