Commit Graph

739 Commits

Author SHA1 Message Date
Qt Submodule Update Bot 259ea67873 Update dependencies on 'dev' in qt/qtcoap
Change-Id: I1559f983167a8e398500274b9e2e6dc9cdc51347
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-08-07 14:52:14 +00:00
Marc Mutz 9029d76d9f Mark the module free of Q_FOREACH ... again
This restores the QT_NO_FOREACH macro originally added in
1725346233 and then lost in the cmake
port.

Luckily, no new uses have crept in in the meantime.

Change-Id: Ic874d95763c0271e606420dba1df147cdedd42ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-04 15:03:00 +02:00
Qt Submodule Update Bot abaea89b1d Update dependencies on 'dev' in qt/qtcoap
Change-Id: Ie64a09a83098ae315070bf25f5ef49c237535913
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-08-03 12:23:22 +00:00
Qt Submodule Update Bot 8fe1e74809 Update dependencies on 'dev' in qt/qtcoap
Change-Id: I51ac03873f620cdb76289477b442495613bce24a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-08-01 06:34:16 +00:00
Qt Submodule Update Bot 2218df5173 Update dependencies on 'dev' in qt/qtcoap
Change-Id: I3b71af351412ee15e28073b165ea87ef5f392305
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-07-28 12:14:47 +00:00
Alexey Edelev 9092794ae4 Remove deprecated sync.profile
Task-number: QTBUG-112418
Change-Id: I2d679cb854a4b1b5f829d8c4628a6406cd9508a5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-26 12:35:53 +00:00
Qt Submodule Update Bot aa4e99993e Update dependencies on 'dev' in qt/qtcoap
Change-Id: I5f8006cf9caa60e3f582b1f949892edf7e00a9b7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-07-26 05:53:53 +00:00
Ivan Solovev 6ffcaefbe1 Update tests and docker scripts to reflect the provisioning updates
The californium docker container is updated, and now provides a
different binary to run.

This patch adjusts the tests and docker script:
* update the docker script to call the proper binary
* update the number of resources exposed by the californium server
* update the expected returned tokens to be uppercase

Task-number: QTBUG-114798
Pick-to: 6.6 6.5
Change-Id: I733793cc472769e433144a08b8f02f0120f6f29b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
2023-07-25 12:16:31 +02:00
Ivan Solovev e90b39053b Examples: update docker-related commands
The docker containers were moved to the 'tqtc' account on docker hub,
Some of them were also updated to fix SSL-related errors.
This patch updates the example documentation to refer to proper docker
containers.

Task-number: QTBUG-114798
Pick-to: 6.6 6.5
Change-Id: Ib02a33eb6281156350400eb6538c371fb1e2157c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2023-07-21 12:06:10 +02: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
Alexandru Croitor 1bea3e0d88 CMake: Make qtcoap tests standalone projects
Add the boilerplate standalone test prelude to each test, so that they
can be opened with an IDE without the qt-cmake-standalone-test script,
but directly with qt-cmake or cmake.

Boilerplate was added using the following scripts:
https://git.qt.io/alcroito/cmake_refactor

Manual adjustments were made where the code was inserted in the wrong
location.

Task-number: QTBUG-93020
Change-Id: Idc25fe2da6e4d6dbefa9fc669401e127beec2ae4
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-07-12 18:23:38 +02:00
Qt Submodule Update Bot c9ac4d891e Update dependencies on 'dev' in qt/qtcoap
Change-Id: I51c9a32dab23dd96eff44564a55c7ab68e28bba8
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-07-06 12:23:38 +00:00
Qt Submodule Update Bot ef16bcae1a Update dependencies on 'dev' in qt/qtcoap
Change-Id: Ie312f1459c9e70d0845444498d8577c9cde08379
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-07-03 13:52:53 +00:00
Qt Submodule Update Bot 41a7f0159c Update dependencies on 'dev' in qt/qtcoap
Change-Id: Ic90ab6a9ffc73fdeb3802875347482085a01c92c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-06-29 07:25:26 +00:00
Ivan Solovev e7cda476e7 Secure CoAP Client: update 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 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: Iec125357001d950efe61b1ec0755d2feaba6b80f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-06-22 10:58:48 +02:00
Ivan Solovev 967163e3d8 Secure CoAP Client: fix qmllint warnings
These were mostly unqualified access warnings, which were fixed by
explicitly specifying the id.
Also replace injection of a context propertly with setting the initial
properties for the engine. This allows to declare 'hostsModel' as a
required property in the Main.qml

Another common warning is M325 "Logical value does not depend
on actual values". It is fixed by explicitly casting
securityModelGroup.checkedButton to RadioButton.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ic334122892510b6bbd5e06ac9d00d99893b7e46c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-06-22 10:58:45 +02:00
Ivan Solovev 313426f097 Secure CoAP Client: use tr() and qsTr() for user-facing strings
Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I242b7d1eba5e9eb01b5644ff502a9317c96848f5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-22 10:58:41 +02:00
Ivan Solovev 804db9abdc Secure CoAP Client: do not set organization name
"Qt CoAP Example" does not seem to be a good organization name. And
the example does not use it anyhow. So just remove this call.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I07b236e06ee9ee6046de3d3c19f24501f84b6675
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-22 10:58:38 +02:00
Ivan Solovev bf3831bc63 Secure CoAP Client: do not set Qt::AA_EnableHighDpiScaling attribute
It's deprecated and has no effect in Qt 6, as High-DPI is always
enabled. The following warning is generated when using it:

 warning: ‘Qt::AA_EnableHighDpiScaling’ is deprecated: High-DPI
 scaling is always enabled. This attribute no longer has any
 effect. [-Wdeprecated-declarations]

Remove this line to get rid of a warning.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Idfdc7715e5c80138fe477a374abf9cf02f91d040
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-22 10:58:34 +02:00
Ivan Solovev ab6490be5e Secure CoAP Client: do not use Qt.labs.platform QML module
It was used for StandardPaths and FileDialog.
StandardPaths are now available in QtCore QML module, and FileDialog
is available in QtQuick.Dialogs.
So use those instead.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ie8efba5b792245dba56824bac88fcb8bbb565db6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-06-22 10:58:31 +02:00
Ivan Solovev 06a0f295be Secure CoAP Client: use modern C++ type registration in QML
... and also update build files to use QML modules

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I522c0c8785e85e99f94feedaa9954a232b677da6
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-06-22 10:58:27 +02:00
Ivan Solovev 53ab48cf42 Secure CoAP Client: clean-up build files
* Use qt_standard_project_setup() instead of manually enabling moc
  (CMake only)
* Use PRIVATE linking (CMake only)
* Do not use C++11 config - we're on C++17 now (qmake only)
* Remove the QT_DEPRECATED_WARNINGS definition - it has no effect since
  Qt 5.13 (both qmake and CMake)

This commit is a preparation for using qml modules

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Iad798bf7bc0471dc2bdf04b093547b7717d74e30
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-22 10:58:23 +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
Qt Submodule Update Bot c291841ff1 Update dependencies on 'dev' in qt/qtcoap
Change-Id: If4f444b4c2438ed877efbcdfa6512e93265a05f6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-06-21 13:21:43 +00:00
Ivan Solovev 9203d5378e CoAP Multicast Discovery example: fix resource delegate height
The height of the delegate which shows the discovered resources was
hardcoded to 60 px. It works fine until someone wants to increase the
default system font size, in which case the data will not fit into the
rectangle anymore.

Fix it by using the implicitHeight of the Column which actually
contains the data. As a drive-by - also add a bottom padding, to center
the content in the delegate rectangle.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I25349005d2edf236ff9e685d7cd8519e30625f97
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-21 10:31:42 +02:00
Ivan Solovev ccad38f304 CoAP Multicast Discovery example: allow to stop discovery and clear the discovered resources
Multicast discovery takes several minutes by default, and so far the
example did not provide any means to stop it.
Fix it by introducing a new 'isDiscovering' property which allows to
check the current state of the client from QML, and a new invokable
'stopDiscovery()' method, which aborts the current request.
While on it, also delete the finished replies explicitly by calling
deleteLater(). Previously the replies were deleted only when the
parent QmlCoapMulticastClient was destroyed.
On QML side, adjust the discoverButton logic, so that it can start or
stop the discovery, depending on the current state.

Also introduce a new button which allows to clear all the discovered
resources.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I7ec3bc2fd5fee1b3c589de74b00862ffb9d6983e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-21 10:31:38 +02:00
Ivan Solovev f2d50cef7e CoAP Multicast Discovery example: fix indentation
Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I26836329b70d40f23cab8c6a466e5faee8c2121d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-21 10:31:31 +02:00
Ivan Solovev 0b194ee336 CoAP Multicast Discovery example: fix range-for loop
Take the objects by const reference, not by value

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Id81181292b37aff269316967d3db50dfb7cab0fe
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-21 10:31:27 +02:00
Ivan Solovev 2a882ddf58 CoAP Multicast Discovery example: fix qmllint warnings
The example had a bunch of unqualified access warnings.
Fix them by doing the following:
* use 'pragma ComponentBehavior: Bound' to limit the context of the
  delegates, and introduce required properties to pass needed data to
  them
* add some missing ids and explicitly use them when accessing the
  objects

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: If42661c3c8272f16edfa2d0e21466cf254062184
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-21 10:31:23 +02:00
Ivan Solovev 23956255e2 CoAP Multicast Discovery example: fix injection of parameters warnings
Fix the warnings like

 Parameter "resource" is not declared. Injection of parameters into
 signal handlers is deprecated. Use JavaScript functions with formal
 parameters instead.

by doing what is recommended.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ia936cdc620457c438ae1f8dd70f1ad120f46de67
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-21 10:31:16 +02:00
Ivan Solovev ebd40ab730 CoAP Multicast Discovery example: fix error handling
The CoapMulticastClient.onError handler was actually trying to handle
the base QCoapClient::error signal which is using a QCoapReply* as a
parameter. This type is not known to QML, so this produced a qmllint
warning.

Fix it by processing the QCoapClient::error() signal on the C++ side,
and converting it to the existing QmlCoapMulticastClient::finished()
signal with only one int parameter, because the QCoapReply is really
not needed for this example.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I5b41dd9d19f44d813051f4705521d0026ab55848
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-21 10:31:12 +02:00
Ivan Solovev 1eb537da53 CoAP Multicast Discovery example: do not set Qt::AA_EnableHighDpiScaling attribute
It's deprecated and has no effect in Qt 6, as High-DPI is always
enabled. The following warning is generated when using it:

 warning: ‘Qt::AA_EnableHighDpiScaling’ is deprecated: High-DPI
 scaling is always enabled. This attribute no longer has any
 effect. [-Wdeprecated-declarations]

Remove this line to get rid of a warning.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I9f8cdfade553c07ea60e31672f719ee29e6f9b1c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-21 10:31:08 +02:00
Ivan Solovev cb3d9c032c CoAP Multicast Discovery example: use modern C++ type registration in QML
... and also update build files to use QML modules

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I6dbbe05abc0ec345f923f5b2ff5c95cdacda234c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-06-21 10:31:05 +02:00
Ivan Solovev b6e7a5770a CoAP Multicast Discovery example: clean-up build files
* Use qt_standard_project_setup() instead of manually enabling moc and
  uic (CMake only)
* Use PRIVATE linking (CMake only)
* Do not use C++11 config - we're on C++17 now (qmake only)
* Remove the QT_DEPRECATED_WARNINGS definition - it has no effect since
  Qt 5.13 (both qmake and CMake)

This commit is a preparation for using qml modules

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I9bd07769514e26e54fd7ad5829dd6d0c1351be46
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-21 10:31:01 +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 868ce39b70 Simple CoAP Client: use tr() for user-facing strings
... and Qt::StringLiterals on string that do not require
translation.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ie31d997925f2efd627f2aac7cdc2b763f5cefca4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-20 09:59:34 +02:00
Ivan Solovev 707c565b23 Simple CoAP Client: split long lines
Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I67acb4381621972dc77cccaf1ab92ffebca12b37
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-06-20 09:59:30 +02: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
Qt Submodule Update Bot 225a32f91c Update dependencies on 'dev' in qt/qtcoap
Change-Id: Iaf73c8348b3fc489bde71bd50af9d30c79e297c6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-06-19 05:23:19 +00:00
Qt Submodule Update Bot e747df4e66 Update dependencies on 'dev' in qt/qtcoap
Change-Id: I7512f6a7e082f571ebac733fd07bf72864e41219
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-06-15 07:44:44 +00:00
Ivan Solovev 344623f906 Simple CoAP Client: update 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 container after usage
* Update the screenshot to reflect the changes in the UI, switch
  to webp format

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I1338d2d4d501bef8ef92b38f4cf2dc485acde989
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-06-13 17:18:25 +02:00
Ivan Solovev ff909fe2b9 Simple CoAP Client: use std::as_const() where necessary
... to prevent unintended detaching

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I29f30734c42341bae49949e80c07a948f576c9a3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-13 17:18:21 +02:00
Ivan Solovev 462c3efb57 Simple CoAP Client: remove toolbar from the main window
It's unused anyway, and just occupies some space.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Iea0897d822c1c1659857e98c49508e92fbbdd070
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-13 17:18:18 +02:00
Ivan Solovev 0d84cc88a0 Simple CoAP Client: remember options in options dialog
The options dialog is re-created every time we press the "Add Options"
button. As a result, it looses all the options that were set, even
if the message was not yet sent. This is inconvenient, as it does not
allow the user to append forgotten options, or simply to double-check
which options are used.

This patch passes the current options to the OptionDialog's c-tor, so
that the dialog opens with the list of the relevant options.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ia11754706884229b3971526e94c0f8470b5d89b2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-13 17:18:15 +02:00
Ivan Solovev e613acc676 Simple CoAP Client: extend options dialog
Add possibility to remove individual entries from the options table.
Also change the selection behavior of the table to allow selection of
individual rows only. This makes sense, because we do not allow to
change values in the already-added entries anyway, and row-selection
makes more sense when deleting entries.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ica56c697c79c758d473f647831afc793c7ca35b0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-13 17:18:11 +02:00
Ivan Solovev aebe258af6 Simple CoAP Client: fix lambda capture
Implicit 'this' capture is deprecated in C++20, so explicitly capture
'this' and 'url' instead of '=' capture.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: Ib11e42cf5255a75599e1fe8e5690f1f3915f35c3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-13 17:18:07 +02:00
Ivan Solovev 23f98b0bc4 Simple CoAP Client: optimize includes
Forward-declare classes, where possible, and add the missing includes
to the cpp file.

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I647f00c6f56aea13a4e3c1771beee7963537399c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-13 17:18:03 +02:00
Ivan Solovev ac07a9918d Simple CoAP Client: fix build files
* Use qt_standard_project_setup() instead of manually enabling moc and
  uic (CMake only)
* Use PRIVATE linking (CMake only)
* Do not use C++11 config - we're on C++17 now (qmake only)
* Remove the QT_DEPRECATED_WARNINGS definition - it has no effect since
  Qt 5.13 (both qmake and CMake)

Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I8d2eaf3edac289a49c2749fc2805aba94c77f522
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-13 17:17:59 +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
Jani Heikkinen e36dd0604a Bump version to 6.7.0
Change-Id: I7efceec446a54f5eb545b86a57eff3e39fa38622
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-06-13 05:54:45 +01:00