summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-281-1/+2
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/mqtt/mqtt.pro Change-Id: Ic76ff03e314e0d9761ba66372e19f546afcc7d6c
| * Fix build with -no-guiMaurice Kalinowski2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | Examples requiring a user interface recently need to check for its availability. Task-number: QTQAINFRA-2576 Change-Id: I731dfee16bd1a9b5eb0396433213243dfa9b23da Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add console examplesMaurice Kalinowski2018-12-207-0/+588
|/ | | | | | | | | | Other solutions provide minimal console applications for publishing and subscribing, which can then be used as tools. Task-number: QTBUG-69995 Task-number: QTBUG-71957 Change-Id: Ica4a856e25b540d089e1aa20f853b780c18d59dd Reviewed-by: hjk <hjk@qt.io>
* Examples: Visual clean upMaurice Kalinowski2018-12-122-13/+29
| | | | | | | | | The UI needed some minimal overhaul to be more consistent. Adapt the layouts. Change-Id: I7e3fdf38faca2264c768fd188bb381a78f6cf4d3 Fixes: QTBUG-64014 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add username and password editsv5.12.0-beta4Maurice Kalinowski2018-11-052-10/+42
| | | | | | | The example was missing that so far. Change-Id: I312dc4e67cb801313bb4811ceced4b78f985e9ab Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Move qWarning to categorized loggingMaurice Kalinowski2018-07-261-1/+1
| | | | | | | | | | 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>
* Add new QML example to publish topics/messagesPablo J. Rogina2018-07-207-0/+461
| | | | | | | | | | New QML-based example that allows to send topic/message (along with QoS and retain properties) based mainly on existing QML subscription example, in order to provide a way for showing the whole publish/subscription model in MQTT via QML applications. Change-Id: I1673177371297969098adf635e7a582c25e4d0c7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Update qml subscription exampleMaurice Kalinowski2018-07-181-3/+4
| | | | | | | Give the window a proper title and also added some debug output. Change-Id: Iccdecb709cd872e1281a34434c4e811c6b7f5817 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* qdoc files always use FDL/commercial license comboAlex Blasche2018-03-015-165/+50
| | | | | | Change-Id: I349a0f4b104046272062979bccdef456bdca428e Reviewed-by: Andrew O'Doherty <andrew.odoherty@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Introduce specific types for topic names and filtersLorenz Haas2017-11-154-8/+8
| | | | | | | | | | | 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>
* Doc: Add screenshot and details to Qt MQTT example docsLeena Miettinen2017-11-082-4/+49
| | | | | Change-Id: Ib3f1eaac6bc09ee40ea0244c3445eee354f0d965 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Doc: Add screenshot and details to Simple MQTT Client example docsLeena Miettinen2017-11-082-2/+44
| | | | | Change-Id: Idd0549a40365f12dc7cbe1f73696cb6cef1138f4 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Doc: Add docs for MQTT Subscriptions exampleLeena Miettinen2017-10-262-3/+47
| | | | | Change-Id: Ia5c3b6cc76f6938f4b315215f0c8351f6ae434d9 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Doc: Adding and editing the docsMaurice Kalinowski2017-10-165-0/+306
| | | | | | | | | | | | 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>
* Use Qt5-style connect and QOverloadMaurice Kalinowski2017-10-122-2/+2
| | | | | Change-Id: I589649329858e074f0bbc1feb89bb4da2c1e25b2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Resize example user interfacesMaurice Kalinowski2017-10-102-6/+6
| | | | | | | On some displays they appeared too small. Change-Id: Iea63f866b3fa7116a4bcb46397d38f4336018594 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Change signature of QMqttClient::subscribeMaurice Kalinowski2017-09-016-16/+15
| | | | | | | | | | | | 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>
* Update signal signatureMaurice Kalinowski2017-08-302-2/+6
| | | | | Change-Id: Ie76f1bee3e6299ebd3f684faa7c3023716f7098e Reviewed-by: hjk <hjk@qt.io>
* Fix includes in exampleMaurice Kalinowski2017-08-301-2/+1
| | | | | Change-Id: I1cb67eabaaf3ef40f4e0fe07a2bf5a5852861fe2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Rename ping receival signalMaurice Kalinowski2017-08-302-2/+2
| | | | | Change-Id: I52320fd58305a3ba38c77e2da8589c35b54cd73e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove hardcoded test serverMaurice Kalinowski2017-08-302-2/+2
| | | | | Change-Id: I846a7247850648b5e0f63b91d1bd31caec0d185d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add module conditionals for examplesMaurice Kalinowski2017-07-031-3/+4
| | | | | Change-Id: Ibffb387d939f98fb3454148c56099a304e733e9c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Add websocket exampleMaurice Kalinowski2017-06-207-1/+549
| | | | | | | | | | Beside QtWebSockets not officially supporting subprotocols, one can circumvent this using QNetworkRequest. Works nicely with hivemq, yet need to find a websocket server supporting MQTT 3.1.1. Change-Id: I889eca86b5b7e4a9752aa0b4cef525d3b8462ab0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix warningsMaurice Kalinowski2017-06-192-3/+3
| | | | | Change-Id: I80b21f973a697bbfcd66904c1caaaa52f3eae636 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Rename QMqttMessage::content to payloadMaurice Kalinowski2017-06-152-2/+2
| | | | | | | | This is a way more consistent naming. Change-Id: Id1236a76fc8f88f09a62490ec01370c1e13de4f8 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add QML exampleMaurice Kalinowski2017-06-157-1/+476
| | | | | | | | | Instead of providing an API for QML it was decided to rather showcase how to do this manually. Potentially this decision might be revisited at a later point. Change-Id: If274fa681b05733d755602c3d9837c809e41fc3d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Clean up exampleMaurice Kalinowski2017-05-192-5/+5
| | | | | | | | - use const ref - prefer comma separated initializer list Change-Id: I69dbf7b9577ec7db721b174ca13b936b79d66023 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Introduce QMqttMessageMaurice Kalinowski2017-05-192-3/+4
| | | | | | | | | | 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>
* Add/Fix license headersMaurice Kalinowski2017-04-278-0/+400
| | | | | Change-Id: Ie5192a94a5e3dc3153344f4cf17f4dfb85a386ca Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Fix exampleMaurice Kalinowski2017-04-061-1/+4
| | | | Respect the checkbox and set the retain parameter accordingly.
* Provide access to message identifierMaurice Kalinowski2017-03-292-2/+2
| | | | | | | | | In cased a user is interested in the status of a message delivery, the ID returned by published() is also used in the messageSent() signal once the message has been fully acknowledged by the broker. This depends on the qos level. QoS 0 has no quality, hence nothing is confirmed.
* Change messageReceived signaturesMaurice Kalinowski2017-03-292-2/+2
| | | | | | | | | | | 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.
* Fix potential crashesMaurice Kalinowski2017-03-292-3/+15
| | | | | | | | In case of no active connection, transport might be nullptr as well, causing either a nullptr reference or other side-effects. Also the example applications should verify that a subscription succeeded.
* Fix namespaced buildMaurice Kalinowski2017-03-273-0/+6
|
* Unsubscribe when the subscription window is closedMaurice Kalinowski2017-03-241-0/+1
|
* Add support for QoS Level 1Maurice Kalinowski2017-03-234-101/+188
| | | | On subscription and message side.
* Remove QMqttClient::subscribed signalMaurice Kalinowski2017-03-232-14/+0
| | | | | In case subscription status is interesting for the developer, QMqttSubscription is the preferred item to use.
* Add support for unsubscribe to topicsMaurice Kalinowski2017-03-231-1/+1
|
* switch message type to QByteArrayMaurice Kalinowski2017-03-232-2/+2
| | | | | | 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.
* Add initial support for QMqttSubscriptionMaurice Kalinowski2017-03-239-1/+522
| | | | | | | 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.
* rename target executableMaurice Kalinowski2017-02-091-1/+1
|
* Add ping button to example.Maurice Kalinowski2017-01-203-16/+39
|
* Handle messages receival in exampleMaurice Kalinowski2017-01-201-0/+10
|
* add subscribe button to exampleMaurice Kalinowski2017-01-203-33/+51
|
* Update example to specify topic and message to publishMaurice Kalinowski2017-01-203-3/+53
|
* Fix int <-> quint16 conversion issuesMaurice Kalinowski2017-01-192-3/+7
|
* Make example a bit more verboseMaurice Kalinowski2017-01-193-19/+132
|
* Add example app to get startedMaurice Kalinowski2017-01-197-0/+163