From 1e39b39ddb478719682948bed329e891b26d7bf6 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 18 Jun 2020 16:51:02 +0200 Subject: xcb: remove multi-connection code path This code was introduced in 2011 as an experimental feature and have been untested/unmaintained ever since. It's time to remove it for the following reasons: - It has never been documented in QGuiApplication under "Supported Command Line Options". The intended command line was: ./app -platform xcb:address:display - I am not aware of other toolkits that would provide this functionality - connecting to several X displays simultaneously. - XCB plugin respects the "-display" command line and DISPLAY envvar which should be sufficient. So the "workaround" to get your window on 2 X displays is: ./app -display :0 ./app -display :1 - There are no JIRA bugs where users would complain that this feature does not work. AFAICT it has not worked for years. Almost all functions care only about the "default" connection, and don't attempt to support multi-connection. - This will stop confusing people who want to contribute to the XCB plugin. [ChangeLog][Platform Specific Changes][X11] Connecting to multiple X servers simultaneously within the same application is no longer supported. Task-number: QTBUG-52408 Change-Id: I61ce23480702bb89b02c6028fa0986fe63481978 Reviewed-by: Volker Hilsheimer --- src/plugins/platforms/xcb/qxcbintegration.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbintegration.h') diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 571726c354..a67e79e0b8 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -102,8 +102,8 @@ public: QPlatformTheme *createPlatformTheme(const QString &name) const override; QVariant styleHint(StyleHint hint) const override; - bool hasDefaultConnection() const { return !m_connections.isEmpty(); } - QXcbConnection *defaultConnection() const { return m_connections.first(); } + bool hasConnection() const { return m_connection; } + QXcbConnection *connection() const { return m_connection; } QByteArray wmClass() const; @@ -124,7 +124,7 @@ public: static QXcbIntegration *instance() { return m_instance; } private: - QList m_connections; + QXcbConnection *m_connection = nullptr; QScopedPointer m_fontDatabase; QScopedPointer m_nativeInterface; -- cgit v1.2.3