Improve Qml code model import handling.

* Fill the snapshot with files that could be imported.
* Implement package imports.

* The qmldir file is not parsed yet.

Reviewed-by: Erik Verbruggen
This commit is contained in:
Christian Kamm
2010-03-16 16:34:33 +01:00
parent 62c41defb4
commit 9ea01cf5fb
17 changed files with 251 additions and 175 deletions

View File

@@ -59,11 +59,6 @@ QStringList Bind::includedScripts() const
return _includedScripts;
}
QStringList Bind::localImports() const
{
return _localImports;
}
Interpreter::ObjectValue *Bind::currentObjectValue() const
{
return _currentObjectValue;
@@ -210,16 +205,8 @@ bool Bind::visit(AST::Program *)
return true;
}
bool Bind::visit(UiImport *ast)
bool Bind::visit(UiImport *)
{
if (ast->fileName) {
QString path = _doc->path();
path += QLatin1Char('/');
path += ast->fileName->asString();
path = QDir::cleanPath(path);
_localImports.append(path);
}
return false;
}