forked from qt-creator/qt-creator
TextEditor: Allow opening links without filename
... in editors displaying a document without a filename. Change-Id: I857018e2532b406a37983d8fd77e52daa31ae70d Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -6927,9 +6927,6 @@ bool TextEditorWidget::openLink(const Utils::Link &link, bool inNextSplit)
|
||||
} s;
|
||||
#endif
|
||||
|
||||
if (!link.hasValidTarget())
|
||||
return false;
|
||||
|
||||
QString url = link.targetFilePath.toString();
|
||||
if (url.startsWith(u"https://"_qs) || url.startsWith(u"http://"_qs)) {
|
||||
QDesktopServices::openUrl(url);
|
||||
@@ -6942,6 +6939,8 @@ bool TextEditorWidget::openLink(const Utils::Link &link, bool inNextSplit)
|
||||
setFocus();
|
||||
return true;
|
||||
}
|
||||
if (!link.hasValidTarget())
|
||||
return false;
|
||||
EditorManager::OpenEditorFlags flags;
|
||||
if (inNextSplit)
|
||||
flags |= EditorManager::OpenInOtherSplit;
|
||||
|
||||
Reference in New Issue
Block a user