QmlDesigner: Modify the model editor files path

Task-number: QDS-12505
Change-Id: Ib35ba7ab8ce3c6a980770bd73385d1afab630a2d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Ali Kianian
2024-04-16 14:02:25 +03:00
parent d385a2350b
commit 3f597a5935

View File

@@ -96,13 +96,17 @@ Utils::FilePath dataStoreDir()
if (!currentProject) if (!currentProject)
return {}; return {};
return currentProject->projectDirectory().pathAppended("/imports/" FilePath oldImportDirectory = currentProject->projectDirectory().pathAppended(
+ currentProject->displayName()); "imports/" + currentProject->displayName());
if (oldImportDirectory.exists())
return oldImportDirectory;
return currentProject->projectDirectory().pathAppended(currentProject->displayName());
} }
inline Utils::FilePath collectionPath(const QString &filePath) inline Utils::FilePath collectionPath(const QString &filePath)
{ {
return dataStoreDir().pathAppended("/" + filePath); return dataStoreDir().pathAppended(filePath);
} }
inline Utils::FilePath qmlDirFilePath() inline Utils::FilePath qmlDirFilePath()