forked from qt-creator/qt-creator
ClangRefactoring: Remove FileCache from SymbolStorage
It is not used. Change-Id: Iaff5a34dfe613f0a627e0a3a727af1130ad2b522 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -68,7 +68,7 @@ private:
|
|||||||
FilePathCachingInterface &m_filePathCache;
|
FilePathCachingInterface &m_filePathCache;
|
||||||
SymbolsCollector m_collector{m_filePathCache};
|
SymbolsCollector m_collector{m_filePathCache};
|
||||||
StatementFactory m_statementFactory;
|
StatementFactory m_statementFactory;
|
||||||
Storage m_symbolStorage{m_statementFactory, m_filePathCache};
|
Storage m_symbolStorage{m_statementFactory};
|
||||||
ClangPathWatcher<QFileSystemWatcher, QTimer> m_sourceWatcher{m_filePathCache};
|
ClangPathWatcher<QFileSystemWatcher, QTimer> m_sourceWatcher{m_filePathCache};
|
||||||
FileStatusCache m_fileStatusCache{m_filePathCache};
|
FileStatusCache m_fileStatusCache{m_filePathCache};
|
||||||
SymbolIndexer m_indexer{m_collector,
|
SymbolIndexer m_indexer{m_collector,
|
||||||
|
@@ -45,10 +45,8 @@ class SymbolStorage final : public SymbolStorageInterface
|
|||||||
using Database = typename StatementFactory::Database;
|
using Database = typename StatementFactory::Database;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SymbolStorage(StatementFactory &statementFactory,
|
SymbolStorage(StatementFactory &statementFactory)
|
||||||
FilePathCachingInterface &filePathCache)
|
: m_statementFactory(statementFactory)
|
||||||
: m_statementFactory(statementFactory),
|
|
||||||
m_filePathCache(filePathCache)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +264,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
StatementFactory &m_statementFactory;
|
StatementFactory &m_statementFactory;
|
||||||
FilePathCachingInterface &m_filePathCache;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ClangBackEnd
|
} // namespace ClangBackEnd
|
||||||
|
@@ -58,7 +58,6 @@ using Storage = ClangBackEnd::SymbolStorage<StatementFactory>;
|
|||||||
class SymbolStorage : public testing::Test
|
class SymbolStorage : public testing::Test
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
MockFilePathCaching filePathCache;
|
|
||||||
NiceMock<MockSqliteDatabase> mockDatabase;
|
NiceMock<MockSqliteDatabase> mockDatabase;
|
||||||
StatementFactory statementFactory{mockDatabase};
|
StatementFactory statementFactory{mockDatabase};
|
||||||
MockSqliteWriteStatement &insertSymbolsToNewSymbolsStatement = statementFactory.insertSymbolsToNewSymbolsStatement;
|
MockSqliteWriteStatement &insertSymbolsToNewSymbolsStatement = statementFactory.insertSymbolsToNewSymbolsStatement;
|
||||||
@@ -95,7 +94,7 @@ protected:
|
|||||||
SourceLocationEntries sourceLocations{{1, {1, 3}, {42, 23}, SourceLocationKind::Declaration},
|
SourceLocationEntries sourceLocations{{1, {1, 3}, {42, 23}, SourceLocationKind::Declaration},
|
||||||
{2, {1, 4}, {7, 11}, SourceLocationKind::Definition}};
|
{2, {1, 4}, {7, 11}, SourceLocationKind::Definition}};
|
||||||
ClangBackEnd::ProjectPartArtefact artefact{"[\"-DFOO\"]", "{\"FOO\":\"1\"}", "[\"/includes\"]", 74};
|
ClangBackEnd::ProjectPartArtefact artefact{"[\"-DFOO\"]", "{\"FOO\":\"1\"}", "[\"/includes\"]", 74};
|
||||||
Storage storage{statementFactory, filePathCache};
|
Storage storage{statementFactory};
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(SymbolStorage, CreateAndFillTemporaryLocationsTable)
|
TEST_F(SymbolStorage, CreateAndFillTemporaryLocationsTable)
|
||||||
|
Reference in New Issue
Block a user