diff options
author | David Schulz <david.schulz@qt.io> | 2020-09-02 12:06:51 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-09-04 10:14:14 +0000 |
commit | 339db00f8563c7fc865a6166114e684021ac260e (patch) | |
tree | fad2b72c3ac36fc08ac3f5c24a2df8a2ded909d8 /src/plugins/cppeditor/cppeditorwidget.cpp | |
parent | e4dec0484c7becbeaeeda3d473bfe2f24dc52e94 (diff) |
Core: replace QString with Utils::FilePath to get documents
Change-Id: I01777c227398be8bd3bf877c5429b84a75aa361b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppeditorwidget.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppeditorwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index ddc0a09630..38083da56f 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -388,7 +388,7 @@ static void onReplaceUsagesClicked(const QString &text, static QTextDocument *getOpenDocument(const QString &path) { - const IDocument *document = DocumentModel::documentForFilePath(path); + const IDocument *document = DocumentModel::documentForFilePath(FilePath::fromString(path)); if (document) return qobject_cast<const TextDocument *>(document)->document(); @@ -1104,7 +1104,7 @@ void CppEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefL abortDeclDefLink(); d->m_declDefLink = link; IDocument *targetDocument = DocumentModel::documentForFilePath( - d->m_declDefLink->targetFile->fileName()); + FilePath::fromString(d->m_declDefLink->targetFile->fileName())); if (textDocument() != targetDocument) { if (auto textDocument = qobject_cast<BaseTextDocument *>(targetDocument)) connect(textDocument, @@ -1137,7 +1137,7 @@ void CppEditorWidget::abortDeclDefLink() return; IDocument *targetDocument = DocumentModel::documentForFilePath( - d->m_declDefLink->targetFile->fileName()); + FilePath::fromString(d->m_declDefLink->targetFile->fileName())); if (textDocument() != targetDocument) { if (auto textDocument = qobject_cast<BaseTextDocument *>(targetDocument)) disconnect(textDocument, |