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 project name is used in Qt Creator as root name for the project.
Using the same name as the documentation/example name makes it
clearer which example is actually open. Only drop prefixes like
'Qt Quick Demo - '.
Pick-to: 6.10
Change-Id: I863a23e26307a973bb04ce879d0c95c3731cdc53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Colorpaletteclient is able to interface two server backends: public
reqres.in service and QHttpServer example service. The public reqres.in
service has recently started requiring an api-key HTTP header (see
https://reqres.in/signup).
This commit adds an api-key header if the app uses the public
reqres.in service. The header is added to the QNetworkRequestFactory
and is consequently then used in all subsequent requests.
The code is furthermore adjusted so that it won't accidentally
remove the api-key when toggling another proprietary header ("token").
Pick-to: 6.9 6.8
Fixes: QTBUG-136790
Change-Id: Id19d223722fd8f735d76855a293bc77f680ed344
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The server URLs got an additional /API path and they didn't fit into the
delegates anymore. This patch increases the delegate width so it looks
nice again. This is not the best solution. A dynamic solution would be
better but also a bit too complicated for an example.
Amends 6a6212a652.
Pick-to: 6.9 6.8
Change-Id: Iead827d4e37b5e0494f7f35c95934b8bf848cb40
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Use include style that is consistent with rest of the
application. The include style was a leftover from the times the
application itself defined "restaccessmanager.h". Since Qt 6.7
the qrestaccessmanager.h is a proper QtNetwork class header.
Pick-to: 6.9 6.8
Change-Id: I25c1103ed9ccef1aa1da86475a1e20d9dba76a3b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
The application uses QtNetwork classes and should link against it
accordingly. This missing linkage doesn't cause problems for most
users because QtNetwork is usually transitively linked through other
modules.
But understandably relying on transitive linkage is not acceptable.
This became a problem when disabling QML networking
(-no-feature-qml-network) => Qt::Network classes no longer available.
Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-136036
Change-Id: Id2f1348551f77c5139b514bce95d97f8c8e38f67
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
REUSE.toml files are read by reuse to complement or override the
copyright and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.
In order to be reuse compliant all the licenses referenced in file
or within a REUSE.toml file must be present in the LICENSES
directory at the base of the module.
The missing licenses are added.
Also, all the licenses present in the LICENSES directory must be used.
License files not used are removed.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Pick-to: 6.8
Change-Id: I1dabbf6f13c2ae5ad73dc8c7df9108c160e1dc2b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This avoids a warning about using the old policy bheaviour, and allows
us to remove redundand own-module imports.
The qmake project needs no further adjustment, as it already collapses
the folder structure in the qrc file system.
Pick-to: 6.8
Task-number: QTBUG-126201
Change-Id: I1804611c6158775346d2f652537ae48664e5a267
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor
Some examples had to be adapted manually, mostly those that build
additional qml modules / plugins.
documentviewer did not get the deployment api, because it's trickier.
Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I76322185fc824c112d77e077ee39e7ccbc193a4c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
According to QUIP-18 [1] all files under examples
should be licensed
LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Ia2e8f62af64a384196a9b0c02ac5b2fbf5404a8b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
The Python port uses different models, which causes QML errors like
ColorPalette/ColorView.qml:296:17: TypeError: Cannot read property 'width' of null
when refreshing the model. Specify ids instead of "parent" in the
delegates since their parent can arbitrarily change.
Amends 7a62659880
Task-number: QTBUG-115085
Pick-to: 6.7
Change-Id: Ic7097496ad2d8b902225ea0e5c3a661f797aed16
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Change '* ' into ' *', and '& ' into ' &'
Pick-to: 6.7
Change-Id: I29223b069d92f67195405fa88795469a6cc767a0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
... by making sure it's properly part of the app bundle.
Task-number: QTBUG-115085
Change-Id: I196d309c9400acb897950dbfb5fe99d9d7f13756
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The code is only used in an example.
Fixes: QTBUG-116580
Pick-to: 6.5 6.6
Change-Id: I9a045d128a8f36e442ab38dd2fee0d84b31511e2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Add following examples to Application Examples category:
* Robot Arm Example
* Qt Quick Demo - RESTful Color Palette API client
* Media Player Example
* Document Viewer
Pick-to: 6.5 6.6
Change-Id: Ie36bb9a09d7fe868db07e02edcb1778f214494e9
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.
Pick-to: 6.5
Task-number: QTBUG-113277
Change-Id: I9bc7963d8524ef2ab061e32aef428711646247a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This patch changes the document viewer example to a plugin based
architecture.
It adapts the documentation accordingly.
Change-Id: Ia24028aa27e21fb8ab36f5ef3a9953be60858b19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The '\meta category' command was used for tagging examples with a
specific category, used in Qt Creators Welcome mode.
As we want to also generate lists of examples belonging to a category
elsewhere in the documentation, replace the command with a macro that
expands to the original \meta command and also adds the example to
a group using the \ingroup command. This way, the category names can
be used as arguments to the \generatelist or \annotatedlist commands.
Pick-to: 6.5
Task-number: QTBUG-112731
Change-Id: I8590894bdd31d69c38a60cdd42f7301e2cecd2ed
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Replace the addressbook client example with a colorpalette client.
The corresponding addressbook server has been superseded by a
colorpalette server.
The client can interface the local QHttpServer colorpaletteserver
example as well as the publicly accessible reqres.in. Please note
that the reqres.in is stateless service, and eg. adding/updating colors
will have no actual effect.
Task-number: QTBUG-106041
Pick-to: 6.5
Change-Id: I4ea06bbcd9b32900a661f19e0abe0629275aaef1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>