QmlDesigner: Allow using assets from entire project in subfolders

If editing a subcomponent qml, assets tab now lists assets from the
entire project, and url/font choosers list appropriate resources
from entire project with correct relative paths.

Fixes: QDS-3638
Change-Id: I4a066c30d1bd696e8edbd17754bb9df2b7880873
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2021-01-26 14:03:58 +02:00
parent 8731325ce8
commit dd1c89aa22
6 changed files with 35 additions and 26 deletions

View File

@@ -495,5 +495,12 @@ bool DocumentManager::belongsToQmakeProject()
return proNode;
}
Utils::FilePath DocumentManager::currentResourcePath()
{
Utils::FilePath resourcePath = currentProjectDirPath();
if (resourcePath.isEmpty())
return currentFilePath().absolutePath();
return resourcePath;
}
} // namespace QmlDesigner