Terminal: Correctly parse url links with empty path

Previously urls such as http://google.com were appended to the current
dir, as FilePath::isAbsolute would return false since there is no path.

Change-Id: I17546aed322a74f6b8cbcc166d37608fd809fd1e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-04-06 14:32:06 +02:00
parent 46b9cd952a
commit d05faf64f4

View File

@@ -1362,7 +1362,7 @@ bool TerminalWidget::checkLinkAt(const QPoint &pos)
Link link = Link::fromString(t, true);
if (!link.targetFilePath.isAbsolutePath())
if (!link.targetFilePath.isEmpty() && !link.targetFilePath.isAbsolutePath())
link.targetFilePath = m_cwd.pathAppended(link.targetFilePath.path());
if (link.hasValidTarget()