summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Fix compilation with -qtnamespaceKai Koehne2012-01-313-4/+8
| | | | | Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Mac: Fix compilation with -qtnamespace setKai Koehne2012-01-311-0/+3
| | | | | | Change-Id: Id3b9f4e3edf2caeac32c8a44278cdf05a1fc70fb Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Use events for accessibility updates.Frederik Gladhorn2012-01-312-9/+9
| | | | | | | | | | | | | The problem with the old updates is that it was impossible to send details about the update. For the Linux implementation to work properly with AT-SPI I need to know which state changed (currently I only get a generic "state changed" event) or which part of the text was changed for long texts (imagine a word processor sending updates). This also gives us more options when updating with events generated from not QObject based objects. Change-Id: If0b6c83c523092565eb48e79f3f6de5a1b905ea8 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* xcb: Check for SHM extension before using itUli Schlachter2012-01-311-2/+6
| | | | | | | | | | | If we call any xcb_shm_*() function, libxcb will have to figure out SHM's major number. However, if that fails because the SHM extension is not available, xcb will disconnect from the server. Obviously, that's not what we want and must be avoided. Change-Id: I8eba5ff9e84e0e2017a5c0d88fda4efd0459bd1e Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* xcb: Check for SYNC extension before using itUli Schlachter2012-01-311-1/+5
| | | | | | | | | | | If we call any xcb_sync_*() function, libxcb will have to figure out SYNC's major number. However, if that fails because the SYNC extension is not available, xcb will disconnect from the server. Obviously, that's not what we want and must be avoided. Change-Id: I9a1032e1cfac074a52bafcb0772304bfd423e770 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Changed debug output to option in qminimalbackingstore.Kurt Korbatits2012-01-312-8/+15
| | | | | | | | | | | - Added QT_DEBUG_BACKINGSTORE environment variable to enable debug output. Defaulting to no output if not set. Change-Id: Id9c369031f946d77605321c8b28ab3378da8fbf9 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* directfb: Use QPlatformPixmap::fromFile for Qt resourcesHolger Hans Peter Freyther2012-01-311-8/+2
| | | | | | | | | | | | | Move to fromFile to load Qt resources for two reasons. The first is that ::fromData creates a QBuffer on our raw data and is passing that to the QImageReaders. Right now we there is a QFile -> QByteArray -> QBuffer transition that wastes cycles. The other reason is that QPlatformPixmap::fromData did/does not check if the decoded image is null and might cause a crash because of that. Change-Id: I7cb92d84874323e7205ab28883cc0fe9ecca1e27 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Avoid non-standard indentation of license headers.Jason McDonald2012-01-304-156/+156
| | | | | | | | The strange indentation has made maintenance of license headers difficult on several occasions. Change-Id: Ib29a7e5275e2c7a2c13a3f32fd2479f34d3353ca Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add native event filters to Windows, forward to Widgets.Friedemann Kleint2012-01-301-3/+11
| | | | | | | Use prototypically for qwizard_win.cpp. Change-Id: I075e81ae1bc3d62d9f27e51c73c800ffd71cbcd6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-30282-282/+282
| | | | | | | | | | 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>
* Decouple QPlatformTheme from QDialog.Friedemann Kleint2012-01-278-73/+40
| | | | | | | | | | - Use an enumeration for the dialog type. - Implemented on Windows and Mac Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Change-Id: I213748a08168efbabc2ac0106308e97ff19d19c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fix exit crash related to deletion of platform screens.Friedemann Kleint2012-01-273-6/+3
| | | | | | | | Do not delete screens in the destructor as this might call back to the Windows and use QWindowsContext. Change-Id: I5e66e480d4b6ddb8b17cc92e4bef93013e336be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix compilation of MeeGo/Maliit related code after Qt::ScreenOrientation API ↵Simon Hausmann2012-01-271-1/+1
| | | | | | | | | changes Qt::UnknownOrientation is now Qt::PrimaryOrientation. Change-Id: I2846a90bd11ecd1416c29b7bd861f180ccb129a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
* Fall back on glXChooseVisual() if glXChooseFBConfig() doesn't work.Samuel Rødal2012-01-274-46/+69
| | | | | | | | | | Some older drivers don't fully support glXChooseFBConfig(). As a bonus, fix some memory leaks here and there. Task-number: QTBUG-21880 Change-Id: Ie306dee27f616927a6aa55fd71601569b828afcc Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move glyphMargin() to QFontEngineJiang Jiang2012-01-243-4/+4
| | | | | | | | | | | | | glyphMargin() support for QTextureGlyphCache is implemented in respective font engines, thus this function is platform dependent. Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC, now we should move them into QFontEngine and its subclasses. So far only Windows font engines support it. FreeType and Core Text based font engines all ignore it. Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Remove Symbian and Maemo code from uikit plugin.Xizhi Zhu2012-01-241-17/+0
| | | | | | | | The code is only supposed to be used by iOS, so platform specific code is removed. Change-Id: Ibea585dfac9e6a7a87e66a1426793dfd8713fdef Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use QObject pointer as QCocoaAccessibleElement id.Morten Johan Sorvig2012-01-233-23/+14
| | | | | | | | | | | | | | | Each QCocoaAccessibleElement needs to provide a unique stable id through the -(NSUnterger)hash method. The previous approach of basing the hash on the parent hash plus the child index is unpractical now that childAt() can return distant descendants instead of immediate children only. Use the QObject pointer, which is set for all accessible interfaces today. Change-Id: I5868e3a81c1b4da7233504f30003ab8060e9fa3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* directfb: Deal with Qt trying to create a QSize(0, 0) platfom windowHolger Hans Peter Freyther2012-01-231-3/+3
| | | | | | | | | | | | | | Qt will attempt to create a platform window with the above size and DirectFB will fail to create the window. Make sure the width/height is at least 1 before handing it to DirectFB. According to Samuel it is legitimate to create a QPlatformWindow with QSize(0, 0) and it is the job of the platform plugin to make it work. Follow the approach of the XCB plugin and increase the size. Change-Id: Ifc92780b46f1a73123945988d06bd21a3deb6bb0 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Windows: Implement native event filters.Friedemann Kleint2012-01-233-8/+54
| | | | | Change-Id: Ibdf556428e4dbb9156c87504b923ec9600bcf871 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* XCB: Introduce enumeration for event filter types.Friedemann Kleint2012-01-233-10/+25
| | | | | | | | 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>
* xcb: Correctly check the X11 connectionUli Schlachter2012-01-231-1/+1
| | | | | | | | | | | | | Commit e08453f31ae2a195f86a763f0b1c5e617df0e1ce added a check which makes sure qt prints an error message instead of segfaulting when it can't connect to the X11 server. However, libxcb will never return NULL from xcb_connect() and thus that commit only works if XCB_USE_XLIB is defined and used. Change-Id: I8cc1496494a94f07055a3ac5093ce362dd347c5b Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* xcb: Don't crash on missing mouse pointerUli Schlachter2012-01-231-4/+6
| | | | | | | | | | | | | | | | | | | The draganddrop examples all crashed here because they were using a default-constructed QImage() (i.e. one without any content). I guess this happens here because I don't have any mouse theme set. To test, one could start a second X server, but without any WM or DE. The "evil" QImage() came from QGuiApplicationPrivate::getPixmapCursor(). This function seems to just always "return QPixmap();". This fix is correct because the only caller has another fallback if the createNonStandardCursor()-fallback didn't work. This caller is QXcbCursor::createFontCursor(). Change-Id: I7ec7fbcfdf0203e983149b5e73016cc7e85ecf40 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-23282-282/+282
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Windows: Work on QPlatformScreen implementation.Friedemann Kleint2012-01-208-38/+239
| | | | | | | | Implement virtual desktops (which is the default for EnumDisplayMonitors) and change notifications. Change-Id: Id24a1b6d9766903901ddf1ded8e9933aa03589d4 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Add a virtual sendPostedEvents() to QEventDispatcherWin32.Friedemann Kleint2012-01-203-9/+10
| | | | | | | | | | | | | Reimplement this in QWindowGuiEventDispatcher to send both Qt posted events and queued QPA window system events. We need to do this at a well defined place, instead of sending events outside of the eventloop from the Windows proc. This fixes various hangs for example in tst_qinputdialog, which used a 0-timer to close a dialog. Change-Id: I64e0b8f1209fb434059a7fa667ed585902c19db4 Initial-patch-by: bhughes <bradley.hughes@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Introducing QPlatformSharedGraphicsCacheEskil Abrahamsen Blomfeldt2012-01-207-2/+1280
| | | | | | | | Interface to provide cross-process caching mechanisms in a platform plugin. Can be used for shared glyph caches and icon caches etc. Change-Id: If0d89a0a50bbd6eee05daf908448262ff270fc5b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add support for platform plugin specific event filters.Simon Hausmann2012-01-206-69/+97
| | | | | | | | | The setEventFilter on the platform native interface allows subscribing to events on the backend by event name. Change-Id: Ib10077fbc69f0207edbae1177e7bbd18c8d0f9ae Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
* fix case of included windows headersMark Brand2012-01-193-5/+5
| | | | | | | | Allows cross-building on unix. Change-Id: If389138c2d3bf5e72c62c85d054785ac9232f158 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add "nswindow" resource to the Cocoa native interface implementationBradley T. Hughes2012-01-191-0/+2
| | | | | | | | | This will return the NSWindow* for the given QWindow*. Port the QWidget autotest helper to use the native interface and the "nswindow" resource. Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Prevent menubar related crashesBradley T. Hughes2012-01-191-8/+8
| | | | | | | | | | | | | | | The native menubar interface does not communicate menubar destruction down to the implementation, so we cannot keep naked pointers (otherwise they become dangling). This happens often while running autotests as windows, menus, widgets, etc. are quickly created, tested, and then destroyed. Work-around the crashes for now by using QWeakPointer. A proper fix will need to be investigated to prevent the menubars hash from holding dangling key pointers. Change-Id: Ie8e50cbc52f9510e844fc3c0c5ae6a0865320282 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Windows: Implement QPlatformScreen::name()Friedemann Kleint2012-01-192-0/+3
| | | | | Change-Id: I04ec91b12936bdcc179b79558ac2285b70281dcd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove all references to QAccessible::SelfJan-Arve Saether2012-01-191-2/+2
| | | | | | | | | | | | | navigate() to Self does not make any sense (its basically a clone). It seems that its not that useful to return Self from relationTo(), since it was only one place where relationTo() was called where it checked for the Self flag. This was in the windows bridge, and we could easily work around that. If it really turns out that Self is useful, we can always add that enum value back later. Change-Id: I9ebb60da059a843de5e6fcab9e815b919afc6f2a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Improve accessibility actions descriptions on MacMorten Johan Sorvig2012-01-171-4/+5
| | | | | | | Use built-in descriptions for built-in actions Change-Id: Ic5581e89e4568abcc6c3add126d492345d26d87d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Added libxrender-dev to xcb's README.Samuel Rødal2012-01-171-2/+2
| | | | | | Task-number: QTBUG-23633 Change-Id: I9428d04dab9e769f531a5aaffb943c6c2fa79f9a Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add support for QWindow::setOrientation on HarmattanSimon Hausmann2012-01-175-5/+36
| | | | | | | | | | Set the _MEEGOTOUCH_ORIENTATION_ANGLE property on the window, just like Qt Components for MeeGo and MeegoTouch itself. Change-Id: I0b9adf4550593678bbcba89a2d4f1f65c1f4bd20 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Delete src/widgets/platforms/macMorten Johan Sorvig2012-01-175-5/+446
| | | | | | | | This looks like the mac port but isn't any more, remove it to prevent confusion. Change-Id: I498f536d77d1a3c53e687f696ca6992539a1a90b Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cleanup properly when destroying QCocoaWindowBradley T. Hughes2012-01-161-0/+2
| | | | | | | | | | [NSNotificationCenter addObserver]'s documentation clearly states that removeObserver needs to be called before releasing the object being observed. The m_contentView we create was never released either, so be sure to release that as well. Change-Id: Ia54eb1c5c751f4cb0edb21ad559b261cb8f24208 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* xcb: Obey maximum request length when uploading imagesUli Schlachter2012-01-161-11/+41
| | | | | | | | | | | | | | | | | | | | | When connecting to an X11 server, the server tells the client what its maximum allowed request size is. Larger requests are not permitted. Thus, libxcb verifies that all requests which are sent are smaller than this size limit and possibly kills the connection (without any good error message). Thus, when uploading an image, we could be trying to send more pixel data than fit into a single request. If this would be the case, the code will now use multiple requests where each request only sends a part of the allowed rows. In case all the data fits into a single request, this commit shouldn't change any behavior. Change-Id: I84a4ebfcdb6de7e206015c37e3e33cba3bd309b1 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clean up and extend QAccessible::State.Frederik Gladhorn2012-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | The state should contain useful and clear information. Some of the old enum/bitfield members were not really clear. Make them follow Qt terminology and shift the burden of interpreting them to the bridge. Apart from the previous commit changing from enum to bitfield, these flags have changed names: unavailable -> disabled mixed -> checkStateMixed protected -> passwordEdit (in the last commit) floating is completely removed, even MSAA documentation states it is unsupported. Some new states have been added. Documentation added. Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* xcb: abort (rather than segfault) when X is not availableRohan McGovern2012-01-161-13/+16
| | | | | | | | Be more user-friendly (e.g. when logging into a machine by ssh and forgetting to export DISPLAY). Change-Id: I9d07b0af9c5b4841827826053bb27b507801ae61 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clean up QCocoaIntegration destruction.Morten Johan Sorvig2012-01-142-9/+12
| | | | | | | | Fix memory leak - delete the font database. Remove the NAApplication delegate. Change-Id: I7c69eb4df01c8450c0abde360f77fbb318b20c83 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Windows: Use a message-only window as clipboard viewer or for GL.Friedemann Kleint2012-01-131-3/+3
| | | | | Change-Id: Ib8d287404b157aae2f4493ef8eba220afaba6c47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-133-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current way we do it of having the platform or touch plugin send both mouse and touch events is not ideal. There's no good way to write an application that works sanely both on a touch-only device and on a desktop except by restricting yourself to only handling mouse events. If you try to handle touch events you don't get any events at all on desktop, and if you try to handle both, you end up getting duplicate events on touch devices. Instead, we should get rid of the code in the plugins that automatically sends mouse events translated from touch events. This change enables that by making the behaviour fully configurable in QtGui. Two new application attributes are added to explicitly say whether unhandled touch events should be sent as synthesized mouse events and vice versa, and no duplicates are automatically sent as the current situation. Synthesized mouse events are enabled by default. We also get rid of the QTouchEvent::TouchPoint::Primary flag, which was only used to signal that the windowing system automatically generated mouse events for that touch point. Now we only generate mouse events from the first touch point in the list. Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Cocoa: Send window activation events.Morten Johan Sorvig2012-01-133-0/+22
| | | | | | Change-Id: I599b4316f1535bf4855b205bfb2117bbcee63bf0 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
* Remove all references to QAccessible::(Up|Down|Left|Right)Jan-Arve Saether2012-01-121-2/+8
| | | | | | | | | | | | It is now the resonsibility of the bridge to support this (by querying for QAccessibleInterface::rect()) The windows bridge (currently the only bridge in need of this) has already been updated to reflect this in commit 7dca461620ee6d8cce3a74acf2e1530d4497bff9 Change-Id: Ief1339ab6edc118e2d47e3875e09fa885db65c2f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Don't crash during QApplication constructionBradley T. Hughes2012-01-121-1/+2
| | | | | | | | | | | | The QCoreApplication::init() function calls the virtual QCoreApplicationPrivate::createEventDispatcher(), which for QApplication, also creates the plaform integration. Unfortunately, the Cocoa menubar integration uses qApp before QApplication is constructed, causing a crash. Circumvent this by using QGuiApplicationPrivate directly. Change-Id: Ib36f628641761e70f9e9e39dd23e70e7537a165b Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Ignore uninteresting accessibile interfaces.Morten Johan Sorvig2012-01-124-2/+54
| | | | | | | | | Certain interface roles should be ignored and not be a part of the user-visible accessibility interface tree. Change-Id: I264fef909052c528ee505875e3a211a33114d881 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make show() default to sane sizing behaviour based on the platform.Samuel Rødal2012-01-122-0/+10
| | | | | | | | | | | | | | | | Traditionally it's been hard to write a Qt app that behaves sanely across embedded and desktop platforms, i.e. defaults to fullscreen on embedded and non-fullscreen on desktop. For Qt 5 we can fix this by making the behaviour of the default QWindow::show() be customizable by the platform plugin. If the application developer wants to override this behaviour he can still use the explicit showFullScreen(), showNormal() etc functions. Change-Id: I26a907b404058e345d841c818daefbb57a26d3fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make QAccessibleInterface::indexOfChild() 0-based.Frederik Gladhorn2012-01-112-3/+3
| | | | | | | Makes the code nicer and more consistent with the rest of the world. Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>