forked from qt-creator/qt-creator
qmljs: add isIdle method to detect background parsing/scannig
If the qmljsmodel has no background task, then isIdle returns true Change-Id: I31420343c560c5ed118f371f7be347eadb6622f4 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
committed by
Fawzi Mohamed
parent
7c9c5bda94
commit
7e1b512f31
@@ -629,6 +629,11 @@ ModelManagerInterface::ProjectInfo ModelManagerInterface::projectInfoForPath(QSt
|
||||
return res;
|
||||
}
|
||||
|
||||
bool ModelManagerInterface::isIdle() const
|
||||
{
|
||||
return m_synchronizer.futures().isEmpty();
|
||||
}
|
||||
|
||||
void ModelManagerInterface::emitDocumentChangedOnDisk(Document::Ptr doc)
|
||||
{ emit documentChangedOnDisk(doc); }
|
||||
|
||||
|
@@ -182,6 +182,7 @@ public:
|
||||
void emitDocumentChangedOnDisk(QmlJS::Document::Ptr doc);
|
||||
void updateQrcFile(const QString &path);
|
||||
ProjectInfo projectInfoForPath(QString path) const;
|
||||
bool isIdle() const ;
|
||||
|
||||
PathsAndLanguages importPaths() const;
|
||||
QmlJS::QmlLanguageBundles activeBundles() const;
|
||||
|
Reference in New Issue
Block a user