forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/6.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
This commit is contained in:
@@ -123,6 +123,10 @@ QmlProjectItem *QmlProjectFileFormat::parseProjectFile(const Utils::FilePath &fi
|
||||
if (qt6ProjectProperty.isValid() && qt6ProjectProperty.value.toBool())
|
||||
projectItem->setQt6Project(qt6ProjectProperty.value.toBool());
|
||||
|
||||
const auto widgetAppProperty = rootNode->property("widgetApp");
|
||||
if (widgetAppProperty.isValid())
|
||||
projectItem->setWidgetApp(widgetAppProperty.value.toBool());
|
||||
|
||||
if (debug)
|
||||
qDebug() << "importPath:" << importPathsProperty.value << "mainFile:" << mainFileProperty.value;
|
||||
|
||||
|
||||
@@ -78,6 +78,9 @@ public:
|
||||
QString mainFile() const { return m_mainFile; }
|
||||
void setMainFile(const QString &mainFilePath) { m_mainFile = mainFilePath; }
|
||||
|
||||
bool widgetApp() const { return m_widgetApp; }
|
||||
void setWidgetApp(bool widgetApp) { m_widgetApp = widgetApp; }
|
||||
|
||||
void appendContent(QmlProjectContentItem *item) { m_content.append(item); }
|
||||
|
||||
Utils::EnvironmentItems environment() const;
|
||||
@@ -99,6 +102,7 @@ protected:
|
||||
bool m_forceFreeType = false;
|
||||
bool m_qtForMCUs = false;
|
||||
bool m_qt6Project = false;
|
||||
bool m_widgetApp = false;
|
||||
};
|
||||
|
||||
} // namespace QmlProjectManager
|
||||
|
||||
@@ -585,6 +585,13 @@ bool QmlBuildSystem::forceFreeType() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool QmlBuildSystem::widgetApp() const
|
||||
{
|
||||
if (m_projectItem)
|
||||
return m_projectItem.data()->widgetApp();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool QmlBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FilePaths *)
|
||||
{
|
||||
if (!dynamic_cast<QmlProjectNode *>(context))
|
||||
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
QString primaryLanguage() const;
|
||||
void setPrimaryLanguage(QString language);
|
||||
bool forceFreeType() const;
|
||||
bool widgetApp() const;
|
||||
|
||||
bool addFiles(const QStringList &filePaths);
|
||||
|
||||
|
||||
@@ -227,6 +227,11 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
|
||||
ProcessArgs::addArg(&args, "windows:fontengine=freetype", osType);
|
||||
}
|
||||
|
||||
if (bs->qt6Project() && bs->widgetApp()) {
|
||||
ProcessArgs::addArg(&args, "--apptype", osType);
|
||||
ProcessArgs::addArg(&args, "widget", osType);
|
||||
}
|
||||
|
||||
const QString main = bs->targetFile(FilePath::fromString(mainScript())).toString();
|
||||
if (!main.isEmpty())
|
||||
ProcessArgs::addArg(&args, main, osType);
|
||||
|
||||
Reference in New Issue
Block a user