Qt 4.8
Public Functions | Protected Functions | Properties | Friends | List of all members
QDeclarativeCleanup Class Referenceabstract

The QDeclarativeCleanup provides a callback when a QDeclarativeEngine is deleted. More...

#include <qdeclarativecleanup_p.h>

Inheritance diagram for QDeclarativeCleanup:
QDeclarativeCompiledData QDeclarativeIntegerCache QDeclarativePropertyCache QDeclarativeTypeNameCache

Public Functions

 QDeclarativeCleanup (QDeclarativeEngine *)
 
virtual ~QDeclarativeCleanup ()
 

Protected Functions

virtual void clear ()=0
 

Properties

QDeclarativeCleanupnext
 
QDeclarativeCleanup ** prev
 

Friends

class QDeclarativeEnginePrivate
 

Detailed Description

The QDeclarativeCleanup provides a callback when a QDeclarativeEngine is deleted.

Warning
This function is not part of the public interface.

Any object that needs cleanup to occur before the QDeclarativeEngine's QScriptEngine is destroyed should inherit from QDeclarativeCleanup. The clear() virtual method will be called by QDeclarativeEngine just before it deletes the QScriptEngine.

Definition at line 61 of file qdeclarativecleanup_p.h.

Constructors and Destructors

◆ QDeclarativeCleanup()

QDeclarativeCleanup::QDeclarativeCleanup ( QDeclarativeEngine engine)
Warning
This function is not part of the public interface.

Create a QDeclarativeCleanup for engine

Definition at line 66 of file qdeclarativecleanup.cpp.

67 : prev(0), next(0)
68 {
69  if (!engine)
70  return;
71 
73 
74  if (p->cleanup) next = p->cleanup;
75  p->cleanup = this;
76  prev = &p->cleanup;
77  if (next) next->prev = &next;
78 }
QDeclarativeCleanup * cleanup
static QDeclarativeEnginePrivate * get(QDeclarativeEngine *e)
QDeclarativeCleanup ** prev
QDeclarativeCleanup * next

◆ ~QDeclarativeCleanup()

QDeclarativeCleanup::~QDeclarativeCleanup ( )
virtual
Warning
This function is not part of the public interface.

Definition at line 83 of file qdeclarativecleanup.cpp.

84 {
85  if (prev) *prev = next;
86  if (next) next->prev = prev;
87  prev = 0;
88  next = 0;
89 }
QDeclarativeCleanup ** prev
QDeclarativeCleanup * next

Functions

◆ clear()

virtual void QDeclarativeCleanup::clear ( )
protectedpure virtual

Friends and Related Functions

◆ QDeclarativeEnginePrivate

Definition at line 71 of file qdeclarativecleanup_p.h.

Properties

◆ next

QDeclarativeCleanup* QDeclarativeCleanup::next
private

◆ prev

QDeclarativeCleanup** QDeclarativeCleanup::prev
private

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