Fix a memory leak in QXcbConnection.
Change-Id: I2307bf434c53d9321c71609eeacc1f3883bbbb13 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
abe5a0a432
commit
2aba4e12ba
@ -162,7 +162,7 @@ QXcbConnection::QXcbConnection(const char *displayName)
|
||||
initializeXInput2();
|
||||
#endif
|
||||
|
||||
m_wmSupport = new QXcbWMSupport(this);
|
||||
m_wmSupport.reset(new QXcbWMSupport(this));
|
||||
m_keyboard = new QXcbKeyboard(this);
|
||||
m_clipboard = new QXcbClipboard(this);
|
||||
m_drag = new QXcbDrag(this);
|
||||
|
@ -305,7 +305,7 @@ public:
|
||||
QXcbClipboard *clipboard() const { return m_clipboard; }
|
||||
QXcbDrag *drag() const { return m_drag; }
|
||||
|
||||
QXcbWMSupport *wmSupport() const { return m_wmSupport; }
|
||||
QXcbWMSupport *wmSupport() const { return m_wmSupport.data(); }
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
void *xlib_display() const { return m_xlib_display; }
|
||||
@ -382,7 +382,7 @@ private:
|
||||
QXcbKeyboard *m_keyboard;
|
||||
QXcbClipboard *m_clipboard;
|
||||
QXcbDrag *m_drag;
|
||||
QXcbWMSupport *m_wmSupport;
|
||||
QScopedPointer<QXcbWMSupport> m_wmSupport;
|
||||
|
||||
#if defined(XCB_USE_XLIB)
|
||||
void *m_xlib_display;
|
||||
|
Loading…
Reference in New Issue
Block a user