summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Fix QT_NO_SYSTEMTRAYICON build.Sérgio Martins2012-09-111-0/+4
| | | | | | | | | The ifndef was added to the header but was missing in the implementation file. Change-Id: I25111b34b9c087465306ef81c23d6667257b5e71 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Removing duplicate includesSergio Ahumada2012-09-093-8/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix compilation error of qcursor_qpa.cpp with QT_NO_CURSOR.Sergio Martins2012-09-071-0/+2
| | | | | | | | | | | ChangeId Ia69f37343f95772e934eab1cd806bd54cbdbbe51 added two new methods to QCursor but didn't update the fake cursor. Qt5's build still fails with QT_NO_CURSOR somewhere in QT_METATYPE_INTERFACE_INIT(Type), but that's another story. Change-Id: Ib0c706faf78e547d93a1128085e440fe5d1a5e9b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Doc: Missing documentation added and doc errors fixed.aavit2012-09-057-13/+132
| | | | | | Change-Id: I573bf9622e38b54f2cb8c32fd402d477a1deb5c2 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Doc: fix yet more errors reported by qdocaavit2012-09-041-0/+36
| | | | | Change-Id: I67ac081ce95235912784bbbc347dd8f80fdebbde Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Fix doc errors in QScreen.Jason Barron2012-09-031-15/+13
| | | | | | | | | - Ensure all args are documented - Remove signals from \sa tag - Ensure return values are documented Change-Id: I1db111d082ee47f046598695bc3fa53d67798333 Reviewed-by: aavit <qt_aavit@ovi.com>
* Private slots should be named starting with _q_Sergio Ahumada2012-09-036-15/+16
| | | | | | | | | | | | | This is to reduce the risk of collisions with signals/slots in user classes q_updateFocusObject(QObject *object) => _q_updateFocusObject(QObject *object) q_checkFocusObject(QObject *object) => _q_checkFocusObject(QObject *object) q_connectFocusObject() => _q_connectFocusObject() emitActivated(QPlatformSystemTrayIcon::ActivationReason) => _q_emitActivated(QPlatformSystemTrayIcon::ActivationReason) Change-Id: I148913f1e24a80fe5cacfd737d1b455b805cfced Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Doc: Fix some documentation issues.Kim Motoyoshi Kalland2012-08-311-6/+6
| | | | | Change-Id: I21bba7b8a1808cf214cae1b7d3b6b5e41e36e3ba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Doc: Add documentation for deprecated function.Kim Motoyoshi Kalland2012-08-311-0/+7
| | | | | Change-Id: If1e76e4ac7f1da5f0362a7774b3341a4fedb31b0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Doc: Fix wording in \brief section.Kim Motoyoshi Kalland2012-08-311-2/+2
| | | | | Change-Id: I60748a681cce6bd61805376b2a2cd38d2020e68e Reviewed-by: aavit <qt_aavit@ovi.com>
* Doc: More fixes of qdoc-reported doc errorsaavit2012-08-311-1/+1
| | | | | Change-Id: I2dd815c471e56d2c239a63e7c7ad3496af2a585b Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Doc: Fixes for several doc errorsaavit2012-08-313-9/+10
| | | | | Change-Id: I5be9c8e9ff9c17fae0fbbe468f34439411aca06b Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Use the right getter for the QScreen::primaryOrientation property.Jason Barron2012-08-311-1/+1
| | | | | Change-Id: I408e4941163cd676133b2e41613162f52b685076 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Header contains `signals' - use `Q_SIGNALS' instead!Sergio Ahumada2012-08-311-1/+1
| | | | | Change-Id: I5ee1bfd0ce9c98d64b50cc727d414037fafb91c5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Doc: Fix various errorsaavit2012-08-307-54/+37
| | | | | Change-Id: I07503dd379779148b674ab0f806f6eeac5d7d4b7 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Fix mistake in docs. Return type should be QSurfaceFormatJason Barron2012-08-291-1/+1
| | | | | | Change-Id: I4f4bf2542bb89b28ee84773507d4a121b134e730 Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qplatformclipboard.h does not need qplatformdefs.h, so removeThiago Macieira2012-08-291-1/+1
| | | | | | | | | | | | It's not using anything from the qplatformdefs.h header in the public API (and it shouldn't, since qplatformdefs.h can change) nor in inline functions, so there's no need to include it here. Include qglobal.h, which includes qconfig.h, which is where the QT_NO_CLIPBOARD define will be, if anywhere. Change-Id: I913db9aface297e75f91b6346c0dc48439d7d1f6 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fix limitting shortcuts to keypad onlyJani Honkonen2012-08-271-2/+7
| | | | | | | | | | | | | | | | | The Qt::KeypadModifier modifier is internally masked away from all shortcuts. So it is not possible to set a keypad only shortcut. Changed the implementation so that first a full keysequence match is searched. Then if no match is found the same sequence is tried without the keypad modifer. Added a autotest for this also to cover the basic use cases relating to this. Task-number: QTBUG-20191 Change-Id: Ibe7740c705fd0ab1eece4809b9a0b48882172933 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* explain specifically how to make a transparent windowShawn Rutledge2012-08-251-2/+10
| | | | | | Change-Id: I136d8d9709d4fae914f12919e513641a6e76e3f0 Task-number: QTBUG-20768 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* doc: Fix several text-related qdoc warningsEskil Abrahamsen Blomfeldt2012-08-251-15/+15
| | | | | | | | | Also adds a new snippet which is just copy-pasted from the old documentation, because the snippet-file previously referenced seems to have disappeared. Change-Id: I0180715544321e076acda769cbdcbf19d50a971b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove remaining bits of deprecated QInputPanelPekka Vuorela2012-08-236-142/+4
| | | | | | | Introduced during Qt5 development and renamed to QInputMethod. Change-Id: If6744648dc98b779e65c449ae32626db574181df Reviewed-by: Joona Petrell <joona.petrell@gmail.com>
* Remove deprecation from enumerations in QtGui.Friedemann Kleint2012-08-221-1/+1
| | | | | | | | | | | | Referencing them in a (deprecated) function declaration causes a deprecation warning to be emitted each time the header is included, which causes a massive amount of warnings for qevent.h. It should be sufficient to deprecate them in the documentation and to deprecate function using them. Change-Id: I531b7c893e73428703cfb302615bff382abce54f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make Qt compile with -DQDND_DEBUG and fix debug messagesBerthold Krevert2012-08-222-59/+56
| | | | | Change-Id: Idf34880179e27cdd48ea3365108d2c7bca07e596 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add hint for touch -> mouse event synthesizingMorten Johan Sorvig2012-08-222-1/+4
| | | | | | | | | | | | | | | | | Commit 7808ec79 changes QApplication to synthesize mouse events from (unhandled) touch events. On Mac OS X this creates a conflict for two-finger scroll swipes, which generates both touch events and mouse wheel events: scrolling in QTextEdit will also select the text. Add a SynthesizeMouseFromTouchEvents platform style hint that enables the event synthesising. Set to true by default and false in Cocoa. Change-Id: I1ffa5a141476aa38b81ce92a87eff676c7ec2276 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix a bunch of Mac/clang specific warningsJiang Jiang2012-08-211-1/+1
| | | | | Change-Id: I0ecc67d58fb7e727a88a5f546eeca01ff7554502 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QWindow documentation fixes; make pos, size and geometry propertiesShawn Rutledge2012-08-212-55/+107
| | | | | Change-Id: I745bbe5d0baa68fc7ee49d6fe76d3678f3212b3d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
* Fixed qdoc complaints for qsurface and qsurfaceformat.Shawn Rutledge2012-08-212-15/+51
| | | | | | | Also QTBUG-25231 Change-Id: I54e1f2d4ca9a52590b28e4d5ea04a8ae4a48d318 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* QTouchDevice documentationShawn Rutledge2012-08-211-3/+6
| | | | | Change-Id: I33c39522c92ef1abd5572b757122f6467702b1e6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
* OpenGL: Use official glext.h and gl2ext.h headersSean Harmer2012-08-201-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Khronos group makes the glext.h (Desktop OpenGL) and gl2ext.h (OpenGL ES2) headers officially available nowadays. Most (all?) Linux systems ship this by default. On Windows platforms the glext.h file needs to be downloaded from http://www.opengl.org/registry/api/glext.h and placed alongside the system OpenGL header. Making use of the official header reduces the maintenance overhead for OpenGL support in Qt by removing the need to copy and paste definitions into the Qt sources. As the Khronos-provided headers are standardised and backwards and forwards compatible we can utilise these for all platforms rather than just for Windows. This means that all definitions required by Qt will be present even if the system ships out-dated equivalents. Mac OS X needs special handling in that we should always use the system-provided headers there. This is because Apple controls the OpenGL driver and the headers that go along with it. As such there is no possibility that the driver exposes additional functionality compared with the system-provided OpenGL headers. Apple has also decided to make different decisions about some OpenGL typedefs compared to other implementations. For example, Apple typdefs GLhandleARB to void* whereas other platforms use unsigned int. The alternative, which is to use the system provided glext.h (or gl2ext.h) header means that Qt code would need to check for the availability of such definitions wherever it is not guaranteed to be provided by core OpenGL/ES just to compile. The proposed approach means that Qt can compile regardless of the system's OpenGL extension support. We just need to be rigourous in runtime checking of support for extensions but that is already a requirement (and is missing in a few places, see TODO's added in this commit). The official Khronos headers are added to Qt as qopenglext.h - Desktop OpenGL qopengles2ext.h - OpenGL ES2 They need to be public but not part of QtGui module include, hence the headers have been modified by adding #if 0 #pragma qt_no_master_include #endif to them. This has been tested on: Gentoo Linux with GCC 4.6.3 Windows 7 with MSVC 2010 Mac OSX 10.8 with Apple clang 4.0 (based on LLVM 3.1svn) QNX with qcc (based on GCC 4.4) A small change is needed to QtDeclarative when building for OpenGL ES 2 after applying this commit. See https://codereview.qt-project.org/#change,31794 Change-Id: I4b3d2b1680baf4c78be9a87b4d8de076d23e8f82 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix in-process QAxServers inside modal windows.Miikka Heikkinen2012-08-203-2/+21
| | | | | | | | | | | | | | | | The main window of in-process QAxServers doesn't have QWindow parent, but it does have native parent that is part of the native window tree of the application. The lack of Qt parent makes embedded controls look like toplevel windows, which causes problems e.g. with modality. Introduced new optional method QPlatformWindow::isEmbedded() to detect if a window is an embedded window and utilized it in proper places during modality handling. Task-number: QTBUG-26871 Change-Id: Iac9a51dae06b8fc15410de7838857e203e4275b8 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Clean up QScreen::grabWindow()aavit2012-08-181-1/+1
| | | | | | | | | | | Handle 0 WId parameter as meaning "desktop window"/whole screen. Also, re-add the default values for the grab area, both for convenience and compatibility with QPixmap::grabWindow() in Qt4. Update the screenshot example so it doesn't comlain about usage of deprecated QPixmap::grabWindow(). Change-Id: I2ad229113ddb8ded0388f2ebc0e8c703c6657f1f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Move docs for QSessionManager to the right file.Frederik Gladhorn2012-08-151-0/+247
| | | | | Change-Id: Ia3735ac14fe91de8cfbb58fc68f1a37f04d7b668 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Handle "-psn_XXX" command line args on MacMorten Johan Sorvig2012-08-101-0/+4
| | | | | | | | | | | | Finder on Mac OS X sends a command line argument of the form -psn_0_3523420 when launching applications. Eat the argument like we do in Qt 4. Change-Id: I09db9dea035e62c0b816a833c9ad6fcd78f83735 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Simo Fält <simo.falt@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* OpenGL: Allow querying OpenGL extensions via the QOpenGLContextSean Harmer2012-08-093-0/+38
| | | | | Change-Id: Ia88470554bbfd2a56738dadfcafafe42a990382d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QWindowSystemInterface: fix mem leak and raceMarc Mutz2012-08-072-18/+26
| | | | | | | | | | | | | | | | | There was a race where QGuiApplicationPrivate::processMouseEvent accessed QWindowSystemInterfacePrivate::windowSystemEventQueue without holding QWindowSystemInterfacePrivate::queueMutex. There was a memory leak where QWindowSystemInterfacePrivate::windowSystemEventQueue would not delete events contained in it when it was destroyed. Fix both of these by properly encapsulating the QList/QMutex pair in a small class, WindowSystemEventList, that allows only properly protected access to the internal QList and calls qDeleteAll() in its dtor. Change-Id: Ifaa9968c9272096df2f7109a7a6cf1c8e5fa736c Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fixed popups getting blocked by modal windows.Samuel Rødal2012-08-061-1/+1
| | | | | | | | | | | | | | In the case of a file dialog with a completer, the completion list view is a popup that is not a transient child of the file dialog. Thus it ends up getting its blockedByModal flag set due to the file dialog window being a modal window. To prevent this we make sure popups don't get blocked by modal windows, as they were special cased and processed before modal windows in Qt 4.x. Change-Id: Id5688cfb1534541cd1678b1e53d75e34a68f9b8e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix intended assignment to customSet variable.Frank Osterfeld2012-08-061-1/+1
| | | | | | | | The naming suggests that this variable should be set to true here (instead of leaving the expression result unused). Also, the variable isn't written to anywhere else. Change-Id: I8aae904f6e4456ce0bdd053ce89c2721168dccd3 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-033-5/+5
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use glFlush() if swapBehavior is single-bufferedJan-Arve Saether2012-08-021-1/+2
| | | | | | | | | | | | | Otherwise, use swapBuffers() This fixes an issue where swapbuffers() did not swap the "back buffer" to the "front buffer" if we had single-buffered swap behavior. This was an issue on Windows 7 with an NVIDIA graphics card that by default was using single-buffered mode. Change-Id: If53f54146e4633305be3ad5158565752b6516b59 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make tests compile without gui-privatePaul Olav Tvete2012-08-021-0/+40
| | | | | | | | | | | | | Add new qt_handleXXX functions that forward to the QWindowSystemInterface functions, and use those in the testlib inline functions. Remove use of struct QWindowSystemInterface::TouchPoint from the testlib header files (requiring some slight increase in ugliness in the two tests that use that struct). Also remove the qmake hack that adds private headers to all tests Change-Id: Iec23537e55a44802f6e9cd463f7a0f82007c5250 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Move QPlatformWindowPrivate into its own headerLaszlo Agocs2012-08-023-6/+76
| | | | | | | | | Most other qplatform* classes have the same setup and more importantly this allows QPlatformWindow subclasses to utilize the d-pointer. Change-Id: I52afeaaf35bba8ef42d59ff3107f7d7bcf931e5e Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* fix a few qdoc command typosJeremy Katz2012-08-011-2/+2
| | | | | Change-Id: I5eb3a6d2bb7939f001f1fcb836660dd46a47c350 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-012-2/+2
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* replace \key and \gui qdoc commands with \uicontrolJeremy Katz2012-08-011-4/+4
| | | | | Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Implement synchronous WS events by flushing.Friedemann Kleint2012-07-312-10/+21
| | | | | | | | | | | | | | | | | | | | | | | Previously synchronous window system events were implemented by bypassing the queue and processing the event immediately. This is not ideal since the event order is not preserved - there might be "happened before" events waiting in the queue. Add QWindowSystemInterface::flushWindowSystemEvents and change all handleSynchronous* to 1) queue the event 2) call flushWindowSystemEvents. flushWindowSystemEvents is almost identical to the already existing sendWindowSystemEvents with the exception that it does not call QApp::sendPostedEvents. Move the common implementation to a new private function. Task-number: QTBUG-20778 Change-Id: Ie98a83875bc0a14e335e36bed0dd9e0ed4a1dea0 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* WindowSystemInterface::sendWindowSystemEvents(): Remove unused parameter.Friedemann Kleint2012-07-233-3/+3
| | | | | | | | No need to pass the dispatcher. Get rid of Windows logic to maintain a stack of dispatcher associated with flags. Change-Id: Ic2daad4b6762a46fac3274937effc188af436c9a Reviewed-by: David Faure <faure@kde.org>
* Provide public API for native event filtering, moved up from QPA.David Faure2012-07-203-56/+0
| | | | | | | | | | | | | | | | | | The previous API was hard to use (global function, no type safety, manual chaining), and confusing (app vs dispatcher split only made sense on Windows). Installing and removing out of order would have the risk of setting back a dangling pointer (crash). Meanwhile QPA added type safety, and this new API models the QObject::installEventFilter API for ease of use. The virtual method is in a new interface, QAbstractNativeEventFilter. QPA was even calling the dispatcher event filter with QPA-private event classes, which made no sense (refactoring leftover from when the code was in the dispatcher). Now the QPA plugins trigger the qcoreapp event filters with the actual native events directly. Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-193-5/+5
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Mirror potentially themeable style hints in QPlatformTheme.Friedemann Kleint2012-07-184-16/+84
| | | | | | | | | | | | | | | Currently, most of the QStyleHint-values are potentially configureable by the user in certain desktop environments. Add them to the QPlatformTheme and query the theme first. Keep the values in QPlatformIntegration such that simple integrations that do not implement themes are not forced to implement them to change the values. Change-Id: I15742a5968df0ad5d7398cceae640dc7e541da52 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Make qwindowsysteminterface.cpp compile with QT_NO_SHORTCUTJeremy Katz2012-07-161-0/+25
| | | | | | | | Task-number: QTBUG-24816 Change-Id: Ia3d20775d28922ee94f965b4a7bc993915f34d6b Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>