Clang: Refactor FilePathId

We don't need the directory id any more. It's not used widely any way.

Task-number: QTCREATORBUG-21443
Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-11-06 19:02:00 +01:00
parent d37ec2c1e5
commit 6eb620238b
37 changed files with 444 additions and 411 deletions

View File

@@ -85,10 +85,10 @@ protected:
CppTools::ProjectPart::Ptr projectPart;
CppTools::ProjectFile projectFile{qStringFilePath, CppTools::ProjectFile::CXXSource};
SourceLocationsForRenamingMessage renameMessage{"symbol",
{{{{1, 42}, 1, 1, 0}, {{1, 42}, 2, 5, 10}}},
{{{42, 1, 1, 0}, {42, 2, 5, 10}}},
1};
SourceRangesForQueryMessage queryResultMessage{{{{{1, 42}, 1, 1, 0, 1, 5, 4, ""},
{{1, 42}, 2, 1, 5, 2, 5, 10, ""}}}};
SourceRangesForQueryMessage queryResultMessage{{{{42, 1, 1, 0, 1, 5, 4, ""},
{42, 2, 1, 5, 2, 5, 10, ""}}}};
SourceRangesForQueryMessage emptyQueryResultMessage;
};
@@ -212,7 +212,7 @@ TEST_F(RefactoringClient, ResultCounterIsZeroAfterSettingExpectedResultCount)
TEST_F(RefactoringClient, XXX)
{
const Core::Search::TextRange textRange{{1,0,1},{1,0,1}};
const ClangBackEnd::SourceRangeWithTextContainer sourceRange{{1, 1}, 1, 1, 1, 1, 1, 1, "function"};
const ClangBackEnd::SourceRangeWithTextContainer sourceRange{1, 1, 1, 1, 1, 1, 1, "function"};
EXPECT_CALL(mockSearchHandle, addResult(QString("/path/to/file"), QString("function"), textRange))
.Times(1);
@@ -234,9 +234,9 @@ void RefactoringClient::SetUp()
client.setSearchHandle(&mockSearchHandle);
client.setExpectedResultCount(1);
ON_CALL(mockFilePathCaching, filePath(Eq(FilePathId{1, 1})))
ON_CALL(mockFilePathCaching, filePath(Eq(FilePathId{1})))
.WillByDefault(Return(FilePath(PathString("/path/to/file"))));
ON_CALL(mockFilePathCaching, filePath(Eq(FilePathId{1, 42})))
ON_CALL(mockFilePathCaching, filePath(Eq(FilePathId{42})))
.WillByDefault(Return(clangBackEndFilePath));
}