1
0
mirror of https://github.com/qt/qtmqtt.git synced 2026-10-25 16:16:26 +00:00
Commit Graph

1097 Commits

Author SHA1 Message Date
Even Oscar Andersen
6eb01cac46 Mention in websockets subscription example that websockets are builtin
Added a \note, but keeping the example to show how to create custom
transports.

Pick-to: 6.10
Change-Id: Idf3b22532f6e0b94a0113cea6152a36e81398ea9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-06-12 13:40:32 +02:00
Even Oscar Andersen
2978075162 Add missing trailing comma for enums
Found in api-review.

Task-number: QTBUG-137478
Pick-to: 6.10
Change-Id: I73984caae5714c0f3cddd0f1770ddf19fd6fcd49
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2025-06-12 09:32:21 +02:00
Even Oscar Andersen
951ea815b8 cosmetic fix in qmqttclient.h after API review
Moved declaration of the new connectToHostWebSocket[Secure]
afer connectToHostEncrypted

Task-number: QTBUG-137478
Pick-to: 6.10
Change-Id: I58ef8da23bf9759a1744908e02c6b9ef5db405f1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2025-06-12 08:23:11 +02:00
Qt Submodule Update Bot
27a5c3ce6b Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I1de43ec97d385dfb22be3908444106d911b0dfc6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-24 01:05:08 +00:00
Qt Submodule Update Bot
d09d1fbf67 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I5856f01258f66531f630498d347d9e7b4abc1841
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-21 11:10:34 +00:00
Qt Submodule Update Bot
f542cfa1a4 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I0684185387dd54082efc089b588d10aec101a8a6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-18 11:34:05 +00:00
Qt Submodule Update Bot
22b5735162 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I178cf8b191d92ccd0b5eff57b07f70ee25f09c63
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-13 21:31:06 +00:00
Qt Submodule Update Bot
5b5dee5f74 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ib21e6cac99074663dc91eee737af41225a3aa7e0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-08 16:39:13 +00:00
Qt Submodule Update Bot
9c04ffb5c3 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ib2312b9c2a8a2f5d61b56bfa405d259cc7cb3dda
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-03 03:37:03 +00:00
Qt Submodule Update Bot
7ce0033a38 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I6308729917e195f4a8aec5328285f00fff913410
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-01 09:33:52 +00:00
Qt Submodule Update Bot
ec49cefbaf Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ib0f38c485af7f093122f5a2739ee90f365103ada
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-29 15:16:48 +00:00
Qt Submodule Update Bot
11172cfa34 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Idaac3051ff5ff6656e43f0327cc8d9c4da0946cb
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-24 10:35:47 +00:00
Michal Klocek
9929b7c148 Band-aid patch for overriding mosquitto installation detection
Currently installation is detected by looking for 'mqtt.conf' files,
which are set during provisioning in install-mosquitto-mqtt.sh
and install-mosquitto.ps1. However, this only reflects installation on
the build machine and not on test node. Therefore, add a way to disable
it on WOA also when cross compiled despite of existence of
'mqtt.conf' files on build node.

This is just barely a band aid patch as handling should be really done
during provisioning by Set-EnvironmentVariable, which than could be
read directly by test node as {{.Env.XXX}. However, it would also require the test to detect the setting during runtime and not during compile time.

Note the native arm64 windows setup has no mosquitto installation,
therefore this patch does not change anything for current native windows
arm setup, it only overrides setup for cross compilation node.

Task-number: COIN-1211
Change-Id: Ie6e84b6b04da48c1df284a388022f31ba1eea93e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-04-11 08:01:20 +00:00
Qt Submodule Update Bot
97fd1f585f Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Id96ae45b056d46ea5bf62bc0c89eb4b92f65e0ed
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-03 16:38:58 +00:00
Qt Submodule Update Bot
2465b63c36 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I3f33036115fd78c2bb44973ead264a0bed78bd07
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-01 13:26:22 +00:00
Qt Submodule Update Bot
c04fcebf93 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I573c1e68a9c5d65c57eca4b56a214b8cfa65c6ea
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-03-29 16:47:26 +00:00
Paul Wicking
2cfbbfd24e Add .gitreview file
`git-review` is a command line tool for interacting with Gerrit.
Some IDEs offer support for this tool, either natively or through
plugins. The tool relies on a configuration file, .gitreview. Adding
this configuration file to our repositories simplifies initial setup
for contributors that use the tool directly or through their IDE of
choice.

The configuration file adds a remote called 'gerrit'. This is the
default for the tool, and also the name set for
codereview.qt-project.org by Qt's `init-repository` script. Thus,
the configuration should work seamlessly alongside other repository
helpers.

Task-number: QTBUG-132604
Pick-to: 6.9 6.8
Change-Id: I5b2f0c79f58d97fcc9cb339d663d9cb15cd09c57
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2025-03-24 15:22:02 +01:00
Qt Submodule Update Bot
b5bd818d22 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Id6dfed84e1357377c11ab0171d3b615cbbf879d2
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-03-19 18:31:03 +00:00
Lucie Gérard
0c91902e7e Update licensing of files with infrastructure type
A QUIP 18[1] update sets git files, REUSE.toml and licenseRule.json
as infrastructure type files. They are licensed with:
LicenseRef-Qt-Commercial OR BSD-3-Clause

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

Pick-to: 6.9 6.8
Change-Id: I03d77977a9ee6e41d0a7b45dbe9dc3006c2cce83
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-03-14 13:37:56 +01:00
Lucie Gérard
609f3fe7eb Remove unnecessary comment
Pick-to: 6.9 6.8
Change-Id: Ib2c53483e2fe011c239df0918663a75e98641e0e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2025-03-05 09:37:10 +01:00
Qt Submodule Update Bot
9048f80e3a Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ia06b68d234528992174e8ba1f1b25b0a0752dd33
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-28 09:13:41 +00:00
Lucie Gérard
6b9b462bb5 Make module ready for source SBOM checking
This includes:
- turning VERIFY_SOURCE_SBOM ON
- adding exception to the licenseRule.json files
- correcting the licensing given via REUSE.toml files

A lot of files are skipped during the license test,
but all are present in the source SBOM.
This is why  correction are needed before turning the
source SBOM check on.

Task-number: QTBUG-131434
Pick-to: 6.9
Change-Id: I5398523eafdae59a234bc2ed5ddd229c0aa923df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2025-02-21 07:45:57 +00:00
Qt Submodule Update Bot
d0ee0581d0 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ic6437947f3193cb5b8566d6e8094781925184503
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-20 11:57:14 +00:00
Qt Submodule Update Bot
af0893b8bb Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I10122a727ab1fb3273aa3d5a9c2996bba8e0c135
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-19 17:58:37 +00:00
Qt Submodule Update Bot
0473d461f5 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I93c88e4acbc28f9976e99a6512fddfd50641aa0a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-19 05:29:38 +00:00
Qt Submodule Update Bot
5d29379dfb Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I64add92d00913c692797554b5154ea2220f66055
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-18 15:51:34 +00:00
Even Oscar Andersen
f9305b56d9 Add websockets as an optional dependency on qtmqtt
Change-Id: I82e1e809adef35d1d09ec248c69f4f49eca8b0f2
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2025-01-30 09:11:48 +01:00
Even Oscar Andersen
8316766cec Add tests for websocket support for mqtt
For at least one platform run the twelve combinations of:
 Transport: [Tcp,Ssl,Ws,Wss]
 Protocol: [3.1, 3.1.1, 5.0]

This happens if the following defines are present:
  MQTT_TEST_BROKER
  MQTT_TEST_TYPE
  MQTT_TEST_PROTOCOL

If these are not defined, the old test behavior is kept

The logic is that we are replacing the type of VersionClient
to homegrown logic that replaces connectToHost with the
correct function:
  connectToHost
  connectToHostEncrypted,
  connectToHostWebSocket
  connectToHostWebSocketEncrypted

For this to work it is important that the VersionClient
macro is used everywhere.

Also, DefaultVersionTestData has been changed to
return version(0) if MQTT_TEST_PROTOCOL is defined,
we will now run one protocol at the time instead.

This is Change Request 2 of 2 wrt testing.

Task-number: QTBUG-129171
Change-Id: I4f68d7c2ea226a1107f009c80f87f8b749d9f120
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2025-01-29 15:54:55 +01:00
Even Oscar Andersen
967c70f1d5 Use VersionClient macro everywhere
We want to use the VersionClient macro to iterate over
version,connectiontype. To do this (in a later patch)
it is necessary that VersionClient is used everywhere.

This is change request 1 of 2 wrt mqtt tests.

Task-number: QTBUG-129171
Change-Id: Ica2f97bc2fd130cc49191d7381d49e88e8dc4a0c
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2025-01-29 12:40:15 +01:00
Even Oscar Andersen
dec643fc61 Add websocket support for mqtt
Move the example IODevices to be used with websockets
under the mqtt umbrella.

Two (private) devices are created; QMqttSecureWebSocketIO
and QMqttWebSocketIO

Fixes: QTBUG-129171
Change-Id: Ib7d37150c3a229e882a0c04a32cdd8b7929baf3b
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2025-01-29 07:42:34 +01:00
Even Oscar Andersen
24f5eceea2 Replace raw m_transport pointer with std::shared_ptr
Preparing for the add websocket change request.

Using shared_ptr gives automatic lifetime management
and is needed when adding more transport types.

Task-number: QTBUG-129171
Change-Id: I347175c018963130f403f8e9fe764e77203383a9
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2025-01-27 06:42:47 +01:00
Qt Submodule Update Bot
aa2fb73ac4 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I7cd9aed27c00b0470c2d336156cc581a00597480
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-01-23 19:56:18 +00:00
Qt Submodule Update Bot
3543195ee0 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Icf63208ccf188653718b210a0d6ae529424d7a01
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-01-20 13:32:20 +00:00
Qt Submodule Update Bot
937974f18c Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ibbc37bab74636877240d7af614765127a3d144e0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-01-14 18:18:02 +00:00
Qt Submodule Update Bot
ceeb04c46f Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I81b0d58559b4eec930a43c470696233a0998b1fb
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-01-03 14:15:01 +00:00
Jani Heikkinen
d1f445af72 Bump version to 6.10.0
Change-Id: I95e2cd231e584635b5a1efddc04192a45c274378
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-01-03 14:15:00 +00:00
Volker Hilsheimer
7130aadcea Move logging category into new private global header
Addresses header review comemnts, amends
18bed862b2.

Task-number: QTBUG-132090
Fixes: QTBUG-132164
Pick-to: 6.9
Change-Id: I7d8f2b048482e18112b02374fe53f2bbed52021e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-12-17 13:48:37 +01:00
Qt Submodule Update Bot
b118aafb0b Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I610c91b8895a9466575dec1e2a47feb784783bb0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-12-08 17:02:31 +00:00
Qt Submodule Update Bot
9aec010a74 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I11b6c11833d5f35a8bef63ed8dbe0175482de226
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-12-08 03:30:11 +00:00
Qt Submodule Update Bot
aeac9f7e17 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: Ic9cea01fc588b15225e9245d83231ec09c535325
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-12-03 13:50:10 +00:00
Qt Submodule Update Bot
5a0b137e9e Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I0716289397822076834c4ec245cdc5920cc21729
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-12-02 13:50:33 +00:00
Jøger Hansegård
f6f8bc0fe4 Add CMakeUserPresets.json to .gitignore
The CMakeUserPresets.json file can be used to simplify configuring Qt,
particularly with tools such as Visual Studio and Visual Studio Code.

As opposed to the CMakePresets.json, the CMakeUserPresets.json should
only contain user specific configurations, and should never be checked
into source code management system.

This file is already ignored in the top level Qt super-project, but to
facilitate working with each individual submodule, we should also have
this .gitignore in each submodule.

Pick-to: 6.8
Change-Id: Ic12b3cce1b1082f206d076532f5d68452805ed08
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-11-28 18:02:47 +01:00
Jøger Hansegård
45ab6b8cd2 Only call find_package when building tests as standalone
This allows us to build manual tests together with Qt by specifying
QT_BUILD_MANUAL_TESTS and QT_BUILD_TESTS. A benefit of doing this, is
that the manual tests show up as debuggable targets with IDEs such as
Visual Studio Code, while keeping full code navigation capabilities into
the Qt code.

Pick-to: 6.8
Change-Id: Idd309c06fb2586fd634386951a3345aa40bc093a
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-11-28 18:02:17 +01:00
Qt Submodule Update Bot
8452101eca Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I5a9a7ec519bf43dd2833271c5ae0e2e56020f42a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-11-28 12:18:13 +00:00
Qt Submodule Update Bot
1de96c8ec1 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I48ae9d954bb377a8ab7c71b84ebbcd025ce2e1f8
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-11-26 15:29:21 +00:00
Qt Submodule Update Bot
048d6bebbb Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I0fff0ee90623922bcaddc6bee4199e492c1ca812
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-11-25 22:12:51 +00:00
Even Oscar Andersen
b539b0c38b Fix signal/slot problem with quicksubscription example
The example does not build with latest changes.

As it turns out there is a mismatch between the topic property
and the connected signal. Since the signal is not used, it is
removed in the hope that it will then build.

The error message from the build is:

Failure Summary:
The build failed due to a compilation error in 'qmlmqttclient.cpp'.
The function 'QmlMqttSubscription::topicChanged()' was called without
the required 'QString' argument.

Log snippet:
error: no matching function for call to ‘QmlMqttSubscription::topicChanged()’
note: candidate: ‘void QmlMqttSubscription::topicChanged(QString)’
note: candidate expects 1 argument, 0 provided

Change-Id: Ia8cedda578e2f2c082354892bd00cb9fd25b5652
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-11-20 17:36:32 +01:00
Qt Submodule Update Bot
83db4482e7 Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I319161c12707baa74acb06a988b34d6170baa6ae
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-11-20 16:36:28 +00:00
Lucie Gérard
cb00ee0cff Add REUSE.toml files and missing licenses
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 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: If5891d7b09a559e55081ef4e9111d91eb49a6b14
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-11-14 12:24:58 +00:00
Qt Submodule Update Bot
264ce67ade Update dependencies on 'dev' in qt/qtmqtt
Change-Id: I0eedefc1a3ee5119970cc3c858e1f2369474e031
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-11-07 05:22:55 +00:00