Commit Graph

11 Commits

Author SHA1 Message Date
Tim Jenssen
19f5099c93 StudioWelcome: fix crashes when setupWizard fails
Task-number: QDS-13209
Change-Id: I5751de9d5a5c8065a7cbad91c048d7d4d60de238
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-17 14:03:43 +00:00
Miikka Heikkinen
855c27de2a QmlDesigner: Fix Qt version handling in new project dialog
Different wizards may have different options for target Qt version,
so don't hardcode them, but query them from the wizard.
Also initialize the default target Qt version index to correct value
in 3D wizard.

Fixes: QDS-10223
Change-Id: I75f6bf60655692c52b1350182bf3ac122efc1c74
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-08-01 11:08:20 +00:00
Jarek Kobus
b5af4501df Fix include style
Change-Id: I64cb77f8d39dac35821fe96d735bc5dda35738e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-24 13:42:50 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
05eec13ade StudioWelcome: Avoid using sender()
Change-Id: I3d075867c9114f52ead920b3120904fc79bba775
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-08 16:22:24 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Samuel Ghinet
618eda3572 Implement custom presets
Task-number: QDS-4989
Change-Id: I95844ae97204ad3bb94905c89f8e16b79eed8f64
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-08 09:39:43 +00:00
Samuel Ghinet
c1c147a9dc QDS-5691 Create a tab for Recent choices
The Recents should store presets, rather than normal project items,
while the rest of tabs are to store normal project (i.e. wizard) items
but with the default screen size written under the wizard name.

In this patch I also did a few renames: e.g. the Presets view now uses a
PresetModel rather than ProjectModel, because we now store presets. A
Preset is a higher level concept than Project / Wizard item: it can be a
project/wizard item with pre-defined configurations; and now we can have
multiple presets using the same Wizard factory. Renamed struct
ProjectCategory to WizardCategory, because the items are grouped by the
category of the wizard (i.e. the "category" property of IWizardFactory)

I extracted a class, PresetData, to hold the data that is being shared
by the PresetModel (items in the view) and the PresetCategoryModel
(header/tab items). It stored both information on normal presets and on
recent presets.

Made changes to JsonWizardFactory so that I could extract the list of
screen sizes without requiring to build a wizard object first. This is
important, because multiple JsonWizard objects cannot be created at the
same time and I need to show the screen sizes of multiple presets /
wizards as the Presets view is opened. This also required class
WizardFactories to use JsonWizardFactory instead of Core::IWizardFactory
-- since "screen sizes" are a particularity of the json wizards, not of
all kinds of wizards.

Also, fixed a TODO in WizardHandler::reset() method.

Also, added a few utilities I had need of, in algorithm.h.

Change-Id: Ifd986e2def19b2e112f0aa1ab3db63d522736321
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-17 08:59:09 +00:00
Samuel Ghinet
300ec4119f Fix: Project wizard may not close on project creation if there is an error
The error was: "The executable of the QML emulation layer (QML
Puppet) may not be responding. Switching to another kit might help."

This error / warning condition happens in ConnectionManager::setUp()
in plugins/qmldesigner/designercore/instances/connectionmanager.cpp
when puppet fails to start -
connection.qmlPuppetProcess->waitForStarted(waitConstant) returns
false. This opens a warning message box with the parent of it set as
the active window. This active window happens to be the New Project
dialog QQuickWidget. This somehow prevents the QQuickWidget object
from actually closing on `m_dialog->close()` -- the operation returns
true but the dialog is not closed.

Fixing this involves two steps:
1. On "Create project" hide the dialog box before starting to create
the project, so that the parent of the message box would be set to
the main window.
2. deleteLater() on the m_dialog, because, for some reason, even if
the QQuickWidget is no longer its parent and even if m_dialog has
the flag Qt::WA_DeleteOnClose set, the close() still doesn't
close / destroy the dialog box.

If we do only (2) but not (1) then the message box would appear and
disappear quickly when the dialog box closes.

I have also set variables to null just for correctness.

Task-number: QDS-5531
Change-Id: Ib33be6a2de6174b0439cd1917f3e871ee5d4f52f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-24 11:19:52 +00:00
Samuel Ghinet
c2a4bebad4 Fix: QDS New Project dialog shows incorrect items in the screen size combobox
The index in the backend wizard's combobox was not loaded when
initializing the QML combobox.

Task-number: QDS-5523
Change-Id: I48583ff1ca85f840e9b7314a4e0ed734364c326a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-11-18 11:38:22 +00:00
Samuel Ghinet
a850b1b866 Implement the New Project creation wizard for QDS
Task-number: QDS-4490
Change-Id: Ie8073e8838ec14a7f11ad972acc6fca4456adf58
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-09 18:21:22 +00:00