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>
The wizard is unable to advance when a mandatory field is hidden. Assume
a hidden widget is not mandatory.
Change-Id: I19bdc1a661d91b75151d3aec34ad9d584002a556
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
... instead of having a hard-coded list of widgets you can use.
Change-Id: Iedf7016412ce9d619fea5cdffe6dbf86beda92b0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Benjamin Zeller <benjamin.zeller@canonical.com>
The name is overly generic, particularly with a pathChanged() signal
also present. Rename to "rawPathChanged", which adequately describes the
semantics.
Change-Id: Ia62b8b0a97a794cb6d5ad6b8ce0abcd36b5f5cdb
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This avoids a combobox being shown without any selection. This has
the side-effect that QTCREATORBUG-14699 can no longer get triggered.
Task-number: QTCREATORBUG-14699
Change-Id: I98f5ae503d29370ad46c6620238bc2815c024747
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
That is closer to what a user expects than the "0" and "1" used
before.
Change-Id: I08b3a7b0361dd54b75ee7b2213b3d120fb016bf5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This allows to do more sophisticated checks on the completion state
of the page.
Change-Id: Ibb6593fdc4e9c9f37e7d70c516f1a1410123191f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>