summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Add check to make sure qApp exists before usingChris Meyer2011-12-191-1/+1
| | | | | | | | | | Check for qApp before using. I'm aware that this is in commented out code right now; but I wanted to make sure it doesn't accidently slip back in without this check so I'm submitting this patch. It caused problems at shutdown in 4.8. Change-Id: I1c2358ab94f8b698e5519b3e0f988fb5cdd653fa Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Accept mouse clicks that activates windows.Morten Johan Sorvig2011-12-161-0/+5
| | | | | | | | | | | | | Events for mouse clicks that active windows are by default suppressed. Qt needs to see all events in order to properly close popup windows. Wether or not the event should be sent to the target needs to be implemented later on - in the QWidget world this is controlled by WA_MacNoClickThrough Change-Id: I4b96d33978ed2b3cb793f52bb5b6fef234190a00 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Cocoa: Update geometry on window move.Morten Johan Sorvig2011-12-153-7/+9
| | | | | | | | | | | | | Call [QNSView updateGeometry] directly. We can't got through the frameDidChange notification since we are not actually changing the QNSView frame. Rename frameDidChangeNotification -> updateGeometry sine it now handles updates from two different sources. Change-Id: I848e558294093cd51d97778734b5cf872435266a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Don't set window size in propagateSizeHintsMorten Johan Sorvig2011-12-151-7/+1
| | | | | | | | | | Unless QWindow:baseSize returns a valid value. Setting the size caused lots of window geometry instability in Creator. Change-Id: Iab45e88b47207db900c7655c217959391d84a1bb Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Add version check for convertRectToScreen.Morten Johan Sorvig2011-12-151-7/+12
| | | | | | | | convertRectToScreen was added in 10.7, use convertBaseToScreen on 10.6 Change-Id: Ica1ee0f62e1fc9b0d5ccf463419496684da779b7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make QCocoaWindow independent of NSWindow.Morten Sorvig2011-12-145-16/+68
| | | | | | | | | | | QCocoaWindow now gets resize events from QNSViev and does not require a NSWindow. QWindow instances can now be inserted in NSView hierarchies. This is useful for Qt-as-a-plugin use cases and is needed to implement QMacNativeWidget for Qt 5. Change-Id: Ia95ea9c22a15a3e62d1e6543466cff07390c70a2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Add window debug outputMorten Johan Sorvig2011-12-142-0/+16
| | | | | | | Add logging for setGeometry/setVisible/propagateSizeHints. Change-Id: I3590caed586d36f789dd67b1951e8152f923a407 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QIBusPlatformInputContext: Fix a crash in tst_qinputpanel::update.Friedemann Kleint2011-12-141-0/+2
| | | | | | Change-Id: If50c442958b6f25f17325f7792bb3f882e4b13e7 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QPlatformDialogHelpers: Reduce dependency on QDialog.Friedemann Kleint2011-12-144-141/+167
| | | | | | | | | | For each QDialog-derived class, introduce a Q[X]Options class containing the options of the dialog. An instance is shared between the QDialog (or dialog desktop component) and the helper. Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Use new 10.7 mouse wheel API.Morten Johan Sorvig2011-12-141-3/+14
| | | | | | | | Silence "deprecated" warnings. Use the old API on 10.6. Change-Id: I0cfa3a083108618023b491589a85ddfc268f990b Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Finish removing virtual child integersBradley T. Hughes2011-12-136-13/+13
| | | | | | | | | Finish the work started by commit beb72b2fbf17a20b4a9d51d75d79f9c3c69bb357. This silences warnings found by -Woverloaded-virtual. Change-Id: Ic6f5e77e324463ade8349f23f272b41b509d87e4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix debug output in eglfs with QEGL_EXTRA_DEBUG enabledJohannes Zellner2011-12-132-5/+5
| | | | | Change-Id: I615a953b52184d01c5b1b78d1cff283f94c458d9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QPA xlib plugin handling of setParent(0).Bradley Smith2011-12-132-3/+4
| | | | | | | | | Dereference of the parent argument did not check for nullptr. For example, the hellogl example would crash. Now if the parent argument is null, the screen's root window is used. Change-Id: Ib06181c9ab9794d577722f1c1dd5ee92e4edaee5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Compile fix - qxcbconnection.cpp (‘Display’ was not declared)Thorbjørn Lund Martsum2011-12-131-0/+2
| | | | | | | | | | | To avoid getting qxcbconnection.cpp:89:29: error: ‘Display’ was not declared in this scope Platform linux - configured with ./configure -nokia-developer -nomake examples -nomake demos -nomake tests -no-gtkstyle -no-v8 Change-Id: Ief7315bb8aa67c6454cdeddb1c02e60ea79801b5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use QVarLengthArray in QXcbConnection.Robin Burchell2011-12-132-6/+9
| | | | | | | | | | There's no need in using a QList here, since it's never passed around anywhere; the reference counting is just unnecessary overhead. Change-Id: I92107c69f7338acc396e2ac4a69123c6a2becaed Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* 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>