- Added options for Kit version
- Added CMake support for Qt6.2
- Added options for creating example project,
which uses the plugin
Task-number: QTCREATORBUG-26982
Change-Id: I808c01bce6e4015a679f2fd69767c13179a25ee5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When creating a project from a Recent preset, everything worked well if
the user selected a predefined size. However, when typing a custom width
and custom height, the recent was saved with the selected/active item in
the screen size combobox.
This patch does the following to fix the issue:
* Save the recent info with the screen size written in the text fields
(since they're updated when the user selects a different size from
combobox but the user can type in any other value, the text fields
always reflect the user's choice of width and height)
* When loading a preset for display in the UI, if the preset was saved
with a custom size that does not exist in the predefined list (i.e. in
the combobox), whether that is a custom size or a different
orientation of a predefined size, then append an item into the screen
size combobox so that this custom size will appear as one of the
predefined sizes for the preset. This is both for visual reasons (so
that the combobox would have a valid item active on display) and in
order to be able to save in the backend model this choice (when the
user decides to create the project)
* Update the ListField::selectRow function so that it does not attempt
to select an item that does not exist. The reason is that, when the
user clicks "Create" to create the project, the QWizard will be reset
to the first page, and any modification we might have made to the
model of the screen size combobox will be gone - and thus the
selection would be invalid, which would normally cause the wizard to
fail on page->isComplete(). By not allowing it to select an item in
this case, we rely on the custom width and custom height fields to
hold the real values.
Task-number: QDS-5691
Change-Id: I9e848c5f4957252eb414da7e7146f9f8e7be760c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* We need to use the CheckBox field to set the checked state of fields
(TargetQtVersion, Use as default project location).
* When the validation of the Project Name or Project Location fails, we
need a way to be notified of what went wrong. We also need a way to
force the project intro page to execute the validation of those fields
whenever we need (i.e. when the user types into our QML TextField
controls)
Also, add a warning on loading wizards: whenever a wizard.json file
cannot be parsed, we should issue a qWarning(), so that we can more
easily notice when something went wrong.
Task-number: QDS-4490
Change-Id: I7cfa61b4e43d731db9d0679e093e723d947b60c0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Also remove m_currentPath and logic around it, as it was unused.
Change-Id: Id32ae2845e3788a3e24bb238005b31e8f174f6b9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* We need the showing of the Wizard dialog to be optional
* Each wizard has a "detailsPage.qml" file that stores wizard-specific
UI configuration. We need a way to access that path (QUrl) from QDS.
* ComboboxField is used directly by QDS, and the field object is
fetched by a call to JsonFieldPage::jsonField() - hence, the
ComboboxField needs to be dllexported. We need to access fields
directly from QDS because the QML controls use those fields as backend.
* From QDS we need to select / activate in a combobox field, and to see
which item is current (activated). We also need to make use of the
model that the ComboBoxField uses in order to show those same items in
the qml controls of QDS.
* From QDS we need to set the text in a LineEditField
Task-number: QDS-4490
Change-Id: Ia42d539a5bcbf3dff4593fb027ac18c52da4d046
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Added QDebug operator<< for the Field classes so that they could be inspected during runtime (i.e. logged)
* Added optional QDebug operator<< overloads for QVariant (wizarddebug.h) - to better visualize the data parsed from the wizard.json files (QVariant objects), by using a format more in the like of json.
Change-Id: I53a729b24e4f2d9c9acf1ed802ac9dc3bb67f373
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... rather than a QValidator.
QLineEdit's behavior of preventing invalid input is not suitable here,
as its concept of intermediate states is too limited.
Change-Id: If34793966e8b06762db86b90bb1dbb1526b74ea7
Fixes: QTCREATORBUG-22080
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... until the values have actually been set up.
Fixes: QTCREATORBUG-24971
Change-Id: Ia967fe95545eda1c9044faf8ab1ee885bf3d9e02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.
Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... if the project has no classes.
Apparently, one must not call QFutureInterface::reportsResults() with an
empty list, so prevent that.
Also, for simplicity, make sure we have only one possible point of
deletion for the watcher.
Change-Id: I68c3813459533ced86610e88bea81b6a9d170ca5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
That is, offer existing namespaces for the class name line edit and
existing classes for the base class line edit.
Fixes: QTCREATORBUG-10066
Change-Id: I276036864626eff92997e40e4e22ab16c4f4d617
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Only handle active user clicks as 'modified' to be able
to react on (un)setting values by expressions that depend
on other fields.
Improves the check box handling on the "Add C++ Class" and
"Add Python Class" wizards as it re-evaluates the check box
state based on an expression as long the user does not
actively checks the respective check box.
Change-Id: I739c02b85196555c0379272005ca3b0095f7c762
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This reverts commit e3abd5b348 as it broke
updating evaluating line edits.
Change-Id: Ie729a63d6a2b87df7143aba26726b657cffb8148
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Keep the old method for now to ease downstream porting.
The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.
Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The value was successfully loaded from the history,
but overwritten again.
Let's now check if the line edit already contains
a value (loaded from history) before setting the
default text.
Change-Id: Ic0acad83f76e0aca76309dfd213183a210d334ac
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The ComboBoxField class used the QComboBox view's selection model as the
source for the current value, which makes no sense, as the item that was
last selected was not necessarily activated by the user.
Fixes: QTCREATORBUG-23149
Change-Id: I8587dd20381e142b91f13a987e54c86b8f6237c8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Wizard authors can now provide a persistence key to values where that
makes sense.
For now, we make use of it for the build system type in all wizards and
the minimum Qt version as well as the virtual keyboard settings in the
QtQuick wizards.
Fixes: QTCREATORBUG-16657
Change-Id: I179930665bd163b1cf198467ab8b43bc72f8ec4a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.
The patch also makes it actually possible to assign JSON lists and
dictionaries to values.
This removes some hacks involving creating complex JavaScript objects
through string substitution.
Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
QLabel has a horizontal size policy of "Preferred", but if the label is
word-wrapped, the sizeHint is a using a golden ratio for width & height,
but we want the label to grab as much horizontal space as it gets
anyhow.
Change-Id: I6ed049f4f23158014dc04f2d5020b7c2dd4c1980
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use unique_ptr for all *Private classes, except for those
in singletons.
Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
- reuse some code from ComboBoxField throw an abstract ListField class
- ListField can handle more data like: icon, trToolTip
- fix disabledIndex in ComboBoxField
- adjust documentation
Change-Id: I00b6ab787fb2fad97dafff32786cf73c636c772d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
- parseData methods check that there is no unknown key is used
- showing the name and type might be useful in warning and error messages
Change-Id: I1371bb3af1ad48ed4b85260f3b1309cdba1cb71f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
With it as a wrapper we can register any QObject
to use widget based field mechanism from QWizard.
It also helps to avoid the necessity for inheritance
to just adjust the text property of a widget.
Can not remove the TextCheckBox, because it is used
in some old C++ wizards.
Change-Id: I85a85a834714a4b38b501c13357fa8c8bb02b5bd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
For example it will be used to get the
wizard directory to show icons in fields later.
Change-Id: I6a243a67a89e4a0133550a61b870d771147667f1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
KDE checks for a "text" property in the wizard pages and will then replace the
text it sees there with some text with added '&' characters. This breaks the
wizards, so rename the properties to something that is not "text".
Task-number: QTCREATORBUG-17503
Change-Id: Ie513848cef9cd795f06a47659abb550abd268b11
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
QTCREATORBUG-17190 is fixed by this since initialization is fixed as a side effect;-)
Task-number: QTCREATORBUG-17190
Change-Id: I9d1f81d6cca26fcdd9ba8a49ee66e05607d6cae1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Setting "visible" of a widget (such as TextField) to false in a Field
Page hides the widget, but leaves it's label visible. Modified each
field to update it's label visibility when the widget is shown/hidden.
Change-Id: Idf20c624b6aad09a2be159e2fc697fcb24bd2bc5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>