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

20 Commits

Author SHA1 Message Date
Lucie Gérard
9e1a2c5287 Change license for build files in example
According to QUIP-18 [1], all example files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

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

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I1133ca3b2daf487dbbc2ddae6b94d7f20239ed49
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-20 08:12:04 +01:00
Mate Barany
1f9e2bf463 Remove redundant call from QuickPublication Example
Remove the call m_client.state(), it seems to be unnecessary (just like
in the Quicksubscription example).

Pick-to: 6.6 6.5
Task-number: QTBUG-110893
Change-Id: I460f12f3d4b33388013cb8250149239a6b0f1c94
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-06-26 14:42:43 +02:00
Mate Barany
87223c466a Document the Quickpublication example
Provide the missing documentation for the Quickpublication example

Task-number: QTBUG-110893
Change-Id: I002208e2e036a09acd68621f075bed7a11b6598f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2023-06-26 12:59:23 +02:00
Mate Barany
a6581736ff QuickPublication Example: fix qmllint warnings
Fix the qmllint warnings in the quickpublication example.

Pick-to: 6.6 6.5
Task-number: QTBUG-110893
Change-Id: If78a908807ee8a5f6f693d159a05a9ee91b1e38d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-06-20 13:53:31 +02:00
Mate Barany
f49eaa9b7a QuickPublication Example: Remove version numbers from imports
Remove the version numbers according to revamp the guideline.

Pick-to: 6.6 6.5
Task-number: QTBUG-110893
Change-Id: I9e8fdd0fa54b3218efd2c55bd3dac3137d43e756
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-06-20 13:35:12 +02:00
Mate Barany
63b5119a3e QuickPublication example: Port CMakeLists.txt to use qt_add_qml_module
Port the CmakeLists.txt and change the source files accordingly:
- rename main.qml to Main.qml
- remove MqttClient import from Main.qml
- add QML macros to qmlmqttclient.h
- revamp main.cpp

Also update the qmake build:
- revamp quickpublication.pro
- add qmldir to project
- remove qml.qrc

Pick-to: 6.6 6.5
Task-number: QTBUG-110893
Change-Id: Iffe3e80e40f318d1520ca108933760c0e5d0c18a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-20 11:33:02 +02:00
Mate Barany
8fc1b0de9d Replace QLatin1Strings with _L1 literals
As part of revamping the MQTT examples, replace QLatin1Strings with
_L1 literals.

Also replace QLatin1Chars and QStringLiterals with the appropriate
u'' and u""_s literals.

Task-number: QTBUG-110893
Change-Id: I784f5faa23e51666b6edf36eb9692c0f7c186f70
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-07 15:34:39 +02:00
Maurice Kalinowski
d26a01b1a6 Reimplement QmlMqttClient
QMqttClient is not meant to be directly exported to QML. One reason is
that it uses quint16 for port declaration to minimize size of the class.
However, that is not properly handled on all platforms for the QML
engine.

Instead create a proper wrapper for the client and only expose required
elements.

Fixes: QTBUG-80440
Pick-to: 6.4
Change-Id: Id4066ce24338b0270af05b06c6216c1755dab533
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2022-10-23 19:14:51 +02:00
Lucie Gérard
3012258ec3 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I9caf6ad52cd6a0a63ce7ff37ce189ec4b368befd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2022-08-23 10:00:53 +02:00
Ivan Solovev
241b27ff88 Use QT_DISABLE_DEPRECATED_UP_TO instead of QT_DISABLE_DEPRECATED_BEFORE
Task-number: QTBUG-104944
Change-Id: I98c2a652abb366354710b57e2fea7eb22235c66f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-22 12:59:53 +02:00
Lucie Gérard
d431a18c5c Add license headers to cmake files
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>
2022-07-07 10:10:51 +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
Kai Köhne
b3f44d87a7 Improve examples CMakeLists.txt
- Remove '# generated from xyz.pro' comment from pro2cmake
- Remove automatic use of CMAKE_AUTORCC
- Only opt into CMAKE_AUTOUIC if .ui files are involved
- Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR
- Combine multiple find_package(Qt6 ... calls)
 - use REQUIRED COMPONENTS
 - sort components alphabetically
- Fix wrong indentations
- Use (only) one empty line after multi-line commands

Pick-to: 6.3
Change-Id: Idf2f3d5a09a496fa5c578bbeae84f3560549f1a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-21 10:25:12 +01:00
Joerg Bornemann
115357fbae Raise cmake_minimum_required to VERSION 3.16 in examples
Pick-to: 6.2
Task-number: QTBUG-95636
Change-Id: I821f412f9dbe11ae99ffd888a7ab2ba415ed9379
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-17 13:48:20 +02:00
Joerg Bornemann
f9ebebfce7 CMake: Disable usage of CMake API compatibility wrappers
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>
2021-05-26 21:04:15 +02:00
Maurice Kalinowski
07b7baf3ca Regenerate projects
Change-Id: I8b306c077030ffe1904d42f813f3b7cacc35a0c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-26 15:23:16 +00:00
Alexandru Croitor
113f7ee864 Regenerate projects
Change-Id: I7574a6156e4c340ba94007176287a5d1bcb7f9e1
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-15 13:02:47 +00:00
Maurice Kalinowski
4e5af443ef Add initial support for cmake
Change-Id: I40153b0f225d67afebfaf3ff0b1c43a9c2f69b8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-02 07:06:48 +00:00
Maurice Kalinowski
6a7eed0a04 Examples: Visual clean up
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>
2018-12-12 06:11:45 +00:00
Pablo J. Rogina
ee6eba8a4b Add new QML example to publish topics/messages
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>
2018-07-20 12:22:09 +00:00