aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlcodegenerator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-03 13:30:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-04 18:28:25 +0100
commite5bd40742ab8d0b4ffc9307eb46bc41456fe394a (patch)
treec14979f7f451e90988714450607234059fa5d022 /src/qml/compiler/qqmlcodegenerator_p.h
parent48144d3b29a1204bf1820d782228fbd9e25f318e (diff)
[new compiler] Cleanup empty string handling
Ensure that the empty string always has index 0, that simplifies the code in a few places and makes it easier to check for the empty string in other places where there's no access to the string pool itself. Change-Id: Icd204aec478e8350ef3fee75d89bda1f88cffe26 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmlcodegenerator_p.h')
-rw-r--r--src/qml/compiler/qqmlcodegenerator_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h
index 5475d7f57a..ed94a99726 100644
--- a/src/qml/compiler/qqmlcodegenerator_p.h
+++ b/src/qml/compiler/qqmlcodegenerator_p.h
@@ -161,7 +161,7 @@ struct QmlObject
{
Q_DECLARE_TR_FUNCTIONS(QmlObject)
public:
- int inheritedTypeNameIndex;
+ quint32 inheritedTypeNameIndex;
quint32 idIndex;
int indexOfDefaultProperty;
@@ -191,7 +191,7 @@ public:
QString appendProperty(QmlProperty *prop, const QString &propertyName, bool isDefaultProperty, const AST::SourceLocation &defaultToken, AST::SourceLocation *errorLocation);
void appendFunction(Function *f);
- QString appendBinding(Binding *b, bool isListBinding, bool bindToDefaultProperty);
+ QString appendBinding(Binding *b, bool isListBinding);
private:
PoolList<QmlProperty> *properties;
@@ -305,7 +305,7 @@ public:
static QQmlScript::LocationSpan location(AST::SourceLocation start, AST::SourceLocation end);
- int registerString(const QString &str) const { return jsGenerator->registerString(str); }
+ quint32 registerString(const QString &str) const { return jsGenerator->registerString(str); }
template <typename _Tp> _Tp *New() { return pool->New<_Tp>(); }
QString stringAt(int index) const { return jsGenerator->strings.at(index); }
@@ -330,7 +330,6 @@ public:
QString sourceCode;
QUrl url;
QV4::Compiler::JSUnitGenerator *jsGenerator;
- quint32 emptyStringIndex;
};
struct Q_QML_EXPORT QmlUnitGenerator