forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/7.0'
Conflicts: src/plugins/webassembly/webassemblyrunconfiguration.cpp src/tools/processlauncher/launchersockethandler.cpp Change-Id: Iab052af98013aa59282c16f22ae6e9ecb32f50c4
This commit is contained in:
@@ -161,6 +161,26 @@ QmlProjectItem *QmlProjectFileFormat::parseProjectFile(const Utils::FilePath &fi
|
||||
projectItem->addToEnviroment(i.key(), i.value().value.toString());
|
||||
++i;
|
||||
}
|
||||
} else if (childNode->name() == "ShaderTool") {
|
||||
QmlJS::SimpleReaderNode::Property commandLine = childNode->property("args");
|
||||
if (commandLine.isValid()) {
|
||||
const QStringList quotedArgs = commandLine.value.toString().split('\"');
|
||||
QStringList args;
|
||||
for (int i = 0; i < quotedArgs.size(); ++i) {
|
||||
// Each odd arg in this list is a single quoted argument, which we should
|
||||
// not be split further
|
||||
if (i % 2 == 0)
|
||||
args.append(quotedArgs[i].trimmed().split(' '));
|
||||
else
|
||||
args.append(quotedArgs[i]);
|
||||
}
|
||||
args.removeAll({});
|
||||
args.append("-o"); // Prepare for adding output file as next arg
|
||||
projectItem->setShaderToolArgs(args);
|
||||
}
|
||||
QmlJS::SimpleReaderNode::Property files = childNode->property("files");
|
||||
if (files.isValid())
|
||||
projectItem->setShaderToolFiles(files.value.toStringList());
|
||||
} else {
|
||||
qWarning() << "Unknown type:" << childNode->name();
|
||||
}
|
||||
|
||||
@@ -84,6 +84,12 @@ public:
|
||||
bool widgetApp() const { return m_widgetApp; }
|
||||
void setWidgetApp(bool widgetApp) { m_widgetApp = widgetApp; }
|
||||
|
||||
QStringList shaderToolArgs() const { return m_shaderToolArgs; }
|
||||
void setShaderToolArgs(const QStringList &args) {m_shaderToolArgs = args; }
|
||||
|
||||
QStringList shaderToolFiles() const { return m_shaderToolFiles; }
|
||||
void setShaderToolFiles(const QStringList &files) {m_shaderToolFiles = files; }
|
||||
|
||||
void appendContent(QmlProjectContentItem *item) { m_content.append(item); }
|
||||
|
||||
Utils::EnvironmentItems environment() const;
|
||||
@@ -107,6 +113,8 @@ protected:
|
||||
bool m_qtForMCUs = false;
|
||||
bool m_qt6Project = false;
|
||||
bool m_widgetApp = false;
|
||||
QStringList m_shaderToolArgs;
|
||||
QStringList m_shaderToolFiles;
|
||||
};
|
||||
|
||||
} // namespace QmlProjectManager
|
||||
|
||||
@@ -626,6 +626,20 @@ bool QmlBuildSystem::widgetApp() const
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringList QmlBuildSystem::shaderToolArgs() const
|
||||
{
|
||||
if (m_projectItem)
|
||||
return m_projectItem->shaderToolArgs();
|
||||
return {};
|
||||
}
|
||||
|
||||
QStringList QmlBuildSystem::shaderToolFiles() const
|
||||
{
|
||||
if (m_projectItem)
|
||||
return m_projectItem->shaderToolFiles();
|
||||
return {};
|
||||
}
|
||||
|
||||
bool QmlBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FilePaths *)
|
||||
{
|
||||
if (!dynamic_cast<QmlProjectNode *>(context))
|
||||
|
||||
@@ -95,6 +95,8 @@ public:
|
||||
void setPrimaryLanguage(QString language);
|
||||
bool forceFreeType() const;
|
||||
bool widgetApp() const;
|
||||
QStringList shaderToolArgs() const;
|
||||
QStringList shaderToolFiles() const;
|
||||
|
||||
bool addFiles(const QStringList &filePaths);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user