From 0f047cdae9610e0bd31c52f661321422ffa5f022 Mon Sep 17 00:00:00 2001 From: Denis Steckelmacher Date: Mon, 9 Jun 2014 13:02:39 +0200 Subject: [PATCH] Use BackgroundParser::isIdle in filetest when waiting for all the parse jobs to be finished --- duchain/declarationbuilder.cpp | 2 +- tests/test_files.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/duchain/declarationbuilder.cpp b/duchain/declarationbuilder.cpp index f9808ffb42..aee5712f61 100644 --- a/duchain/declarationbuilder.cpp +++ b/duchain/declarationbuilder.cpp @@ -49,7 +49,7 @@ ReferencedTopDUContext DeclarationBuilder::build(const IndexedString& url, Q_ASSERT(m_session->url() == url); // The declaration builder needs to run twice, so it can resolve uses of e.g. functions - // which are called before they are defined (which is easily possible, due to python's dynamic nature). + // which are called before they are defined (which is easily possible, due to JS's dynamic nature). if (!m_prebuilding) { kDebug() << "building, but running pre-builder first"; DeclarationBuilder* prebuilder = new DeclarationBuilder(m_session); diff --git a/tests/test_files.cpp b/tests/test_files.cpp index 9cb24968fc..dbcf256283 100644 --- a/tests/test_files.cpp +++ b/tests/test_files.cpp @@ -74,7 +74,7 @@ void TestFiles::testFiles() ReferencedTopDUContext top = DUChain::self()->waitForUpdate(indexedFileName, KDevelop::TopDUContext::AllDeclarationsContextsAndUses); - while (ICore::self()->languageController()->backgroundParser()->queuedCount() != 0) { + while (!ICore::self()->languageController()->backgroundParser()->isIdle()) { QTest::qWait(500); } -- GitLab