aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloader_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmltypeloader_p.h')
-rw-r--r--src/qml/qml/qqmltypeloader_p.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index b93cf2942d..ab6f47e8de 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -69,7 +69,7 @@
#include <private/qqmlbundle_p.h>
#include <private/qflagpointer_p.h>
-#include <private/qv4value_p.h>
+#include <private/qv4value_inl_p.h>
#include <private/qv4script_p.h>
QT_BEGIN_NAMESPACE
@@ -189,7 +189,7 @@ private:
// m_errors should *always* be written before the status is set to Error.
// We use the status change as a memory fence around m_errors so that locking
- // isn't required. Once the status is set to Error (or Complete), m_errors
+ // isn't required. Once the status is set to Error (or Complete), m_errors
// cannot be changed.
QList<QQmlError> m_errors;
@@ -244,7 +244,7 @@ private:
void loadWithStaticDataThread(QQmlDataBlob *, const QByteArray &);
void networkReplyFinished(QNetworkReply *);
void networkReplyProgress(QNetworkReply *, qint64, qint64);
-
+
typedef QHash<QNetworkReply *, QQmlDataBlob *> NetworkReplies;
void setData(QQmlDataBlob *, const QByteArray &);
@@ -396,7 +396,7 @@ class Q_AUTOTEST_EXPORT QQmlTypeData : public QQmlTypeLoader::Blob
public:
struct TypeReference
{
- TypeReference() : type(0), majorVersion(0), minorVersion(0), typeData(0) {}
+ TypeReference() : type(0), majorVersion(0), minorVersion(0), typeData(0), needsCreation(true) {}
QQmlScript::Location location;
QQmlType *type;
@@ -404,6 +404,7 @@ public:
int minorVersion;
QQmlTypeData *typeData;
QString prefix; // used by CompositeSingleton types
+ bool needsCreation;
};
struct ScriptReference
@@ -425,7 +426,12 @@ public:
const QQmlScript::Parser &parser() const;
+ // old compiler:
const QList<TypeReference> &resolvedTypes() const;
+ // new compiler:
+ const QHash<int, TypeReference> &resolvedTypeRefs() const { return m_resolvedTypes; }
+ // ---
+
const QList<ScriptReference> &resolvedScripts() const;
const QSet<QString> &namespaces() const;
const QList<TypeReference> &compositeSingletons() const;
@@ -486,10 +492,10 @@ private:
bool loadImplicitImport();
};
-// QQmlScriptData instances are created, uninitialized, by the loader in the
+// QQmlScriptData instances are created, uninitialized, by the loader in the
// load thread. The first time they are used by the VME, they are initialized which
// creates their v8 objects and they are referenced and added to the engine's cleanup
-// list. During QQmlCleanup::clear() all v8 resources are destroyed, and the
+// list. During QQmlCleanup::clear() all v8 resources are destroyed, and the
// reference that was created is released but final deletion only occurs once all the
// references as released. This is all intended to ensure that the v8 resources are
// only created and destroyed in the main thread :)