Utils: filepathify Link

Change-Id: Ie62500bde139158e776f9698ee0ea00c2a113f93
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2021-05-25 10:11:31 +02:00
parent dbd4a10d6f
commit 356bfcc9fd
24 changed files with 76 additions and 59 deletions

View File

@@ -238,11 +238,11 @@ void ProFileEditorWidget::findLinkAt(const QTextCursor &cursor,
else
return processLinkCallback(link);
}
link.targetFileName = QDir::cleanPath(fileName);
link.targetFilePath = Utils::FilePath::fromString(QDir::cleanPath(fileName));
} else {
link.targetFileName = checkForPrfFile(buffer);
link.targetFilePath = Utils::FilePath::fromString(checkForPrfFile(buffer));
}
if (!link.targetFileName.isEmpty()) {
if (!link.targetFilePath.isEmpty()) {
link.linkTextStart = cursor.position() - positionInBlock + beginPos + 1;
link.linkTextEnd = cursor.position() - positionInBlock + endPos;
}