summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa: Add autorelease pools.Morten Johan Sørvig2011-12-123-0/+9
| | | | | | | | | | | | | A couple of cases where we call Cococa APIs without having an autorelease pool in place surfaced after removing the global autorelease pool in 1a218a7. (This happens when when Qt API is called before app.exec() has started the Cocoa event loop.) Add local autorelease pools to prevent memory leaks. Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Windows-DnD: Fix cursors.Friedemann Kleint2011-12-122-8/+187
| | | | | | | Re-add pixmaps that were removed from QGuiApplication. Change-Id: I9936da115e494cf816116159419d40840176afd5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fix clipboard test.Friedemann Kleint2011-12-121-1/+4
| | | | | | | Return the QMimeData set on the Ole object if we own it. Change-Id: I08de0968e04a7356fed1255feb495f7b85e7a6f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Store the primary status in the touch point flags.Laszlo Agocs2011-12-125-11/+15
| | | | | | | | | | | | | | | | | For some reason the primary bit has previously been encoded in the touch point state, even though it has nothing to do with the regular states like Pressed, Released, etc. The value is now stored in the recently introduced flags member of the touch points. This also reduces the need for error-prone internal masking of the state value. The structure used by QWindowSystemInterface::handleTouchEvent also becomes cleaner because the primary status can now be set in the flags member and the isPrimary bool can be dropped. Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove event type parameter from handleTouchEvent.Laszlo Agocs2011-12-097-14/+12
| | | | | | | | | | | Requiring platform and generic plug-ins to pass TouchBegin, TouchUpdate, or TouchEnd is unnecessary. The type can be easily deduced from the touch point states. In fact handleTouchEvent already collected the combined point states, it was just not utilized until now. Change-Id: Icf3c787fefdebc51609a763bc4286c18a0b6aac2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Correctly reimplement QPlatformCursor::pos() in QCocoaCursorBradley T. Hughes2011-12-092-2/+2
| | | | | | | | QPlatformCursor::pos() is a const function, the reimplementation should be as well. Change-Id: I7e37e41086e3b329dc31ebc060fcb0915771d884 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Extend touch events.Laszlo Agocs2011-12-096-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability flags indicate which information is valid in the touch points. Previously there was no way to tell if e.g. the value returned by pressure() is actually the value provided by the driver/device or it is just something bogus due to pressure not being supported. The points' flags return information about the individual touch points. One use case is to differentiate between touches made by finger and pen. Velocity, if available, is now also exposed. Each touch point can now contain an additional list of "raw" positions. These points are not reported individually but are taken into account in some way by the underlying device and drivers to generate the final, "accurate" touch point. In case the underlying drivers expose these additional positions, they are made available in the lists returned by the touch points' rawScreenPosition(). The raw positions are only available in screen coordinates to prevent wasting time with mapping from global positions in applications that do not use this data. Instead, apps can query the QWindow to which the touch event was sent via QTouchEvent::window() and can call mapFromGlobal() manually if they need local raw positions. The capability and device type information is now held in a new QTouchDevice class. Each touch event will contain only a pointer to one of the global QTouchDevice instances. On top of type and capability, the new class also contains a name which can be used to differentiate between multiple touch input devices (i.e. to tell from which one a given QTouchEvent originates from). The introduction of QTouchDevice has three implications: The QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent need to be changed (to pass a QTouchDevice pointer instead of merely a device type value), and each platform or generic plug-in is now responsible for registering one or more devices using the new API QWindowSystemInterface::registerTouchDevice. Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Do not assert on invalid model index.Frederik Gladhorn2011-12-091-6/+2
| | | | | | | | No need to crash here, just warn. This will happen when asking a table for out of range indexes. Change-Id: Ida83604bd587390a3b54fbed68f98dab8038c757 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add support for three new X11 keysAlbert Astals Cid2011-12-092-0/+12
| | | | | | | | | New keys are: XF86XK_TouchpadToggle, XF86XK_TouchpadOn and XF86XK_TouchpadOff Change-Id: I51c0330213def093adf959d4065ee6d7c1f66d76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cocoa: remove autoreleasepool in QCocoaIntegrationMorten Johan Sorvig2011-12-082-4/+0
| | | | | | | | | | | | | This one was far to long lived and would delay releases until application shutdown. We might get more "no autoreleasepool in place" warnings now, these should be fixed by adding local auto release pools. Change-Id: Ia7a46ab05fb1937154997d0c47b8899d2a0cef65 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Create a class to contain accessibilty enums.Frederik Gladhorn2011-12-0813-319/+314
| | | | | | | | This is needed in order to expose the enums to qml. Do not inherit QAccessible. Change-Id: I220a0ea3add2d790e4fa6e93ce3deda762859e1a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Better handling of GLX / EGL errors.Samuel Rødal2011-12-073-5/+31
| | | | | | | | | | If context creation fails, try again without a shared context. Added QPlatformOpenGLContext::isSharing() and QPlatformOpenGLContext::isValid() to propagate whether the platform context was successfully created with or without sharing. Change-Id: I37080b645f531fd207946441057be6d3f6be3f6e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfbegl: Add unimplemented QDirectFbWindow::eglSurface, build fixHolger Hans Peter Freyther2011-12-062-1/+16
| | | | | | | | | | | QDirectFbScreen needs to have the full QDirectFbCursor definition, include the header file directly instead of a forward declaration. Impelement QDirectFbWindowEGL::eglSurface to return the EGLSurface of the underlying DirectFBWindow. Change-Id: Ib6765331ffea6e0b5f10f738d9e05320b7f8155f Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Ask for a context that is likely to be supported.Gunnar Sletta2011-12-061-1/+2
| | | | | | | | | | Most embedded GL chips support 24-bit depth with packed 8 bit stencil, but more rarely 32-bit. Asking for 32 bit means we often fail on other properties to, such as multisampling. Change-Id: Ib913d94af0635b09913ff15cff54cc694ba293fc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Cocoa: Handle accessible interface children.Morten Johan Sorvig2011-12-021-2/+27
| | | | | | | | Implement AccessIbleChildrenAttribute and accessiblityHitTest. Change-Id: Ia9fa80e3015edbb969d173a2587cb53b9c69852e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Don't inherit QAccessible from QWindowsAccessibleJan-Arve Saether2011-12-021-27/+27
| | | | | | | Qualify all references to QAccessible members with QAccessible:: Change-Id: Ia78d8482bbab3d77c9e258a52bc74f8e7c0c7e10 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Clean formatting.Frederik Gladhorn2011-12-022-14/+15
| | | | | | | | Remove extra spaces, remove virtual keywords. This code was simply inconsistent with the rest. Change-Id: Iec8e9542dd4c458ddd535cb1766c90c18051686a Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Accessibility: table2 -> tableFrederik Gladhorn2011-12-023-126/+126
| | | | | | | | Rename the new interface after the old one has been removed. This interface is very close to the IAccessible2 Table2 interface. Change-Id: I8659232189fe0e8307151c743727de425c30ac9a Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* directfb: Introduce EGL integration for DirectFBHolger Hans Peter Freyther2011-12-028-4/+327
| | | | | | | | | | | | Introduce a new platform called 'directfbegl' that allows platform integration with EGL. Change the QDirectFbIntegration to make it more easy to hook up in the creation process, introduce an EGL integration with custom screen, window and EGL Platform Context. Vendors might need to add custom code to initialize EGL to be used with DirectFB, this can be done in QDirectFbScreenEGL::platformInit. Change-Id: I7bee277ede27c72437cd7c5977fa6ed85e65f538 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE around the codeHolger Hans Peter Freyther2011-12-029-0/+32
| | | | | Change-Id: Iabf32130dcfe4f5a383e9c99f661ded176432817 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Move the macro to the qdirectfbconvenience header fileHolger Hans Peter Freyther2011-12-022-5/+6
| | | | | | | | We will need to have logging outside of the blitter code, make the macro available to everyone. Change-Id: I811ecb98a870a818630276b5daa788790db71ccd Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Make cell a proper QAccessible2Interface.Frederik Gladhorn2011-12-012-12/+20
| | | | | Change-Id: I9b245037e8448f39ed2cb80d1ef5fb0714173518 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix image format use in cocoa pluginGunnar Sletta2011-12-012-2/+2
| | | | | | | | | | | | The screen should be opaque. It is used to create the default pixmap data which should be RGB32 on mac. The backing store uses premultiplied in the resize but initializes with non premultiplied. Unify this to all premultiplied Change-Id: I7d17d492fcff30b555a768da852ff9be0a9d96aa Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Mac Core Text font database for QPAJiang Jiang2011-11-302-5/+3
| | | | | | | | | | | | | | Add Core Text fontdatabase for Mac and use it as default. It also reenabled Core Text font engine for native font rendering on Mac, though it's not used in declarative UI (by default declarative will still use scenegraph, which will only use this font engine for retrieving font metrics and outlines). With the new fontdatabase it's now possible to load all the fonts installed in the system as well as adding application fonts. Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Include qglobal.h first in qnsview.mm compilation unit.Zeno Albisser2011-11-302-0/+4
| | | | | | | | | | If cocoa headers are being included first, this messes up the defines MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED when compiling with clang. Change-Id: I07177d07a0ac7c5f7e72b04f42d6343e689e0d33 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix casting. Casting is now done through the virtual interface_cast.Jan-Arve Saether2011-11-3012-16/+76
| | | | | | | | | Change interface_cast to return void* to avoid using virtual inheritance. Get rid of the magic Q_ACCESSIBLE_OBJECT macro. Change-Id: I94b824aef53f2ba657d39d406b387c8681d47ee4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Prevented Xlib sequence errors in xcb plugin.Samuel Rødal2011-11-291-0/+1
| | | | | | | | | | | | | | Prevent Xlib errors of the form "Xlib: sequence lost (0x2716a > 0x1717c) in reply type 0x11!" from being printed. We know the cause of these is because we're manually calling the XESetWireToEvent handlers since those are not handled by XCB, and this confuses Xlib since it's then seeing events with old sequence numbers. We simply set the sequence number to the latest sequence number and the errors go away. Change-Id: I2a9e7a7cfd0ba8692e43ce61f796a8189305e0d3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
* Remove QPlatformPrinterSupport usageJohannes Zellner2011-11-292-9/+0
| | | | | | | QPlatformPrinterSupport seems to not exist anymore. Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed Qtbase OSX specific namespace compilation.Toby Tomkins2011-11-295-2/+18
| | | | | | Change-Id: Idacfa679df7aa6417f8017f80928907830d15df2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix a small memory leak in QXcbIntegration.Jędrzej Nowacki2011-11-292-15/+12
| | | | | | | Prefer to use a smart pointer over a raw pointer. Change-Id: If8b5cbef8767433eab2f82c14abaa9608b8e61d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtGui: Bring back HBITMAP/HICON conversion functions.Friedemann Kleint2011-11-285-394/+8
| | | | | | | | | | - Move the conversion functions from the Lighthouse plugin to QtGui as qt_pixmap/From/To/HBITMAP/HICON(). - Re-enable them in Widgets (QFileIconProvider, QWindowsStyle). - Use them in QtPrintSupport. Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Introduce QWindowSystemInterface::handleSynchronousCloseEventGunnar Sletta2011-11-251-1/+1
| | | | | | | | | | | | And use it from the Cocoa backend. In general, for threaded GL rendering to work, any function that affect the surface must be synchronous, so the implementor (such as QQuickCanvas) can pick it up and block until the GL context has released the surface. Otherwise, we will crash. Change-Id: Id8484dac7452fe96fa80ade4ea321145f32124b4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Change default implementation of window() to just return 0Jan-Arve Saether2011-11-251-2/+17
| | | | | | | | Instead move the traversal up to the ancestors to the bridge. This simplifies the default implementation to just return 0 Change-Id: Ic3ec60851f378587f4a23363aec2039d0e8a08a1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Make cocoa opengl backend threadsafe.Gunnar Sletta2011-11-252-9/+1
| | | | | | | | | | The current implementation on Mac OS X called update() inside the cocoa plugin from the GUI thread, which breaks when trying to use the GL context from another thread and the window gets resized. We now only call it from makeCurrent() Change-Id: I025aad3a3b140e85e729816bf3b68827337cc80d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix navigate returning invalid pointer.Frederik Gladhorn2011-11-241-1/+1
| | | | | | | | Navigate would return a random pointer here when asked for example for not handled relations (label etc). Change-Id: Iec4de94e6f76f14e89b43fe7327d98878aad58ee Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* directfb: Use the QPlatformWindow in the DirectFB BackingstoreHolger Hans Peter Freyther2011-11-243-8/+10
| | | | | | | | | Remove usage of QDirectFbConvenience::dfbDisplayLayer in the QDirectFbBackingStore code and resolve the IDirectFBWindow through the QPlatformWindow. Change-Id: Ia7db8dedc91096648bc9de029d034002ba0d6a03 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Get the IDirectFBDisplayLayer through the QPlatformScreenHolger Hans Peter Freyther2011-11-244-5/+15
| | | | | Change-Id: I1e8bacc2a5c39065f1c0667cda900730c5670066 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Fix the typo in the parameterHolger Hans Peter Freyther2011-11-241-1/+1
| | | | | Change-Id: I3d373872c533bc4b6f4f010f5cce4dbb41dbb561 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Remove dfbDisplayLayer from QDirectFbInputHolger Hans Peter Freyther2011-11-243-8/+7
| | | | | Change-Id: I2ae61c40c28b337448077cff5643a007b54a3d71 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Pass the IDirectFBWindow to the QDirectFbInput methodsHolger Hans Peter Freyther2011-11-243-16/+26
| | | | | | | | No need to go from IDirectFBWindow -> WindowID -> IDirectFBWindow to attach the event buffer for the event system. Change-Id: Ia5f7c20d06e8e1da5142f1bd99ca69906107adba Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Use DirectFBErrorFatal for errors we don't handle wellHolger Hans Peter Freyther2011-11-241-5/+4
| | | | | | | | | In case we fail to initialize DirectFB, use the DirectFBErrorFatal to quit as there is no way we can recover from this error and the QPA backend has already been selected. Change-Id: I8001bf32d0a14ba21c2ec13121748a6384b87c2b Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Access the screen layer through QWindow::screen()Holger Hans Peter Freyther2011-11-245-4/+30
| | | | | | | | | Instead of assuming which layer was assigned to Qt, resolve the to be used layer via QWindow::screen()->handle(). Add a method to the DirectFB QPlatformScreen to provide a pointer to the IDirectFBDisplayLayer Change-Id: Iaea9466ca84daff752a4932deafbe38f48123715 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Move QDirectFbScreen into a separate fileHolger Hans Peter Freyther2011-11-246-63/+151
| | | | | | | | The screen handling will get a bit more complex due the integration of different ways to do OpenGL. Move to a new file. Change-Id: Ibe3e397d13da1b270ec4afaf046d28be50e976f9 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove virtual child integers.Frederik Gladhorn2011-11-2314-772/+370
| | | | | | | | | | | | | | This makes the accessibility apis much simpler and less error prone. Disable the itemviews implementation that is in complex widgets. The itemviews will use the new code from itemviews.h/cpp everywhere now. QToolBox was broken before, now at least it simply exposes all its children. The children are the buttons (tabs of the toolbox) and their contents. Change-Id: I45e218f49f02aebbd678ddfe29f94c2a112a2125 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Accessible widgets: Fix warning.Friedemann Kleint2011-11-231-1/+1
| | | | | Change-Id: Iaf9b112db86a4238ef24f3c6341c83ab0f9ba217 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Remove handlesInputPanelVisibility() deprecation mechanismJoona Petrell2011-11-214-16/+0
| | | | | | | Task-number: QTBUG-21964 Change-Id: I508ba690c90369d31ca33390d3001064857fb62e Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Accessibility: Clean up usage of navigate.Frederik Gladhorn2011-11-215-46/+34
| | | | | | | Prefer to use parent/child functions instead. Change-Id: Ic92165b9439eb750c9d762ddf5dcd2a5ccf0277d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix debug output in meego platform input contextSimon Hausmann2011-11-211-1/+1
| | | | | | | Don't show debug output by default :) Change-Id: I7df9264b3e0211e459cecb2cd9f389e017e9bca4 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Ensure that the corewlan plugin can be built with the Mac OS X 10.7 sdkOswald Buddenhagen2011-11-181-1/+1
| | | | | | | | | | | | | When the 10.7 SDK was specified explicitly then it would fail the check inside the pro file. So this ensures that this is accounted for. Task-number: QTBUG-20516 Merge-request: 2657 Reviewed-by: ossi (cherry picked from commit ce1a25fc692abcaa1c825f465d6a158efa953b06) Change-Id: Ice1a25fc692abcaa1c825f465d6a158efa953b06 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* remove obsolete defineOswald Buddenhagen2011-11-181-1/+0
| | | | | | (cherry picked from commit 85cd78b01812d108f381e42b044abaa888c4146e) Change-Id: I85cd78b01812d108f381e42b044abaa888c4146e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>