summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpptoolsreuse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/cpptoolsreuse.cpp')
-rw-r--r--src/plugins/cppeditor/cpptoolsreuse.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpptoolsreuse.cpp b/src/plugins/cppeditor/cpptoolsreuse.cpp
index 04f679824a..bd5b702360 100644
--- a/src/plugins/cppeditor/cpptoolsreuse.cpp
+++ b/src/plugins/cppeditor/cpptoolsreuse.cpp
@@ -273,7 +273,8 @@ void switchHeaderSource()
{
const Core::IDocument *currentDocument = Core::EditorManager::currentDocument();
QTC_ASSERT(currentDocument, return);
- const QString otherFile = correspondingHeaderOrSource(currentDocument->filePath().toString());
+ const auto otherFile = Utils::FilePath::fromString(
+ correspondingHeaderOrSource(currentDocument->filePath().toString()));
if (!otherFile.isEmpty())
Core::EditorManager::openEditor(otherFile);
}