summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-10-14 19:46:20 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2018-10-14 18:38:07 +0000
commita880780ff962dc31be24b508f811c1a2fd0b0f36 (patch)
tree18b4f892bc0daaa16177d3909b578a3a1ccbc5f6 /src/plugins/platforms/xcb/qxcbconnection.h
parent3af4b59e8b59c7b658c925e1f644d31b89e39896 (diff)
Revert "XCB: Do not create instance of QPlatformIntegration for invalid displays"
This reverts commit 67cc8fea106c35c7ca75bf476667d07b3bbf3257. I forgot about this patch and now it makes rebasing the local changes too time-consuming. Besides, 67cc8fea10 broke a build for -no-xcb-xlib. I will restore this patch, with adaptations to the new QXcb*Connection hierarchy. Task-number: QTBUG-68859 Change-Id: I938f32b5da22ce18f95d761f9b34e77fff923e24 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index db45031cf4..a97a1f1002 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -380,16 +380,9 @@ class Q_XCB_EXPORT QXcbConnection : public QObject
{
Q_OBJECT
public:
- explicit QXcbConnection(xcb_connection_t *c, int primaryScreenNumber,
- QXcbNativeInterface *nativeInterface, bool canGrabServer,
- xcb_visualid_t defaultVisualId, const QByteArray &displayName,
- void *xlibDisplay = nullptr);
-
+ QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName = 0);
~QXcbConnection();
- static QXcbConnection *create(QXcbNativeInterface *nativeInterface, bool canGrabServer,
- xcb_visualid_t defaultVisualId, const char *displayName = nullptr);
-
QXcbConnection *connection() const { return const_cast<QXcbConnection *>(this); }
bool isConnected() const;
@@ -648,21 +641,21 @@ private:
static bool xi2GetValuatorValueIfSet(const void *event, int valuatorNum, double *value);
#endif
- xcb_connection_t *const m_connection;
+ xcb_connection_t *m_connection = nullptr;
const xcb_setup_t *m_setup = nullptr;
const bool m_canGrabServer;
const xcb_visualid_t m_defaultVisualId;
QList<QXcbVirtualDesktop *> m_virtualDesktops;
QList<QXcbScreen *> m_screens;
- const int m_primaryScreenNumber;
+ int m_primaryScreenNumber = 0;
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];
xcb_timestamp_t m_time = XCB_CURRENT_TIME;
xcb_timestamp_t m_netWmUserTime = XCB_CURRENT_TIME;
- const QByteArray m_displayName;
+ QByteArray m_displayName;
QXcbKeyboard *m_keyboard = nullptr;
#ifndef QT_NO_CLIPBOARD
@@ -675,7 +668,7 @@ private:
QXcbNativeInterface *m_nativeInterface = nullptr;
#if QT_CONFIG(xcb_xlib)
- void *const m_xlib_display;
+ void *m_xlib_display = nullptr;
#endif
QXcbEventReader *m_reader = nullptr;