| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
As described in the ProtocolVersion enum description, MQTT Standard 5
is also a valid value.
Fixes: QTBUG-120947
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I27ed8ad1d31201abb195c35ab56ced3ad08494cc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, sending DISCONNECT might return data before the
QMqttConnection is destroyed, causing it to invoke on bogus QMqttClient
members.
Hence, set a flag to avoid this event, but still aim to send a
disconnect to the broker to nicely quit.
Fixes: QTBUG-111846
Pick-to: 6.5 6.4 6.2
Change-Id: Ia94865c9b404ecbd814150c313679aa10b3f6aa0
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The documentation comment isn't a QDoc comment,
so the docs aren't generated.
Fixes: QTBUG-105873
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I176ea1c7ed2460bbeb1700a4d74a81b439215306
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Ie4309963c8e17d4e7dad602f61a660246d5e23cb
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain scenarios, it is important to distinguish errors occurred
within particular states.
A common example is: if network error occurred for a connected
and operational client, one could try to reconnect and restore
previous MQTT session using the same clientId and cleanSession=false,
without having to bother the user if that succeуded;
however if network error occurred during connection to MQTT broker,
the behavior is completely different.
Change-Id: Id1e90b7916f3e2ab32320518d0da1100014e5dd1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
when QMqttClient gets destroyed in Connected state, d->m_connection
in its destructor (indirectly called by ~QObject) sends DISCONNECT
Control packet and then closes connection, causing
transportConnectionClosed() to call m_clientPrivate->setStateAndError(),
which, in its turn, accesses [a partially destroyed] QMqttClient instance
Change-Id: I216f700d92838dc25e385fe2d449f3ad93a642e6
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|\
| |
| |
| | |
Change-Id: I6fa6962ac8618f5fe59a67dfe6bec060cc274227
|
| |
| |
| |
| |
| |
| | |
Change-Id: I530ca158ca01a4d793bad9a5ea2eaf12f6098506
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|/
|
|
|
|
|
|
|
| |
has been superseded by QMqttClient::connectToHostEncrypted(const
QSslConfiguration&).
Change-Id: Ia4660be10a53f69ee310f253603a8530668f6332
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain scenarios, a user wants to manually handle the keepAlive.
Introduce autoKeepAlive as a property. If set to false, then the user
needs to handle the keepAlive by invoking requestPing.
The default for this property is true and keeps the current behavior.
Task-number: QTBUG-76782
Change-Id: I073874e6bdacf3c8d128c20431606affe1d9eeb1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I39fabafba7b8bd591909ed6e32be619b1db73cf0
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
src/mqtt/qmqttclient.cpp
Change-Id: I2b050319270fb365416623998c758ab9ec63f69d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Initially the keepAlive was considered to be specified in ms to more
match the Qt API. However, no server allows this granularity and the
specs also state seconds. Internally it was using this pattern already.
Change-Id: I0a25d1ef636c2b909997223c631dc248b613536c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added documentation flag and also mark the function itself as
deprecated.
Change-Id: I4cc84b2c79ee0849d09b91e1778f38da5478b3c0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I11bde6a2389cd66c6d945d9f8bd32528dc43cc31
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The specs state that a client SHOULD disconnect after not receiving a
pingresp. So far, this needed to be checked manually. However, on Linux
a disrupted network connection does not imply QTcpSocket to switch to
disconnected state. Hence the client continues to consider the
connection active, leading to lost messages and incorrect state.
Task-number: QTBUG-74279
Change-Id: I6d8e540f7e89c621e5c010669085882d25440b0a
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I3f972f2887ba8fb49ada648ade1f3a8637aef42f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous approach to use application wide configurations can break
behavior. Also using a peerName is not sufficient in some cases. Hence,
introduce QMqttClient::connectToHostEncrypted with QSslConfiguration as
an argument, which should fulfill all needs.
[ChangeLog][QMqttClient] Added secure connection with QSslConfiguration
Task-number: QTBUG-73378
Change-Id: I3b91d2c7c02a3affd5dc67a7b486ebe78f4e1cc2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
| |
Otherwise might lead to side effects.
Task-number: QTBUG-71795
Change-Id: Iad2cbe7613e08d1f90f497d1d65ed2da924f0aeb
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
|
|
|
|
|
|
|
|
| |
A couple of enums and member functions have been added since the last
update.
Change-Id: Ie1a32a9b827a6ce9d203026a46519b73921edaa8
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: hjk <hjk@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib911bd894617ac51a7fde2c361203ca0a1e556b2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The client does not take ownership on connection management. This has
not been made clear in the documentation so far and caused to wrong
usage of the client.
Task-number: QTBUG-69305
Task-number: QTBUG-68031
Change-Id: I11186478e241c860760aa187d03458ccb7601eee
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
MQTT 5.0 has been added in the Qt 5.12 release.
Change-Id: I614ad162e836c82f86f21fa3e6fca6f0c3805b01
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTPM-1455
Change-Id: I8eef500fe5eb0e8a36f449534c70e35487c04a7b
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Certain properties cannot be changed while connected and hence this
should be reflected in the behavior.
Task-number: QTBUG-67176
Change-Id: Ib9baafa1ac8d99d7a071839c892187efb51491e0
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While removing a subscription, properties can be passed. V5.0 only
specifies user properties.
Task-number: QTPM-1454
Change-Id: Id068875c1947c9479175f6e5458713e038f7454f
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
qWarning could potentially quit an application while it is easily
possible to recover from an error state. Hence avoid usage of qWarning
inside the module.
Task-number: QTBUG-69544
Change-Id: I7340f38d80e6716450fbcd0918226e9435d37daa
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After applying clang-tidy and codemodel of Qt Creator, apply a couple of
changes to make the code more clean.
Remaining items are kept because either they touch released code or no
mean to optimize (i.e. padding on QSharedData based classes).
Change-Id: I8bea85432e3bacfb01bd3672a9e863a66c07216f
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTPM-1451
Change-Id: I26a12b944eddb029f7fffe8c1af1610ff79cc494
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ic41646937a0fd19a839cff8beb9c456bb005011d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I3bbf3c51d43df0e4260eb90433881b57177d7c1c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Connection properties can request certain features when connecting to a
remote host. Furthermore, the broker is able to tell a client its
feature set.
Change-Id: I1d8813cb7966f31cacd984468640f808b834d69b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this patch it is possible to set the version to MQTT5 and
use the same features as against version 3.1.1. No MQTT5 specific
features are enabled.
Change-Id: I129ff8a2c996d7bcc582565fccda9e38edc48c62
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|/
|
|
|
|
|
|
|
|
| |
Some test brokers require credentials to allow a connection. To be able
to verify the module against those, add a mean to pass those to the
client and run the auto tests without modification.
Change-Id: I10b8e2343f7fc66199d70f5f238f69b07665110a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
While the client or rather its underlying transport is trying to connect
to a broker, a user might want to cancel this step by calling
disconnectFromHost. Previously there was an early return, which lead to
the client being in a bogus state.
Task-number: QTBUG-66412
Change-Id: If6e9b778b8d10f7951631ebd1a0017c870ba6c18
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
In case a connection fails due to a transport error, the client must be
able to try to reconnect. Hence, reset the error state when
connectToHost is called. Furthermore the socket needs to be re-created
if it has been instantiated by QMqttClient previously.
Task-number: QTBUG-65726
Change-Id: Id54e5f91a8ca4d0c7be6f51f1ad79e090c681584
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
Checking for NoError was done on the wrong variable.
Change-Id: I3206333c0e69124ac22ccddcd329a63b7df0f761
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a client reconnects with a cleanSession, all previous subscriptions
need to be disabled due to not being valid anymore. Furthermore, a
broker can decide to not restore a session even though cleanSession was
false. Take this into account by disabling existing subscriptions in
that case as well.
Task-number: QTBUG-64042
Change-Id: I618bc1fe4bb30651a34d70ec9d9e95e48b1c25d5
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
For "topics" the standard defines topic names and topic filters with
specific characteristics. QMqttTopicName and QMqttTopicFilter implement
this requirements.
[ChangeLog][General] Added QMqttTopicName and QMqttTopicFilter
Change-Id: Ie2b6851ec9249f20d05c4b8df3c2f27afc2be4b9
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
| |
Second argument is superfluous in this case.
Change-Id: Id0b5444741375000929d26ea8567ba85b33f2ba7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Instead of querying the properties each time from the client, prefer to
use QMqttClientPrivate, which stores the value types.
Change-Id: I3f199029dc82077bd67a46a922206502b6519dfd
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
There is no reason to use waitForConnected, instead asynchronously react
when the connection is established.
As a side-effect UWP can use this module now without any issue as well.
Change-Id: Ib30f13e42a8cb5c17f83aca594139926e056b932
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
| |
Change-Id: I1f533a26e9e8fd20ec7f5ad2416fe56cab76e24e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
| |
Change-Id: I247ce3538a5c360cd0fd15551f3d3ccd3195406c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename State to ClientState to avoid clashing names with other state
management.
Introduce ClientError to provide further information on occurring
errors. Error values 1-5 are from the standard, followed by Qt specific
error values.
Change-Id: Ica1b703845e93e923fd1af4e3fb6ffb95de8390d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
Make sure that the auto generated client ID is accepted by a standard
compliant server. On the other hand do not forbid client IDs longer than
23 characters because servers MAY allow longer IDs.
Change-Id: I6ccbd140586c2327b8675cd7aeb31bdde0d51f27
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
While there has been some initial API documentation for the preview
release, incorporate further updates to make the module fully
documented.
Additional minor updates due to API changes.
Task-number: QTBUG-63362
Change-Id: Ib472e4d4d18d505e77fdef3c14483c31628f8546
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
| |
Change-Id: If9b7f82a71ec554b152485ddd91a9d105019c6ce
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of returning a QSharedPointer, return the same pointer. This
improves readability as well as using the subscription from a user
perspective.
The ownership has to stay with the client though, otherwise behavior
is unexpected.
Change-Id: I72d3c15a12faf45c9575af8b3a790dfff1a30c2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I5000baabdc176ea1fe5c597258c143d27e2a1247
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|