summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.h
Commit message (Collapse)AuthorAgeFilesLines
* Basic Vulkan enablersLaszlo Agocs2017-03-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | For Android, Windows and xcb. Verified on Win10 with NVIDIA, Win10 with AMD, Android with Tegra K1, Android aarch64 with Tegra X1, and Linux aarch64 with Tegra X1 (Jetson TX1, L4T). Introduce QPA-based Vulkan library loader, core function resolver, and instance creation support. In addition to creating a new VkInstance, adopting an existing one from an external engine is supported as well. The WSI specifics are hidden in the platform plugins. Vulkan-capable windows use the new surface type VulkanSurface and are associated with a QVulkanInstance. On Windows VULKAN_SDK is picked up automatically so finding vulkan.h needs no additional manual steps once the LunarG SDK is installed. [ChangeLog][QtGui] Added support for rendering to QWindow via the Vulkan graphics API. Task-number: QTBUG-55981 Change-Id: I50fa92d313fa440e0cc73939c6d7510ca317fbc9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* XCB: Use member initializationFriedemann Kleint2017-01-271-1/+1
| | | | | | | Shorten or remove constructors accordingly. Change-Id: I9c8bcf512c922c3c72be8a965d9557589bc9874f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-011-12/+12
| | | | | | | | We can use 'override' directly since Qt 5.7. Also remove redundant 'virtual' keywords. Change-Id: Ia40be0e1e60e51f9d043ab575fd6b9305ea620b0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* remove stray dbus/-menu dependency from xcb pluginOswald Buddenhagen2016-10-041-1/+0
| | | | | | | amends 26a05fc09 (which in turn was a cleanup of 38abd6537). Change-Id: I6159a3cfe468db048faf1c396143dd3869f7e72b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* xcb: Remove unused NoFontHinting hintAlexander Volkov2016-09-121-1/+0
| | | | | | | | It is unused since 0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8 (Turn off font hinting when active highdpi scaling). Change-Id: I901407bedf24ae301acbe6afa94bc0a4cadb0620 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QXcbNativeIntegration: Add query for compositing enabledGabriel de Dietrich2016-03-041-1/+2
| | | | | | | Task-number: QTBUG-41195 Change-Id: I4f37c82f6757283ed58b38c7fd47849fb4810bce Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-1/+0
| | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* Make native cursor handles accessible.Friedemann Kleint2015-12-141-0/+3
| | | | | | | | | | Add QWindowsNativeInterface::nativeResourceForCursor() and implement for Windows (returning the HCURSOR) and XCB (returning the xcb_cursor). Task-number: QTBUG-49386 Change-Id: I963869f6e8741449822ecbe6489f9c42a786c7a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-03-161-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbnativeinterface.h Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
| * xcb: Add support for obtaining default xcb connectionJan Kundrát2015-03-121-0/+1
| | | | | | | | | | | | | | This is needed by qtx11extras now that we can meet a nullptr QScreen. Change-Id: I755523cbbbbe188f454bd518d2d86a981542458f Reviewed-by: Richard J. Moore <rich@kde.org>
* | A11y: query a11y bus address from X displayFrederik Gladhorn2015-03-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to get the accessibility bus address from the X display, to match libatspi's behavior. This allows the accessibility bus to be found when an application is running as root. [ChangeLog][QtGui] Linux accessibility (using XCB) will now works for applications launched as root Done-with: Mike Gorse Change-Id: I49a263571b328cbd1fd90cb7f5cb40919d2a4951 Task-number: QTBUG-43674 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Move the systemTrayVisualHasAlphaChannel to the QXcbSystemTrayTrackerJørgen Lind2015-02-251-1/+0
| | | | | | | | | | | | | | | | also expose it through the QXcbScreenFunctions platform header and use it in the qsystemtrayicon_x11.cpp. This gives us static typechecking. Change-Id: Ia9e2e2563ed5994be0b19d7bcf5a6aca92b1b760 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb: Expose the systemtray functions through platformheadersJørgen Lind2015-02-231-1/+1
|/ | | | | Change-Id: I3504141d8130bbfe3246d81b61c8cbb010e255d6 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: remove stray QDBusMenuConnection in QXcbNativeInterfaceShawn Rutledge2015-02-201-1/+0
| | | | | | | | | It was unintentionally left in from an earlier version of 38abd653774aa0b3c5cdfd9a8b78619605230726 Change-Id: I7b0b19ed313493562874642cae8865bb0783e366 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* xcb: QSystemTrayIcon: grab background pixmap for compositing only onceShawn Rutledge2015-02-121-1/+0
| | | | | | | | | | | | | | | Followup to 2203d9d93e24e00d6e9bc9bda0e65a0c7f9923cc: clearRegion takes a little time, so doing grabWindow() too soon afterwards can result in grabbing a pixmap with undesired leftovers. And doing it every time we render the icon causes flicker. So, do clearRegion() ASAP when showing the icon, wait for it to happen, then grabWindow() only the first time we render, and reuse the resulting pixmap for all future calls to paintEvent(). (The downside is, if there is any corruption during the first grabWindow(), it's going to stay there as long as the app is running.) Task-number: QTBUG-35658 Change-Id: If881ab192dba43758dcbb0d080663ff42057fa4f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possibleShawn Rutledge2015-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | Implementing org.kde.StatusNotifier DBus interface http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ as well as org.canonical.dbusmenu for the limited purpose of showing the tray icon's context menu. If a desktop environment (such as KDE or Unity) has a StatusNotifierWatcher listening, then tray icon information is sent to be displayed by the tray implementation instead of being rendered directly in an XEmbed window. This is necessary because some modern tray implementations no longer provide XEmbed "hosting". [ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus protocol when the desktop environment supports it Task-number: QTBUG-31762 Done-with: Marco Martin <mart@kde.org> Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Turn off font hinting when we do high DPI scalingPaul Olav Tvete2015-01-161-1/+2
| | | | | | | | | | | | | | | | | | Font hinting depends on the specific pixel size, and ends up very wrong when the painter is scaled. Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455 Task-number: QTBUG-43809 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add some missing nativeResourceForIntegration imlementationsJørgen Lind2014-12-221-0/+1
| | | | | | | | | | | | | | | | The EglDisplay and the Display is normally a PlatformIntegration wide resource Change-Id: Ie5382a2a0b34fbe1c506b5134bf581afbd7f5d99 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Make GLX and EGL dynamic dependencies for xcbJørgen Lind2014-12-201-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA][Xcb] GLX and EGL code paths are now dynamically resolved, making it possible for one build of a plugin to use both code paths. Default is to use the GLX code path if available. This can be overwritten by specifying QT_XCB_GL_INTEGRATION=xcb_egl as an evnironment variable. Enable qt.xcb.glintegration.debug to get debug log output of what integration is used Change-Id: Ia9fa95fcca3d901b91dadb8c98a695fea0ae3b1e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Fix transparent tray backgrounds with 24bpp tray visualsUli Schlachter2014-12-091-0/+1
|/ | | | | | | | | | | | | | | | | | | Commit 0eefa785a0d8 ported Qt4's method of indirectly drawing the tray icon's background to Qt5. This commit makes it work a bit better. When drawing the tray's background, we use a ClearArea request to make the X11 server fill the tray icon with its background. Then we grab that background from the server and paint the icon on top of it. So this is pretty much pseudo-transparency at work. One small ingredient that was missing before is the BackgroundPixmap of the tray icon. If this attribute is set to ParentRelative, then our tray icon inherits the background of its parent window. That way the ClearArea will actually produce the expected background. Task-number: QTBUG-35832 Change-Id: I63fc4609064d8f858ca9e5cc290409a298b918b7 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* Support antialias and rgba Xft settings as used by GNOME and UNITYAllan Sandfeld Jensen2014-08-181-1/+3
| | | | | | | | | We only parsed the hintstyle from the Xft settings. This patch adds parsing for also subpixel style and disabling antialiasing. Task-number: QTBUG-27106 Change-Id: Icdb88ccc10e50d76eb30a5b126bee7590e257022 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add support for querying "eglconfig" through the xcb native interfaceAndras Becsi2014-07-101-0/+2
| | | | | | | | We already support this for eglfs but for a desktop Qt configured with -opengl es2 we need to expose it through xcb as well. Change-Id: I36d0e255d8c86cc1cec56015f33470f61d7df466 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add support for querying "glxconfig" from native interfaceAndras Becsi2014-07-071-0/+2
| | | | | | | | | This makes it possible to retrieve the GLXFBConfig used by Qt to create the GLXContext. QtWebEngine on desktop needs this so that Chromium can use the same config as Qt to eliminate BadMatch errors. Change-Id: If18c0937b5af3e457ddbfda035e5d652230211c6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Support transparency in qt5 system tray icons, regardless of tray visualLeo Franchi2014-07-041-0/+7
| | | | | | | | | | | | | | | | This ports the Qt4 method of supporting the system tray window visual that has an alpha channel as well as ones that do not. We detect whether or not we have a 32-bit format and either use a Qt::transparent background, or call xcb_clear_region before painting the icon. [ChangeLog][Linux/XCB] Fix transparency of tray icons in cases where there is no alpha channel or system tray visual. Task-number: QTBUG-35832 Change-Id: I43d500c39846d2916dd39f8c47c8d85e59b49cae Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Use QtPlatformHeaders to set platform specific functionalityJorgen Lind2014-05-091-0/+2
| | | | | | | | | | | This involves exposing a new function in the QPlatformNativeInterface which gets a public function for QGuiApplication Proof of concept is done through implementing _NET_WM_WINDOW_TYPE setters for xcb Change-Id: Ic9544e775fb71cc9b30273595ec41b1cdb1c9d64 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add missing Q_DECL_OVERRIDEDavid Faure2014-04-051-4/+4
| | | | | Change-Id: Iffa196043d345d0b839a45635c0500d1abc3199c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Add function for setting the startup ID for the next window that will be shown.David Faure2014-04-051-0/+2
| | | | | | | | | This is useful for applications being requested to show a second window (e.g. via DBus) Change-Id: I04add2aa82dce63e854ba0f1c020274ed586bf1f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Export rootWindow to the QXcbNativeInterfaceMartin Gräßlin2014-03-081-1/+3
| | | | | | | | | | | | | | | | This change exports the root window to the native interface as there is QX11Info::appRootWindow which so far goes over the QDesktopWidget to get the window id of the root window. Which is a rather hackish way considering that the root window is known to the QXcbConnection. But even more it's a very fragile way and can result in crashes on startup of applications if the application accesses the appRootWindow too early. Change-Id: Ibb09a7fa714cb355f579298fc6df33bf80f73f58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Remove stale xcb_dri2 code in QXcbNativeInterfaceJorgen Lind2013-11-281-2/+0
| | | | | Change-Id: Ifc8dc8d84fc60b70f8a49282dfe32cd248bef9ba Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Export x11 screen of the QXcbConnection to the native interfaceMartin Gräßlin2013-09-171-1/+3
| | | | | | | | | | | With XCB a client cannot retrieve the information on which X screen it is running. This information is only available when opening the xcb connection. As this is done by Qt no application is able to retrieve this information. By exporting the x11 screen we can provide this information again in QtX11Extras. Change-Id: I50f1d3e803dc7e3afac0e5c7f1648ccda4502e7c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Export getTimestamp to the native interfaceMartin Gräßlin2013-08-071-1/+3
| | | | | | | | | | | | The functionality to get the current x11 timestamp is also needed by applications which need to interact with the X11 directly. With XCB it is not possible to inspect the event queue and by that an application is not able to retrieve the current timestamp using the property change pattern and waiting for the matching event. Change-Id: Ie7ba78ecbe509ed3a902c702266917f65bf5ad07 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Move the X11 system tray code from widgets into XCB-plugin.Friedemann Kleint2013-07-301-1/+10
| | | | | | | | | | | | | | | | | | - Add system tray tracker class to XCB plugin and provide functionality via invokable slots of the native interface. - Remove XLib-dependency of widgets/utils. - Reintroduce tracking of tray window destruction and recreation, which was removed in the XLib-code when porting it from Qt 4 to Qt 5. This paves the way for implementing the tray icon completely in terms of QPlatformSystemTrayIcon at some point later. Change-Id: Ia04268b0e2919c05874a3e9548930535332897c7 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Implement startup notification spec again.David Faure2013-04-231-1/+4
| | | | | | | | | | | | | | | | | This functionality was in Qt4's qapplication_x11.cpp and was missing from the XCB QPA plugin. Ported the code from xlib to xcb. This code was actually tested (with plasma), unlike the Qt-4.8 code which skipped every other character... for (uint i = 0; i < 20 && i + sent <= length; i++) xevent.xclient.data.b[i] = message[i + sent++]; Provide a QPA native-function for accessing the startup id, for cases where an application doesn't show a window, but starts another app instead, or asks a running app to show the window on its behalf. Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a Reviewed-by: David Faure (KDE) <faure@kde.org>
* Read correct font hinting config on Gnome/UnityEskil Abrahamsen Blomfeldt2013-04-221-1/+2
| | | | | | | | | | | | | Fixes regression against Qt 4. This tries to recreate the logic from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we on Gnome would override the default hint style specified in FontConfig with Xft.hintstyle settings. This is the configuration used for changing the hint style in the Gnome Tweak Tool. Task-number: QTBUG-29582 Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Implement QApplication::beep().Friedemann Kleint2013-04-191-0/+3
| | | | | | | | | | Invoke slot "beep" on QPlatformNativeInterface. Implement for Windows and X11. Task-number: QTBUG-30416 Change-Id: I2be651165b899e5147818a012001d354827bb090 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* XCB: add support for getting and setting appTime and appUserTime.David Faure2012-12-141-1/+10
| | | | | | | | | | | | The QX11Info class needs this. This required adding the missing nativeResourceFunctionForScreen in QPlatformNativeInterface. Change-Id: I2c6e91c7f122f3ecdf769a177deafd2aa3896e2f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QSystemTrayIcon/X11: Use display obtained as native screen resource.Friedemann Kleint2012-11-191-0/+1
| | | | | | | | | | Previously, the screen name was used, which contained the display name. This was changed to return the xrandr-name. Task-number: QTBUG-5416 Change-Id: I560143d6d459a8051c9640079cf7d39a3caebfec Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add glxContextForContext function to QXcbNativeInterface.Zeno Albisser2012-10-261-1/+3
| | | | | | | | | | | This change enables receiving the native GLXContext object that is used by a QOpenGLContext in case of GLX. This clearly is non-public api that is only meant to be used as a last resort for cases where it is really necessary to get hold of a native context object. Change-Id: I7f1f974f18063ed334b8034a0c0192c875c10cec Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Provide public API for native event filtering, moved up from QPA.David Faure2012-07-201-8/+0
| | | | | | | | | | | | | | | | | | The previous API was hard to use (global function, no type safety, manual chaining), and confusing (app vs dispatcher split only made sense on Windows). Installing and removing out of order would have the risk of setting back a dangling pointer (crash). Meanwhile QPA added type safety, and this new API models the QObject::installEventFilter API for ease of use. The virtual method is in a new interface, QAbstractNativeEventFilter. QPA was even calling the dispatcher event filter with QPA-private event classes, which made no sense (refactoring leftover from when the code was in the dispatcher). Now the QPA plugins trigger the qcoreapp event filters with the actual native events directly. Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Implement nativeResourceFunctionForContext for xcbJorgen Lind2012-07-061-2/+3
| | | | | Change-Id: Icf6c39fb456b39fec58ac2f74c569b9d01993589 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* XCB: Implement native events for for windows.Friedemann Kleint2012-03-101-0/+2
| | | | | Change-Id: Iacea1231b49ebe57da96f4012d3f314e1b037105 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* XCB: Introduce enumeration for event filter types.Friedemann Kleint2012-01-231-2/+9
| | | | | | | | Remove QByteArray-construction and hash lookup in the event handling; use an enumeration indexing an array instead. Change-Id: I4d272b32a5ff71c8da58197cf3a0b38c1e61d489 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>