diff --git a/src/lib/data/storage/IntermediateStorage.cpp b/src/lib/data/storage/IntermediateStorage.cpp index 9f2c1a41..dfb2f4f4 100644 --- a/src/lib/data/storage/IntermediateStorage.cpp +++ b/src/lib/data/storage/IntermediateStorage.cpp @@ -323,22 +323,22 @@ void IntermediateStorage::forEachError(std::function IntermediateStorage::getStorageNodes() const +const std::vector& IntermediateStorage::getStorageNodes() const { return m_nodes; } -std::vector IntermediateStorage::getStorageFiles() const +const std::vector& IntermediateStorage::getStorageFiles() const { return m_files; } -std::vector IntermediateStorage::getStorageSymbols() const +const std::vector& IntermediateStorage::getStorageSymbols() const { return m_symbols; } -std::vector IntermediateStorage::getStorageEdges() const +const std::vector& IntermediateStorage::getStorageEdges() const { return m_edges; } @@ -365,22 +365,22 @@ std::vector IntermediateStorage::getStorageSourceLocation return sourceLocations; } -std::vector IntermediateStorage::getStorageOccurrences() const +const std::vector& IntermediateStorage::getStorageOccurrences() const { return m_occurrences; } -std::vector IntermediateStorage::getComponentAccesses() const +const std::vector& IntermediateStorage::getComponentAccesses() const { return m_componentAccesses; } -std::vector IntermediateStorage::getCommentLocations() const +const std::vector& IntermediateStorage::getCommentLocations() const { return m_commentLocations; } -std::vector IntermediateStorage::getErrors() const +const std::vector& IntermediateStorage::getErrors() const { return m_errors; } diff --git a/src/lib/data/storage/IntermediateStorage.h b/src/lib/data/storage/IntermediateStorage.h index f766c1e8..6bf030e5 100644 --- a/src/lib/data/storage/IntermediateStorage.h +++ b/src/lib/data/storage/IntermediateStorage.h @@ -56,16 +56,16 @@ public: // for conversion to and from 'SharedIntermediateStorage' - std::vector getStorageNodes() const; - std::vector getStorageFiles() const; - std::vector getStorageSymbols() const; - std::vector getStorageEdges() const; + const std::vector& getStorageNodes() const; + const std::vector& getStorageFiles() const; + const std::vector& getStorageSymbols() const; + const std::vector& getStorageEdges() const; std::vector getStorageLocalSymbols() const; std::vector getStorageSourceLocations() const; - std::vector getStorageOccurrences() const; - std::vector getComponentAccesses() const; - std::vector getCommentLocations() const; - std::vector getErrors() const; + const std::vector& getStorageOccurrences() const; + const std::vector& getComponentAccesses() const; + const std::vector& getCommentLocations() const; + const std::vector& getErrors() const; void setStorageNodes(const std::vector& storageNodes); void setStorageFiles(const std::vector& storageFiles); diff --git a/src/lib/project/Project.cpp b/src/lib/project/Project.cpp index 8d8e5464..0f920cda 100644 --- a/src/lib/project/Project.cpp +++ b/src/lib/project/Project.cpp @@ -508,12 +508,14 @@ void Project::buildIndex(const RefreshInfo& info, std::shared_ptr di ) ) ); + // add task for injecting the intermediate storages into the persistent storage taskParallelIndexing->addTask( std::make_shared()->addChildTasks( + // block until there are indexers running std::make_shared(TaskDecoratorRepeat::CONDITION_WHILE_SUCCESS, Task::STATE_SUCCESS)->addChildTask( std::make_shared>("indexer_count", TaskReturnSuccessWhile::CONDITION_EQUALS, 0) - ), + ), std::make_shared(TaskDecoratorRepeat::CONDITION_WHILE_SUCCESS, Task::STATE_SUCCESS)->addChildTask( std::make_shared()->addChildTasks( // stopping when indexer count is zero, regardless wether there are still storages left to insert. @@ -527,6 +529,7 @@ void Project::buildIndex(const RefreshInfo& info, std::shared_ptr di ) ) ); + // add task that notifies the user of what's going on taskSequential->addTask( // we don't need to hide this dialog again, because it's overridden by other dialogs later on. std::make_shared([dialogView]() {