aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-04 14:19:01 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-07 06:40:33 +0200
commit438d50d63c48bbbfd185bd7e1a0d6e6174c1791e (patch)
treeb39d6a93c277718fa5a8c12125422c34f8dbee91 /src
parent528acf2804e2e49b901356eef79aed19f94e71e3 (diff)
Remove unused fields
Change-Id: I344beb3a01de5b7573a10f4709f334ac64677ad2 Reviewed-on: http://codereview.qt.nokia.com/1131 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeparser.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h13
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp16
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp5
5 files changed, 4 insertions, 35 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 32025cc416..7571704f19 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -755,8 +755,6 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeParser::Object *obj, const Bi
output->types.at(obj->type);
obj->metatype = tr.metaObject();
- if (tr.component)
- obj->url = tr.component->url;
if (tr.type)
obj->typeName = tr.type->qmlTypeName();
obj->className = tr.className;
@@ -819,7 +817,6 @@ bool QDeclarativeCompiler::buildObject(QDeclarativeParser::Object *obj, const Bi
defaultProperty->isDefault = true;
defaultProperty->location = obj->defaultProperty->location;
defaultProperty->listValueRange = obj->defaultProperty->listValueRange;
- defaultProperty->listCommaPositions = obj->defaultProperty->listCommaPositions;
defaultProperty->values = obj->defaultProperty->values;
defaultProperty->values += explicitProperty->values;
diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp
index cd671bc293..0447ea3227 100644
--- a/src/declarative/qml/qdeclarativeparser.cpp
+++ b/src/declarative/qml/qdeclarativeparser.cpp
@@ -66,7 +66,7 @@ using namespace QDeclarativeJS;
using namespace QDeclarativeParser;
QDeclarativeParser::Object::Object()
-: type(-1), majorVersion(-1), minorVersion(-1), idIndex(-1), metatype(0), synthCache(0), defaultProperty(0), parserStatusCast(-1)
+: type(-1), idIndex(-1), metatype(0), synthCache(0), defaultProperty(0), parserStatusCast(-1)
{
}
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index 722f9fbd5e..59c41ef8de 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -77,13 +77,13 @@ namespace QDeclarativeJS { namespace AST { class Node; } }
/*
XXX
- These types are created (and owned) by the QDeclarativeXmlParser and consumed by the
+ These types are created (and owned) by the QDeclarativeScriptParser and consumed by the
QDeclarativeCompiler. During the compilation phase the compiler will update some of
- the fields for both its own use and for the use of the upcoming QDeclarativeDom API.
+ the fields for its own use.
The types are part of the generic sounding "QDeclarativeParser" namespace for legacy
reasons (there used to be more in this namespace) and will be cleaned up and
- migrated into a more appropriate location shortly.
+ migrated into a more appropriate location eventually.
*/
namespace QDeclarativeParser
{
@@ -124,12 +124,6 @@ namespace QDeclarativeParser
// QDeclarativeCompiledData::types array, or -1 if the object is a property
// group.
int type;
- // The url of this object if it is an external type. Used by the DOM
- QUrl url;
-
- // version information if type is defined in library or C++
- int majorVersion;
- int minorVersion;
// The fully-qualified name of this type
QByteArray typeName;
@@ -366,7 +360,6 @@ namespace QDeclarativeParser
LocationSpan location;
LocationRange listValueRange;
- QList<int> listCommaPositions;
};
}
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index df1dec5efc..3f843295d7 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -740,19 +740,6 @@ bool ProcessAST::visit(AST::UiScriptBinding *node)
return false;
}
-static QList<int> collectCommas(AST::UiArrayMemberList *members)
-{
- QList<int> commas;
-
- if (members) {
- for (AST::UiArrayMemberList *it = members->next; it; it = it->next) {
- commas.append(it->commaToken.offset);
- }
- }
-
- return commas;
-}
-
// UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
bool ProcessAST::visit(AST::UiArrayBinding *node)
{
@@ -781,9 +768,6 @@ bool ProcessAST::visit(AST::UiArrayBinding *node)
prop->listValueRange.offset = node->lbracketToken.offset;
prop->listValueRange.length = node->rbracketToken.offset + node->rbracketToken.length - node->lbracketToken.offset;
- // Store the positions of the comma token too, again for the DOM to be able to retrieve it.
- prop->listCommaPositions = collectCommas(node->members);
-
while (propertyCount--)
_stateStack.pop();
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index a788b4b915..47c90bd186 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -1053,11 +1053,6 @@ void QDeclarativeTypeData::resolveTypes()
if (ref.type) {
ref.majorVersion = majorVersion;
ref.minorVersion = minorVersion;
- foreach (QDeclarativeParser::Object *obj, parserRef->refObjects) {
- // store namespace for DOM
- obj->majorVersion = majorVersion;
- obj->minorVersion = minorVersion;
- }
} else {
ref.typeData = typeLoader()->get(url);
addDependency(ref.typeData);