summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbxsettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* xcb: build fix when XCB_USE_XLIB is not defined.Tomasz Olszak2015-01-111-0/+8
| | | | | | | | | | | When XCB_USE_XLIB was not defined QXcbXSettings still used XIproto.h. This change removes XIProto.h dependency and leaves QXcbXSettings uninitialized when XCB_USE_XLIB is not defined. QXcbXSettings::initialize() is already used in other parts of code e.g. qxcbcursor.cpp. Change-Id: I48eb82e39c5c091b41e8ec19e742a21d41de2610 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Prevent a leak of QXcbXSettingsPrivateGiuseppe D'Angelo2014-11-031-0/+6
| | | | | | | | | | The private was not deleted. Adding the dtor in turn causes a warning about not having a virtual dtor in the base class, so add that as well. Change-Id: I24a90caf2cf6192a6f17cf5af96b8f77010d9127 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* [xcb/xsettings] Byte order byte is at address 0Egbert Eich2014-04-071-1/+1
| | | | | | | | | | Accoring to http://standards.freedesktop.org\ /xsettings-spec/xsettings-spec-0.5.html the byte order byte is address 0 (not 1). Change-Id: I441084a7f24908dd8a504648bfc50ba2d486a586 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* [xcb/xsettings] Add support for byte swappingEgbert Eich2014-04-031-11/+32
| | | | | | | | | | | | | | | | | | | The XSettings protocol is not endian neutral. Instead it holds information about endianness in the first byte. It uses the same convention as X11/X.h does. So far byte order handling was missing leading to nasty crashes when byte order between clients setting and reading XSettings differed. This patch fixes this. Using the X11/X.h conventions seems to be an 'established standard', this piece is missing from the Xsettings specifications. Therefore this fix may introduce spurious regressions as other Xsettings 'providers' may use a different convention. To detect this and to avoid crashes the fix also adds checks to avoid reading past the end of the of the Xsettings data blob. If problems are encountered: warn and bail. Change-Id: If8acb23cca2478369633129af2d99e122a84cede Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Silence failed xcbxsettings initializationJorgen Lind2014-01-231-2/+9
| | | | | | | | also add a boolean flag indicating if xsettings is initialized and can be used Change-Id: I9dae83b8fef224171744d2b940767cbf54ce4f55 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Remove useless code setting but not using variablesThiago Macieira2013-09-171-3/+0
| | | | | | | | | | | | Clang 3.3 found a variable assigned to itself, probably to cause GCC to shut up about a variable set-but-unused. So simply stop assigning the value at all to this variable. qxcbxsettings.cpp:155:16: error: explicitly assigning a variable of type 'uint' (aka 'unsigned int') to itself [-Werror,-Wself-assign] Change-Id: I74ae8f724e87c1b3f6b9d358e13d6a440ff4a3e1 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* xcb: Fix minor leaks in XSettings codeUli Schlachter2013-07-251-1/+3
| | | | | | | | | | | If some of the X11 requests fail, QXcbXSettings::QXcbXSettings() prints a warning and returns. These error paths all caused memory leaks. Change-Id: Idfecf03dd412c35552c3bbbebdda9c039aeadc13 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix for when we don't have XSettingsJørgen Lind2013-06-071-4/+18
| | | | | | | | | Task-number: QTBUG-31418 Task-number: QTBUG-31410 Task-number: QTBUG-31446 Change-Id: I3fbed40054f3e0720b50ada0dc4ad0ae4cb0412e Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Introduce QXcbXSettingsJørgen Lind2013-05-201-0/+280
This allows you to easily retrieve properties in the XSETTINGS specification. It is also possible to add listeners to get notified when a specific property changes. XSETTINGS is lazy initialized, so it will not be instansiated before someone uses it. For now the intended use is a fallback for finding cursor theme Change-Id: Id47f0613f5876424cd47d721b40da17d3f63429e Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>