Utils: Remove FilePath::fromUrl()

Even though the concepts are similar, direct conversion is
usually neither desired (lossy) nor needed.

Change-Id: Id5c9e69d0597ed867cbda25f3fc4619a9fe90966
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-12-13 08:45:37 +01:00
parent af881688e5
commit 8e8afd3cf6
3 changed files with 7 additions and 12 deletions

View File

@@ -405,15 +405,14 @@ static QWidget *dialogParent(QWidget *parent)
return parent ? parent : s_dialogParentGetter ? s_dialogParentGetter() : nullptr;
}
FilePath qUrlToFilePath(const QUrl &url)
static FilePath qUrlToFilePath(const QUrl &url)
{
if (url.isLocalFile())
return FilePath::fromString(url.toLocalFile());
return FilePath::fromUrl(url);
return FilePath::fromParts(url.scheme(), url.host(), url.path());
}
QUrl filePathToQUrl(const FilePath &filePath)
static QUrl filePathToQUrl(const FilePath &filePath)
{
return QUrl::fromLocalFile(filePath.toFSPathString());
}