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

26 Commits

Author SHA1 Message Date
Jani Heikkinen
ebd3d87293 Replace Q_ENUMS with Q_ENUM
Amends ea3dc64d3f,
7467bbdc84, and
ea0d792a44 (all before 6.0).

Fixes: QTBUG-148625
Pick-to: 6.12 6.11 6.8
Change-Id: I2f9b24f7e32d437cce258dfdce0d669c8d2638e1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2026-07-29 11:40:44 +00:00
Ivan Solovev
18548033e1 Mark the rest of sources as security-significant
This is the default level. All critical parts were identified in the
previous commits.

Fixes: QTBUG-135764
Pick-to: 6.10 6.9 6.8
Change-Id: Ib9df3db37e3efe3074f0fbc99eb60d31281d5a5a
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
2025-07-29 14:06:19 +02:00
Lucie Gérard
edd6855344 Use SPDX license identifiers
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>
2022-06-16 10:22:20 +02:00
hjk
fe4883441f Revert "Use const references for non-trivial parameters to signals"
This reverts commit ccd80bb35b
which breaks binary compatibility.

Change-Id: Ica34959914db592ce5a138b461cdf1d2f5994c5c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-11-20 17:15:28 +00:00
hjk
ccd80bb35b Use const references for non-trivial parameters to signals
Change-Id: I03149cbeebcd31dbfd297112b491869a2f104bae
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-09-12 10:50:03 +00:00
Maurice Kalinowski
7d2525e623 Rename shared subscription functions
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>
2018-09-12 10:42:52 +00:00
Maurice Kalinowski
a216985e6a Add reason code support for subscriptions
Change-Id: I13064ac4bbd3a42d70485b5055825a824472f9af
Reviewed-by: hjk <hjk@qt.io>
2018-08-15 10:00:40 +00:00
Maurice Kalinowski
001c3e7edc MQTT5: Add support for shared subscriptions
The scheme to create a shared subscription is $share/sharename/
topicfilter. During QMqttSubscription creation, the topic gets split and
shareName is a newly introduced property to verify whether a
subscription has been shared.

Task-number: QTPM-1452
Change-Id: I99c1aa9bb3bf8db2a930ce031c1a0a4882f01bcd
Reviewed-by: hjk <hjk@qt.io>
2018-07-30 11:52:32 +00:00
Maurice Kalinowski
f31b5b8539 MQTT5: Introduce QMqttSubscriptionProperties
Change-Id: Ic41646937a0fd19a839cff8beb9c456bb005011d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-07-20 11:54:22 +00:00
J-P Nurmi
c79f5fead7 Tweak the includes
Use the <QtModule/qheader.h> syntax in headers to follow the Qt coding
conventions, and use local "qheader_p.h" includes for including own
headers from within the QtMqtt module itself. These changes, that
eliminate dependencies from QtMqtt sources to syncqt's generated
headers, make it possible to e.g. build QtMqtt as part of a project
tree, and with custom build systems.

Change-Id: Iebd98ea70dc89d8171dff3616ebfc661f5993f9f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-12 10:15:14 +00:00
Lorenz Haas
6eca6f914d Introduce specific types for topic names and filters
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>
2017-11-15 13:18:31 +00:00
Jani Heikkinen
984527e516 Update license headers
Change-Id: If9b7f82a71ec554b152485ddd91a9d105019c6ce
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-09-25 11:58:23 +00:00
Maurice Kalinowski
b7a40f4c74 make QMqttSubscription::setState private
Should not be part of user API and hence be unaccessible.

Change-Id: I7a82c747673eaee9c93d150f53164b395ec6bd66
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-05 06:56:57 +00:00
Maurice Kalinowski
ea3dc64d3f Make enums and functions exposable to QML
While there is no existing API to QML, exposing connectToHost and others
helps in exporting QMqttClient to QML.

Change-Id: I9f71cb589be75e90e9b40d78cc32d25aa08e4f72
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-13 15:41:22 +00:00
Maurice Kalinowski
042b828c14 Update license
Change-Id: Iafccea66a89d8290f9beb92f4c0360016bc827e8
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-05-19 11:40:05 +00:00
Maurice Kalinowski
5a05823961 Introduce QMqttMessage
QMqttMessage stores all information about a published message being
received on a subscription. A user might be interested in more details,
hence provide all known details. Keep the class as lean as possible,
because its lifetime usually is very limited.

Change-Id: I6bfc3d8e93117cef370b1f02eb0d432c04341947
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2017-05-19 06:59:23 +00:00
Maurice Kalinowski
1d23262497 Mark destructors as override
Feedback given was that we should mark them as virtual. However, base
classes are virtual already. Hence this is redundant information.

Change-Id: Ie12da7ce54694b03cb8451939211bdea0f0ac65a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-05-04 10:20:06 +00:00
Maurice Kalinowski
e05a4adb2f Fix build
Change-Id: I22559aed986d0a87dbbfb4e71b299ed62b5f1bd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-04-28 06:11:05 +00:00
Maurice Kalinowski
729d15e345 Introduce QMqttSubscriptionPrivate
QMqttSubscription is a public class, hence it must not have fixed
members.

Change-Id: Iac085a1ceea2b6276812470ac48f3cd642dc48ec
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-04-27 13:57:21 +00:00
Maurice Kalinowski
3e16cb6b14 Change messageReceived signatures
This way one can connect to the same signal either with or without
interest for the topic.

Another option had been to have two different messageReceived signals,
one including just the message and another the message plus the topic.
Then again, that would double the amount of signals and also cause
troubles connecting to a signal with different arguments, including
static cast magic.
2017-03-29 10:35:52 +02:00
Maurice Kalinowski
63867873f5 Specify Q_DISABLE_COPY where appropiate 2017-03-27 15:11:39 +02:00
Maurice Kalinowski
d990cef71f Add support for QoS Level 1
On subscription and message side.
2017-03-23 13:03:14 +01:00
Maurice Kalinowski
ee3bb8e950 Add support for unsubscribe to topics 2017-03-23 08:53:23 +01:00
Maurice Kalinowski
043c07b6d8 Add unsubscribe to QMqttSubscription
The subscription needs to store the associated client for this.
2017-03-23 08:30:41 +01:00
Maurice Kalinowski
b5bd021db3 switch message type to QByteArray
Using QString for the message implies that all messages are strings,
which is a completely wrong assumption. Instead use QByteArray which can
represent any type of data.
2017-03-23 08:17:19 +01:00
Maurice Kalinowski
8bda237fa0 Add initial support for QMqttSubscription
The class handles all subscription related items. Developers can use it
to manage the state of the subscription. Having a subscription object
simplifies message handling, there is no need to do a topic check for
each message received.
2017-03-23 08:04:20 +01:00