QmlProjectManager: Allow opening remote .qmlproject

This get rid of two instances of FilePath::toString and allows now
to opens the default wizard-generated "Qt Quick UI Prototype"
.qmlproject.

As the QmlBuildSystem is still heavily tied to the local file system
this here is only a baby step towards fully functionial remote
.qmlproject support.

Change-Id: I940f99472d45d9ade4966cf4f15b0692a51f2e7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-08-09 18:32:32 +02:00
parent 62ad0014f1
commit b6569b9333
3 changed files with 5 additions and 5 deletions

View File

@@ -228,9 +228,9 @@ void QmlBuildSystem::parseProjectFiles()
}
Utils::FilePath mainFilePath{Utils::FilePath::fromString(m_projectItem->mainFile())};
if (!mainFilePath.isEmpty()) {
mainFilePath = canonicalProjectDir().resolvePath(m_projectItem->mainFile());
const QString mainFileName = m_projectItem->mainFile();
if (!mainFileName.isEmpty()) {
Utils::FilePath mainFilePath = canonicalProjectDir().resolvePath(mainFileName);
Utils::FileReader reader;
QString errorMessage;
if (!reader.fetch(mainFilePath, &errorMessage)) {