forked from qt-creator/qt-creator
QmlProject: Add qtForMCU flag
Change-Id: Ia473fd257414f5edddc0ffcce8c913897d75f351 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -101,6 +101,10 @@ QmlProjectItem *QmlProjectFileFormat::parseProjectFile(const Utils::FilePath &fi
|
|||||||
if (targetDirectoryPropery.isValid())
|
if (targetDirectoryPropery.isValid())
|
||||||
projectItem->setTargetDirectory(targetDirectoryPropery.toString());
|
projectItem->setTargetDirectory(targetDirectoryPropery.toString());
|
||||||
|
|
||||||
|
const QVariant qtForMCUProperty = rootNode->property("qtForMCUs");
|
||||||
|
if (qtForMCUProperty.isValid() && qtForMCUProperty.toBool())
|
||||||
|
projectItem->setQtForMCUs(targetDirectoryPropery.toBool());
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "importPath:" << importPathsProperty << "mainFile:" << mainFileProperty;
|
qDebug() << "importPath:" << importPathsProperty << "mainFile:" << mainFileProperty;
|
||||||
|
|
||||||
|
@@ -55,6 +55,11 @@ void QmlProjectItem::setTargetDirectory(const QString &directoryPath)
|
|||||||
m_targetDirectory = directoryPath;
|
m_targetDirectory = directoryPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QmlProjectItem::setQtForMCUs(bool b)
|
||||||
|
{
|
||||||
|
m_qtForMCUs = b;
|
||||||
|
}
|
||||||
|
|
||||||
void QmlProjectItem::setImportPaths(const QStringList &importPaths)
|
void QmlProjectItem::setImportPaths(const QStringList &importPaths)
|
||||||
{
|
{
|
||||||
if (m_importPaths != importPaths)
|
if (m_importPaths != importPaths)
|
||||||
|
@@ -51,6 +51,9 @@ public:
|
|||||||
QString targetDirectory() const { return m_targetDirectory; }
|
QString targetDirectory() const { return m_targetDirectory; }
|
||||||
void setTargetDirectory(const QString &directoryPath);
|
void setTargetDirectory(const QString &directoryPath);
|
||||||
|
|
||||||
|
bool qtForMCUs() const { return m_qtForMCUs; }
|
||||||
|
void setQtForMCUs(bool qtForMCUs);
|
||||||
|
|
||||||
QStringList importPaths() const { return m_importPaths; }
|
QStringList importPaths() const { return m_importPaths; }
|
||||||
void setImportPaths(const QStringList &paths);
|
void setImportPaths(const QStringList &paths);
|
||||||
|
|
||||||
@@ -83,6 +86,7 @@ protected:
|
|||||||
Utils::EnvironmentItems m_environment;
|
Utils::EnvironmentItems m_environment;
|
||||||
QVector<QmlProjectContentItem *> m_content; // content property
|
QVector<QmlProjectContentItem *> m_content; // content property
|
||||||
bool m_forceFreeType = false;
|
bool m_forceFreeType = false;
|
||||||
|
bool m_qtForMCUs = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlProjectManager
|
} // namespace QmlProjectManager
|
||||||
|
@@ -205,6 +205,13 @@ QString QmlBuildSystem::mainFile() const
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QmlBuildSystem::qtForMCUs() const
|
||||||
|
{
|
||||||
|
if (m_projectItem)
|
||||||
|
return m_projectItem.data()->qtForMCUs();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void QmlBuildSystem::setMainFile(const QString &mainFilePath)
|
void QmlBuildSystem::setMainFile(const QString &mainFilePath)
|
||||||
{
|
{
|
||||||
if (m_projectItem)
|
if (m_projectItem)
|
||||||
@@ -393,6 +400,8 @@ QVariant QmlBuildSystem::additionalData(Id id) const
|
|||||||
return customFileSelectors();
|
return customFileSelectors();
|
||||||
if (id == Constants::customForceFreeTypeData)
|
if (id == Constants::customForceFreeTypeData)
|
||||||
return forceFreeType();
|
return forceFreeType();
|
||||||
|
if (id == Constants::customQtForMCUs)
|
||||||
|
return qtForMCUs();
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -76,6 +76,7 @@ public:
|
|||||||
|
|
||||||
Utils::FilePath canonicalProjectDir() const;
|
Utils::FilePath canonicalProjectDir() const;
|
||||||
QString mainFile() const;
|
QString mainFile() const;
|
||||||
|
bool qtForMCUs() const;
|
||||||
void setMainFile(const QString &mainFilePath);
|
void setMainFile(const QString &mainFilePath);
|
||||||
Utils::FilePath targetDirectory() const;
|
Utils::FilePath targetDirectory() const;
|
||||||
Utils::FilePath targetFile(const Utils::FilePath &sourceFile) const;
|
Utils::FilePath targetFile(const Utils::FilePath &sourceFile) const;
|
||||||
|
@@ -33,6 +33,7 @@ namespace Constants {
|
|||||||
const char * const QMLPROJECT_MIMETYPE = QmlJSTools::Constants::QMLPROJECT_MIMETYPE;
|
const char * const QMLPROJECT_MIMETYPE = QmlJSTools::Constants::QMLPROJECT_MIMETYPE;
|
||||||
const char customFileSelectorsData[] = "CustomFileSelectorsData";
|
const char customFileSelectorsData[] = "CustomFileSelectorsData";
|
||||||
const char customForceFreeTypeData[] = "CustomForceFreeType";
|
const char customForceFreeTypeData[] = "CustomForceFreeType";
|
||||||
|
const char customQtForMCUs[] = "CustomQtForMCUs";
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace QmlProjectManager
|
} // namespace QmlProjectManager
|
||||||
|
Reference in New Issue
Block a user