QmlProjectManager: Add widgetApp qml project property

Widget was the default apptype in Qt5, but in Qt6 the default was
changed to gui, so projects with qml modules that depend on widgets can
no longer be launched. Notable example of this is QtCharts.

Added "widgetApp" qml project property to allow users to specify if
they want widget or gui based application.

Task-number: QDS-5686
Change-Id: If0787421c79d4ba24a0f8513c8538126bcf29b4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Miikka Heikkinen
2021-12-07 15:04:04 +02:00
parent 8c139603a1
commit c17f633a7e
5 changed files with 21 additions and 0 deletions

View File

@@ -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))