forked from qt-creator/qt-creator
QmlJsLiveTextPreview: adjusted ast offsets for objectbindings
Reviewed-by: Kai Koehne
This commit is contained in:
@@ -82,6 +82,7 @@ class MapObjectWithDebugReference : public Visitor
|
||||
|
||||
private:
|
||||
void process(UiObjectMember *ast);
|
||||
void process(UiObjectBinding *ast);
|
||||
private:
|
||||
int activated;
|
||||
};
|
||||
@@ -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()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>();
|
||||
|
||||
Reference in New Issue
Block a user