forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user