Commit Graph

137 Commits

Author SHA1 Message Date
Ahmad Samir 0861fb612a Mark the whole repo with QT_NO_URL_CAST_FROM_STRING
Pick-to: 6.11
Change-Id: Ic4457f2151822e7bf2d6e4463b15f2835f860cbd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-12-10 16:47:34 +02:00
Volker Hilsheimer 7aefb14c39 Allow binding QCoapClient to a network interface
Add a proper public property to QCoapClient class, and also add
the getter and setter to the QCoapConnection private class.

The code in QCoapConnection uses the new private APIs from QtNetwork
(added in qtbase/83fc4ff9c20eb922113e08ba8566e077ce44dea3) to bind
the UDP socket to a specific network interface.

Since the new private QtNetwork APIs are not fully functional on
macOS, this patch also implements additional filtering of the
incoming datagrams based on the specified network interface.

The QCoapConnection instance lives in a helper thread, so the
implementation stores the specified QNetworkInterface in both
QCoapConnection and QCoapClient, and uses invokeMethod() to transfer
the value from the client to the connection.

A different approach could be to store the network interface in the
connection only, and use a QMutex to synchronize access to it, but
due to the mentioned problem with macOS, we need to access the
QNetworkInterface instance in QCoapConnection when processing each
received datagram, so locking a mutex looks like too much overhead
in this case.

[ChangeLog][QCoapClient] Added a bindInterface property that can be
used to bind the communication to a specific network interface.

Done-with: Ivan Solovev <ivan.solovev@qt.io>
Fixes: QTBUG-139697
Change-Id: Ib64691d4f4787fcbc25240da31ff059c2bf326fe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-11-26 04:23:49 +01:00
Volker Hilsheimer d1edf59e2e QCoapClient: remove documentation about custom transport
Neither QCoapConnection nor QCoapQUdpConnection are public classes, and
there is no QCoapClient constructor (or other API) that would accept a
connection-instance.

Task-number: QTBUG-139697
Pick-to: 6.10 6.9 6.8
Change-Id: I3024d886299175401557a0b30987e98ab80b956f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-09-05 17:18:53 +02:00
Topi Reinio 241da3cf7c Doc: Fix incorrect usage of \generatelist
The \generatelist command takes an optional argument
that affect how the members are listed, for example,
`classesbymodule` which creates an annotated list of
the classes in a named C++ module.

`groupsbymodule` is not recognized or documented. QDoc
falls back to generating a list of all members of a
group in this case. While the end result is correct,
this relies on an undocumented feature that is likely
to change and break.

Replace these instances with an explicit \annotatedlist
command that produces the same output.

Pick-to: 6.10
Task-number: QTBUG-138901
Change-Id: I0c23dac38445e41940907cf32a6da6fe3b769f7f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-08-06 09:14:57 +00:00
Ivan Solovev de51e04450 Mark the rest of the files in QtCoAP as security-significant
The previous commits identified and marked all security-critical files.
This commit marks the rest of the module with the default security
level (i.e. significant).

Fixes: QTBUG-135752
Pick-to: 6.10 6.9 6.8
Change-Id: I5ca76189504a2dfa1143def36abaafcca14bbcf5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-08-01 15:18:07 +02:00
Ivan Solovev 27beb42a33 Mark qcoapresourcediscoveryreply.cpp as security-critical
The QCoapResourceDiscoveryReplyPrivate::resourcesFromCoreLinkList()
method parses the resource discovery reply according to the CoRE Link
Format.

Task-number: QTBUG-135752
Pick-to: 6.10 6.9 6.8
Change-Id: I274c6ea467ccafe8d8bef1230a87d0c12d79dbc8
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-08-01 15:18:07 +02:00
Ivan Solovev d28ae1fef4 QCoapClient::post(): align the implementation with the docs
The docs clearly mention that a null device is treated as empty content.
However, the code was simply returning a nullptr in such case instead
of posting an actual request with an empty data.

As a drive-by, update the docs to actually mention that if the original
request has a payload, it will be used in such case. That is how the
QBA overload behaves.

[ChangeLog][Important Behavior Changes][QCoapClient] The post() overload
that takes a QIODevice* now behaves according to the documentation.
Specifically, if the provided QIODevice* is null, it will act as if an
empty QByteArray was provided instead of simply returning nullptr.

Change-Id: If8848515c71bd48f15e7672be6e184f903ce576d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-08-01 15:18:07 +02:00
Ivan Solovev 95a161861b Explicitly mark qcoaprequest.cpp as significant
Various methods in this file parse and adjust the user-provided URL.
However, they do it by using the public QUrl APIs only. Since QUrl
itself is security-critical, this file can be marked with the default
security score.

Task-number: QTBUG-135752
Pick-to: 6.10 6.9 6.8
Change-Id: I556a5b171aa0b1944688d5d87ab2279c13277ec3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-08-01 10:46:13 +02:00
Ivan Solovev 19498bed65 Mark files that implement the CoAP protocol as security-critical
The QCoapInternalMessage::setFromDescriptiveBlockOption() method
implements a part of the CoAP protocol, so mark qcoapinternalmessage.cpp
as security-critical.

The QCoapInternalReply class has createFromFrame() and nextBlockToSend()
methods that implement parts of the CoAP protocol, so mark
qcoapinternalreply.cpp as security-critical.

The QCoapInternalRequest class contains multiple methods that
implement the CoAP protocol (e.g. toQByteArray() or blockOption()), so
mark qcoapinternalrequest.cpp as security-critical.

The QCoapProtocol class implements the high-level details of the CoAP
protocol. It does not directly parse the data or generate the frames,
but contains the logic to call the proper low-level implementation.
Therefor, mark it as security-critical as well.

Task-number: QTBUG-135752
Pick-to: 6.10 6.9 6.8
Change-Id: I84855b6c352356f6163f7310b2d7075fd86bc9d4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-08-01 10:46:07 +02:00
Ivan Solovev 163b5e619b Docs: clarify QCoapClient::put() QIODevice overload
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ib3c4f5b82803a83bafe10ba56a3d01b61287a0c5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-08-01 08:45:58 +00:00
Ivan Solovev b80c11bf00 QCoapResourceDiscoveryReply: do not copy QByteArrays when iterating
Take them by const ref instead.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Iaf24edcc63d7ff7f682ced01665753a6a94f95dd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-07-30 09:33:00 +02:00
Ivan Solovev d85ded9e40 QCoapResourceDiscoveryReply: store QString's size in qsizetype
... instead of an int. The int variable had a risk of overflow, which
is technically an UB. However, in practice it would have silently
resulted in a negative value.
The only usage of the variable is a call to QString::mid(), which
handles the negative second parameter as "provide data until the end
of the string".

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ic95de0ceba09e02b726ab90407d637c449da2ccd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-07-30 09:32:57 +02:00
Ivan Solovev a292490ba6 QCoapOption: use qt_ptr_swap() instead of qSwap()
It's faster when we know that we operate on pointers.

Change-Id: I1366c96159ff65186f2aa67d397772b5a4d4c5bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-07-30 09:32:50 +02:00
Ivan Solovev 11df2d4c33 Optimize QCoapClient::observe()
There's no need to call get() once the request was created. It will
simply result in unnecessary copy of the request.
We can call sendRequest() directly instead.

Change-Id: I313a186478b4f2e9701c46e83d80c091f5a64a5f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-07-30 09:32:47 +02:00
Volker Hilsheimer 060d2edbec Move logging categories into private header
The are not part of the public API.

Addresses header review comment, and amends
41b71d6187

Task-number: QTBUG-132090
Pick-to: 6.9
Change-Id: Iff94177bbd10b4f74e957e362e5a0c3ba72cf11f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-12-17 13:48:39 +01:00
Thiago Macieira 38ef69689d qcoapglobal.h: don't re-Q_DECLARE_METATYPEs - not supported
And especially not built-in types.

The re-registration in the QCoapClient constructor with a name will
register the alias, by calling QMetaType::registerNormalizedTypedef()
eventually.

Pick-to: 6.8
Change-Id: I936b144f20b97f55c9f4fffd5988373ea84ba1de
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-11-28 09:34:38 -08:00
Thiago Macieira 976398d9eb Use the correct macro to create an exported Q_NAMESPACE
Pick-to: 6.8
Change-Id: I564281ca685a168501ecfffdd3e631f1c0ad7579
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-11-11 18:42:04 -08:00
Topi Reinio bced08d550 Doc: Enable documentation testing in the CI
Include documentation testing steps in coin/module_config.yaml and
set the warning limit to zero.

Task-number: QTBUG-130559
Change-Id: I0e34102e936db08861f1afb6f6687cf89165e191
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-11-04 11:25:31 +00:00
Volker Hilsheimer 41b71d6187 Clean up logging categories
Declare those used in multiple translation units in a central header,
and make those that are used in a single translation unit static.

Change-Id: I4cd440cf5b4520a3df2df2aa1d49d7a708ef1fdc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-08-01 12:02:25 +02:00
Alexei Cazacov 8d8d451cad Docs: Organize topics in the Qt CoAP project
This commit organizes the articles, so they:
- have a reasonable tree structure
- can be navigated through the topic tree in the Qt Creator help viewer

Task-number: QTBUG-127042
Change-Id: I45ae86fa8fa8c899dec5725ee5ec209b2c335a6a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-07-24 11:38:13 +03:00
Alexandru Croitor a4d3322320 CMake: Annotate some targets with SBOM information
Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Id0d4c6afd12c87f5377a66a700a8600a9463360d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-07-11 12:03:51 +02:00
Alexey Edelev cc7ae76e0c Remove the use of GENERATE_CPP_EXPORTS argument
The behavior that argument was enabling is the default one now.

Pick-to: 6.8
Task-number: QTBUG-90492
Change-Id: Idefccdc3c6dcd5c3ed513a534f3933faeb79138d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-06-10 09:59:03 +00:00
Volker Hilsheimer 7dbcceff6f Doc: fix warnings from undocumented parameter
Move assignment operators might be self-explanatory, but if
we document them, then we need to document the parameters.

Change-Id: I794ed7d023c3dde3f80ed7273889b7cf9a2113d6
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2024-05-06 12:55:34 +02:00
Marc Mutz f5c6a57865 Include what you need: <QPointer>
All these TUs relied on transitive includes of qpointer.h, maybe to a
large extent via qevent.h, though, given that qevent.h is more or less
the only public QtBase header that includes qpointer.h, something else
seems to be at play here.

Said qevent.h actually needs QPointer in-name-only, so a forward
declaration would suffice. Prepare for qevent.h dropping the include.

The algorithm I used was:

If the TU mentions 'passiveGrabbers', the name of the QEvent function
that returns QPointers, and the TU doesn't have qpointer.h included
explicitly, include it. That may produce False Positives, but better
safe than sorry. Otherwise, in src/, add an include to all source and
header files which mention QPointer. Exception: if foo.h of a foo.cpp
already includes it, don't include again.

Task-number: QTBUG-117670
Change-Id: I49b637cc4ff478da510e52d999f3b76501ba6061
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-10-13 12:38:42 +02:00
Jaishree Vyas cf268782f4 Doc: All overviews list categorization
The \generate list names are added for each categorized section with
some explanation. Here, calling the overviews as
explanations-(name of the section). The idea is to give general terms
instead of specific phrases like 'core' etc, for better understanding.

Task-number: QTBUG-115347
Pick-to: 6.5 6.6
Change-Id: Ifd8058f343fe6ffc4b45e443fb4ef0de17a4cb7a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-09-07 09:19:20 +02:00
Ahmad Samir 21ca922eee Build with QT_NO_CONTEXTLESS_CONNECT (add it to .cmake.conf)
This disables the 3-arg QObject::connect() overload:
QObject::connect(sender, signal, functor)

For details see:
https://lists.qt-project.org/pipermail/development/2023-July/044141.html

Change-Id: Ie9fe431feac6db6a8981b65fbc25bc8a1e352457
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
2023-08-21 00:05:38 +03:00
Jaishree Vyas 30ad860c5e Doc: List of all Qt overviews which are now termed as explanation
The autogenerated list of overviews was adding the \group command which
included all the groups instead of overviews.
The idea here is to categorize the overviews later on once we have
the list of all overviews.

Task-number: QTBUG-114762
Change-Id: I3cf53886be277abc86b5ec54d399cd6933fbe882
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
2023-07-19 12:22:37 +02:00
Ivan Solovev 6036fd0982 CoAP Multicast Discovery example: update the documentation
* Do not use the "Example" word in the title
* Set the proper example category
* Add a note about running the example from QtCreator
* Add a note on how to terminate docker containers after usage
* Update the screenshot to reflect the changes in the UI, switch to
  webp format
* Update the documentation about exposing C++ types to QML. Describe
  the modern way of doing it.
* Introduce a section about changes to build files.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I1ff3cdc4be673affa791a28d5f4641351060b13b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-21 19:24:42 +02:00
Ivan Solovev 423deb4768 Remove Console CoAP Client example
The example demonstrates a subset of features from Simple CoAP Client
example, but does not have any UI, and also provides only a basic
documentation page.
It can be safely removed, and other examples should be used instead.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Iec63aa530d1bf35c403151341057ceb7dd2fac66
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
2023-06-21 07:45:25 +00:00
Ivan Solovev 355d0ea260 Docs: use \keyword on QtCoap namespace
The QtCoap namespace clashes with the QtCoap module, when it comes to
linking in qdoc. Because of that it was not possible to link to the
namespace.
Add a

 \keyword {QtCoap Namespace}

command to the QtCoap namespace, so that it could be
referenced using \l {QtCoap Namespace}.

Pick-to: 6.6 6.5
Change-Id: I066504dac6107a5bbc7f5d40a7f0c3924c2e8acb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-06-19 10:32:34 +02:00
Ivan Solovev 5dfdfc315c QCoapMessagePrivate: make the d-tor virtual
To fix the AddressSanitizer error:

AddressSanitizer: new-delete-type-mismatch in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   104 bytes;
  size of the deallocated type: 80 bytes.

QCoapMessage stores an instance of QCoapMessagePrivate in a
QSharedDataPointer. There is also a QCoapRequest class, which is
derived from QCoapMessage, and a QCoapRequestPrivate, which is derived
from QCoapMessagePrivate.
The QCoapRequest constructor creates an instance of QCoapRequestPrivate
and stores it in base class' d_ptr (which is
QSharedDataPointer<QCoapMessagePrivate>). This leads to an error shown
above.
Fix it by making QCoapMessagePrivate's d-tor virtual.

This revealed another issue - the non-const d_func() calls on
QCoapMessage were always calling QCoapMessagePrivate's copy c-tor,
which is incorrect if the d_ptr stores a QCoapRequestPrivate instance.
Fix it by introducing a virtual QCoapMessagePrivate::clone() function,
implementing it for both classes in the hierarchy, and providing a
specialization for QSharedDataPointer<QCoapMessagePrivate>, which uses
the clone() method.
This way we ensure that the detach goes via a virtual method, not via
a copy constructor.
Also make the copy constructors protected, to prevent future bugs.

Pick-to: 6.6 6.5 6.2
Change-Id: I865b8ce4733500120c12ac562a97e08b11c01c4c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-13 15:17:56 +00:00
Friedemann Kleint 2db1f76335 Remove remains of qmake conversion from CMakeLists.txt files
Pick-to: 6.5
Change-Id: I50610fc5d680151b0092adb128f8a604125792d5
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2023-02-10 08:45:31 +01:00
Marc Mutz a01b9dfc24 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I0483bd72018332f9a1d7c60537228ea6c85f7029
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-06 17:43:41 +02:00
Marc Mutz be8150867f Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: I227e49052f5f1a2a8abfc719112facb5c805d463
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-06 17:43:37 +02:00
Friedemann Kleint 4edcf10406 Documentation: Use https link
Pick-to: 6.4 6.3 6.2
Change-Id: I9eabce51a3280cc2f7ceb255fc442e0d6d897c3a
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
2022-09-16 10:31:23 +02:00
Lucie Gérard 96b4684826 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I9f2589d36e91c60df09242b1262cc660bde7537a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 20:52:15 +02:00
Kai Köhne d05d22bc98 Remove Cpp.ignoretokens from .qdocconf
qdoc's new clang backend does not use Cpp.ignoretokens anymore.

Task-number: QTBUG-104903
Change-Id: I120c231d476c0645917593fe8acbe6efcc1f6907
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-08-22 15:37:28 +02:00
Kai Köhne 490d96e704 Doc: Document protected variable as internal
Fixes
  qt5/qtcoap/src/coap/qcoapmessage.h:64: (qdoc) warning: No documentation for 'QCoapMessage::d_ptr'

Task-number: QTBUG-105091
Change-Id: I848f83938cce3af9ef32c2e66083236c1c64ea97
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-07-22 09:06:33 +00:00
Lucie Gérard f3f41251da 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: I53217bc6cf8a044937785533ec42ce22d6720a49
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-07 17:38:56 +02:00
Lucie Gérard 283f4b3373 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: I2f390c365ce2d50aa79d317eafd63be19e530c1e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-15 11:29:34 +02:00
Marc Mutz 0fcd1a12db QtCoap: replace qSwap with member-swap where possible
qSwap() is a monster that looks for ADL overloads of swap() and also
detects the noexcept of the wrapped swap() function, so it should only
be used when the argument type is unknown. In the vast majority of
cases, the type is known to be efficiently std::swap()able or to have
a member-swap. Call either of these.

Task-number: QTBUG-97601
Pick-to: 6.3 6.2 5.15
Change-Id: Icaed67ff42bc148cb70e42d3377dea6b7eed908e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-11 18:25:04 +02:00
Thiago Macieira 29c54684f8 Make sure all private headers include at least one other
See script in qtbase/util/includeprivate for the rules.

Since these files are being touched anyway, I also ran the
updatecopyright.pl script too.

Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-03-08 08:04:51 -08:00
Kai Köhne 8aeb608ea8 Doc: Remove navigation.homepage setting
This seems to be a leftover. It will now default to index.html
(as set in qtbase).

Pick-to: 6.3
Change-Id: Ica9ded9eddbf3f973a5eb4058e59ff22ae8e3f28
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-02-14 09:17:42 +01:00
Sona Kurazyan b396a95ea8 QtCoap documentation cleanup
- Updated the overview documentation with details on how to link against
QtCoap with CMake
- Added \qtcmakepackage command, to include CMake instructions in
class/namespace docs
- Removed the note about the module being part of Qt for Automation
- Fixed an error in the license information

Fixes: QTBUG-99991
Pick-to: 6.3 6.2
Change-Id: Ie6f3f8cd5f797a5dc6702750eb6e1f12e10bdaf8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-01-27 17:57:09 +01:00
Assam Boudjelthia 64f4b16335 Fix warnings on Android with developer-build
The d-pointer is not used in that scope.

Pick-to: 6.2
Task-number: QTBUG-91163
Change-Id: I8bdf97bafdc9cb66992f3a3cff1d58d4df922287
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-10-04 12:11:34 +00:00
Alexey Edelev e7056928b6 Migrate to autogenerated cpp exports
Replace the hardcoded cpp exports with a generated one where it's
applicable.

Task-number: QTBUG-90492
Change-Id: I6218c27fcc34adf8ddcff255bbc9ad8b30c23ad4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Adrien Leravat <aleravat@witekio.com>
2021-09-13 20:45:36 +02:00
Luca Di Sera 3454d3e734 Doc: Repairs broken \externalpage URLs and update redirected ones
`src/coap/doc/src/external-resources.qdoc` defines a series of
`\externalpage` resources to some RFCs.

The links to `https://tools.ietf.org/search/*` resolve to an `Object
not found!` page.

To avoid the problem, they were replaced with an equivalent link on
the `datatracker.ietf.org` domain, which is one of the official ways
of reading published RFCs as per the IETF website.

The `tools.ietf.org/html/*` web pages containing RFCs now redirect
to `datatracker.ietf.org/doc/html/*`.

While the redirection work, our script to catch broken links on
dev-snapshots builds of the documentation doesn't handle redirection
correctly, reporting it as broken.

To appease the broken-links script, to avoid an unneccesary and to be
consistent in the domain that is linked to by the other pages, the
relevant `\externalpage` link were modified to point to the new domain.

Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: Idcaed482b1d54eefe33cb157fca425b2abd47962
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-09-13 15:37:08 +02:00
Kai Köhne 465c14ab36 Doc: Remove unsupported customFilters
customFilters defined in .qdocconf are not supported anymore by Qt
Assistant since Qt 5.13. Therefore remove them from all .qdocconf files,
also to avoid cargo-culting them to new help modules.

Task-number: QTBUG-95987
Change-Id: Iee20206a76c5f12866a30011a2f0023914b64e50
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-09-03 11:55:58 +00:00
Sona Kurazyan e40563354f Remove the trailing token from empty acknowledgment packets
When sending Acknowledgment packets with code 0.00, the message should
be empty (RFC-7252 section 12.1). An empty message should have no token
(token length is 0), and no bytes should appear after the message ID
(RFC-7252 section 4.1, section 3). Since Reset packets have the same
structure (only the packet type differs), unified the packet creation
for both cases in one method.

Fixes: QTBUG-94763
Pick-to: 6.2 6.1 5.15
Change-Id: If2619ad6f4f5dba500e04ab10dbbbf08e4887aef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-06-30 16:55:22 +02:00
Joerg Bornemann ca7557335b 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: I034cce0921b65bf635c1d16a408bbd7141efe4a0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-25 15:33:49 +02:00