| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, only space was allowed.
Windows 10 and macOS 10.14.2 both allow using enter to activate menu
items.
Change-Id: I64476347669ff73f233efd129563a18ba51618a5
Fixes: QTBUG-73354
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
| |
We don't have the conflicting virtual getters anymore.
Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Task-number: QTBUG-50992
Change-Id: Ifb41a8caf6b406249d6da4783c546816d9b51581
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Advertise text and icon properties equally. The additional mention
of the icon property make icons sound somehow less worthy. :)
Change-Id: I564954091ba9d484abda702ce4ba46ddebe7a082
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Use a single example for the whole menu. We can now use Actions and the
delegate property to use the styled menu item for the whole menu. The same
structure will be used for the upcoming MenuBar example.
Change-Id: Idbaa38cc536b27a4d64eb9ad72c07936bf160d6e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
The menu item that presents a sub-menu now follows the sub-menu's
enabled state.
Change-Id: Iee200c14facf4d6d19dbbd8d5b8ad43482ca305a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
De-couple current index management from the content item. Instead of
manipulating the content item's current index directly from C++, offer
a currentIndex property that can be visualized by the style, also when
not using a ListView. This is essentially the same technique ComboBox
uses to control the highlighted index in the popup ListView.
[ChangeLog][Controls][Menu] Added currentIndex property for styling
purposes.
Change-Id: Idf7746d9c08fc9ca9a0dfd15225ebae5a29243c9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds initial support for cascading sub-menus by allowing
one to nest declarative Menu declarations. A follow-up commit adds
support for adding, inserting, and removing menus programmatically.
[ChangeLog][Controls][Menu] Added support for cascading sub-menus.
Task-number: QTBUG-60351
Change-Id: I0eee4f74d92a97c09333fcc4348b019782448535
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the expected behavior on desktop.
NOTE: It must be possible to mix mouse hover highlighting, and keyboard
navigation in the way that keyboard navigation must seamlessly continue
from the item that was previously mouse highlighted. Furthermore, there
should be only one item highlighted at a time. In order to be able to
respect keyboard navigation while another item is hovered and vice versa,
the visual highlight should be bound to MenuItem::highlighted instead of
Control::activeFocus or Control::hovered.
[ChangeLog][Controls][MenuItem] Menu has been fixed to highlight its
items while key navigating and mouse hovering to ensure seamless item
highlight between mouse hover and key navigation. In order to provide
appropriate highlighting that works for key navigation and mouse hover,
styles should bind their visual highlight to MenuItem::highlighted
instead of Control::activeFocus or Control::hovered.
Change-Id: I70cad5a5b441f2616d1ce2166e97974dc1ae063f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][MenuItem] Added a "menu" property that provides
access to the menu that contains the menu item.
Change-Id: I5edbf860756ba7ba9aef93d4992720327c10d1df
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I4345f6a3b61476287b6161d89b752735757f3a7e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-49820
Change-Id: I6b735a5c87ca8f3154722984d36a3a631dd19c38
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
It was placed after the constructor. Move it after properties to keep
the same order as declared in the header.
Change-Id: I91584f80a5a7eee139393f635b7465f5795c2332
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I03deebff661746d49e537af5b1c8899b938efb0d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It was a bit inconsistent before. Admittedly the colon at the end
was the most commonly used style in the quicktemplates2 code base,
but some had a line-break before the colon. This is now chosen as
the one true coding style of QQC2. ;) It makes the initializer list
aligned so that it stands out from the constructor body.
Change-Id: I66835e088df90d7219af04915176006d2a934ddc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Initialize one member per line. Allow empty constructors with one
initialized member on a single line.
Change-Id: Ie115802561ebd19efd4dacda1fa868b64d279109
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 7a8f055, we hid the checkable property from QQuickAbstractButton and
exposed it only in QQuickButton and QQuickMenuItem. The reasoning was
that QQuickCheckBox, QQuickRadioButton, QQuickSwitch and their delegate
counterparts are inherently checkable, so having the checkable property
available in QML didn't seem to make sense.
While this still holds true, there are other factors to take into
consideration. AbstractButton is meant to be a generic base class for
all types of buttons, but the lack of a checkable property makes it
unusable as a base class for custom QML-based checkable buttons.
If we want to a hide the checkable property from CheckBox, RadioButton,
and Switch to avoid having it popup in the auto-completion list, we can
probably do it in a less disruptive way via tooling.
[ChangeLog][Controls][AbstractButton] The checkable property has been
made accessible from QML. Previously it was only exposed for Button and
MenuItem, but it is now available for any AbstractButton to make it
possible to create custom QML-based checkable buttons.
Task-number: QTBUG-51554
Change-Id: I19e29fc87cd15811c43c9b9ebb29701d66cde72f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Change-Id: If7bdd4c11aaeb2df87622c769b1a65ac82ac7e73
Task-number: QTBUG-55904
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Change-Id: Iff356498b438e0f4373efce0131634439b5e6240
Task-number: QTBUG-55904
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
|
|
|
|
| |
Change-Id: I70468b35b2a3a03c6e2d557a67443291697c8b42
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: I908fe8f0b1a49865a56ef385a8f4d7206f35b855
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: I5b0015476c3ceef8f82b00d99b084b1ce3bfaa6f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
| |
Change-Id: Id6c476424fa359d222f027584278346fc0984069
Task-number: QTBUG-52549
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
| |
This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.
Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|