summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
* Change WId to be a quintptr.Jonathan Liu2012-02-071-1/+2
| | | | | | | | | | | Fix compilation with MinGW-w64: Use quintptr instead of unsigned long as WId needs to be able to cast to HWND which is a 64-bit pointer on Windows 64-bit. Acked-by: Samuel Rødal <samuel.rodal@nokia.com> Change-Id: I7bbe83ce02b739eb04218ca4b6b478509347d515 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixed typo in QOpenGLContext warning message.Samuel Rødal2012-02-061-1/+1
| | | | | Change-Id: I967279f4b4875ae80ce45744d559fc7380bc0125 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Destroy the QWindow children in destroy() instead of close()Laszlo Agocs2012-02-061-10/+9
| | | | | | | | | | | | | | | | When closing a window, destroy() ensures a setVisible(false) call only for the window itself, not for other windows parented to it. With the new quit lock ref feature this breaks code that creates a fake root window parented to the main, visible window. (for example the xcomposite backends of qtwayland do this) Such apps do not anymore exit after closing their window because the children do not receive a deref due to setVisible not getting called. (At that point. It would get called after exiting the event loop but that never happens due to the refcounting) Change-Id: I124737c80ad59600ddc79261100f3904af0f410d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix a typo TypeDefiniton -> TypeDefinition.Jędrzej Nowacki2012-02-031-17/+17
| | | | | | | | If you repeat a typo often enough, it becomes the right spelling. But 49 times is definitely not enough :-) Change-Id: I7c0bb29e68e4bff5c67277f9874df8b3ab8b2b54 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Remove QInputContextPekka Vuorela2012-02-031-1/+1
| | | | | | | | | | This has only been around as compatibility interface for Qt4 but is now replaced by QPlatformInputContext. Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Build with -pedanticStephen Kelly2012-02-031-2/+2
| | | | | Change-Id: I42487099855d2adaecfad0a3147141f88aca1898 Reviewed-by: David Faure <faure@kde.org>
* Improve QSurface / QWindow API a bit and use that to avoid errorsGunnar Sletta2012-02-026-15/+79
| | | | | Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update wrong docs for TouchPoint::id().Laszlo Agocs2012-02-021-3/+2
| | | | | | | | What it states is simply not true, at least certainly not since QPA has been introduced. Change-Id: If8aa2120cf5fc9ca85f4f0e6832b2115a5b71fe1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix qmlscene segfault on startup on Mac OS 10.6.Morten Johan Sørvig2012-02-021-2/+4
| | | | | | | | | | | | | | | | Task-number: QTBUG-23982 The platform plugin loader was searching for plugins in qtbase/bin and would segfault when checking if the qmlscene binary was a plugin. Test if "../Plugins" actually exists before setting it as the platform plugin path. Change-Id: Ibd887b5c5045d23e3eb62867dc7598e09d3918ad Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Renamed QInputPanel as QInputMethodPekka Vuorela2012-02-0210-186/+315
| | | | | | | | | | | QInputMethod better describes what the class is about, input methods in general, be they panels or just composing input from key events. Compatability headers added for old name. Not bulletproof but should be enough to get transition done. Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* qopenglcontext not checking for null and failing with platform minimalKurt Korbatits2012-02-021-0/+2
| | | | | | | | | | - The minimal platform plugin returns null and was causing segfault. Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move QPlatformDialogs from QtWidgets to QtGui.Friedemann Kleint2012-02-013-2/+874
| | | | | | | | - Remove dependency of the Windows platform plugin on QtWidgets. Change-Id: Iceb876ba7df46b49966af0fc101816654eedb5c5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Use QBasicMutex instead of Q_GLOBAL_STATIC QMutexOlivier Goffart2012-02-012-8/+8
| | | | | | | | | | | | | | QBasicMutex is a POD and can be used as a static global object. in qpicture.cpp factoryLoader is used only once, and under the mutex, so there is no need for Q_GLOBAL_STATIC for it, it can be a function static in qhostinfo_unix.cpp the code seemed wrong while compiled with namespace and QT_NO_GETADDRINFO. I also could get rid of one include because it was included earlier. Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Introduced BufferQueueingOpenGL capability in platofrm integrationGunnar Sletta2012-02-012-1/+24
| | | | | Change-Id: Iedb7255862fd3a11aceae0e06e90a5539febc7e7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add the event loop quitlock feature to QtCore.Stephen Kelly2012-01-313-11/+22
| | | | | | | | | | | | | | | | A feature of a ref-counted quit (managed by a quit-lock class) is added to both QEventLoop and QCoreApplication. This allows, for example, an event loop to quit() when there is no more work for it to do. quitOnLastWindowClosed is implemented in terms of the refcount in QCoreApplication so that jobs can be completed before the application quits. Change-Id: I14c8f4e7ee12bbf81a6e5849290d4c8ff37fa110 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* add virtual destructor to QWindowSystemInterfacePrivate::WindowSystemEventjian liang2012-01-311-0/+1
| | | | | | | | | | | Add a virtual destructor to QWindowSystemInterfacePrivate::WindowSystemEvent class. Otherwise, in QWindowSystemInterface::sendWindowSystemEvents() "delete event" can't destruct the subclass of WindowSystemEvent properly. Change-Id: Ic708f4ab61de88cd0015aa6e472d356b2de64583 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove many deprecated methodsLars Knoll2012-01-311-0/+4
| | | | | | | | | | Remove methods that have been marked as deprecated before Qt 4.6. Keep others, but inline them where possible and mark them as QT_DEPRECATED_SINCE(5, 0). Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove Symbian specific code from QtGui.Xizhi Zhu2012-01-312-83/+80
| | | | | Change-Id: I450a78863462936d0b18e211763f274b59497109 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QGuiApplication::topLevelWindows(), introducing allWindows()Anselmo L. S. Melo2012-01-312-1/+29
| | | | | | | | | | | | | As discussed on the development mailing list, the window list returned by QGuiApplication::topLevellWindows() included all QWindows, even the non top-level ones. This commit introduces the new method allWindows(), which returns the list of all QWindows, fixes the list returned by topLevelWindows() and also introduces tests for both methods. Change-Id: I761f0fcdec79f83949012c628655ed12cd18572c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* fix memory leak in QGuiApplicationPrivatejian liang2012-01-311-0/+2
| | | | | | | | delete app_font object in QGuiApplicationPrivate's destructor Change-Id: Iad0c5a69e03477f6c93fcf76c58bac001cbdffb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add native event filters to Windows, forward to Widgets.Friedemann Kleint2012-01-306-0/+42
| | | | | | | 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-3093-93/+93
| | | | | | | | | | 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-272-7/+12
| | | | | | | | | | - 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>
* QGuiApplication::focusObject() to replace QInputPanel::inputItem()Pekka Vuorela2012-01-277-5/+79
| | | | | | | | | | | * Deprecated QInputPanel::inputWindow() which is already just returning QGuiApplication::activeWindow() * Deprecated QInputPanel::inputItem() and introduced QGuiApplication::focusObject(). Input methods can check input method support by Qt::ImEnabled query. Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Introduced QOpenGLContext::defaultFramebufferObject().Samuel Rødal2012-01-275-5/+114
| | | | | | | | Also add some debugging helpers to make sure applications are correctly written even on less restrictive platforms. Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Implement QWindow::close()Anselmo L. S. Melo2012-01-271-2/+22
| | | | | | | Implement the public slot QWindow::close() and add the correspondent test. Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Made QWindow::currentOrientation() a property.Samuel Rødal2012-01-263-5/+13
| | | | | | | | | | | | | | To match the previous QWindow::orientation() property which can be useful to access from QML. Also, removed the automatic translation of Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow level, as it leads to a lot of complexity regarding the QWindow::contentOrientationChanged() signal, and makes it hard to distinguish between the case where the window's orientation follows that of the screen, and the case where the orientation just happens to be set to that of the screen. Change-Id: I6950d1337b7f929815eff1328181855090d8066b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2540-40/+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>
* Make coordinates float based where it makes sense.Lars Knoll2012-01-252-19/+24
| | | | | | | | | Mouse and Hover events already use FP corrdinates. They also make sense for tablet and drop events. Task-number: QTBUG-20115 Change-Id: Iff35d1f468567bd5a37236853dbc7725a37d87f2 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-2412-100/+246
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QKeySequence: add tests, fix handling of '+' as key or separator.David Faure2012-01-241-7/+16
| | | | | | Change-Id: I3c471dff9b46025aab762d36bb3a3adc64ced561 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make it possible to compile with -no-opengl.Andreas Holzammer2012-01-243-5/+17
| | | | | | | | | | | | | This takes out the dependency to the header files of OpenGl. The ifdef QT_NO_OPENGL in the opengl headers are needed, as qmake adds depends in the makefiles for all GUI headers. Task-number: QTBUG-23207 Change-Id: If31448ee35fd8c39194c7cb7d62273fbc6def883 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove Symbian specific code from QtGui.Xizhi Zhu2012-01-241-3/+1
| | | | | Change-Id: I103abb545d1a5deed7d40c0b50fc3eff0c89d622 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix synthesizing mouse events when touches change orderingLaszlo Agocs2012-01-232-5/+18
| | | | | | | | | | | | | | There is no guarantee the touches will be listed in the same order in an update: the platform/generic plug-in, the drivers, etc. are all free to shuffle the list of touch points in each report (even though the order is fairly stable with most systems). Therefore, to be safe, move and release events should be generated not from the first point in the list but from the one with the matching id. Change-Id: I6615224cbf2cfdc440143eb3191482a23d85c6a4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2393-93/+93
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introducing QPlatformSharedGraphicsCacheEskil Abrahamsen Blomfeldt2012-01-205-3/+329
| | | | | | | | 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>
* Docs: Fix typo in the QWindow class documentationAnselmo L. S. Melo2012-01-201-1/+1
| | | | | | | | It was 'windw' instead of 'window' Change-Id: I3a7b361a22e4ea09ee1fb3d9b551c1a88d401ff1 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Allow generic plugins to set defaults for window system propertiesSimon Hausmann2012-01-201-2/+2
| | | | | | | | | | | | | In order for generic plugins to set defaults on "startup" time - such as the meego integration plugin to set the correct screen orientation - it is necessary to construct the plugins when the application startup is done. Then the plugin can "inject" the values the usual way, using QWindowSystemInterface::handle*Change. Afterwards we need to process those events - take them from the window system event queue and let QGuiApplication process them. Change-Id: I84de022ad565a33ae3ef5dfc34f540d6bf488b03 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add support for platform plugin specific event filters.Simon Hausmann2012-01-202-0/+50
| | | | | | | | | 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>
* Rename all our interfaces from com.trolltech to org.qt-projectLars Knoll2012-01-191-1/+1
| | | | | | Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix ### Qt5 for QKeySequenceLars Knoll2012-01-172-18/+10
| | | | | | Change-Id: I32e582d264991e4a42e4ca6678d477835d15dbce Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Move keyboardInput data back to QApplicationPekka Vuorela2012-01-172-25/+0
| | | | | | | | | Deprecated interface, rest of Qt now adapted to QInputPanel. Change-Id: Iacbbcac90dd7c037a24b45df1ee868f04090b21b Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Use QFunctionPointer in QOpenGLContext as well.Samuel Rødal2012-01-162-2/+2
| | | | | Change-Id: I7192e6aea721c75257bfbd1d205d5ce7764d915f Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-137-74/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add setPalette to QGuiApplicationLars Knoll2012-01-122-0/+11
| | | | | | | | If we have a getter, we also need the setter to be symmetric. Change-Id: Ibcb20d66c711e4c1bebd448781fa9eddb9cd773f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Made it possible to report screen changes through QWindowSystemInterface.Samuel Rødal2012-01-1212-57/+210
| | | | | | | | | | This makes it possible for platform plugin independent code (such as generic plugins) to report changes to screen properties. An example would be an accelerometer plugin that reports orientation changes without knowing anything about the windowing system. Change-Id: I984984b6d064327772c264bc942269422451da37 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Make show() default to sane sizing behaviour based on the platform.Samuel Rødal2012-01-126-7/+30
| | | | | | | | | | | | | | | | 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>
* Input direction/locale to come from platform input contextPekka Vuorela2012-01-113-3/+37
| | | | | | Change-Id: Ib049693211a08dcffc9dbe49add54e7feab38978 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Introduce a QVariant themeHint() to QPlatformTheme.Friedemann Kleint2012-01-112-0/+50
| | | | | | | Start on removing platform-specific code from QtWidgets. Change-Id: Ic2163a0ce6f2db2151cdf7ca93766b2d861eeb55 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Reimplement QVariant to QDebug streaming.Jędrzej Nowacki2012-01-101-84/+3
| | | | | | | New implementation fixes some commented code marked as FIXME. Change-Id: If8f5bebedd65bcf8f839d804c2022ca79ef82ddf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>