This may be tested in File | New File... | C/C++ | C++ Class,
Base class line edit should provide class completion.
With locator matcher the task is being executed ~20% faster.
This patch also solves the potential issue with interference
between parallel runs of classes filter in locator and
in LineEditField.
Change-Id: Ice3e719d9cbe72ec4cd11bd4362a94e9c3ce8874
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This changes several tr() calls which were either missed during Tr::tr-
ization or were added later.
Found with regular expression: (?<!(Tr::)|([\w]))tr\(
Change-Id: I1c0c03589e941614a7a8449ecfebc7d2cad396c3
Reviewed-by: hjk <hjk@qt.io>
Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.
Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
Combo boxes have "suppressName" set, but if they have span set too, we
still need to use addRow instead of addWidget.
Reorder the if conditions. The previous code didn't make much sense,
because it first checked for suppressName, and then for hasSpan, but
inside hasSpan it checked for (!suppressName) again, which could never
be false.
You can see this in action in the File > Qt > JS File wizard.
Change-Id: I976227f80277642823620e41aba605c8570aed44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
... by a new PathChooser::textChanged signal.
They were both emitted in reaction to the underlying line edit's
textChanged() signal.
Use 'textChanged()' as name to mimic/match the Qt side. This also
makes it more clear on the user code side, when this happens.
Some textChanged() consumers should probably use editingFinished()
instead, but that's left for later changes.
Change-Id: Ib07347f616cbf1c5d09bc2f8671ca860d185d1f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The other code path to trigger rawPathChanged is not relevant here.
Helps in a follow-up change.
Change-Id: Ifa70a763d8b3c82484b3c4e3c62d91ba2ca8e998
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
- 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>