Commit Graph

22 Commits

Author SHA1 Message Date
Karim Pinter 9acb78d01d Add Qt::Qml before Qt::QmlPrivate to auto tests
The build for auto tests for VxWorks fails because Qt::Qml is not added
before Qt::QmlPrivate resulting in many unresolved symbols from Qt::Qml
library. When Qt::Qml is added before it solves this problem.

Task-number: QTBUG-129113
Change-Id: I89d553ac1d6706e2e934665fed2f308e6b01ed78
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-10-22 01:27:15 +03:00
Mitch Curtis f5b235b95d Remove native style customization warnings for ItemDelegate
It has no native visuals so customizing it is fine.

Task-number: QTBUG-123773
Pick-to: 6.5 6.7
Change-Id: Iebac1231b096dbb5f9cde1d79ccda59688b25f09
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-15 09:27:25 +08:00
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Mitch Curtis 215d39032d Windows: add SwitchDelegate
Task-number: QTBUG-115165
Change-Id: I4ffc9b70a8fe2b8d5134e394d41fb00f754d5eb1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis ce779c6f5f Windows: add RadioDelegate
Task-number: QTBUG-115165
Change-Id: I79181ff85d752c5dce1ce75165fb622d95d92499
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-01 21:45:06 +08:00
Mitch Curtis a7a39cce2a Windows: add ItemDelegate
Task-number: QTBUG-115165
Change-Id: Ibc4fd7b1f85a47a9bfec3a4900e351ea61bcc7ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis c4591ceea1 Windows: add CheckDelegate
Task-number: QTBUG-115165
Change-Id: I7c55ba9062b08e1aefbaaf12a582ea8557eee7dd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis 0f5d70a88a macOS: add ItemDelegate
Task-number: QTBUG-115165
Change-Id: Ifcee1b26140938beeed420c75bf832019edea1f2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis 21a9e41422 macOS: add RadioDelegate
Task-number: QTBUG-115165
Change-Id: I166c4d71e62d8340a37bb11803ad209a88e4764f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis b520beaf51 macOS: add CheckDelegate
Task-number: QTBUG-115165
Change-Id: Ie873592d74dcda4828ba753391c64929402736f8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis bd3e1af6cd Windows: add DelayButton
Task-number: QTBUG-115165
Change-Id: I8a860d8bc7f7fb8a54f3bee460e8856421c9924f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis a7b8483e0c macOS: add DelayButton
In order to be consistent with Button's appearance without having to
implement it entirely in QML (with no QStyle support), we draw the
delay progress bar over the contentItem.

Task-number: QTBUG-115165
Change-Id: Idc9bb9b5cf90f4b42268c0ccc17f454b1f7c3c9e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-01 21:45:06 +08:00
Mitch Curtis 9187e07d36 Windows: add Switch
Task-number: QTBUG-115165
Change-Id: Ib1de7e40282a86a194577de2a24291013934dd55
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-10-26 13:50:52 +08:00
Mitch Curtis 28abe5a08c Windows: add RangeSlider
Task-number: QTBUG-115165
Change-Id: I89805658575463f85319e08c7e1cf903bd647063
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-10-25 11:24:27 +08:00
Mitch Curtis f27cf68473 macOS: add RangeSlider
Also ensure that RangeSlider warns about customization of its handles.

Task-number: QTBUG-115165
Change-Id: Ia4993713e7273d0872c4538ff7d1200cad9bc7ed
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-09-08 10:36:01 +08:00
Mitch Curtis 15894c3ca7 Allow customization of native Dialog and DialogButtonBox
There's no harm in customizing these, and especially the contentItem
and footer need to be customizable, as that's where the content and
any customized OK/Cancel/etc. buttons go.

This fixes warnings in the testbench manual test.

Currently only the macOS styles has implementations of these
controls.

Pick-to: 6.5 6.6
Change-Id: I09678c777088786961583724d68dc2c3f6d90895
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-08-09 13:12:04 +08:00
Fabian Kosmale 901a8bf768 Windows native style: Mark ScrollBar as non-customizable
Consequently, remove code that supported setting a non-native
contentItem.

Task-number: QTBUG-107771
Pick-to: 6.5 6.6
Change-Id: I871156c567f85db6e1b8247dcc6c2ea6a350cd4d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-07-11 12:19:59 +08:00
Alexandru Croitor 1858e6c7b1 CMake: Make quickcontrols tests standalone projects
Add the boilerplate standalone test prelude to each test, so that they
can be opened with an IDE without the qt-cmake-standalone-test script,
but directly with qt-cmake or cmake.

Boilerplate was added using the follow script:
https://git.qt.io/alcroito/cmake_refactor

Manual adjustments were made where the code was inserted in the wrong
location.

Task-number: QTBUG-93020
Change-Id: I1dff995ec69c65494a9f8daff3c8b2fbe5b507b2
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-07-05 12:34:12 +02:00
Amir Masoud Abdol c2d37f9646 Retire the qt_parse_all_arguments
Task-number: QTBUG-99238
Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-20 16:40:42 +01:00
Mitch Curtis 0cd146b4b0 Fix warnings with native styles
Amends e592a2ad31 to cover some cases
that were missed. They were missed because I incorrectly assumed that
the various test functions that I added in
0765c176e7 would catch warnings,
forgetting that the fact that we set
QT_QUICK_CONTROLS_IGNORE_CUSTOMIZATION_WARNINGS to 1 in tst_macos and
tst_windows meant that we'd never get the warnings.

Fixes: QTBUG-109438
Pick-to: 6.5
Change-Id: I527785a3adf3afb2a7ee4943300e87909f21562e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-22 10:57:04 +08:00
Mitch Curtis e592a2ad31 Warn users when they customize native styles
Since Qt 6, the default style is no longer the Basic style, but instead
depends on the platform the application is run on. In addition, the
introduction of the native styles (which are not designed to be
customized) means that users customizing controls can run into visual
issues and not understand why.

This patch partially addresses this issue by warning when a native
control is customized (i.e. a delegate is overridden):

"qrc:/main.qml:11:22: QML QQuickItem: The current style does not
support customization of this control (property: "contentItem" item:
QQuickItem(0x1637375d210, parent=0x0, geometry=0,0 0x0)).
Please customize a non-native style (such as Basic, Fusion, Material,
etc). For more information, see:
https://doc.qt.io/qt-6/qtquickcontrols2-customize.html#customization-reference"

Ideally we'd also have qmllint integration in Creator so that users get
warnings from the IDE as they code, but that's not there yet.

The patch also updates the documentation by removing the code snippet
from the note and referring users to the existing
"Using Styles in Qt Quick Controls" section, which covers the topic in
greater detail. The snippet itself is also not considered a part of the
note, so the (online) styling looked a bit off.

[ChangeLog][Important Behavior Changes] Customization of native styles
will now result in warnings. Non-native styles (such as Basic) should
be used for customization purposes, or a custom style. If you are aware
of the risks and still want to customize these controls, you can ignore
the warnings by setting QT_QUICK_CONTROLS_IGNORE_CUSTOMIZATION_WARNINGS
to 1.

Fixes: QTBUG-108519
Task-number: QTBUG-96733
Change-Id: Ib6dff4639bad76b228e0f31285d20db4e3207224
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-05 15:00:35 +08:00
Mitch Curtis 4bd87b903b Remove "2" from Qt Quick Controls directories
Qt Quick Controls 2 was named that way because it was a follow-up to
Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer
supported, we don't need to have "2" in the name. Work on this was
already started for the documentation in
1abdfe5d5a.

By doing this renaming a few weeks before feature freeze, it won't
affect the release but still results in as little time possible spent
manually fixing conflicts in cherry-picks from non-LTS releases as a
result of the renaming.

This patch does the following:

- Renames directories.
- Adapts CMakeLists.txt and other files to account for the new paths.

A follow-up patch will handle documentation.

It does not touch library names or other user-facing stuff, as that
will have to be done in Qt 7.

Task-number: QTBUG-95413
Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-12-01 10:26:20 +08:00