summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Fixed wrong emits of x/y/width/height changed signals in QWindowSamuel Rødal2013-01-041-9/+9
| | | | | | | | | | We should only emit these when the corresponding property value changes. Since these are changed asynchronously in the case of a platform window, we should not emit them in the setter, as they are already properly emitted in QGuiApplicationPrivate::processGeometryChangeEvent(). Change-Id: I5ac00601ddb4e7a8ff02376e5f5135d427913119 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()Jon Severinsson2013-01-042-5/+7
| | | | | | | | | | | | | | | | | Previous commit b2363a935c8dac fixed keyboardModifiers() after QPA event processing, but broke QTestLib, which expects spontaneous input events sent to qApp->notify() to update keyboardModifiers() and mouseButtons(). The commit also did not fix mouseButtons() after QPA event processing, and missed keyboardModifiers() after QPA Tablet event processing. This commit fixes all these shortcommings in b2363a935c8dac. Includes test case by David Faure <faure@kde.org> Task-Number: QTBUG-26887 Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Accessibility: Activate in QGuiApp instead of QApp.Frederik Gladhorn2012-12-161-0/+4
| | | | | | | | This makes it possible to use accessibility with QQuickWindow. Change-Id: I5fccd5f25021c4953b03e146705f48a198dbaaa7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Implicit conversion of shortcuts to string is gone.Frederik Gladhorn2012-12-141-1/+1
| | | | | | | | This only effects compilation with DEBUG_QSHORTCUTMAP. Change-Id: I184e644f2165049336cee8a6ac63a3301cf4c849 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Entered hardcoded url for Gnu EmacsNico Vertriest2012-12-141-1/+1
| | | | | | | | | | Corrected in qkeysequence.cpp Link from external-sites not working So, entered hardcoded url. Task-number: QTBUG-27512 Change-Id: I5b8d25d2b1f4f4fb0d57d2306de7f1b7c3dc40e3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* XCB: add support for getting and setting appTime and appUserTime.David Faure2012-12-142-0/+8
| | | | | | | | | | | | 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>
* Fix empty window title regression, add application display name to window titleDavid Faure2012-12-141-1/+6
| | | | | | | | | | | | | | | This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix QWidget::setWindowOpacity() when called before show().Friedemann Kleint2012-12-122-2/+6
| | | | | | | | | Pass opacity from the QWidget to QWindow and to the platform windows. Task-number: QTBUG-28477 Change-Id: If5a85d9183bd1ca33dac2052936ecd1e6c0b5f6c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* De-inline all setters in QWindowShawn Rutledge2012-12-122-77/+84
| | | | | | | | | | | | | | | | If we don't do this, we can have binary compatibility issues later. For example https://codereview.qt-project.org/#change,41700 will change the behavior of setWidth and setHeight to call setSize instead of setGeometry, because we don't want changing the height to also set the position of a window; if x and y are left uninitialized it needs to remember that fact. But if setWidth is left as an inline method, calling setGeometry, then an application which was built with 5.0 would behave differently than an application built with 5.1, even if Qt is upgraded after the application was built. To generalize, setters should never be inlined. Change-Id: I1ec42cb61a45fe541b3f3bb99d1b1ca24ad2a517 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Some fixes to the OpenGL docs in GUIGunnar Sletta2012-12-121-1/+1
| | | | | Change-Id: I6415ff16b1765a5814d50a4cd39db00495d43073 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove incorrect and confusing documentation from qplatformwindow.cppSamuel Rødal2012-12-111-3/+0
| | | | | Change-Id: If3fd383bf7ff08a04df2e11c727c11aeef05a6de Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Compile with QT_NO_CURSOR.Volker Krause2012-12-071-0/+2
| | | | | | | | | | | | | Mostly straightforward, the a11y changes might look a bit drastic, but the base class QAccessibleTextWidget was already disabled in this case, so we have to obviously take out its sub-classes as well. Change-Id: I682ace20d6938688ddb1da23c3463f3c025fab8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Removed requestOrientation() API from QWindow.Samuel Rødal2012-12-065-90/+10
| | | | | | | | | | | There are no proper implementations of this API, and as it stands it only acts to confuse anyone who stumbles across it. It will be better to revisit the full cross platform orientation API story for 5.1. Change-Id: Iff7054a32c6e5e4ad0cc0493a5e4ecc35a6ec4f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fixed crash in tst_qguiapplication with QT_QPA_PLATFORM=minimalSamuel Rødal2012-12-051-1/+2
| | | | | | | | | | | The tst_qguiapplication creates and destroys multiple instances of QGuiApplication. Since the minimal platform plugin doesn't report any theme names, the platform_theme never gets set to 0 in init_platform, and we end up trying to use or at least delete an already deleted QPlatformTheme. Change-Id: I1a41d55b0705c5531c019e60a7a96dac144bacb7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Removed temporary backwards-compat properties and accessors in QWindowShawn Rutledge2012-12-031-36/+0
| | | | | | Change-Id: I718b877e3b6c0b1191a932d934599d5c2f5aa958 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Stop using the name "Trolltech" in QSettingsSergio Ahumada2012-12-031-2/+2
| | | | | | | | | Also change Trolltech for QtProject in other places Task-number: QTBUG-23269 Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-0110-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Renamed the keyboard-focus doc to make clear it's about WidgetsShawn Rutledge2012-12-011-1/+1
| | | | | | | Also link from the widgets index page. Change-Id: I49cd415b09d7458d89d75931ecfaafe29c226c6f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Restore the visibility of a moved QWindow in QWindow::screenDestroyedJocelyn Turcotte2012-11-301-1/+9
| | | | | | | | | | | | | | | | | | | | QWindow::screenDestroyed triggers an move of the window to the primary screen. This causes the screen to be destroyed and shown again on the new QScreen. The issue is that QWindow::destroy() hides the window but create() doesn't set it visible, and this ultimately causes any QWindow to be automatically hidden when their QScreen is destroyed. As stated in the comment, it could be the intended behavior that windows aren't shown automatically on a remaining screen like when using two screens not logically part of the same desktop. Once the platform plugins have access to an API allowing them to adjust the screens of their QWindow, this patch shouldn't be needed anymore. Change-Id: I7628377c969f79f9eebb3deabaf0470542d68a9c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix crash when requesting QGuiApplication::platformNativeInterface()Miikka Heikkinen2012-11-301-1/+1
| | | | | | | | If QGuiApplication has not been instantiated, this function would crash. Change it to return NULL pointer instead. Change-Id: Ia3d27019daa436d5243c9cce757a132d96aae112 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Move session management code from QApplication to QGuiApplication.David Faure2012-11-284-5/+239
| | | | | | | | | | | | | | QSessionManager was already in QtGui, but not usable since the only API to get to it was still in QtWidgets. Session management isn't related to widgets, it also applies to QML apps on the desktop. The virtual commitData and saveState methods have been removed, given the two signals which exist since 4.2, and an additional isSessionSaving() method was added instead. Change-Id: I8099e70df133303e74456706827da21f013fcc6a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QGuiApplication docs: clarify that QWidget needs QApplicationJ-P Nurmi2012-11-271-1/+3
| | | | | | Task-number: QTBUG-28076 Change-Id: I2ebbedd1916f472b9517b509f3b5499d93c71d45 Reviewed-by: Jing Bai <jing.bai@digia.com>
* Fixed abbreviations in QWindow::framePos() and QWindow::setFramePos().Samuel Rødal2012-11-273-5/+6
| | | | | | | | | | | | As 672e7c875e8680818e23d0aef98129d95eb7e91c did changing pos() to position() and setPos() to setPosition(). Luckily there's not much code that uses these. Change-Id: I1e1982f00412a22bd376e667a5e8c30b6149f9b5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove QApplication::type() and make QCoreApplication::Type internalJ-P Nurmi2012-11-231-1/+1
| | | | | | | | | | | | These Qt3 legacy application types do not match the application types available in Qt5. Thus, the decision was to kill the confusing and mostly useless type enum. Use for example qobject_cast instead to find out the application type. Task-number: QTBUG-28093 Change-Id: Ia8cf7c3ea98a3cea27f74760d62e519ea10bce9f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable gui build with QT_NO_SYSTEMTRAYICONTasuku Suzuki2012-11-211-2/+2
| | | | | | Task-number: QTBUG-24816 Change-Id: I5b53392bee3990ec5c7235cc615b4a477fb62089 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Handle QEventLoop::ExcludeUserInputEvents in QWindowSystemInterface.Friedemann Kleint2012-11-212-36/+45
| | | | | | | | | | | Add a flag indicating user input events to the event type and leave those events in the queue if QEventLoop::ExcludeUserInputEvents is set. Task-number: QTBUG-27595 Change-Id: Ib41b826ef3be19253cd582d9894dd7c87953711f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add QPlatformNativeInterface::nativeResourceForScreen().Friedemann Kleint2012-11-192-0/+10
| | | | | | | Task-number: QTBUG-5416 Change-Id: Ic163a5ff1c7a06869d324acb9aa7c257a0262e72 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Missing break in case QEvent::WindowStateChange.Miikka Heikkinen2012-11-151-0/+1
| | | | | | | | The missing break causes state change event handling to fall through to tablet event handling, which is clearly wrong. Change-Id: If19d7b3f794b3614961b9e79952331b0ede1fba1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Bring back -nograb/-dograb for debugging.Friedemann Kleint2012-11-153-0/+30
| | | | | | | Task-number: QTBUG-27632 Change-Id: I4b59df01519af4684d9dbe6e4b6c18a5ebd9aeae Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Change to enter/leave policy while grabbing.Miikka Heikkinen2012-11-151-6/+12
| | | | | | | | | | | | | | | | | | | | | Sending enter and leave events to other windows than the grabbing window is not logical. The policy should be that only the grabbing window receives enter and leave events. Changed the documentation accordingly and provided the necessary changes to Windows implementation. Also removed explicit leave event generation for widgets when popup is opened as that is now redundant. tst_QWidget::underMouse() test was changed to behave according to new logic. Task-number: QTBUG-27871 Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-106-9/+67
| | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Added private header warnings in src/gui/kernelSamuel Rødal2012-11-098-1/+88
| | | | | Change-Id: If3ad9d1e18543639f9e6abb8899b72772bc70c83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Return appropriate currentContext() in platform's makeCurrent().Samuel Rødal2012-11-082-4/+17
| | | | | | | | This way the platform plugin can use convenience classes such as QOpenGLFramebufferObject in the makeCurrent() implementation. Change-Id: I1fb5f6b8ec094ff39454adbeca9eb0d1a8f43ee6 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Relax QOpenGLContext::swapBuffers() conditions.Samuel Rødal2012-11-081-15/+1
| | | | | | | | | There's no need to force the context to be current and the correct FBO to be bound when swapBuffers() is called, as this can easily be handled on a per-platform basis. Change-Id: I7af5a082d6a2b03dfa2cdc874c27617139a781a9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Temporary backwards-compatible QWindow::setPos accessorsShawn Rutledge2012-11-081-0/+6
| | | | | | | | To be reverted after I19c00b54b1d2712f9418e8bcf56e35a8008b89ef and and Ibd5cd10814c8cbd2b1f6e49b70782c7768d2366d are both integrated Change-Id: I2e14d732cc7fc4168e8b4507a050f43f1e4c9e49 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove QWindow pos, geometry and size as properties; pos->positionShawn Rutledge2012-11-083-25/+39
| | | | | | | | | | | Abbreviated properties are to be avoided. But all 3 of these properties are redundant from the QML perspective; and because QRect, QPoint and QSize are (wisely) not QObjects, it's not possible to bind to _their_ properties, which make these QWindow properties less useful than users might assume that they are. Change-Id: I19c00b54b1d2712f9418e8bcf56e35a8008b89ef Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Temporary backwards-compatibility window propertiesShawn Rutledge2012-11-071-0/+29
| | | | | | | | | | | These are intended to exist only during the integration of patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21, so that it will be possible to build the other modules. Then it will be reverted after the property renaming is propagated to all the other modules. Change-Id: I8d0c0774e685a728a98e8c866d95c606c927ff46 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-073-99/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Don't include qaccessible.h on QT_NO_ACCESSIBILITYKevin Funk2012-11-061-1/+3
| | | | | Change-Id: I1da4036c211172a72b73440648f4ff9ede761a69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Added MultipleWindows platform capability.Samuel Rødal2012-11-022-5/+10
| | | | | | | | | | | | | | Several platform plugins, like eglfs, kms, etc don't support multiple windows as there's no system compositor, they're rendering directly to a single back buffer. By adding a platform capability we'll be able to provide better error reporting when an application tries to create multiple QWindows on a single-window platform. Also, QML apps can use this capability to figure out whether they should create a QWindow for dialogs / popups / menus, or whether to just create items in the same scene, that are shown on top of the rest of the content. Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Introduced QWindow properties {min/max}imum{Width/Height}Samuel Rødal2012-11-023-0/+70
| | | | | | | These are useful when QWindow is exposed to QML. Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove a couple of unused variables.Miikka Heikkinen2012-11-021-2/+0
| | | | | Change-Id: I33528cdb27801317d311d39e4499d2db6a291377 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Send leave to most recently entered window when modal dialog is shown.Miikka Heikkinen2012-10-303-0/+23
| | | | | | | | | | | | | | | If a modal dialog was shown as a response to button click, the button retained its hover highlight, because it didn't get leave event. Fixed by tracking the most recently entered window and sending a leave to it when modal dialog is shown that blocks it. Also modified tst_QGuiApplication::modalWindow() autotest to check for enters and leaves. Task-number: QTBUG-27644 Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix syncing of visibility and enabled for menus on CocoaAndy Shaw2012-10-261-0/+1
| | | | | | | | | | | Fixed menu handling on Cocoa so if a menu is enabled/disabled or made visible or not then it will keep this in sync with the appropriate native menu entry. Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com> Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Remove stale QT_MODULE() usage casesKonstantin Ritt2012-10-255-10/+0
| | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: I167ccb4c9e92ec9b5e4faeb02bf9c5ef5d982b50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add ContextMenu event to QWindowSystemInterfaceMiikka Heikkinen2012-10-255-1/+56
| | | | | | | | | | | | | Context menu key wasn't working, as QPA had no handling for it. Added ContextMenu event to QWindowSystemInterface and proper handling to QGuiApplication and QWidgetWindow. Also provide Windows implementation. Task-number: QTBUG-27648 Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix excess enter/leave event generation for native widgetsMiikka Heikkinen2012-10-193-2/+54
| | | | | | | | | | | | | | | | | | | | | | Native widgets have a native window each, so QPA plugin sends enter and leave events for associated QWindow whenever mouse cursor moves from one widget to another. QWidgetWindow had no context to interpret these events as moves from one widget to another, since they were sent separately. This resulted in leaves and enters for each widget in parent chain, when only the bottom child should have gotten them. Fixed by peeking into window system message queue when handling leave in QWidgetWindow and retrieving the entered window from queued enter event. Also provided a convenience function that QPA plugin can use to ensure both leave and enter events are in the event queue when moving from one QWindow to another. Task-number: QTBUG-27550 Change-Id: I74fec0ac90f6848495c2392c5f7e41624ad8aea2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowStateRichard Moe Gustavsen2012-10-173-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set the window state if it can, and return the actual window state back. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowState would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window state upon creation). As such, the window state might be left unsynched with the platform window. This patch suggests removing the return value from QPlatformWindow::setWindowState. This will at least be consistent, so that setting/getting state would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported/actual window state. Change-Id: Ie43f56169656854a765ce88b47a808f8f3d51bb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add QDrag class to 'draganddrop' groupGatis Paeglis2012-10-171-0/+1
| | | | | | Change-Id: I0cb96f57486dbda7cb9ca19556515e1b2b4f6c3e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix setting custom cursor for widgets and windows before showing themMiikka Heikkinen2012-10-162-15/+22
| | | | | | | | | | | | If custom cursor was set before the window was created, it didn't actually get set, and in some cases even caused a crash. Fixed by making sure the cursor is correct when showing widget/window. Task-number: QTBUG-27535 Change-Id: I3bc946a9c406c96af5b86869a3a54893f8980aba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>