Qt 4.8
Public Functions | Public Variables | List of all members
ObjectData Struct Reference
Inheritance diagram for ObjectData:
QScriptDeclarativeClass::Object

Public Functions

 ObjectData (QObject *o, int t)
 
virtual ~ObjectData ()
 
- Public Functions inherited from QScriptDeclarativeClass::Object
virtual ~Object ()
 

Public Variables

QDeclarativeGuard< QObjectobject
 
int type
 

Detailed Description

Definition at line 69 of file qdeclarativeobjectscriptclass.cpp.

Constructors and Destructors

◆ ObjectData()

ObjectData::ObjectData ( QObject o,
int  t 
)
inline

Definition at line 70 of file qdeclarativeobjectscriptclass.cpp.

70  : object(o), type(t) {
71  if (o) {
72  QDeclarativeData *ddata = QDeclarativeData::get(object, true);
73  if (ddata) ddata->objectDataRefCount++;
74  }
75  }
static QDeclarativeData * get(const QObject *object, bool create=false)
QDeclarativeGuard< QObject > object

◆ ~ObjectData()

virtual ObjectData::~ObjectData ( )
inlinevirtual

Definition at line 77 of file qdeclarativeobjectscriptclass.cpp.

77  {
78  if (object && !object->parent()) {
79  QDeclarativeData *ddata = QDeclarativeData::get(object, false);
80  if (ddata && !ddata->indestructible && 0 == --ddata->objectDataRefCount)
81  object->deleteLater();
82  }
83  }
static QDeclarativeData * get(const QObject *object, bool create=false)
QDeclarativeGuard< QObject > object
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273

Properties

◆ object

QDeclarativeGuard<QObject> ObjectData::object

◆ type

int ObjectData::type

Definition at line 86 of file qdeclarativeobjectscriptclass.cpp.


The documentation for this struct was generated from the following file: