summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Edit focus should not be lost unless by explicit actionSami Merila2009-12-211-1/+5
| | | | | | | | | | | | Currently non-touch devices lose edit focus if window switch happens. I.e. in cases when screensaver activates, an incoming call occurs, a global notification is shown... With this fix, edit focus remain active, until user removes the focus explicitly. Task-number: 4792 Reviewed-by: axis
* Optimisations to gesture event filtering.Denis Dzyubenko2009-12-151-6/+40
| | | | | | | Now we don't filter some events through the gesture manager and use QMap instead of QHash, which seem to be a bit faster in our cases. Reviewed-by: Olivier Goffart
* Fix crashes when deleting QWidgets and QGraphicsItems in touch event handlers.Bradley T. Hughes2009-12-111-2/+8
| | | | | | | | | | | | | | Use QWeakPointer to bail out early if a widget is deleted while we are delivering/propagating a TouchBegin event. In QGraphicsScene, we need to make sure that we clear the scene's active touch points for items that are removed from the scene. This allows us to detect when an item is removed during TouchBegin event delivery/propagation. Unlike QWidget, propagation continues since we use a hit-test instead of the item's hierarchy for propagation. Task-number: QTBUG-6654 Reviewed-by: bnilsen
* We don't need to initialize multitouch in non-gui applications.Denis Dzyubenko2009-11-241-1/+2
| | | | | Reviewed-by: trustme Patch-by: raipriha
* Fixes in the multitouch handling.Denis Dzyubenko2009-11-181-28/+48
| | | | | | | | | | | | When filling in touch point data for delivering to widget don't use the setter methods to avoid unnecessary detaches. Making it not detach also allows not to re-calculate widget-relative start position and last position on each delivery step. Also use the QWeakPointer to store a pointer to a widget that expects to receive a touch event, so that if the widget is destroyed we'll get notified. Reviewed-by: Bradley T. Hughes
* PlatformPlugin: Do not load the plugin if there is no GUIOlivier Goffart2009-11-101-1/+2
| | | | | | | Otherwise valgrind might complain we use uninitialized value (when using the X11 structure) Reviewed-by: Gabriel
* Merge commit '51c9b68' into 4.6Morten Johan Sørvig2009-11-041-47/+11
|\ | | | | | | | | | | Conflicts: dist/changes-4.6.0 src/gui/kernel/qevent.h
| * Gesture api review.Denis Dzyubenko2009-11-031-48/+6
| | | | | | | | | | | | Changes to the gesture api after the review. Reviewed-by: Jasmin Blanchette
| * Modified gesture events propagation.Denis Dzyubenko2009-11-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | By default if the gesture is ignored, only gestures in the started state are propagated, and accepting a gesture in the started state adds an implicit grab meaning all the following events in the gesture sequence will be delivered to that widget. This is similar to the way QTouchEvent is propagated. Also added a hint, which specifies if gestures in any state can be propagated to the widget which has enabled the hint. Reviewed-by: Thomas Zander
| * Made native Pan gesture work on Windows.Denis Dzyubenko2009-11-031-0/+1
| | | | | | | | Reviewed-by: trustme
* | Merge commit 'origin/4.6' into featureJørgen Lind2009-11-021-4/+3
|\ \ | |/
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-platform-team into ↵Bradley T. Hughes2009-10-281-1/+3
| |\ | | | | | | | | | 4.6-WM_NULL-driven
| | * Implement QApplication::unregisterGestureRecognizerThomas Zander2009-10-261-1/+3
| | | | | | | | | | | | Reviewed-by: Denis Dzyubenko
| | * Merge branch '4.6' into 4.6-platformDenis Dzyubenko2009-10-261-17/+24
| | |\
| * | \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6-WM_NULL-drivenBradley T. Hughes2009-10-281-21/+24
| |\ \ \ | | |/ / | |/| |
| * | | Remove workarounds for Win32 event dispatcher bugsBradley T. Hughes2009-10-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the startstop timer delay in QAbstractAnimation, and the inSizeMove workaround for paint events. Reviewed-by: Prasanth Ullattil
* | | | Fix LIBRARY and ICONJørgen Lind2009-10-291-1/+4
| |/ / |/| | | | | | | | | | | | | | However, compiling with QT_NO_ICON will still not work :( Reviewed-by: tom
* | | Implement support for wheel delta with finer resolution than 15 deg.Richard Moe Gustavsen2009-10-271-4/+0
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, Qt, in many places, does not really understand that a mouse wheel, or touch pad, might operate on a much higher granularity than 15 degrees (that is, a delta of 120). This is clear disadvantage on mac, since the mighty mouse, and track pad, got a resolution that is close to 1 degree. This is called pixel scrolling. This patch first and formost changes the implementation of QAbstractSlider::wheelEvent to _really_ understand what to do when delta is less than 120. Rather than accumulate delta until 120 is reached, then scroll with a value equal to: offset * step * QApplication::wheelScrollLines (default = 3), we multiply offset directly, before waiting for 120. This means that event tough offset is below 120, multiplying it with wheelScrollLines and step will very often give a value over 120, menaing we can scroll much earlier and _much more_ fined grained. This also fixes some auto tests that was ifdeffed out because of specialised mac code written inside this function from before. (NB: we still plan to introduce a new event for pixel scrolling, perhaps for Qt-4.7) Rev-By: Andreas Rev-By: denis
* | Improvements for gesture event deliveryDenis Dzyubenko2009-10-221-16/+16
| | | | | | | | | | | | | | | | | | When delivering GestureOverride events by default both the event and individual gestures will be ignored. We also store the acceptance state of individual gesture in the event and not in the gesture object, along with its target. Reviewed-by: Thomas Zander
* | Improving gesture event delivery for widgets.Denis Dzyubenko2009-10-221-0/+1
| | | | | | | | Reviewed-by: trustme
* | Fixed gesture event delivery when several gestures are triggered.Denis Dzyubenko2009-10-221-1/+1
| | | | | | | | | | | | | | | | When there are two different gestures are being triggered and they are supposed to be sent to different widgets, don't stop event "propagation" when the first event is successfully delivered. Reviewed-by: trustme
* | Improved gesture event filtering inside QGraphicsView for QGraphicObjectsDenis Dzyubenko2009-10-221-2/+7
| | | | | | | | Reviewed-by: trustme
* | Fix bug in embedded dialog demo with tab focus.Alexis Menard2009-10-201-0/+1
|/ | | | | | | | | | | | On embedded dialog pressing tab stop changing the focus when the focus was given to QFontComboBox. It's because QFontComboBox embed a QLineEdit in order to allow editing. But this QLineEdit is a focus proxy so we need to special case that. The logic is the same in QApplication. Be careful when changing one of them. Task-number:QTBUG-4818 Reviewed-by:jan-arve Reviewed-by:ogoffart
* Revert "Change the way we handle KeyboardUIMode on Mac"Benjamin Poulain2009-10-201-16/+4
| | | | | | This will be handled differently (QTBUG-4751) This reverts commit b12fb5861ce09539c04cd51db12a9bfbe32a4774.
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Alexis Menard2009-10-201-1/+4
|\
| * Fixed a rare crash in qt_x11_enforce_cursorGabriel de Dietrich2009-10-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | A QPointer was set to point to a QWidget by one of its children, during its deletion. This happens during the child deletion, and after the call to QObject::clearGuards(), which means that the QPointer becomes a dangling one. The fix ensures that qt_x11_enforce_cursor will not be called with a being-deleted QWidget. The included auto-test doesn't test anything, except that it doesn't crash. Reviewed-by: Olivier
* | Doc: Documentation for gesture features. Still a moving target.David Boddie2009-10-161-1/+1
|/ | | | Reviewed-by: Trust Me
* Doc: Gesture API documentation review.David Boddie2009-10-121-10/+13
| | | | Reviewed-by: Trust Me
* Added documentation for the Gesture API.Denis Dzyubenko2009-10-121-0/+18
| | | | Reviewed-by: trustme
* Fix for qapplication::testDeleteLaterProcessEvents autotest in Symbian.Janne Anttila2009-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | Deleting qt_desktopWidget eventually ends up to QSymbianControl destructor. Calling setFocusSafely from QSymbianControl destructor causes a new events to be posted to event queue. Posting events tries to wakeup event dispatcher, which was deleted in QApplication destructor before calling delete for qt_desktopWidget. This makes application to panic. The fix is to change is_app_closing and is_app_running flags to correct state immediately after event dispatcher is closed down, and check the is_app_closing flag in QSymbianControl destructor. The change fixes panic in qapplication::testDeleteLaterProcessEvents, and otherwise QApplication and QWidget autotest results are same as before change. Reviewed-by: Miikka Heikkinen Reviewed-by: Brad
* A new implementation of the Gesture API.Denis Dzyubenko2009-10-091-0/+89
| | | | | | | Implemented gestures using gesture events and separate QGesture/QGestureRecognizer classes. Reviewed-by: trustme
* Integrate the GuiPlatformPlugin interfaceOlivier Goffart2009-10-071-32/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This is an internal interface for plugins that can be provided by the platform to give platform-specific features by platforms built on top of Qt. We can easlily integrate Qt on Windows, Mac, Gnome, ... without any plugin because we can link to their respective library (dynamically if we don't want to depend on it). On Gnome, we can dynamically resolve Gtk+ symbols. This is however not possible for KDE or other platform built on top of Qt: we can't link against their library because they depend on us and we can't dynamically resolve the symbols because they are mangled (C++) So this plugin provides hooks inside Qt to be able to do things like native File or Color dialog, native icons, accurate reading of the config file, and so on. This is currently private API. Task-number: QT-406 Reviewed-by: Jens Bache-Wiig Reviewed-by: Oswald Buddenhagen
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-10-011-1/+1
|\
| * Fixed Designer property editor selection bug.Gabriel de Dietrich2009-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the editor had been created inside the QtPropertyEditorView (inheriting QTreeWidget), the subsequent show sent a synthetic mouse move event down to the QLineEdit, and a new selection was made on the text because the mouse button was marked as pressed in the event. QApplicationPrivate::sendSyntheticEnterLeave() now sends a mouse move event without any button pressed. Auto-test included in tst_QWidget. Task-number: QTBUG-4055 Task-number: 253159 Task-number: QT-659 Task-number: 245398 Reviewed-by: bnilsen
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Fix: Abstract slider does not understand wheel events properlyRichard Moe Gustavsen2009-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | A wheel event contain delta values that describe the rotation angle the wheel was rotated (in 1/8 of a degree). For some mouse devices (thinking of mac mighty mouse/trackpad) the resolution is better than the standard 15 degrees. The Qt docs describe how to deal with this. But abstract scrollbar does did follow this recipe, but it does now with this patch. Reb-By: prasanth
* | Add the -testability option to Qt applications.Petri Kiiskinen2009-09-291-0/+24
| | | | | | | | | | | | | | | | If this option is given, Qt will load a plugin called "qttestability" and run an initialisation function from it. This allows one to just install the plugin in a non-debug device in order to enable testing. Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* | Change the way we handle KeyboardUIMode on MacBenjamin Poulain2009-09-251-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | On Mac OS X, when the keyboard UI mode specifies "text boxes and lists only", the tab key should only focus lists and text edit. The previous implementation was using the focus policy to exclude the buttons. This does not respect the configuration. The change fixes tst_QApplication::focusChanged() with the Keyboard mode "text boxes and lists only". Reviewed-by: Richard Moe Gustavsen
* | Add a new compressable event QEvent::UpdateSoftKeys.Jason Barron2009-09-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | Now that the softkey framework triggers updates on focus changed, window activated, and action added/removed/changed the softkey bar was updating many times resulting in flicker. Solve that by introducing a new event type that is posted to the softkey framework. Since we only need to update the softkeys once per event loop iteration, the event is compressible in the event loop. Reviewed-by: Alessandro Portale
* | Making Keypad Navigation more usableAlessandro Portale2009-09-191-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All changes of this commit are #ifdef'ed in QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice any change. Navigating between QWidgets was not alwys a pleasure on keypad devices. This commit fixes the navigation behavior for some widgets, mostly itemviews. Furthermore, it adds a 'directional' navigation mode. Until now, the existing keypad navigation used the tab order do go back and forth between widgets. The new mode is supposed to provide a more intuitive navigation. It is the new default mode on Symbian. Screens (and their resolutions) become bigger, and also low resolution screens can be used in landscape mode. That's why the directional mode was requested. Another popular request was to put some more convenience into QSlider: If a (horizontal) slider has focus and the user presses left/right, the value of the slider may directing change without being selected (edit mode). This commit also adds the manual test 'keypadnavigation'. Reviewed-by: Shane Kearns
* | doc: Fixed some qdoc errors.Martin Smith2009-09-161-1/+1
| |
* | QCursor support for Symbian OSShane Kearns2009-09-151-15/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Jason Barron Reviewed-By: Alessandro Portale Summary: QT_NO_CURSOR is now not defined for symbian builds Existing QCursor APIs are all supported New public API, QApplication::setNavigationMode, to allow the navigation mode to be set. I.E. on an S60 3.2 phone, some applications will want a virtual mouse cursor (web browser), while others are designed for keypad navigation. Symbian HAL is used for detecting input capabilities. Fix DND, code cleanup & comment QCursor visibility now uses a refcount, and is called from DND and the setNavigationMode so they are both simpler and don't interfere with each other. QApplication::setNavigationMode New public API for configuring cursor/keypad navi style. This links in with ongoing work on the 4-way keypad navi branch, but 2-way and 4-way modes both act as 2-way mode until that is integrated Some of the demos/examples have cursor switched on (those that were not usable with keypad) Virtual mouse support for non touch, non mouse phones (tested on N78) add *.d and .metadata (carbide debug file / workspace dir) to .gitignore System pointers are unavailable when using sprite workaround, so the system cursor shapes are compiled into qtgui as resources. MAC port does this also for shapes that aren't standard on the MAC. Refactor Drag'n'Drop to use QCursor Add test case to check all system cursor shapes Simply a mainwindow containing a label widget for each cursor shape, with the cursor property set appropriately QCursor(QBitmap,QBitmap) supported Fixed problem with the image & mask being inverted when using the QCursor constructor that takes two mono bitmaps. add .make.cache files to .gitignore Correct implementation of QApplication::setOverrideCursor QApplication::restoreOverrideCursor and QApplication::setOverrideCursor are now working correctly on Symbian platform. Performance will be slower compared with other platforms, because the Symbian window server has a cursor associated with each native window. Add test case for custom cursors Create a pixmap cursor and associate it with a widget. No changes to production code, since test passed 1st time ;) Add manual test for QCursor Make cursor independent of construction order Updated to work around window server issue where contruction order affects what cursor is displayed in child windows. Also changed to effectiveWinId following review comments Also fixed a problem which would make qcursor not link if configured with QT_NO_CURSOR Moved some multiply declared extern functions from cpp to _p.h files Implemented Symbian versions of the cursor functions. Merged in work I'd done based on tower. Fill in bits of stub functions based on windows port Removed QT_NO_CURSOR from list of config options forced on symbian Recompiled configure.exe Added stub functions for the missing functions in s60 port
* | Implement synthetic enter/leave events for QWS.Paul Olav Tvete2009-09-141-4/+14
| | | | | | | | | | | | | | QWS uses alien widgets too, so we need the same logic as the other platforms. Reviewed-by: bnilsen
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'origin/4.5' into 4.6Joerg Bornemann2009-09-081-2/+12
|\ \ | |/ | | | | | | Conflicts: src/gui/kernel/qapplication.cpp
| * Doc: keypad navigation is supported on Windows CEJoerg Bornemann2009-09-081-2/+10
| | | | | | | | Reviewed-by: thartman
* | QApplication: Small commentMarkus Goetz2009-09-021-0/+1
| |
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me