logic: Fixed source files within CDB not indexed unless within Indexed Header Paths

This commit is contained in:
Eberhard Graether
2017-05-22 23:02:35 +02:00
parent 3598fd357d
commit 082dfc2e1a
10 changed files with 41 additions and 26 deletions
+3 -3
View File
@@ -30,17 +30,17 @@ size_t IndexerCommand::getByteSize() const
return size;
}
FilePath IndexerCommand::getSourceFilePath() const
const FilePath& IndexerCommand::getSourceFilePath() const
{
return m_sourceFilePath;
}
std::set<FilePath> IndexerCommand::getIndexedPaths() const
const std::set<FilePath>& IndexerCommand::getIndexedPaths() const
{
return m_indexedPaths;
}
std::set<FilePath> IndexerCommand::getExcludedPath() const
const std::set<FilePath>& IndexerCommand::getExcludedPath() const
{
return m_excludedPaths;
}
+3 -3
View File
@@ -17,9 +17,9 @@ public:
virtual size_t getByteSize() const;
FilePath getSourceFilePath() const;
std::set<FilePath> getIndexedPaths() const;
std::set<FilePath> getExcludedPath() const;
const FilePath& getSourceFilePath() const;
const std::set<FilePath>& getIndexedPaths() const;
const std::set<FilePath>& getExcludedPath() const;
virtual bool preprocessorOnly() const = 0;
virtual void setPreprocessorOnly(bool preprocessorOnly) = 0;
-3
View File
@@ -1,7 +1,6 @@
#include "data/indexer/TaskBuildIndex.h"
#include "utility/AppPath.h"
#include "utility/file/FileRegisterStateData.h"
#include "utility/logging/FileLogger.h"
#include "utility/scheduling/Blackboard.h"
#include "utility/UserPaths.h"
@@ -23,12 +22,10 @@ TaskBuildIndex::TaskBuildIndex(
unsigned int processCount,
std::shared_ptr<IndexerCommandList> indexerCommandList,
std::shared_ptr<StorageProvider> storageProvider,
std::shared_ptr<FileRegisterStateData> fileRegisterStateData,
bool multiProcessIndexing
)
: m_indexerCommandList(indexerCommandList)
, m_storageProvider(storageProvider)
, m_fileRegisterStateData(fileRegisterStateData)
, m_multiProcessIndexing(multiProcessIndexing)
, m_interprocessIndexerCommandManager(Application::getUUID(), 0, true)
, m_interprocessIndexingStatusManager(Application::getUUID(), 0, true)
-4
View File
@@ -3,7 +3,6 @@
#include <thread>
#include "utility/file/FileRegisterStateData.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageInterruptTasks.h"
#include "utility/scheduling/Task.h"
@@ -13,7 +12,6 @@
#include "data/indexer/interprocess/InterprocessIntermediateStorageManager.h"
class DialogView;
class FileRegisterStateData;
class StorageProvider;
class IndexerCommandList;
@@ -26,7 +24,6 @@ public:
unsigned int processCount,
std::shared_ptr<IndexerCommandList> indexerCommandList,
std::shared_ptr<StorageProvider> storageProvider,
std::shared_ptr<FileRegisterStateData> fileRegisterStateData,
bool multiProcessIndexing
);
@@ -48,7 +45,6 @@ protected:
std::shared_ptr<IndexerCommandList> m_indexerCommandList;
std::shared_ptr<StorageProvider> m_storageProvider;
std::shared_ptr<FileRegisterStateData> m_fileRegisterStateData;
bool m_multiProcessIndexing;
InterprocessIndexerCommandManager m_interprocessIndexerCommandManager;
@@ -39,7 +39,7 @@ void InterprocessIndexer::work()
data.setIndexedFiles(m_interprocessIndexingStatusManager.getIndexedFiles());
std::shared_ptr<FileRegister> fileRegister = std::make_shared<FileRegister>(
data, indexerCommand->getIndexedPaths(), indexerCommand->getExcludedPath()
data, indexerCommand->getSourceFilePath(), indexerCommand->getIndexedPaths(), indexerCommand->getExcludedPath()
);
std::shared_ptr<IntermediateStorage> result = indexer->index(indexerCommand, fileRegister);