Commit Graph

95 Commits

Author SHA1 Message Date
Mitch Curtis 48b24f762f Doc: make validator documentation more discoverable
Make it easier for users to discover the other types of
validators by linking to various pages.

Change-Id: Ifb15b9629ec81bdc7d3e4da4811f2b591a611d23
Fixes: QTBUG-101402
Pick-to: 6.2 6.3
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-03-09 15:49:40 +08:00
Marc Mutz 2cc336bde4 Fix Clang 10 -Werror,-Wdeprecated-enum-float-conversion
C++20 deprecated these. We don't seem to -Wno-error that warning, but
the fix is simple, so I guess we don't have to.

Pick-to: 6.3 6.2
Change-Id: I3774295b0985369ab531e9f7a2a0c18983180554
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-01-23 22:38:23 +01:00
Kai Köhne 5d4679289b Use up-to date LGPL license header
Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3
instead of LICENSES.LGPL3.

Change-Id: If7a90ec18331a68491c5a740f131a5e7b3f37df4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-11-29 09:21:34 +01:00
Mitch Curtis fb6baf03fa AbstractButton: emit doubleClicked() for touch events
[ChangeLog][Controls][AbstractButton] doubleClicked() is now also
emitted for touch events.

Fixes: QTBUG-82146
Change-Id: Ie1e24d291bd4b592edd91fc762da8636e08698df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-06-09 11:22:02 +02:00
Jan Arve Sæther 64fd0b53b3 Add support for ScrollBar arrow buttons
In order to achieve this, it separates out QQuickSpinButton into a
separate file (and renames it since it's not only purposed for SpinBox
anymore). This allows it to be also used by QQuickScrollBar.

Fixes: QTBUG-88115
Pick-to: 6.0
Change-Id: I2dea42b29750b7bc619031f40a43717fc10c177b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-12-10 16:21:21 +01:00
Mitch Curtis 08477f64d8 Doc: remove all instances of \qmlpropertygroup
This is apparently no longer necessary.

Pick-to: 5.15
Change-Id: I0f45a84ced5118d248ffab4e745c4e2f2ce5738f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-11-09 12:58:27 +01:00
Andy Shaw 97d2d27123 Update the text when the inputted value is out of range
When the inputted value is out of range but it would be fixed to the
previous value then it would not update the text correctly to show the
corrected value. This ensures that it is updated as appropriate.

Before it would check if the value had actually changed after it had
been fixed to the corrected value. So if it was corrected to the
original value then it would not see it as having changed. Additionally
the displayText also has the original text before the change, so we
have to force through an update to ensure the contentItem's text is
updated too.

Change-Id: Ic38787d0803ab59cd998f4e2871c613f1642e764
Pick-to: 5.15
Fixes: QTBUG-85719
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-09-11 09:58:28 +02:00
Mitch Curtis 2d0794cbc7 QQuickSpinBox: fix another "function expressions as statements" warning
This amends d5fbbddd77 by also fixing
valueFromText().

Task-number: QTBUG-64151
Pick-to: 5.15
Change-Id: I02b053bb4d4579e86eaaa2279826f3b103800fdf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-20 23:44:46 +02:00
Shawn Rutledge e481f1c414 Replace calls to deprecated QEvent accessor functions
Several event accessors were deprecated in
qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5.

Replacements were generated by clazy using the new qevent-accessors check:
$ export CLAZY_CHECKS=qevent-accessors
$ export CLAZY_EXPORT_FIXES=1
$ ../qt6/configure -platform linux-clang -developer-build -debug
  -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy
$ make
$ cd ../../qt6/qtquickcontrols2
$ find . -name "*.clazy.yaml"
$ clang-apply-replacements .

Task-number: QTBUG-20885
Task-number: QTBUG-84775
Change-Id: I7fb9b0603341ea1a0c3a00f79ebd642a6354702d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-06-11 18:52:07 +00:00
Simon Hausmann a73d89590c Fix build after QJSValue API changes
Change-Id: I21ba3fc72951b946e84eb8c7c85f73ff4276eaac
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-19 17:25:53 +01:00
Vitaly Fanaskov 31f5c21ddb Remove old QQuickPalette implementation
The existing implementation was removed in order to reduce massive code
duplication and simplify color resolving process. Unit tests were fixed
accordingly.

See related changes in the qtdeclarative module for the further details.

[ChangeLog][General] the palette API is a part of
QQuickItem now.

Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-18 17:29:24 +01:00
Alexandru Croitor 92dc998f6d Fix build failures as a result of QMetaType changes in qtbase
moc now stores the QMetaType of properties as a result of
46f407126ef3e94d59254012cdc34d6a4ad2faf2 in qtbase, which requires
full type information about the property type inside the moc generated
source file.

Many of the property types were forward-declared, and this resulted
in build errors like
  "invalid application of 'sizeof' to an incomplete type 'QQuickTransition'"

Make sure to explicitly include the moc files inside the counterpart
.cpp files, so that full information is available from included headers.

Fixes: QTBUG-82774
Change-Id: I5971713864992398daed72ce9f6ab866668cf8e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2020-03-12 15:48:31 +01:00
Qt Forward Merge Bot 9a9ae6be7d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
2019-11-30 03:04:24 +01:00
Mitch Curtis 80f1186338 Don't delete items we didn't create
Up until this patch, we've always deleted "old" items when a new one is
assigned. For example, the style's implementation of contentItem will
be destroyed here as it is not accessible by the user and is no longer
used:

    Button {
        contentItem: Item { /* ... */ }
    }

This was especially important before the introduction of deferred
execution, as the "default" items would always be created, regardless
of whether the user had overridden it with one of their own items.
By deleting the old items, we free unused resources that would
otherwise persist until application shutdown (calling gc() does not
result in the items being garbage-collected, from my testing).

Although this has largely worked without issues, deleting objects
that weren't created by us in C++ is not supported. User-assigned items
can be created in QML (with JavaScriptOwnership) or C++ (with
CppOwnership), and it is up to the user and/or the QML engine to
manage the lifetime of these items.

After the introduction of deferred execution, it became possible to
skip creation of the default items altogether, meaning that there was
nothing to delete when assigning a new, user-specified item. This
requires that no ids are used in these items, as doing so prevents
deferred execution. Assuming that users avoid using ids in their items,
there should be no unused items that live unnecessarily until
application shutdown. The remaining cases where items do not get
destroyed when they should result from the following:

- Imperative assignments (e.g. assigning an item to a Button's
  contentItem in Component.onCompleted). We already encourage
  declarative bindings rather than imperative assignments.
- Using ids in items.

Given that these are use cases that we will advise against in the
documentation, it's an acceptable compromise.

[ChangeLog][Important Behavior Changes] Old delegate items (background,
contentItem, etc.) are no longer destroyed, as they are technically
owned by user code. Instead, they are hidden, unparented from the
control (QQuickItem parent, not QObject), and Accessible.ignored is
set to true. This prevents them from being unintentionally visible and
interfering with the accessibility tree when a new delegate item is
set.

Change-Id: I56c39a73dfee989dbe8f8b8bb33aaa187750fdb7
Task-number: QTBUG-72085
Fixes: QTBUG-70144
Fixes: QTBUG-75605
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-28 15:51:43 +01:00
Venugopal Shivashankar 8ee511bcd9 Doc: Fix qdoc warnings
The warnings were about:
- Undocumented function parameters
- Instances of \instantiates that us an internal class
- A few link issues

Task-number: QTBUG-79827
Change-Id: I60094279c7da6bc446b5c63b7b4924b71cee4672
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-11-26 13:51:32 +01:00
Venugopal Shivashankar f74cff42a7 Doc: Replace the "Qt Quick Controls 2" instances
Now that Controls 1 is deprecated, it's ideal to use
"Qt Quick Controls" instead of "Qt Quick Controls 2".

Task-number: QTBUG-70333
Change-Id: Ie745db4b61071ddb5e06150d4e739cda74c59f41
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-08-22 08:32:02 +02:00
Mitch Curtis 2431853d82 SpinBox: fix indicators being hovered when mouse is moved while pressed
We also need to update the hovered state of each indicator when
the mouse is moved while pressed, not just when we get hover move
events.

Change-Id: I6fa71344fd540f648683958e5804ae735523e72d
Fixes: QTBUG-74688
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-04-08 08:40:54 +00:00
Topi Reinio 0dfc617e4d Doc: Fix incorrect link to Number.toLocaleString()
Task-number: QTBUG-73849
Change-Id: I02b32f55fabc6274a071536234dd485bf4e9bd02
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2019-02-19 12:30:48 +00:00
Liang Qi 66a781692a Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/imports/controls/imagine/TextArea.qml
	src/imports/controls/imagine/TextField.qml
	tests/auto/controls/data/tst_tumbler.qml

Change-Id: I25a8228a4299fb7a53db70b7223663a1637ed933
2018-06-25 10:49:57 +02:00
Mitch Curtis d5fbbddd77 QQuickSpinBox: Fix "function expressions as statements" warning
Surround the function with parentheses as suggested:

QWARN  : tst_Snippets::verify(qtquickcontrols2-spinbox-custom) Warning: Using function expressions as statements in scripts is not compliant with the ECMAScript specification:
 "function(value, locale) { return Number(value).toLocaleString(locale, ..."
This will throw a syntax error in Qt 5.12. If you want a function expression, surround it by parentheses.

Change-Id: I39df9af9b3dc62ffaf6fcba071c04c8933698c07
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-21 07:55:28 +00:00
J-P Nurmi 1a3c1a089f QQuickTheme: rename themeFont() and themePalette()
We don't have the conflicting virtual getters anymore.

Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-22 14:20:53 +00:00
Qt Forward Merge Bot de9c38dd61 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/quicktemplates2/qquickabstractbutton_p_p.h
	src/quicktemplates2/qquickcombobox.cpp
	src/quicktemplates2/qquickcontainer.cpp
	src/quicktemplates2/qquickcontrol.cpp
	src/quicktemplates2/qquickcontrol_p_p.h
	src/quicktemplates2/qquickdialog_p_p.h
	src/quicktemplates2/qquickdialogbuttonbox.cpp
	src/quicktemplates2/qquickdialogbuttonbox_p_p.h
	src/quicktemplates2/qquickdrawer.cpp
	src/quicktemplates2/qquickmenubar.cpp
	src/quicktemplates2/qquickmenubar_p_p.h
	src/quicktemplates2/qquickpage.cpp
	src/quicktemplates2/qquickpage_p_p.h
	src/quicktemplates2/qquickpane.cpp
	src/quicktemplates2/qquickpane_p_p.h
	src/quicktemplates2/qquickpopup.cpp
	src/quicktemplates2/qquickpopup_p_p.h
	src/quicktemplates2/qquickrangeslider.cpp
	src/quicktemplates2/qquickscrollview.cpp
	src/quicktemplates2/qquickslider.cpp
	src/quicktemplates2/qquickspinbox.cpp
	src/quicktemplates2/qquickswipeview.cpp
	src/quicktemplates2/qquicktabbar.cpp
	src/quicktemplates2/qquicktextarea_p_p.h
	src/quicktemplates2/qquicktextfield_p_p.h
	src/quicktemplates2/qquicktheme_p.h

Change-Id: I6e2b8fe99e51e3e26c87546aa66af045bc429ec4
2018-05-07 14:18:09 +02:00
J-P Nurmi aea55d29d2 Templates: use C++11 default member initialization
The code is more readable and less error-prone (this patch caught a few
uninitialized members) when the members are initialized in the same
place where they are declared. In many cases, empty default destructors
can be entirely removed, and we get faster implicitly declared inline
default constructors defined by the compiler.

Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-04 12:53:00 +00:00
J-P Nurmi 1a7be21541 SpinBox: add up|down.implicitIndicatorWidth|Height
[ChangeLog][Controls][SpinBox] Added up.implicitIndicatorWidth,
up.implicitIndicatorHeight, down.implicitIndicatorWidth, and
down.implicitIndicatorHeight properties.

Change-Id: I2cdc4e95f8cc3f0e47ce3b24346781f44809eecd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-04-18 15:40:44 +00:00
J-P Nurmi 5178f62694 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/quickcontrols2/qquickstyle.cpp
	tests/auto/controls/data/tst_popup.qml

Change-Id: I7b7bb5f9c63b32eef65c9b2e68f56baa3da69cff
2018-03-23 15:02:35 +01:00
J-P Nurmi 2acf527d54 Combo|SpinBox: fix wheel event propagation
Sync the behavior with Qt Widgets. Don't propagate wheel events when
reaching the end. The behavior was not nice, that a ScrollView
underneath started suddenly moving whilst these input controls had
input focus.

Task-number: QTBUG-66044
Change-Id: I1b9c7f005652041cd82c77d4a1ca1a01d7d536e9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-23 12:14:43 +00:00
J-P Nurmi 87d3e84c75 Add QQuickTheme::Scope
Replace the old enums that were originally copied from QPlatformTheme,
including irrelevant entries for DockWidget, MdiSubWindow, MessageBox,
with a unified enum that will be matched to cover everything needed
for theming fonts and palettes for Qt Quick Controls 2.

Task-number: QTBUG-67062
Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-15 13:00:53 +00:00
J-P Nurmi 63773fd536 QQuickTheme: add missing fonts and palettes
SpinBox, Switch, and Tumbler were previously not available in
QPlatformTheme, but now we have our own enums so we can add them.

Task-number: QTBUG-67062
Change-Id: Ie99a49b464fbbd25051181b75d721f537b8e3a68
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-15 07:50:30 +00:00
Qt Forward Merge Bot 41dd1405d5 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Id5cd236e14238612647f7a897886be0202863132
2018-03-10 03:00:41 +01:00
Mitch Curtis c6bf75d7da Doc: add a "Focus Management in Qt Quick Controls 2" page
This will list each control that is a focus scope, and have
some relevant information about focus in Qt Quick Controls 2.

Change-Id: I3126452bf73f7d7730d0522d616d61ad0da0dd74
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2018-03-06 19:08:12 +00:00
J-P Nurmi 5b711c320c Move QQuickControlPrivate::themeFont|Palette() to QQuickTheme
QPlatformTheme is too limited for our theming purposes. We need support
for separate palettes (and later, icon colors) in dark and light themes.
Also, the fact that Qt Quick Controls 2 injects a platform proxy theme
does have undesired side effects in Qt Widgets and Qt Quick Controls 1.
Therefore, we start separating QPlatformTheme and QQuickTheme. The first
step is to eliminate some direct QPlatformTheme access in QQuickControl
and route it via QQuickTheme instead.

Task-number: QTBUG-51921
Change-Id: I055471a75ed6f26968796496efd1892975447c98
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-02-15 12:25:58 +00:00
J-P Nurmi eddd9d24ff Docs: fix qdoc (clang) warnings
qtquickcontrols2-automotive.qdoc:28: (qdoc) warning:   EXAMPLE PATH DOES NOT EXIST: automotive
    qtquickcontrols2-musicplayer.qdoc:28: (qdoc) warning:   EXAMPLE PATH DOES NOT EXIST: musicplayer
    qquickspinbox.cpp:814: (qdoc) warning: Can't link to 'textFromValue()'

Change-Id: Iec6fd398cca98b514a76fe9f2f30c79a59b81457
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-02-13 13:02:03 +00:00
J-P Nurmi 08e6333450 Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: Ibd1490e8d958361e55ac272dff75c9361239958b
2018-01-16 09:38:19 +01:00
J-P Nurmi 5d9736653e Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/imports/controls/BusyIndicator.qml
	src/imports/controls/CheckBox.qml
	src/imports/controls/CheckDelegate.qml
	src/imports/controls/ComboBox.qml
	src/imports/controls/DelayButton.qml
	src/imports/controls/Dial.qml
	src/imports/controls/ItemDelegate.qml
	src/imports/controls/MenuItem.qml
	src/imports/controls/RadioButton.qml
	src/imports/controls/RadioDelegate.qml
	src/imports/controls/SwipeDelegate.qml
	src/imports/controls/Switch.qml
	src/imports/controls/SwitchDelegate.qml
	src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
	src/imports/controls/material/CheckDelegate.qml
	src/imports/controls/material/ItemDelegate.qml
	src/imports/controls/material/MenuItem.qml
	src/imports/controls/material/RadioDelegate.qml
	src/imports/controls/material/SwipeDelegate.qml
	src/imports/controls/material/SwitchDelegate.qml
	src/imports/controls/qquickdefaultbusyindicator.cpp
	src/imports/controls/qquickdefaultbusyindicator_p.h
	src/imports/controls/qtquickcontrols2plugin.cpp
	src/imports/controls/universal/CheckDelegate.qml
	src/imports/controls/universal/ItemDelegate.qml
	src/imports/controls/universal/MenuItem.qml
	src/imports/controls/universal/RadioDelegate.qml
	src/imports/controls/universal/SwipeDelegate.qml
	src/imports/controls/universal/SwitchDelegate.qml
	src/quickcontrols2/quickcontrols2.pri
	src/quicktemplates2/qquickcontrol.cpp
	src/quicktemplates2/qquickmenu.cpp
	src/quicktemplates2/qquickpopup_p.h

Change-Id: Ib25c8b4a7fe018b7c0ade9b02bfaaa6980118c15
2018-01-10 13:43:39 +01:00
Liang Qi ef5e426bed Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	.qmake.conf
	src/quicktemplates2/qquickabstractbutton_p.h

Change-Id: I265cbd2ce51beaf2afef99292c2e2798dadb4ba3
2018-01-09 21:54:50 +01:00
J-P Nurmi c40486acc3 Fix deferred execution
If the QML engine refuses to defer execution of a delegate (it contains
an ID), we must make sure to cancel any pending deferred execution for
the same delegate. Otherwise, we may end up overriding a custom (non-
deferred) delegate with a default (deferred) delegate.

This patch adds a new test style "identified" to tst_customization.
This style contains delegates with IDs so we can test the behavior with
IDs in base styles. Furthermore, overriding delegates is now tested
in various ways (with and without IDs in the base and custom styles) in
a separate test method. This is done by generating QML code to override
delegates with dummy Item instances with appropriate IDs and names.

Task-number: QTBUG-65341
Change-Id: Ie6dca287cb74672004d9d8f599760b9d32c3a380
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-12-21 14:46:30 +00:00
J-P Nurmi 1fcec5bf1e Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	examples/quickcontrols2/quickcontrols2.pro
	src/imports/controls/ComboBox.qml
	src/quicktemplates2/qquickabstractbutton.cpp
	src/quicktemplates2/qquickabstractbutton_p.h
	src/quicktemplates2/qquickapplicationwindow_p.h
	src/quicktemplates2/qquickcombobox.cpp
	src/quicktemplates2/qquickcontainer.cpp
	src/quicktemplates2/qquickcontrol.cpp
	src/quicktemplates2/qquickcontrol_p.h
	src/quicktemplates2/qquickcontrol_p_p.h
	src/quicktemplates2/qquicklabel_p.h
	src/quicktemplates2/qquicklabel_p_p.h
	src/quicktemplates2/qquickslider_p.h
	src/quicktemplates2/qquickspinbox.cpp
	src/quicktemplates2/qquicktextarea_p.h
	src/quicktemplates2/qquicktextarea_p_p.h
	src/quicktemplates2/qquicktextfield_p.h
	src/quicktemplates2/qquicktextfield_p_p.h
	tests/auto/auto.pro
	tests/auto/controls/data/tst_combobox.qml

Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
2017-12-15 11:44:26 +01:00
J-P Nurmi 6b89293b99 Control: defer the execution of the content item
Tumbler is excluded because test_customContentItemAtConstruction()
starts failing if deferred execution is enabled for the content item.

Task-number: QTBUG-50992
Change-Id: I11022c3c380311396453cf6229e068e4aae2d82a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-12-15 10:04:26 +00:00
J-P Nurmi a03f18e026 Control: defer the execution of the background item
Task-number: QTBUG-50992
Change-Id: I6372e143c68f0a5bf7212d759281acef3c81618e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-12-15 09:27:44 +00:00
J-P Nurmi a60a28f822 SpinBox: use deferred execution
tst_controls::SpinBox::test_initialFocus() caught an issue that focus
was not transferred as expected when the creation of the content item
was deferred.

Task-number: QTBUG-50992
Change-Id: I6b9f5684ab7141fa4ebfe4c7fe3e32528553b96d
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-12-14 18:06:58 +00:00
J-P Nurmi 501d45012f Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/quickcontrols2/qquickchecklabel.cpp
	src/quickcontrols2/qquickchecklabel_p.h
	src/quickcontrols2/qquickmnemoniclabel_p.h
	src/quicktemplates2/qquickbuttongroup_p.h
	src/quicktemplates2/qquickspinbox.cpp
	src/quicktemplates2/qquickswipedelegate.cpp

Change-Id: I1278b78dcaf25be5698f34751193b83dc951eb3c
2017-11-06 20:32:26 +01:00
J-P Nurmi c39b126a77 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/quicktemplates2/qquickabstractbutton_p.h
	src/quicktemplates2/qquickbuttongroup_p.h
	src/quicktemplates2/qquickrangeslider.cpp
	src/quicktemplates2/qquickrangeslider_p.h
	src/quicktemplates2/qquickswipeview_p.h
	src/quicktemplates2/qquicktextarea.cpp
	src/quicktemplates2/qquicktextarea_p.h
	src/quicktemplates2/qquicktextfield_p.h

Change-Id: I7cba8783b1dd85a4db534222e36572ee05dd01d0
2017-11-06 14:02:21 +01:00
J-P Nurmi 430fe83ecb Re-order all revisioned members and add explanatory comments
We've come to realize that even though it's tempting to group similar
properties together, organizing the API so that revisions are grouped
together makes future maintenance more pleasant. It's a lot easier to
to see what was added and when.

Change-Id: I47ba7725260f2c259048848cc2a9b17bce2f01c7
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-11-06 10:17:22 +00:00
J-P Nurmi 990862b162 QQuickSpinBox: fix internal setValue() arguments
Task-number: QTBUG-64075
Change-Id: Ifd48b6d0075ab1930be3d759b18292b5038bcc17
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-10-27 17:49:27 +00:00
J-P Nurmi 459842c6d8 Add QQuickSpinBox::displayText
Allows styles to create a simple binding to display the textual value
instead of calling the textFromValue() JS-function. Furthermore, this
allows us to do the text<->value conversion in C++ using QLocale by
default, unless custom textFromValue and/or valueFromText JS-functions
are provided.

Before:

    running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml
        100 frames
        100 frames
        99 frames
        Average: 99.6667  frames; using  samples; MedianAll=100; StdDev=0.57735, CoV=0.00579281

After:

    running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml
        152 frames
        150 frames
        151 frames
        Average: 151  frames; using  samples; MedianAll=151; StdDev=1, CoV=0.00662252

Change-Id: I66a5ebaf685d2c30613b58099724e6e7bbe00504
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-10-25 13:03:27 +00:00
J-P Nurmi c32c776bf4 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/quicktemplates2/qquicklabel.cpp
	src/quicktemplates2/qquicktextarea.cpp
	src/quicktemplates2/qquicktextfield.cpp

Change-Id: Ibbf6bc48972f58fbc6779a87ac9e2434c56c4db8
2017-09-11 14:03:47 +02:00
J-P Nurmi bc2f84ad4a QQuickSpinBox: fix initial value validation
Task-number: QTBUG-62508
Change-Id: I8981968c02b65d4b005eb9b54b0228fd51a3abda
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-08-29 12:39:44 +00:00
J-P Nurmi a31a5ade38 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/quicktemplates2/qquickspinbox.cpp
	tests/auto/controls/data/tst_scrollbar.qml

Change-Id: Ief9481cb648076a951db0aeffaeb11aeaf392677
2017-06-22 20:59:07 +02:00
J-P Nurmi 0d851ddab0 QQuickSpinBox: emit valueModified() on long press
Move the emit inside QQuickSpinBoxPrivate::setValue() to avoid having
to store and compare the old value in so many places where the value
changes are interactive (mouse, keys, wheel).

Task-number: QTBUG-61426
Change-Id: I7f42fc09cafc403eb55a9748e3a93c2e9bf6df62
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-06-16 08:45:49 +00:00
J-P Nurmi 108946db94 Doc: add the Qt version to "\since QtQuick.Controls 2.3"
For the earlier versions, this was already done in the 5.9 branch.

Change-Id: I3fd3840aca0f5aadd7aa77eba358ac0f6c94f942
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-31 09:07:16 +00:00