diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-06 12:49:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-06 12:49:47 (GMT) |
commit | 6d4c3c7fe561d472b34bfed1ab9d3665cee1f659 (patch) | |
tree | 7dcfde2a2c565a08333959e3a2c8f5bb3f54284a | |
parent | 7c1093d3e8eba6b8ab92c6503fde0c941550125d (diff) | |
download | Qt-6d4c3c7fe561d472b34bfed1ab9d3665cee1f659.zip Qt-6d4c3c7fe561d472b34bfed1ab9d3665cee1f659.tar.gz Qt-6d4c3c7fe561d472b34bfed1ab9d3665cee1f659.tar.bz2 |
Add an (unused) locations field to compiled data
-rw-r--r-- | src/declarative/qml/qmlcompiler.cpp | 16 | ||||
-rw-r--r-- | src/declarative/qml/qmlcompiler_p.h | 11 | ||||
-rw-r--r-- | src/declarative/qml/qmlparser_p.h | 4 |
3 files changed, 22 insertions, 9 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 8eb5fa1..13fc332 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -136,6 +136,22 @@ int QmlCompiledData::indexForInt(int *data, int count) return idx; } +int QmlCompiledData::indexForLocation(const QmlParser::Location &l) +{ + // ### FIXME + int rv = locations.count(); + locations << l; + return rv; +} + +int QmlCompiledData::indexForLocation(const QmlParser::LocationSpan &l) +{ + // ### FIXME + int rv = locations.count(); + locations << l.start << l.end; + return rv; +} + QmlCompiler::QmlCompiler() : exceptionLine(-1), exceptionColumn(-1), output(0) { diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h index e2b8388..b885e7b 100644 --- a/src/declarative/qml/qmlcompiler_p.h +++ b/src/declarative/qml/qmlcompiler_p.h @@ -48,6 +48,8 @@ #include <qmlerror.h> #include <private/qmlinstruction_p.h> #include <private/qmlcompositetypemanager_p.h> +#include <private/qmlparser_p.h> + class QStringList; QT_BEGIN_NAMESPACE @@ -56,12 +58,6 @@ class QmlComponent; class QmlCompiledComponent; class QmlContext; -namespace QmlParser { - class Object; - class Property; - class Value; -}; - class QmlCompiledData { public: @@ -98,6 +94,7 @@ public: QList<CustomTypeData> customTypeData; QList<QByteArray> datas; QList<QMetaObject *> mos; + QList<QmlParser::Location> locations; QList<QmlInstruction> bytecode; private: @@ -106,6 +103,8 @@ private: int indexForByteArray(const QByteArray &); int indexForFloat(float *, int); int indexForInt(int *, int); + int indexForLocation(const QmlParser::Location &); + int indexForLocation(const QmlParser::LocationSpan &); }; class Q_DECLARATIVE_EXPORT QmlCompiler diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h index 5910705..31f8702 100644 --- a/src/declarative/qml/qmlparser_p.h +++ b/src/declarative/qml/qmlparser_p.h @@ -45,10 +45,8 @@ #include <QByteArray> #include <QList> #include <qml.h> -#include "qmlcomponent_p.h" #include <private/qmlrefcount_p.h> -#include "qmlcompiledcomponent_p.h" - +#include <private/qobject_p.h> QT_BEGIN_HEADER |