Commit 6a829f5a authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlJsLiveTextPreview: adjusted ast offsets for objectbindings

Reviewed-by: Kai Koehne
parent be3f3a15
...@@ -82,6 +82,7 @@ class MapObjectWithDebugReference : public Visitor ...@@ -82,6 +82,7 @@ class MapObjectWithDebugReference : public Visitor
private: private:
void process(UiObjectMember *ast); void process(UiObjectMember *ast);
void process(UiObjectBinding *ast);
private: private:
int activated; int activated;
}; };
...@@ -124,6 +125,16 @@ void MapObjectWithDebugReference::process(UiObjectMember* ast) ...@@ -124,6 +125,16 @@ void MapObjectWithDebugReference::process(UiObjectMember* ast)
} }
} }
void MapObjectWithDebugReference::process(UiObjectBinding* ast)
{
if (lookupObjects.isEmpty() || activated) {
SourceLocation loc = ast->qualifiedTypeNameId->identifierToken;
QHash<QPair<int, int>, DebugIdList>::const_iterator it = ids.constFind(qMakePair<int, int>(loc.startLine, loc.startColumn));
if (it != ids.constEnd())
result[ast].append(*it);
}
}
QmlJS::ModelManagerInterface *QmlJSLiveTextPreview::modelManager() QmlJS::ModelManagerInterface *QmlJSLiveTextPreview::modelManager()
{ {
return ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>(); return ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment