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;
|
||||
SymbolsCollector m_collector{m_filePathCache};
|
||||
StatementFactory m_statementFactory;
|
||||
Storage m_symbolStorage{m_statementFactory, m_filePathCache};
|
||||
Storage m_symbolStorage{m_statementFactory};
|
||||
ClangPathWatcher<QFileSystemWatcher, QTimer> m_sourceWatcher{m_filePathCache};
|
||||
FileStatusCache m_fileStatusCache{m_filePathCache};
|
||||
SymbolIndexer m_indexer{m_collector,
|
||||
|
@@ -45,10 +45,8 @@ class SymbolStorage final : public SymbolStorageInterface
|
||||
using Database = typename StatementFactory::Database;
|
||||
|
||||
public:
|
||||
SymbolStorage(StatementFactory &statementFactory,
|
||||
FilePathCachingInterface &filePathCache)
|
||||
: m_statementFactory(statementFactory),
|
||||
m_filePathCache(filePathCache)
|
||||
SymbolStorage(StatementFactory &statementFactory)
|
||||
: m_statementFactory(statementFactory)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -266,7 +264,6 @@ public:
|
||||
|
||||
private:
|
||||
StatementFactory &m_statementFactory;
|
||||
FilePathCachingInterface &m_filePathCache;
|
||||
};
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -58,7 +58,6 @@ using Storage = ClangBackEnd::SymbolStorage<StatementFactory>;
|
||||
class SymbolStorage : public testing::Test
|
||||
{
|
||||
protected:
|
||||
MockFilePathCaching filePathCache;
|
||||
NiceMock<MockSqliteDatabase> mockDatabase;
|
||||
StatementFactory statementFactory{mockDatabase};
|
||||
MockSqliteWriteStatement &insertSymbolsToNewSymbolsStatement = statementFactory.insertSymbolsToNewSymbolsStatement;
|
||||
@@ -95,7 +94,7 @@ protected:
|
||||
SourceLocationEntries sourceLocations{{1, {1, 3}, {42, 23}, SourceLocationKind::Declaration},
|
||||
{2, {1, 4}, {7, 11}, SourceLocationKind::Definition}};
|
||||
ClangBackEnd::ProjectPartArtefact artefact{"[\"-DFOO\"]", "{\"FOO\":\"1\"}", "[\"/includes\"]", 74};
|
||||
Storage storage{statementFactory, filePathCache};
|
||||
Storage storage{statementFactory};
|
||||
};
|
||||
|
||||
TEST_F(SymbolStorage, CreateAndFillTemporaryLocationsTable)
|
||||
|
Reference in New Issue
Block a user