forked from qt-creator/qt-creator
Read qmldir files in a thread and cache them in Snapshot.
Reviewed-by: Erik Verbruggen
This commit is contained in:
@@ -202,6 +202,22 @@ Bind *Document::bind() const
|
||||
return _bind;
|
||||
}
|
||||
|
||||
LibraryInfo::LibraryInfo()
|
||||
: _valid(false)
|
||||
{
|
||||
}
|
||||
|
||||
LibraryInfo::LibraryInfo(const QmlDirParser &parser)
|
||||
: _valid(true)
|
||||
, _components(parser.components())
|
||||
, _plugins(parser.plugins())
|
||||
{
|
||||
}
|
||||
|
||||
LibraryInfo::~LibraryInfo()
|
||||
{
|
||||
}
|
||||
|
||||
Snapshot::Snapshot()
|
||||
{
|
||||
}
|
||||
@@ -216,6 +232,11 @@ void Snapshot::insert(const Document::Ptr &document)
|
||||
_documents.insert(document->fileName(), document);
|
||||
}
|
||||
|
||||
void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
||||
{
|
||||
_libraries.insert(path, info);
|
||||
}
|
||||
|
||||
Document::Ptr Snapshot::documentFromSource(const QString &code,
|
||||
const QString &fileName) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user