summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix/qgenericunixservices_p.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-08-09 18:07:59 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-08-30 23:56:26 +0200
commitde609d84b9cee4a481d1718c00b09105d8c2ae69 (patch)
tree8307e80d993c67c31da85bcfe2eddfa74b1ae311 /src/gui/platform/unix/qgenericunixservices_p.h
parent751cbbd6b13d9899e31c19d9db80d1c64a72a8bd (diff)
QGenericUnixServices: properly disconnect signals in dtor
Since QGenericUnixServices does not derive from QObject, the connection to QDBusPendingCallWatcher made in the ctor might outlive the lifetime of QGenericUnixServices. Fix it by explicitly disconnecting it in the dtor. Fixes: QTBUG-125239 Pick-to: 6.8 6.7 6.5 Change-Id: I5fac4fd5831b2dde16b3d7b479a8ee616bfb7e3a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices_p.h')
-rw-r--r--src/gui/platform/unix/qgenericunixservices_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/platform/unix/qgenericunixservices_p.h b/src/gui/platform/unix/qgenericunixservices_p.h
index 56e15103f72..8bb49527793 100644
--- a/src/gui/platform/unix/qgenericunixservices_p.h
+++ b/src/gui/platform/unix/qgenericunixservices_p.h
@@ -27,6 +27,7 @@ class Q_GUI_EXPORT QGenericUnixServices : public QPlatformServices
{
public:
QGenericUnixServices();
+ ~QGenericUnixServices();
QByteArray desktopEnvironment() const override;
@@ -41,6 +42,9 @@ public:
private:
QString m_webBrowser;
QString m_documentLauncher;
+#if QT_CONFIG(dbus)
+ QMetaObject::Connection m_watcherConnection;
+#endif
bool m_hasScreenshotPortalWithColorPicking = false;
};