summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-02-21 14:56:16 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2011-02-21 15:05:04 +0100
commit1d4cd9b7f28b867aee3815fabdbd9c0fe39a0bdb (patch)
treeb86606ffbcf14a95ee54f8cb8693f379f9723add /src/plugins
parent9232b3d5e8f08a2f03230f31b506ae5ed9f5ea97 (diff)
downloadqt-creator-1d4cd9b7f28b867aee3815fabdbd9c0fe39a0bdb.tar.gz
QmlJS: Remove the strict separation of types and attached types.
The problem was that several lookup calls suddenly failed because the actual QML types were no longer in the default scope chain. However, the QML documentation says the type names are in the scope. Also, 'MyComponent.' in a JS-expression context only showed the attached properties of MyComponent and missed the enums. With this change completion now may offers too many options, but that's better than missing some. This reverts parts of 490f2797f636ff49ce0a778610a2532d1277e4d4 Reviewed-by: Leandro Melo
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp2
-rw-r--r--src/plugins/qmljseditor/qmljsfindreferences.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
index f967c97da0..39c3d9c33b 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
@@ -308,7 +308,7 @@ public:
bool isAttachedProperty = false;
if (! propertyName.isEmpty() && propertyName[0].isUpper()) {
isAttachedProperty = true;
- if (const Interpreter::ObjectValue *qmlTypes = m_context->scopeChain().qmlAttachedTypes)
+ if (const Interpreter::ObjectValue *qmlTypes = m_context->scopeChain().qmlTypes)
scopeObjects += qmlTypes;
}
diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp
index 779e3222d1..a92bcbacdb 100644
--- a/src/plugins/qmljseditor/qmljsfindreferences.cpp
+++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp
@@ -178,7 +178,7 @@ protected:
const ScopeChain &chain = _context->scopeChain();
if (chain.jsScopes.contains(scope)
|| chain.qmlScopeObjects.contains(scope)
- || chain.qmlAttachedTypes == scope
+ || chain.qmlTypes == scope
|| chain.globalScope == scope)
return false;