summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* QPA: Introducing QPlatformTheme standardPixmap(), fileIconPixmap()Gabriel de Dietrich2012-10-162-1/+102
| | | | | | | | | | | | | | | | | | | | The basic idea is that the platform theme is now responsible for providing the pixmaps for the given standard name, or any file or directory. Then, the QStyle implementation should query the platform theme for the pixmaps, and build the icons accordingly using ThemeHint::IconPixmapSizes. Same thing for QFileIconProvider. This also opens future support for getting platform dependent pixmaps in QtQuick components. Also includes the implementation for the Cocoa (QCocoaTheme) and Windows (QWindowsTheme) platform plugins. Task-number: QTBUG-27450 Change-Id: I4e8406585d970a9af481be10f6643cf0abbc38a3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QScreen's physicalSize can change. Ensure siblings are updated.Shawn Rutledge2012-10-162-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | I have found the following scenarios when the physical size can appear to change even though you can't actually stretch your monitor: 1) VNC allows setting the resolution. Physical size will then be a fraction of the physical size of the monitor on which you display the VNC window. 2) When you rotate your display, the width and height are reversed. 3) MacOS X simulates a change in physical size when you change the mode to one whose aspect ratio does not match your monitor, and also when you use simulated HiDPI mode on a non-HiDPI monitor. While this info is basically wrong, since we are now querying the OS for it, we might as well make sure it is propagated all the way through to the QScreen object's properties. Also, make sure that when geometry changes on one screen, all the siblings are informed of the change in virtual geometry. Also simplified the signals (don't need separate ones to inform of changes which are fundamentally related to each other and always change together). Change-Id: I6a98a1c203e24e8fbeef6e90999671e56dc0c655 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QKeySequence: remove duplicate QDataStream operatorsJ-P Nurmi2012-10-151-5/+0
| | | | | | | The operators are implemented in qkeysequence.cpp Change-Id: Id3078abe944673dd2076cc642e4474caa1472dcc Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowFlagsRichard Moe Gustavsen2012-10-153-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set as many of the flags it can, and return the same flags with the unsupported flags removed. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowFlags would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window flags upon creation). As such, the filtering would never be done. Looking at the current set of plugins, most of them also seems to ignore this protocol, returning the flags unfiltered. This patch suggests removing the return value from QPlatformWindow::setWindowFlags. This will at least be consistent, so that setting/getting flags 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 window flags. Change-Id: I9c759b5f9fab5ebed764a982f77fe19881118875 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix "open with" functionality on OSX (FileOpenEvent)Shawn Rutledge2012-10-131-0/+4
| | | | | | | | | | | | QGuiApplicationPrivate::processWindowSystemEvent needs to handle the FileOpen event type so that applications can receive the events from the Finder. This makes it possible to e.g. double-click a qml file and open it in QML Viewer. Task-number: QTBUG-26855 Change-Id: I1e14e478460e8823095e4a33cee1e0defbf76d8b Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Be able to obtain list of possible key combinations in platform integrationOliver Wolff2012-10-133-1/+22
| | | | | | | | | | | | As there is no way to obtain the list of possible keys for a shortcut in a platform independent way there needs to be a way to get that from the platform integration. Task-number: QTBUG-26902 Change-Id: I520add56ee09d5c3c58709fb29dad2fbfe4c9d0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove handleSynchronous* functions.Morten Johan Sorvig2012-10-104-68/+57
| | | | | | | | | | | | | | | | | | | | There are now two different ways to implement synchronous event processing. The platform plugins can choose which one to use. 1) flushWindowSystemEvents() Use to flush the event queue at one point, making preceding calls synchronous. 2) setSynchronousWindowsSystemEvents(bool enable) Makes all handle* functions synchronous, bypassing the event queue completely. Change-Id: I020b80c731fd13f855a377d7c91d06a4e39b6a0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Mac: Bring back "Text boxes and list only" tab navigationGabriel de Dietrich2012-10-102-1/+7
| | | | | | | | | | | | | Added ThemeHint::TabAllWidgets as a mean to access that platform specific bool. The default implementation returns always true when querying QPlatformTheme::themeHint(). Several auto-tests had to be updated to reflect for qt_tab_all_widgets' type change. One XFAIL removed from tst_QApplication::focusChanged(). Task-number: QTBUG-24372 Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Prevent crashing on screen deletion.Samuel Rødal2012-10-081-0/+2
| | | | | | | | | Even child windows need to hook into the screen destroyed signal to avoid having a dangling screen pointer. Change-Id: I7b613356c333be6e9dfdf5db45f70a521a9b8fe2 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Show widget cursor after restoring last override cursorMiikka Heikkinen2012-10-041-2/+15
| | | | | | | | | | | | | | | | qwidget_qpa.cpp was setting cursor directly to platform window, so QWindow didn't actually know what cursor was supposed to be shown. Since QWindow now supports setting cursor and has override cursor handling there, set cursor via QWindow instead of platform window. Also changed QGuiApplication override cursor handling so that it will query the cursor from QWindow if there is no override cursor. With these changes, widget's custom cursor will be properly shown when final override cursor is restored. Task-number: QTBUG-24674 Change-Id: I2d2bb1027779256f9d6de560b6533f45e205ffe9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* OpenGL: Don't request a context version higher than is supportedSean Harmer2012-10-033-7/+15
| | | | | | | | | | | | | | | The function wglCreateContextAttribsARB will fail if we request a context version higher than is supported. We therefore upper-bound the requested version by the version of the static context. This results in context creation succeeding and having the closest possible match to the requested format. The xcb qpa plugin is modified to operate similarly to the windows plugin in that it now creates a "static" context which is used to limit the versions of contexts requested by the user. Change-Id: I277ad7cc82edfdf7b9d8502ad921c8175feb1a4a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introducing the PlatformPanel event type.Sergio Martins2012-10-035-1/+37
| | | | | | | | | | | | | | | | | This event can be used by any platform plugin to implement special application panels/overlayed menus. Currently used by QNX only. This replaces sending fake Qt::Key_Menu presses in the QNX plugin. Qt::Key_Menu is already used when invoking context menus with the keyboard. Change-Id: I9c8f1743fd147a07c11883323800017376915ae1 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Set CWD when launched from Finder.Morten Johan Sorvig2012-10-021-1/+13
| | | | | | | | | | | Like Qt 4. Use the presence of the "-psn_" command- line argument to detect Finder launches. Link QtGui against the Cocoa framework due to CFBundle usage. Change-Id: I947ae53462072fbdb23afcc0a13ce6b26d02c191 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QWindow::setWindowFilePath addedJoerg Bornemann2012-10-025-0/+32
| | | | | | | | | | | | QWindow::setWindowFilePath sets the file path of the document that is currently represented by the window. The window system might display it in the window's title bar along with an icon matching the file type. Task-number: QTBUG-27299 Change-Id: I8f620d1262fc0b4cd16884198b16853b73ce3b1f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Document QPA implementation aspects.Friedemann Kleint2012-10-011-0/+31
| | | | | Change-Id: I4fef8a534b145efa9655a9070f790bf9aba030d9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Added QGLPixelBuffer implementation using framebuffer objects.Samuel Rødal2012-09-271-0/+1
| | | | | | | | | | | Instead of having QGLPixelBuffer be a unusable stub implementation we deprecate it and implement it in terms of QOpenGLFramebufferObject. Framebuffer objects are anyway the recommended replacement for pixelbuffers in modern OpenGL, as the context switching overhead is avoided. Change-Id: Ia220c358ee92813e87981d297c51d84525010322 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix QScreen::orientation() not always being updated after changing the ↵Simon Hausmann2012-09-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | update orientation mask The back-end might report screen orientation changes at any point and we record it in screen.d->orientation. However QScreen::orientation() returns the orientation filtered according to the mask. Changing the mask sends a notification to the back-end, which might send another update as a result of a possible subscription to system services (accelerometer). However on platforms where no subscription is required, where the platform plugin ignores the mask and always sends the latest orientation, we should "simulate" the update by updating the filtered orientation according to the new mask. The function is cheap to call as it won't emit any signals unless the orientation actually changes. This patch also adds missing flush() calls after handleScreenOrientationChange calls in the tests to ensure that the (synthetic) window system events are actually delivered to QScreen/QGuiApplication. Change-Id: Iebdd050f947e658ff5bc388629aa4cb31ab497fe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Fix events being processed on application startSimon Hausmann2012-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit ef2efafcc6b28791df6258fa1c5d565090a9577a introduced a call to QWindowSystemInterface::sendWindowSystemEvents() in QGuiApplicationPrivate::init(), which in its implementation ends up calling sendPostedEvents() before flushing and processing any pending (internal) window system events. This patch changes the call in init() to use QWindowSystemInterface::flushWindowSystemEvents() instead, which is more gentle in that regard. The provided unit test verifies that no posted events are processed during the execution of the QGuiApplication constructor while at the same time verifying what the original changed tried to do: Allow a generic plugin to provide window system specific defaults that are implemented using the event queue of QWindowSystemInterface. Task-number: QTBUG-26886 Change-Id: I129a907c00d947df60fe1a02efc67857580fce24 Reviewed-by: David Faure <faure@kde.org>
* XCB: Correctly report the created OpenGL context version and profileSean Harmer2012-09-262-0/+36
| | | | | | | | | | | | | | | This commit fixes the xcb qpa plugin such that it now correctly reports the version and profile of the created OpenGL context in the QOpenGLSurfaceFormat. To do this we have to create a temporary X window so that we can make our new context current. We also handle the buggy nVidia drivers which incorrectly report 0 for the GL_CONTEXT_PROFILE_MASK query. The reduced format is also copied back from qglx_findVisualInfo. Change-Id: I6f34fe1c6130aebbb6b40c36df4acc216069d2b1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-261-2/+2
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-22109-2618/+2618
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed multiple modal windows from all blocking each other.Samuel Rødal2012-09-211-0/+2
| | | | | | | | | | | | A modal window in front in the modal window list should never be blocked by a modal window further back in the list. This was taken care of in QGuiApplicationPrivate::isWindowBlocked(), we just need to make sure it gets called when a new modal window gets shown so that its blocked status is up to date. Task-number: QTBUG-27206 Change-Id: I590f1715e66067edb178081352636f34fe54a885 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Do not refer to non-existant member in QSurfaceFormat docsLaszlo Agocs2012-09-201-2/+2
| | | | | | | | | | Sample buffers should be enabled automatically under the hood when samples is > 0 and therefore the getter and setter are gone. Change-Id: I9cd6438e89060f901598a6aacacb99362fac4718 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove qUpperBound usages from qtbaseGiuseppe D'Angelo2012-09-191-1/+1
| | | | | | | | | Replace them with std::upper_bound; this allows for deprecation of qUpperBound. Change-Id: Idef01d2228b9a70eee3d52931d7aedb5bb6ba902 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove qLowerBound usages from qtbaseGiuseppe D'Angelo2012-09-191-2/+4
| | | | | | | | | Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix mapping to/from global coordinates for child/embedded windows.Miikka Heikkinen2012-09-183-2/+36
| | | | | | | | | | | | | | | | | | | | | QWidget's mapToGlobal() and mapFromGlobal() functions assumed that if the widget reports it's a window or if it has no parent widget, it must be a top level window whose coordinates are in global coordinates. This is not true for child QWindows or embedded native windows (QAxWidgets). Changed the logic for mapping coordinates to use equivalent methods from QWindow if widget has a window handle, and changed QWindow's methods to map coordinates using native methods if window is embedded. Also fixed newly failing accessibility autotest. The geometry related failures there popped up because now the position of the rect returned by accessible interface is actually correct while widget geometry still reports position 0,0 before widget has shown up. Task-number: QTBUG-26436 Change-Id: I658fafd0ce01eb1604ba255efeeba3073ca0189f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* X11 (xcb) support for QScreen-per-output and runtime changesShawn Rutledge2012-09-182-3/+19
| | | | | | | | | | | | | QScreen has notifiers for its properties, but they were not being emitted when one changes the resolution or arrangement of individual outputs, e.g. via xrandr. Also there should be one QScreen per "output", e.g. laptop LCD + external monitor means 2 QScreens which will be siblings, rather than just 1 QScreen to represent the whole desktop. Change-Id: Ia61bbc5e6a3506f813ab11f87c03d14cf7f4ce85 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* gui/opengl: Fix missing or improper include guard in headersSergio Ahumada2012-09-154-12/+12
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: I29b41e9d33e4ea17165f44c49de0a963574dd809 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* remove usage of QT_MAKEDLL in favor of the new QT_STATIC macroJoerg Bornemann2012-09-141-5/+5
| | | | | | Change-Id: I411cab0d92a8cad6b4f3676afe5cee050c4b789b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove deprecated QInputMethod::visible()Pekka Vuorela2012-09-142-11/+0
| | | | | | | | Replaced with isVisible() Change-Id: Id47683954e89c53e73fc5171977609de7f1b4245 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Fix misc. doc errors and document undocumented functionsaavit2012-09-123-71/+186
| | | | | | Change-Id: I0c1e0a36ee37d5a8f3741f0405f63f9b26967f32 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Added link to the OpenGL window example from the QOpenGLContext docs.Samuel Rødal2012-09-111-0/+3
| | | | | Change-Id: I650c61422485dfcb2fcc661a839294aa98b18e80 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>