Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / src / declarative / qml / qdeclarativecomponent_p.h
index 7677f30..2a23736 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the QtDeclarative module of the Qt Toolkit.
 **
@@ -35,6 +34,7 @@
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 
 #include "qdeclarativecomponent.h"
 
-#include "private/qdeclarativeengine_p.h"
-#include "private/qdeclarativetypeloader_p.h"
-#include "private/qbitfield_p.h"
+#include <private/qv8_p.h>
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativetypeloader_p.h"
+#include <private/qbitfield_p.h>
+#include "qdeclarativevme_p.h"
 #include "qdeclarativeerror.h"
 #include "qdeclarative.h"
 
 
 QT_BEGIN_NAMESPACE
 
+class QV8Engine;
+
 class QDeclarativeComponent;
 class QDeclarativeEngine;
 class QDeclarativeCompiledData;
 
 class QDeclarativeComponentAttached;
-class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback
 {
     Q_DECLARE_PUBLIC(QDeclarativeComponent)
         
 public:
     QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), cc(0), engine(0), creationContext(0) {}
 
-    QObject *beginCreate(QDeclarativeContextData *, const QBitField &);
+    QObject *beginCreate(QDeclarativeContextData *);
     void completeCreate();
+    void initializeObjectWithInitialProperties(v8::Handle<v8::Object> qmlGlobal, v8::Handle<v8::Object> valuemap, QObject *toCreate);
 
     QDeclarativeTypeData *typeData;
     virtual void typeDataReady(QDeclarativeTypeData *);
@@ -97,20 +102,14 @@ public:
     QDeclarativeCompiledData *cc;
 
     struct ConstructionState {
-        ConstructionState() : componentAttached(0), completePending(false) {}
-        QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding> > bindValues;
-        QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus> > parserStatus;
-        QList<QPair<QDeclarativeGuard<QObject>, int> > finalizedParserStatus;
-        QDeclarativeComponentAttached *componentAttached;
+        ConstructionState() : completePending(false) {}
+
+        QDeclarativeVME vme;
         QList<QDeclarativeError> errors;
         bool completePending;
     };
     ConstructionState state;
 
-    static QObject *begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext,
-                          QDeclarativeCompiledData *component, int start, 
-                          ConstructionState *state, QList<QDeclarativeError> *errors, 
-                          const QBitField &bindings = QBitField());
     static void beginDeferred(QDeclarativeEnginePrivate *enginePriv, QObject *object, 
                               ConstructionState *state);
     static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state);
@@ -125,34 +124,6 @@ public:
     }
 };
 
-class QDeclarativeComponentAttached : public QObject
-{
-    Q_OBJECT
-public:
-    QDeclarativeComponentAttached(QObject *parent = 0);
-    ~QDeclarativeComponentAttached();
-
-    void add(QDeclarativeComponentAttached **a) {
-        prev = a; next = *a; *a = this;
-        if (next) next->prev = &next;
-    }
-    void rem() {
-        if (next) next->prev = prev;
-        *prev = next;
-        next = 0; prev = 0;
-    }
-    QDeclarativeComponentAttached **prev;
-    QDeclarativeComponentAttached *next;
-
-Q_SIGNALS:
-    void completed();
-    void destruction();
-
-private:
-    friend class QDeclarativeContextData;
-    friend class QDeclarativeComponentPrivate;
-};
-
 QT_END_NAMESPACE
 
 #endif // QDECLARATIVECOMPONENT_P_H