diff options
Diffstat (limited to 'src/mqtt')
-rw-r--r-- | src/mqtt/doc/src/index.qdoc | 38 | ||||
-rw-r--r-- | src/mqtt/doc/src/module.qdoc | 27 | ||||
-rw-r--r-- | src/mqtt/doc/src/overview.qdoc | 25 | ||||
-rw-r--r-- | src/mqtt/qmqttclient.cpp | 13 | ||||
-rw-r--r-- | src/mqtt/qmqttconnection.cpp | 3 |
5 files changed, 65 insertions, 41 deletions
diff --git a/src/mqtt/doc/src/index.qdoc b/src/mqtt/doc/src/index.qdoc index 989f4a4..fd50391 100644 --- a/src/mqtt/doc/src/index.qdoc +++ b/src/mqtt/doc/src/index.qdoc @@ -1,11 +1,11 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtMqtt module. +** This file is part of the documentation of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:GPL$ +** $QT_BEGIN_LICENSE:FDL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the @@ -14,18 +14,17 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ + /*! \page qtmqtt-index.html @@ -45,6 +44,9 @@ and devices to publish telemetry data. The supported versions are MQTT 3.1 and MQTT 3.1.1. + \note Qt MQTT is part of the Qt for Automation offering and not Qt. For further + details please see \l {Qt for Automation}. + \section1 Getting Started To include the definitions of the module's classes, use the following @@ -77,4 +79,12 @@ \list \li \l{Qt MQTT C++ Classes}{C++ Classes} \endlist + + \section1 Licenses and Attributions + + Qt MQTT is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under the + the \l{GNU General Public License, version 3}. + + \generatelist{groupsbymodule attributions-qtmqtt} */ diff --git a/src/mqtt/doc/src/module.qdoc b/src/mqtt/doc/src/module.qdoc index 759fd87..457e02d 100644 --- a/src/mqtt/doc/src/module.qdoc +++ b/src/mqtt/doc/src/module.qdoc @@ -1,11 +1,11 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtMqtt module. +** This file is part of the documentation of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:GPL$ +** $QT_BEGIN_LICENSE:FDL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the @@ -14,18 +14,17 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ + /*! \module QtMqtt diff --git a/src/mqtt/doc/src/overview.qdoc b/src/mqtt/doc/src/overview.qdoc index dda3059..64f5fab 100644 --- a/src/mqtt/doc/src/overview.qdoc +++ b/src/mqtt/doc/src/overview.qdoc @@ -1,23 +1,30 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtMqtt module. -** -** $QT_BEGIN_LICENSE:COMM$ +** This file is part of the documentation of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:FDL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ + /*! \page mqtt-overview.html diff --git a/src/mqtt/qmqttclient.cpp b/src/mqtt/qmqttclient.cpp index 23fb00f..8cf1661 100644 --- a/src/mqtt/qmqttclient.cpp +++ b/src/mqtt/qmqttclient.cpp @@ -443,10 +443,17 @@ void QMqttClient::disconnectFromHost() { Q_D(QMqttClient); - if (d->m_connection.internalState() != QMqttConnection::BrokerConnected) + switch (d->m_connection.internalState()) { + case QMqttConnection::BrokerConnected: + d->m_connection.sendControlDisconnect(); + case QMqttConnection::BrokerDisconnected: return; - - d->m_connection.sendControlDisconnect(); + case QMqttConnection::BrokerConnecting: + case QMqttConnection::BrokerWaitForConnectAck: + default: + d->m_connection.m_transport->close(); + break; + } } QMqttClient::ClientState QMqttClient::state() const diff --git a/src/mqtt/qmqttconnection.cpp b/src/mqtt/qmqttconnection.cpp index 4db53c1..b60816a 100644 --- a/src/mqtt/qmqttconnection.cpp +++ b/src/mqtt/qmqttconnection.cpp @@ -85,6 +85,7 @@ QIODevice *QMqttConnection::transport() const bool QMqttConnection::ensureTransport(bool createSecureIfNeeded) { + Q_UNUSED(createSecureIfNeeded); // QT_NO_SSL qCDebug(lcMqttConnection) << Q_FUNC_INFO << m_transport; if (m_transport) { @@ -125,7 +126,7 @@ bool QMqttConnection::ensureTransportOpen(const QString &sslPeerName) if (m_transportType == QMqttClient::IODevice) { if (m_transport->isOpen()) - return true; + return sendControlConnect(); if (!m_transport->open(QIODevice::ReadWrite)) { qWarning("Could not open Transport IO device"); |