forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user