According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: If63837f32f9f5e852292c20e449877e6a6fecc89
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
A topic can have multiple '+' wildcards, but isValid was searching for
the wrong wildcard at the second instance.
Pick-to: 6.6 6.5 6.2
Change-Id: I83e3fa258ef01b26388c0e6fd8c17a0a140ab75a
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
The matching check for topic filters did not take into account that a
mixture of wildcards is valid. While # is only allowed a single time,
using + is valid in multiple occasions and can also me mixed with other
wildcards.
Fixes: QTBUG-104478
Pick-to: 6.6 6.5 6.2
Change-Id: I04129d5fbbb21c95115a15d74c6787804a8d0b10
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
The example is not documented and it is also missing from the
examples-manifest.xml file. However, it can be still useful
for debugging or for performing small tests, so move it to
the tests/manual folder.
The qmake project files are kept for the examples because the
CI builds the examples with CMake and qmake. Now that this has
been moved to tests/manual, the .pro files can be removed.
Change-Id: Id69c3c6896d98b543ff5bd493592d06a27746496
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
As we are now processing the arguments with
cmake_parse_arguments(PARSE_ARGV, we don't need to pass the escape
characters anymore.
Task-number: QTBUG-99238
Change-Id: I8dbdad71e6a5b40e944c55c35dd4c772af6b5665
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
When iterating through the list of active subscriptions to emit the
messageReceived signal, the handler can add further subscriptions, which
renders the iterator to be invalid. Instead store the subscriptions in a
list, which are supposed to receive the signal and only act upon these.
Fixes: QTBUG-106203
Pick-to: 6.4 6.2 5.15
Change-Id: I790a6081c332e82da8e53b15df8ad8494f35cc46
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.
Change-Id: Ieb49171212fd72c685ba27cb39aaec9cbaf3a701
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Each sub item in the filter tree needs to be directly compared. Using
startsWith causes invalid elements to be marked as matching.
Fixes: QTBUG-92817
Pick-to: 6.4 6.2 5.15
Change-Id: I439d9325b58fd0aa57fb4ead8db48edb4188ebee
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I40135f08b4e89e8e034ec764ffed3273fc60646a
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>
No Local subscription allow for filtering on the server side.
If a client subscribes and publishes a message on the same topic,
it will not be routed back.
Fixes: QTBUG-100862
Change-Id: I363361d0267aba740d07483c04ce0d4c30b5e14c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.
Pick-to: 6.2
Task-number: QTBUG-95018
Change-Id: Ib00e7ecb09111745f3f9165b40fd1d9ae606e75a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable
in the project ensures we ported away from old API calls.
Task-number: QTBUG-86815
Change-Id: I589f0192370a932ac10088656eaee1e35a41ea73
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Also, remove optional dependency to websockets, which is not
part of Qt 6.0 and fix compile error against unsigned comparison.
Switch default test configuration to not launch TLS brokers.
Latest COIN updates causes paho to fail in the SSL setup.
Task-number: QTBUG-88189
Change-Id: I9d31f9e54801d269122878ab4cf7541512fdbe98
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
And use an updated coin instruction file.
Change-Id: I852d38febe9ecaa86c516b7f4a0451d0f80d8011
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Some test servers might have different configurations.
For instance, mosquitto broker provides a different
default value for topic aliases.
Change-Id: I00bc9c6b27d06358a352f9c0adb04e4044666aac
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
mosquitto MQTT5 support seems to wait longer to send
will messages.
Change-Id: I2c13609e228319ce8fefc5e79d4f99bbfe0b061b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
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>
A will message is allowed to be empty. Hence, check whether a will topic
exists to identify incorporating the last will to the connect message.
Task-number: QTBUG-76783
Change-Id: Ifb7f5467e8e7e70c6d9c050b36a35df2419f4171
Reviewed-by: hjk <hjk@qt.io>
For MQTT 5 the fake server did not send any property information. Hence,
the client (potentially) read among the buffer.
Change-Id: I58c7d1b4a1f15a0803c04495c82537f648c8a642
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Change-Id: If08d050a92db812e95a668d141d8774e56f9516e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@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>
As agreed on the review process, using sharedSubscription(Name) is more
verbose and descriptive.
Change-Id: I81fa5d9f74ecd12d3b90d485f67b52dfb4f70bf5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Before failed with:
.../qtmqtt/tests/auto/cmake/build/module_includes/main.cpp:4:16: fatal error: QMqtt: No such file or directory
#include <QMqtt>
^~~~~~~
Task-number: QTBUG-68343
Change-Id: I1000f533b2b29558f3c2b0d23c64c2c621e641e5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
A user might be interested in knowing the exact state of a message while
publishing or when a message is received.
Task-number: QTPM-1453
Task-number: QTBUG-66599
Change-Id: Ibf977f76ba6078b5b525ba00b6988d4b69960176
Reviewed-by: hjk <hjk@qt.io>
VerneMQ does not send any server connection properties at all and relies
on the default values set by the standard. All other implementations
behave differently so far, mostly to set lower limits (i.e. max packet
size).
Change-Id: I01824640021651cfe752523803b9797aed197fc9
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The standard did not mention it explicitly to be a list. However,
quoting "Multiple Subscription Identifiers will be included if the
publication is the result of a match to more than one subscription, in
this case their order is not significant" clearly indicates that
multiple subscription ids can be part of a publish message.
Change-Id: I1a45564a719847020e24aec7d0385807f3be3aa4
Reviewed-by: hjk <hjk@qt.io>