~ruther/guix-local

1d09799f48494bd0503742aec7653ab9ae054f81 — Zheng Junjie 8 months ago 33167cf
gnu: qtwebsockets: Update to 6.9.2.

* gnu/packages/qt.scm (qtwebsockets): Update to 6.9.2.
[source]: Use patch.
* gnu/packages/patches/qtwebsockets-6.9-fix-tst_QWebSocket.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I56c137c846787932af1032d360491edafa7e03f5
M gnu/local.mk => gnu/local.mk +1 -0
@@ 2218,6 2218,7 @@ dist_patch_DATA =						\
  %D%/packages/patches/qtwayland-dont-recreate-callbacks.patch	\
  %D%/packages/patches/qtwayland-cleanup-callbacks.patch	\
  %D%/packages/patches/qtwayland-update-wayland-xml.patch	\
  %D%/packages/patches/qtwebsockets-6.9-fix-tst_QWebSocket.patch\
  %D%/packages/patches/rabbitmq-defaults.patch		\
  %D%/packages/patches/ragel-char-signedness.patch		\
  %D%/packages/patches/randomjungle-disable-static-build.patch	\

A gnu/packages/patches/qtwebsockets-6.9-fix-tst_QWebSocket.patch => gnu/packages/patches/qtwebsockets-6.9-fix-tst_QWebSocket.patch +40 -0
@@ 0,0 1,40 @@
from https://codereview.qt-project.org/c/qt/qtwebsockets/+/639623

From 0c0f476150e501f311d054c67426b4d2304d2cbd Mon Sep 17 00:00:00 2001
From: Timur Pocheptsov <timur.pocheptsov@qt.io>
Date: Mon, 14 Apr 2025 14:22:51 +0200
Subject: [PATCH] QWebSocketPrivate: disconnect/reconnect from/to destroyed

QWebSocket connects to signals of its internal 'tcp socket', including
the 'destroyed' signal to handle destruction of the socket.
Then it disconnects from these signals at a few points, including when
creating a new socket, by using a wildcard disconnect.

Since a79d5b8d0856, a recent change in qtbase, disconnecting from
the 'destroyed' signal using a wildcard disconnect prints a warning.
Since this was our intended behavior we now disconnect it separately to
be explicit and to avoid the warning.

Fixes: QTBUG-135959
Change-Id: I5bd13b1635d504feace76d201fdb6db65454ddf2
Reviewed-by: Mate Barany <mate.barany@qt.io>
---

diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index a0ca7e0..b6a966d 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -717,8 +717,12 @@
  */
 void QWebSocketPrivate::releaseConnections(const QTcpSocket *pTcpSocket)
 {
-    if (Q_LIKELY(pTcpSocket))
+    if (Q_LIKELY(pTcpSocket)) {
+        // Explicitly disconnect this signal to avoid warning being printed about a destroyed-signal
+        // being disconnected with the wildcard disconnect below
+        disconnect(pTcpSocket, &QObject::destroyed, this, &QWebSocketPrivate::socketDestroyed);
         pTcpSocket->disconnect();
+    }
     m_dataProcessor->disconnect();
 }
 

M gnu/packages/qt.scm => gnu/packages/qt.scm +5 -2
@@ 1905,13 1905,16 @@ consume data received from the server, or both.")))
(define-public qtwebsockets
  (package
    (name "qtwebsockets")
    (version "6.8.2")
    (version "6.9.2")
    (source (origin
              (method url-fetch)
              (uri (qt-url name version))
              (sha256
               (base32
                "1glczsi3pgrhgb6v20pqm8invnfjb8415lcj74wwhiilp9igb7ci"))))
                "1vh82w96436pqrp4daf324mqs2zjvn51z78b3ksc5mnqgrk3z0xy"))
              (patches
               (search-patches
                "qtwebsockets-6.9-fix-tst_QWebSocket.patch"))))
    (build-system cmake-build-system)
    (arguments
     (list