diff options
author | David Schulz <david.schulz@qt.io> | 2020-04-03 15:03:26 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-04-23 13:00:07 +0000 |
commit | dee0997d388c4f9674b07303904bfe740e3bfecb (patch) | |
tree | 333469c65517ab5d2482dd851b666b8bdcf60318 /src/plugins/qmljseditor | |
parent | e3a0fe71e4ac34f805a03ccd81e09b4e3fb35a78 (diff) |
QmlJSEditor: jump to file under cursor if it exists
Don't limit this functionality to files that are part of the snapshot,
but try to open all files. This will allow opening c++ files defined in
a qbs project file.
Fixes: QTCREATORBUG-22685
Change-Id: If2a2a2075e5d7113a7bb44625c0f29ef66138d3c
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r-- | src/plugins/qmljseditor/qmljseditor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 9f1799eef2..16aaa6ec47 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -791,7 +791,7 @@ void QmlJSEditorWidget::findLinkAt(const QTextCursor &cursor, const QString relative = QString::fromLatin1("%1/%2").arg( semanticInfo.document->path(), text); - if (semanticInfo.snapshot.document(relative)) { + if (QFileInfo::exists(relative)) { link.targetFileName = relative; processLinkCallback(link); return; |