forked from qt-creator/qt-creator
CppEditor: FilePathify some of the refactoring operations
... and adjust surrounding code. Change-Id: I1d36e5a0c6ba14a1d9b8fd59340f1bb2a1e45ad1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
|
||||
using namespace CppEditor;
|
||||
using namespace LanguageClient;
|
||||
using namespace Utils;
|
||||
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
@@ -337,12 +338,11 @@ void ClangModelManagerSupport::findUsages(const CppEditor::CursorInEditor &curso
|
||||
CppModelManager::findUsages(cursor, CppModelManager::Backend::Builtin);
|
||||
}
|
||||
|
||||
void ClangModelManagerSupport::switchHeaderSource(const Utils::FilePath &filePath, bool inNextSplit)
|
||||
void ClangModelManagerSupport::switchHeaderSource(const FilePath &filePath, bool inNextSplit)
|
||||
{
|
||||
if (ClangdClient * const client = clientForFile(filePath)) {
|
||||
// The fast, synchronous approach works most of the time, so let's try that one first.
|
||||
const auto otherFile = Utils::FilePath::fromString(
|
||||
correspondingHeaderOrSource(filePath.toString()));
|
||||
const FilePath otherFile = correspondingHeaderOrSource(filePath);
|
||||
if (!otherFile.isEmpty())
|
||||
openEditor(otherFile, inNextSplit);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user