From 0e2c013a4523915a0af37fe1f338a4f66b07f91d Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 7 May 2019 10:56:08 +0200 Subject: doc: Add dontdocument.qdoc files Each module that has publically declared classes or structs that are not meant to be documented is given a dontdocument.qdoc file to tell qdoc that these classes are not meant to be documentented. Then qdoc will not print warnings about missing \class comments for these classes and structs. Change-Id: I9195f0b546032e1c7642c9da34d85a0a4a9bfb08 Reviewed-by: Paul Wicking --- src/network/doc/src/dontdocument.qdoc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/network/doc/src/dontdocument.qdoc (limited to 'src/network') diff --git a/src/network/doc/src/dontdocument.qdoc b/src/network/doc/src/dontdocument.qdoc new file mode 100644 index 0000000000..fe2e54b34c --- /dev/null +++ b/src/network/doc/src/dontdocument.qdoc @@ -0,0 +1,30 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** 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 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$ +** +****************************************************************************/ + +/*! + \dontdocument (QTypeInfo QMetaTypeId QIPv6Address) +*/ -- cgit v1.2.3 From 29425f1e7776c3fcea3b041484d97683a57b431d Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 3 Jun 2019 16:12:47 +0200 Subject: Update documentation regarding import/export restrictions for OpenSSL From Qt 5.12.5 and 5.13.0 on we ship OpenSSL 1.1.x libraries with Qt through the binary installers, as Qt is a general purpose toolkit and as such not subject to import/export restrictions. However, application developers still have to take care of the relevant requirements and compliance before distributing OpenSSL. Change-Id: I1c3622116eadda270d638becfa23a5493976e919 Fixes: QTBUG-75814 Reviewed-by: Paul Wicking Reviewed-by: Akseli Salovaara --- src/network/doc/src/ssl.qdoc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/network') diff --git a/src/network/doc/src/ssl.qdoc b/src/network/doc/src/ssl.qdoc index a3af1d0477..e485a1b393 100644 --- a/src/network/doc/src/ssl.qdoc +++ b/src/network/doc/src/ssl.qdoc @@ -77,11 +77,12 @@ \section1 Import and Export Restrictions - Due to import and export restrictions in some parts of the world, we - are unable to supply the OpenSSL Toolkit with Qt packages. Developers wishing - to use SSL communication in their deployed applications should either ensure - that their users have the appropriate libraries installed, or they should - consult a suitably qualified legal professional to ensure that applications - using code from the OpenSSL project are correctly certified for import - and export in relevant regions of the world. + Qt binary installers include the OpenSSL libraries used by QtNetwork. However, + those are not automatically deployed with applications that are built with Qt. + Import and export restrictions apply for some types of software, and for + some parts of the world. Developers wishing to use SSL communication in their + deployed applications should either ensure that their users have the appropriate + libraries installed, or they should consult a suitably qualified legal + professional to ensure that applications using code from the OpenSSL project + are correctly certified for import and export in relevant regions of the world. */ -- cgit v1.2.3 From 762d4afdc17f96804a83391551fcc7cad26a9319 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Mon, 27 May 2019 11:08:47 +1000 Subject: wasm: fix crash in case network js event becomes null or undefined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also fix data progress Task-number: QTBUG-75489 Change-Id: I5222fda64d258a6ae78ba0ca20194b81c289c27e Reviewed-by: Morten Johan Sørvig --- src/network/access/qnetworkreplywasmimpl.cpp | 53 ++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 10 deletions(-) (limited to 'src/network') diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp index 9f8a42ad89..9f6422a107 100644 --- a/src/network/access/qnetworkreplywasmimpl.cpp +++ b/src/network/access/qnetworkreplywasmimpl.cpp @@ -59,6 +59,9 @@ using namespace emscripten; static void q_requestErrorCallback(val event) { + if (event.isNull() || event.isUndefined()) + return; + val xhr = event["target"]; quintptr func = xhr["data-handler"].as(); @@ -77,19 +80,24 @@ static void q_requestErrorCallback(val event) static void q_progressCallback(val event) { + if (event.isNull() || event.isUndefined()) + return; + val xhr = event["target"]; QNetworkReplyWasmImplPrivate *reply = reinterpret_cast(xhr["data-handler"].as()); Q_ASSERT(reply); - if (xhr["lengthComputable"].as() && xhr["status"].as() < 400) - reply->emitDataReadProgress(xhr["loaded"].as(), xhr["total"].as()); - + if (xhr["status"].as() < 400) + reply->emitDataReadProgress(event["loaded"].as(), event["total"].as()); } static void q_loadCallback(val event) { + if (event.isNull() || event.isUndefined()) + return; + val xhr = event["target"]; QNetworkReplyWasmImplPrivate *reply = @@ -121,6 +129,7 @@ static void q_loadCallback(val event) reader.set("data-handler", xhr["data-handler"]); reader.call("readAsArrayBuffer", blob); + val::global("Module").delete_(reader); } @@ -136,6 +145,9 @@ static void q_loadCallback(val event) static void q_responseHeadersCallback(val event) { + if (event.isNull() || event.isUndefined()) + return; + val xhr = event["target"]; if (xhr["readyState"].as() == 2) { // HEADERS_RECEIVED @@ -152,12 +164,18 @@ static void q_responseHeadersCallback(val event) static void q_readBinary(val event) { + if (event.isNull() || event.isUndefined()) + return; + val fileReader = event["target"]; QNetworkReplyWasmImplPrivate *reply = reinterpret_cast(fileReader["data-handler"].as()); Q_ASSERT(reply); + if (reply->state == QNetworkReplyPrivate::Finished || reply->state == QNetworkReplyPrivate::Aborted) + return; + // Set up source typed array val result = fileReader["result"]; // ArrayBuffer val Uint8Array = val::global("Uint8Array"); @@ -171,6 +189,10 @@ static void q_readBinary(val event) reinterpret_cast(buffer.data()), size); destinationTypedArray.call("set", sourceTypedArray); reply->dataReceived(buffer, buffer.size()); + + event.delete_(fileReader); + Uint8Array.delete_(sourceTypedArray); + QCoreApplication::processEvents(); } @@ -194,14 +216,21 @@ QNetworkReplyWasmImplPrivate::QNetworkReplyWasmImplPrivate() QNetworkReplyWasmImplPrivate::~QNetworkReplyWasmImplPrivate() { + m_xhr.set("onerror", val::null()); + m_xhr.set("onload", val::null()); + m_xhr.set("onprogress", val::null()); + m_xhr.set("onreadystatechange", val::null()); + m_xhr.set("data-handler", val::null()); } -QNetworkReplyWasmImpl::~QNetworkReplyWasmImpl() +QNetworkReplyWasmImpl::QNetworkReplyWasmImpl(QObject *parent) + : QNetworkReply(*new QNetworkReplyWasmImplPrivate(), parent) { + Q_D( QNetworkReplyWasmImpl); + d->state = QNetworkReplyPrivate::Idle; } -QNetworkReplyWasmImpl::QNetworkReplyWasmImpl(QObject *parent) - : QNetworkReply(*new QNetworkReplyWasmImplPrivate(), parent) +QNetworkReplyWasmImpl::~QNetworkReplyWasmImpl() { } @@ -226,19 +255,23 @@ QByteArray QNetworkReplyWasmImpl::methodName() const void QNetworkReplyWasmImpl::close() { + QNetworkReply::close(); setFinished(true); emit finished(); - - QNetworkReply::close(); } void QNetworkReplyWasmImpl::abort() { - Q_D(const QNetworkReplyWasmImpl); - setError( QNetworkReply::OperationCanceledError, QStringLiteral("Operation canceled")); + Q_D( QNetworkReplyWasmImpl); + if (d->state == QNetworkReplyPrivate::Finished || d->state == QNetworkReplyPrivate::Aborted) + return; + + setError(QNetworkReply::OperationCanceledError, QStringLiteral("Operation canceled")); + d->doAbort(); close(); + d->state = QNetworkReplyPrivate::Aborted; } qint64 QNetworkReplyWasmImpl::bytesAvailable() const -- cgit v1.2.3