Clang 16 has the following build error. ../kdeconnect-9999/core/backends/bluetooth/bluetoothdevicelink.cpp:102:12: error: chosen constructor is explicit in copy-initialization return {}; // TODO Not sure what to do here. For LanDeviceLink we use the SSL connection's certificate, but we don't have that here ^~ /usr/include/qt5/QtNetwork/qsslcertificate.h:95:14: note: explicit constructor declared here explicit QSslCertificate(const QByteArray &data = QByteArray(), QSsl::EncodingFormat format = QSsl::Pem); ^ 1 error generated.
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/540
Git commit bbac0aa0852b14bc5cc9a1b8c3be0f55adda2428 by Ali Abdel-Qader. Committed on 06/05/2023 at 19:51. Pushed by albertvaka into branch 'master'. Use explicit constructor for QSslCertificate with value initialized argument Previously the BluetoothDeviceLink::certificate() method was returning a value initialized object which I believe default initializes the object. However, Clang throws a build error at this because QSslCertificate has explicit constructors. This change uses one of those constructors and uses value intialization to default construct/initialize the argument for it. It fixes the build and hopefully doesn't break anything since this is a TODO anyways! Signed-off-by: Ali Abdel-Qader <abdelqaderali@protonmail.com> M +1 -1 core/backends/bluetooth/bluetoothdevicelink.cpp https://invent.kde.org/network/kdeconnect-kde/commit/bbac0aa0852b14bc5cc9a1b8c3be0f55adda2428
Git commit 8687f8cfdaf689aea5fb2cdb8043c5c4d5a93658 by Andreas Sturmlechner, on behalf of Ali Abdel-Qader. Committed on 08/06/2023 at 07:16. Pushed by albertvaka into branch 'release/23.04'. Use explicit constructor for QSslCertificate with value initialized argument Previously the BluetoothDeviceLink::certificate() method was returning a value initialized object which I believe default initializes the object. However, Clang throws a build error at this because QSslCertificate has explicit constructors. This change uses one of those constructors and uses value intialization to default construct/initialize the argument for it. It fixes the build and hopefully doesn't break anything since this is a TODO anyways! Signed-off-by: Ali Abdel-Qader <abdelqaderali@protonmail.com> (cherry picked from commit bbac0aa0852b14bc5cc9a1b8c3be0f55adda2428) M +1 -1 core/backends/bluetooth/bluetoothdevicelink.cpp https://invent.kde.org/network/kdeconnect-kde/-/commit/8687f8cfdaf689aea5fb2cdb8043c5c4d5a93658