forked from qt-creator/qt-creator
Clang: Handle native file in the file cache
Different types are introduced for normalized and native file path. So the compiler is warning you if you try the wrong format. Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "refactoringengine.h"
|
||||
#include "projectpartutilities.h"
|
||||
|
||||
#include <filepath.h>
|
||||
#include <refactoringserverinterface.h>
|
||||
#include <requestsourcelocationforrenamingmessage.h>
|
||||
|
||||
@@ -96,8 +97,8 @@ CppTools::Usages RefactoringEngine::locationsAt(const CppTools::CursorInEditor &
|
||||
QTextCursor cursor = Utils::Text::wordStartCursor(data.cursor());
|
||||
Utils::Text::convertPosition(cursor.document(), cursor.position(), &line, &column);
|
||||
|
||||
const QByteArray filePath = data.filePath().toString().toLatin1();
|
||||
const ClangBackEnd::FilePathId filePathId = m_filePathCache.filePathId(filePath.constData());
|
||||
const QByteArray filePath = data.filePath().toString().toUtf8();
|
||||
const ClangBackEnd::FilePathId filePathId = m_filePathCache.filePathId(ClangBackEnd::FilePathView(filePath));
|
||||
return m_symbolQuery.sourceUsagesAt(filePathId, line, column + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user