The demo shows how to use an external third-party csv library with
QtGraphs.
Pick-to: 6.10
Task-number: QTBUG-122326
Change-Id: I08dc6c74953fde9dd35c9bf8540ea58234e567f1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Most of the warnings were straightforward to fix: add missing ids to
lookups, remove an unused import.
There is one interesting case, though: The getCurrentUserImage function
in ColorView was referring "users", which does not exist in that file,
and is not one of its properties. The application however still worked.
That's due to it being found on the root context, as it exists as an id
defined in Main.qml.
It was however already passed down via properties to ColorView, so use
the property instead.
Amends 7a62659880
Pick-to: 6.10
Change-Id: I6f91dc45302f30d70d8a09b66d0add9b963fa6b2
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
The PropertyChanges warnings have to be disabled to keep supporting QDS
compatibility.
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I727f58be7de6e94749a65f5cfca47ea032a7a5ef
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The RoomsModel has changed in shape in the previous commit. This commit
adapts the rest of the app to it and performs general cleanup and
warning fixing.
-Remove dead code
-Qualify lookups
-Declare all properties injected into delegates as required and give
them a proper type such as Room or list<Room> instead of var
-General dataflow and depencies fixing. Change aliases to required
properties where required
-Make the min/max/avg temperature values in the stats view update
dynamically
-Simplify logic for processing temperature, humidity, and energy
statistics
Change-Id: I21d962e9d692578f00c4e2466aae8a40d12a7dcc
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Change the model from a ListModel to a list<Room> where Room is a new
type containing all the information related to a room. This allows
making what is passed to various components and delegates clearer and
explicit.
The data of the model itself was also updated:
-The statistics for humidity, energy, and temperature for each room are
now stored as simple list<int> or list<real>.
-Data series were regenerated to be more varied; many were identical or
didn't fluctuate enough to visibly change dynamically in the UI.
-More rooms were made active from the start and especially the first one
which allows for immediate interaction in the thermostat settings view
without having to first activate the room.
-Background values for humidity and energy consumption were also made
more varied instead of identical everywhere.
The rest of the example will be adapted to this new model in the next
commits.
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I3ce48ccb14aa4cfdee2d0508427b26598ce5446a
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The Color singleton isn't exposed publicly yet and there is no way of
importing it without using an internal module. This generates runtime
warnings. Borrow the logic in a new function specific to the example.
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: Iea5ecfc7276d79be4f60318953ef0468c6123e63
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Raw functions and function calls are not allowed in .ui.qml files.
Most .qml files in the proejct are empty. Respect the trend by sometimes
moving functions inside the .ui.qml files.
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I95db0ba473189183fa46ddba3b7eb1ce938e5326
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Use Synchronizer to synchronize different coffee
slider values with CoffeeConfig.
Set sugarAmount to 0 by default.
Change docs to reflect new implementation.
Fixes the synchronization issue with sugar value.
Pick-to: 6.10
Fixes: QTBUG-138676
Change-Id: Ic73066df3ab2a4281aaf885547f22d2a3bdf662d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
This helps resolve ApplicationSettings and Constants which are used all
over.
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I6b0beaba914f8400336ab3def8542f8520a46535
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The example uses custom controls for its UI so we can safely use a
a style that the compiler can deal with.
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I66bcad7a78e06ab9d3e28b4ba238fec42dd9c81b
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
`fileURL` role has been changed to `fileUrl` in Qt 6.10
Task-number: QTBUG-138124
Pick-to: 6.10
Change-Id: I41d917ae65233a17ab724c449f9e04a2f8580459
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Across the example there are many accesses to implicitly available elements.
That is, an element is declared in some file with a certain id, and then
other files use that id directly, to access those elements.
While the engine can handle this, qmllint cannot, as it cannot know that
those accesses will happen in a context where the referred to elements
with the referred to id are available as that can only be resolve at
runtime.
Thus, it produces a series of [unqualified] warnings for those accesses,
as it cannot make sense of them.
To fix the warning, and generally improve the style/readability of the
example, the pattern for those accesses was modified in a way that can
be understood by the tooling.
In particular, whenever a custom type wants to access an implicitly
available element, it now provides a required property to an element of
that type that will be filled-in at usage-site, where the previously
implicit element is available and can be explicitly bound.
The various accesses to the objects or its subparts were updated to use
the newly added required properties and the various usage site of the
relevant types were updated to ensure that those required properties are
bound to a relevant element.
In some cases, properties that were defined inline without a backing
type were being accessed on an implicitly accessed element.
One such example is in the case of certain `NumberAnimation`s elements
being defined in "Screen01.ui.qml", with an additional "phase" property
being defined inline and then accessed through an implicit reference to
that specific `NumberAnimation` instance.
Since this is done without specifying a type, qmllint cannot be induced
to know about the presence of the additional property, such that it
might fail to understand the access to it.
In those cases, a required property was added that is bound directly to
the additional subpart of the element instead of the element itself,
which allows qmllint to understand the provenance of the property and
validate the access.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: I05ce940e7de45b1749010af67fce2ac571cf9ba6
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
qmllint was reporting an unqualified access warning to `pinch` in a
connection based onPinchUpdated handler of a PinchArea element.
The `pinch` in the relevant function is intended to be the `PinchEvent`
that is passed to the handler, thus name the first parameter of the
function to mark the argument explicitly which in turn stops qmllint
from warning about it.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: Iffb0ca2c4ff9a64cb2be880788055146083be728
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Many of the ui.qml files were assigning single objects to properties
that expects a list of those objects.
For example assigning a single particle object to the `particles`
members of a `Wander3d`, with qmllint producing warnings about the
incompatibility of the binding.
To fix the warnings, change all of those patterns to wrap the single
object into an array.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: I371da8e70faa25bf009186c16fa722457eb372c5
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Some of the (.ui).qml files access some elements by qualifying them with
the identifier of an outer components.
This kind of access requires the ComponentBehavior to be set to Bound,
with qmllint warning about it when this is not the case.
Thus, to fix the warnings, set the ComponentBehavior to Bound in those
files that make use of the relevant access pattern.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: Id39e07e25769c063b5a41d09632584b5c74a5fd8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The various ui and qml files under content depends on some additional
custom QML modules that are part of the example, living under the
`imports` directory.
The module for those files does not link to those custom modules, such
that qmllint will produce a warning when they are imported.
Add a direct dependency, based on CMake targets, to the custom
`PocketDemo` and `CB_MaterialBundle` QWL modules to ensure that qmllint finds
them, thus fixing the warnings.
The `add_subdirectory` calls in the main project description were
reordered to ensure that the dependencies targets are available when we
declare a dependency to them.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: I743524dafec41923664fe45decd946237b6c21ba
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The examples uses its own version of some of the designer studio
components that provides various QML types, most of which seems to be
unused in the rest of the project, and that further depend on
dependencies that aren't currently provided by the project itself or
produce various qmllint warnings.
Hence, remove the files defining those types.
Further adjust the CMakeLists.txt file and qmldir file for the
QtQuick.Studio.Components module to avoid referring to the now removed
files.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: I88d1e0e7bfa63a70d46c97e970e243a1883da84b
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The examples uses an internal QML module, `PocketDemo`, that provides
various QML types, most of which seems to be unused in the rest of the
project, and that further depend on dependencies that aren't currently
provided by the project itself.
Hence, remove the files defining those types.
Further adjust the CMakeLists.txt file and qmldir file for the
PocketDemo module to avoid referring to the now removed files.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: I4f76879f0c39652ccae4fac1e828bbf38c3a3c33
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The `Qt` singleton has an `application` member that is not guaranteed to
be a `QQuickApplication`, and thus might not always have a `font`
member.
Hence, qqmlint can produce a [missing-property] warning when, for
example, an access like `Qt.application.font` is performed.
To avoid the issue, the `Application` singleton that QtQuick exposes can
be used for the same purpose, while ensuring that the singleton is
recognized as a `QQuickApplication` and has a `font` member always
available.
Hence, ensure that accesses to the `font` property always pass by the
`Application` singleton instead of the `application` member of the `Qt`
singleton.
Pick-to: 6.10
Task-number: QTBUG-138170
Change-Id: I59a1c8307e7e8f5df6a65ba810eebcf2d8e37bba
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The example is currently in a state where qmllint produces no warning,
and should generally be kept in such a state.
Thus, add a configuration file that sets the warning limit to "0", such
that running the all_qmllint target for the example will fail if any
warning is produced, with the additional strictness hopefully helping
keeping the example warnings-free.
Pick-to: 6.10
Fixes: QTBUG-138175
Change-Id: If9adb0f4929fdb99272883ceccca9479bf640204
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The `MediaPlayerApp` example has has a `MediaPlayer` QML module whose
`Main.qml` file defines a function, `openFile`, in the scope of the root
element, that is later used by a child element in a binding.
qmllint produces an [unqualified] access warning for this usage.
To avoid the warning being produced, the usage of the `openFile`
function in the child element was qualified with the id of the root
element.
Task-number: QTBUG-138175
Pick-to: 6.10
Change-Id: I11f8c02fb2c45c178f42770cb06badb3fb73c3e1
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
`MediaPlayerApp` depends on some additional custom QML modules that are
positioned such that they are siblings to each other.
By default they would not appear under the normal QML search path, such
that qmllint was failing to find them producing a series of [import]
warnings.
Add a direct dependency, based on CMake targets, to the custom
`Config` and `MediaControls` QWL modules to ensure that qmllint finds
them, thus fixing the warnings.
The `add_subdirectory` calls in the main `CmakeLists.txt` file of the
project were re-ordered to ensure that the dependencies targets are
known at the time we add them as a dependency.
Task-number: QTBUG-138175
Pick-to: 6.10
Change-Id: I5ce43606ae0458a572b97b6afb218aafa8ef87b8
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The `MediaControls` QML module that is part of the `MediaPlayerApp`
example, imports a custom QML module, `Config`, that is defined in a
sibling directory.
The `Config` module exports a singleton and, when the singleton is
accessed, qmllint produces a series of [unqualified] access warnings.
Add a direct dependency to the custom `Config` QWL module to
ensure that qmllint recognizes the singleton, thus fixing the warnings.
To allow for the use of the modern, `TARGET` based, dependency
declaration method, introduced in 6.8, the `find_package` and
`qt_standard_project_setup` calls for the project were modified to
search and setup for the 6.8 version.
The `add_subdirectory` calls in the main `CmakeLists.txt` file of the
project were re-ordered to ensure that the `Config` target is known at
the time we add it as a dependency.
Task-number: QTBUG-138175
Pick-to: 6.10
Change-Id: I33cbbdd179d701a36bb5c4f38deca1102aa47a90
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
We can't have cyclic dependencies between types in 6.10.
To reduce the cyclic dependency, we are extracting the coffee settings
into their own type.
The next commit will then (targeting only 6.10) replace ApplicationFlow
properties with var properies.
Reducing the coupling further by extracting the navigation functions
into yet another type is left as a future exercise.
Also, note the opportunity to fix the PropertyChanges in Progress.qml to
not reference a non-local id (which now wouldn't work anymore) – that
wasn't caught by qmllint because PropertyChanges is custom parsed, and
the only way to avoid this is to use the new syntax – but the warning
for that has been turned off due to QDS compatabililty.
Task-number: QTBUG-138898
Change-Id: I6ae97a567350c98dcd8056ac8433858b0b8aec6f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit 5b075084fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch adds the documentation for the translation approach of
the document viewer example.
Pick-to: 6.10
Change-Id: Iae31d9c6278630347f331631c107259a470257dc
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
The example is called "Car Configurator", so let's make
sure the executables and project files are named the same.
Pick-to: 6.10
Change-Id: Ifee049f39ceb9ce8cca1248eb5c23d7d52348673
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Explicitly link the binary against Qt6::Svg, otherwise
qt_generate_deploy_qml_app_script() / macdeployqt will not deploy
the Svg plugin.
Pick-to: 6.10
Change-Id: I150a65e5bc7ad12a8a42a11f1ebafa1d0333837f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The Vive controllers do not have analog grip buttons, so they don't
provide XrInputAction.SqueezeValue, only XrInputAction.SqueezePressed.
Pick-to: 6.10
Change-Id: I55e55f738a307c6915ee85a59a9aaf4025a7de8c
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
The dot texture is never used but dot1
Pick-to: 6.10 6.9 6.8
Change-Id: I269779a1cfe335f3b061ab00a3e7bb3a2ce2e0c7
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
While 'SF Pro Display' is the macOS default font, it is not accessible
under this name even on macOS:
qt.qpa.fonts: Populating font family aliases took 111 ms. Replace uses of missing font family "SF Pro Display" with one that exists to avoid this cost.
Remove the font, and rely on the default system font. While at it,
also remove other font properties that are in the default range.
Pick-to: 6.10
Fixes: QTBUG-138174
Change-Id: Ie1a75aee7c74386ae5db982e3ef878496e521e8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-Add missing imports
-Bind ids inside of Components
-Explicitly require implcitly depended on index property
-Qualify lookups
-Cast reading as AccelerometerReading until it is exposed as the proper
type
Also fix a binding loop when setting the die's position.
Fixes: QTBUG-138165
Pick-to: 6.10
Change-Id: I691d4a5bbf4cfbd8f7a6af0e837c15319f60343d
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
- scale the clock face when adding a new task, so that it's not out of
bounds
- Log a slightly more verbose error message when we can't use the bored
API provider (which we can't, because it's permanently down)
Pick-to: 6.10
Change-Id: I71aa49e480b73df9065026766186bcd27cd10058
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
QDS does in general not allow function calls outside of Connections.
We could either rename the files to plain .qml to acknowledge that, or
use alternative constructs.
This patch opts for the latter aproach: We use Connections in most
places, and expose the subcomponent in another (so that the logic can be
handled in the already existing non-ui.qml file).
Pick-to: 6.10
Task-number: QTBUG-138189
Change-Id: I27a5cc6fc25de73faddeeaa2e103f4df03c5c18f
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
SettingsViewForm interacts with the "global" stack view to push
different (sub-)pages on it. Passing that explicitly down to it would
look somewhat weird, because it would pass through components which
don't directly need it.
So instead, still keep the very tight coupling, but ensure that we at
least have type information: We can get access to the view's Window via
Window.window; and can cast that Window to App. From App, we can then
expose the StackView as an alias property.
A more ideal solution might be to decouple the logic of determining the
next page from actually navigating there. One could for instance add a
signal "transitionToView(page: Component)", and then handle the
navigation on a higher level. However, that would necessiate larger
changes, and is therefore not implemented here.
Pick-to: 6.10
Task-number: QTBUG-138189
Change-Id: Ie352c5afc3a9bd3b2c2a6fc9acdca2d23bbcadbf
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>