forked from qt-creator/qt-creator
Clang: Take over jobs if document's project changes
On registerProjectPartsForEditor() we recreated the affected DocumentProcessors, but did not take care of the jobs that were in the queue, which effectively could led to lost jobs. Catch up on this. Task-number: QTCREATORBUG-18856 Change-Id: I4184e5dc6480667953f2d2081ccf39a28c092186 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -406,6 +406,18 @@ TEST_F(ClangCodeModelServerSlowTest, TranslationUnitAfterUpdateNeedsReparse)
|
||||
ASSERT_THAT(clangServer, HasDirtyDocument(filePathA, projectPartId, 1U, true, true));
|
||||
}
|
||||
|
||||
TEST_F(ClangCodeModelServerSlowTest, TakeOverJobsOnProjectPartChange)
|
||||
{
|
||||
registerProjectAndFileAndWaitForFinished(filePathC, 2);
|
||||
updateVisibilty(filePathB, filePathB); // Disable processing jobs
|
||||
requestReferences();
|
||||
|
||||
expectReferences();
|
||||
|
||||
changeProjectPartArguments(); // Here we do not want to loose the RequestReferences job
|
||||
updateVisibilty(filePathC, filePathC); // Enable processing jobs
|
||||
}
|
||||
|
||||
void ClangCodeModelServer::SetUp()
|
||||
{
|
||||
clangServer.setClient(&mockClangCodeModelClient);
|
||||
|
||||
Reference in New Issue
Block a user