Marc Mutz 567da5e3e0 QDesktopUnixServices: don't leak the QDBusPendingCallWatcher
When, like in tst_QApplication::qtbug_103611(), a QApplication object
is destroyed without calling exec(), then QDesktopUnixServices leaked
its QDBusPendingCallWatcher, because the connection to the slot that
would deleteLater() the watcher was disconnected, and the watcher had
no QObject parent that would otherwise reap it.

Fix by actually deleting the watcher in ~QDesktopUnixServices(), if
it still exists (which implies disconnecting, of course).

This makes tst_QApplication asan-clean on Linux/X11 (was: "75466 bytes
leaked in 965 allocations").

Amends de609d84b9cee4a481d1718c00b09105d8c2ae69.

Pick-to: 6.9 6.8 6.5
Change-Id: I28a08abdb1be65a8746702ad304282de4e1100d7
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2025-03-28 06:56:15 +00:00
2025-03-24 19:01:57 +02:00
2024-11-05 14:36:16 +01:00
2024-11-05 14:36:16 +01:00
2024-12-13 14:54:23 +00:00
2025-03-24 23:19:04 +01:00
2024-06-25 11:44:00 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%