summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsscopebuilder.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-03-01 13:01:05 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-03-01 13:13:02 +0100
commit13d7612f0956e086f358c13770b3421c7593e191 (patch)
tree929189d22982da1a9cbdbd1bd66cd3091d9718fc /src/libs/qmljs/qmljsscopebuilder.cpp
parent079897f2958f6c0548ba38d28968ea086c30fd37 (diff)
downloadqt-creator-13d7612f0956e086f358c13770b3421c7593e191.tar.gz
Removed private header dependencies and introduced loading QML types from XML file.
Diffstat (limited to 'src/libs/qmljs/qmljsscopebuilder.cpp')
-rw-r--r--src/libs/qmljs/qmljsscopebuilder.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp
index 9ab4381441..2ebd2a05ac 100644
--- a/src/libs/qmljs/qmljsscopebuilder.cpp
+++ b/src/libs/qmljs/qmljsscopebuilder.cpp
@@ -73,13 +73,12 @@ void ScopeBuilder::setQmlScopeObject(Node *node)
return; // Probably syntax errors, where we're working with a "recovered" AST.
}
-#ifndef NO_DECLARATIVE_BACKEND
// check if the object has a Qt.ListElement ancestor
const ObjectValue *prototype = scopeObject->prototype(_context);
while (prototype) {
if (const QmlObjectValue *qmlMetaObject = dynamic_cast<const QmlObjectValue *>(prototype)) {
- // ### Also check for Qt package. Involves changes in QmlObjectValue.
- if (qmlMetaObject->qmlTypeName() == QLatin1String("ListElement")) {
+ if (qmlMetaObject->className() == QLatin1String("ListElement")
+ && qmlMetaObject->packageName() == QLatin1String("Qt")) {
scopeChain.qmlScopeObjects.clear();
break;
}
@@ -91,8 +90,8 @@ void ScopeBuilder::setQmlScopeObject(Node *node)
prototype = scopeObject->prototype(_context);
while (prototype) {
if (const QmlObjectValue *qmlMetaObject = dynamic_cast<const QmlObjectValue *>(prototype)) {
- // ### Also check for Qt package. Involves changes in QmlObjectValue.
- if (qmlMetaObject->qmlTypeName() == QLatin1String("PropertyChanges"))
+ if (qmlMetaObject->className() == QLatin1String("PropertyChanges")
+ && qmlMetaObject->packageName() == QLatin1String("Qt"))
break;
}
prototype = prototype->prototype(_context);
@@ -126,5 +125,4 @@ void ScopeBuilder::setQmlScopeObject(Node *node)
}
}
}
-#endif
}