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())
|
||||
projectItem->setTargetDirectory(targetDirectoryPropery.toString());
|
||||
|
||||
const QVariant qtForMCUProperty = rootNode->property("qtForMCUs");
|
||||
if (qtForMCUProperty.isValid() && qtForMCUProperty.toBool())
|
||||
projectItem->setQtForMCUs(targetDirectoryPropery.toBool());
|
||||
|
||||
if (debug)
|
||||
qDebug() << "importPath:" << importPathsProperty << "mainFile:" << mainFileProperty;
|
||||
|
||||
|
@@ -55,6 +55,11 @@ void QmlProjectItem::setTargetDirectory(const QString &directoryPath)
|
||||
m_targetDirectory = directoryPath;
|
||||
}
|
||||
|
||||
void QmlProjectItem::setQtForMCUs(bool b)
|
||||
{
|
||||
m_qtForMCUs = b;
|
||||
}
|
||||
|
||||
void QmlProjectItem::setImportPaths(const QStringList &importPaths)
|
||||
{
|
||||
if (m_importPaths != importPaths)
|
||||
|
@@ -51,6 +51,9 @@ public:
|
||||
QString targetDirectory() const { return m_targetDirectory; }
|
||||
void setTargetDirectory(const QString &directoryPath);
|
||||
|
||||
bool qtForMCUs() const { return m_qtForMCUs; }
|
||||
void setQtForMCUs(bool qtForMCUs);
|
||||
|
||||
QStringList importPaths() const { return m_importPaths; }
|
||||
void setImportPaths(const QStringList &paths);
|
||||
|
||||
@@ -83,6 +86,7 @@ protected:
|
||||
Utils::EnvironmentItems m_environment;
|
||||
QVector<QmlProjectContentItem *> m_content; // content property
|
||||
bool m_forceFreeType = false;
|
||||
bool m_qtForMCUs = false;
|
||||
};
|
||||
|
||||
} // namespace QmlProjectManager
|
||||
|
@@ -205,6 +205,13 @@ QString QmlBuildSystem::mainFile() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool QmlBuildSystem::qtForMCUs() const
|
||||
{
|
||||
if (m_projectItem)
|
||||
return m_projectItem.data()->qtForMCUs();
|
||||
return false;
|
||||
}
|
||||
|
||||
void QmlBuildSystem::setMainFile(const QString &mainFilePath)
|
||||
{
|
||||
if (m_projectItem)
|
||||
@@ -393,6 +400,8 @@ QVariant QmlBuildSystem::additionalData(Id id) const
|
||||
return customFileSelectors();
|
||||
if (id == Constants::customForceFreeTypeData)
|
||||
return forceFreeType();
|
||||
if (id == Constants::customQtForMCUs)
|
||||
return qtForMCUs();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@@ -76,6 +76,7 @@ public:
|
||||
|
||||
Utils::FilePath canonicalProjectDir() const;
|
||||
QString mainFile() const;
|
||||
bool qtForMCUs() const;
|
||||
void setMainFile(const QString &mainFilePath);
|
||||
Utils::FilePath targetDirectory() 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 customFileSelectorsData[] = "CustomFileSelectorsData";
|
||||
const char customForceFreeTypeData[] = "CustomForceFreeType";
|
||||
const char customQtForMCUs[] = "CustomQtForMCUs";
|
||||
|
||||
} // namespace Constants
|
||||
} // namespace QmlProjectManager
|
||||
|
Reference in New Issue
Block a user