After 83111bb3, the path validity result was coming in later and
was not considered for the page completeness check any more.
Fix that by running the check again when the path result is ready.
Change-Id: I2aab6b2130896d63f7e0359ced39e758393a2644
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
LineEdit and TextEdit have a couple of text options which start with
"tr". These strings can be translated via Qt Linguist.
In some cases, these text options contain macros or even JavaScript code
which must not be translated. Translation of these fields can
easily break the wizard.
This change adds the possibility to set non-translatable options for
LineEdits and TextEdits "(tr)Text", "(tr)DisabledText" and
"(tr)Placeholder" in the .json files.
Task-number: QTCREATORBUG-29649
Change-Id: I278a0bec848888cf96bdb49306e319c14a09236c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Deprecated since Qt 6.0 in favor of typeId()
Change-Id: Ib6ab5196ad9ec4cb2d3dbc2d4f1ceca5cfdcdd07
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Connect to LocatorMatcher::done() signal instead of to
serialOutputDataReady() in order to get all the results
available (not just 1st partial results).
Give locator matcher a parent to avoid possible leak.
Amends 1cc7342ef1
Change-Id: Ie4a73a5b2dd25f22616bd30a13eb7393c96a890f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>