forked from qt-creator/qt-creator
Clang: Make file ids unique
Clang file ids are only unique for one query. Because we query in parallel we have to manage our own unique ids. Change-Id: I67d57d8b1766cab75ad252a14e57bbf9dc5fdb79 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -104,19 +104,6 @@ void RefactoringClient::setRefactoringConnectionClient(
|
||||
this->connectionClient = connectionClient;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
Utils::SmallString concatenateFilePath(const ClangBackEnd::FilePath &filePath)
|
||||
{
|
||||
Utils::SmallString concatenatedFilePath = filePath.directory().clone();
|
||||
concatenatedFilePath.append("/");
|
||||
concatenatedFilePath.append(filePath.name().clone());
|
||||
|
||||
return concatenatedFilePath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::unordered_map<uint, QString> RefactoringClient::convertFilePaths(
|
||||
const ClangBackEnd::FilePathDict &filePaths)
|
||||
{
|
||||
@@ -126,7 +113,7 @@ std::unordered_map<uint, QString> RefactoringClient::convertFilePaths(
|
||||
|
||||
auto convertFilePath = [] (const ClangBackEnd::FilePathDict::value_type &dictonaryEntry) {
|
||||
return std::make_pair(dictonaryEntry.first,
|
||||
concatenateFilePath(dictonaryEntry.second).toQString());
|
||||
dictonaryEntry.second.path().toQString());
|
||||
};
|
||||
|
||||
std::transform(filePaths.begin(),
|
||||
|
||||
Reference in New Issue
Block a user