summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the graphics system before creating the style.Jason Barron2010-03-181-6/+8
| | | | | | | | | | | | Previously if the style was creating any pixmaps they were going to the createDefaultPixmapData() function which creates a default platform pixmap without considering the graphics system. If these pixmaps are used they may end up going through a suboptimal code path because they are not the same type of pixmap that is expected by the graphics system. The fix here is to intialize the graphics system before the style is created. Reviewed-by: Trond
* Removed unused macro.Adrian Constantin2010-03-031-4/+0
| | | | Reviewed-by: Stefano Pironato
* Allow platform specific values for the double click radius.Raino Priha2010-03-021-0/+4
| | | | | Task-number: QT-2883 Reviewed-by: Volker Hilsheimer
* Remove unneeded resources from QtGuiAlessandro Portale2010-01-261-1/+3
| | | | | | | | | | | | | | | | | QtGui contains loads of resources. 337,160 bytes just for qstyle. And since this is nearly exclusively full of PNG files, it won't really be compressed in the qt.sis package. And it will eat unneccessary Ram. This patch removes about 260,000 bytes of resources. We only want the 32-pixel big icons. No 16- and 129- pixel versions. Task-number: QTBUG-7277 Reviewed-by: Sami Merila modified: src/gui/kernel/qapplication.cpp new file: src/gui/styles/qstyle_s60.qrc modified: src/gui/styles/styles.pri
* Fixes a crash when destroying and creating QApplication.Denis Dzyubenko2010-01-071-3/+12
| | | | | | | | Moved the gestureManager pointer to a QApplicationPrivate to make sure if QApplication object is destroyed, QGestureManager pointer is set to zero. Task-number: QTBUG-7029 Reviewed-by: Thiago
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Prevent a crash when creating an inputContext from the QApplication dtor.Denis Dzyubenko2010-01-051-0/+2
| | | | | | | | | | When accessing the global input context from the QWidget destructor access it directly instead of calling a helper function. Don't even bother to create an input context if QApplication is being destroyed (just in case if the user is calling the QApplication::inputContext manually from the destructor). Task-number: QTBUG-7105 Reviewed-by: Simon Hausmann
* 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