summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_cocoa_helpers_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* float->int error in OS X Mouse Event HandlingGerhard Roethlin2012-09-241-1/+3
| | | | | | | | | | NSEvent for mouse events contain the mouse position in floating point numbers. This value is truncated/floored for mouse clicks. Qt instead rounds that value, so mouse move events can get positions that are slightly off sometimes. This solves #QTBUG-27273. Change-Id: I2d3f59a09f50cb83dc1ccf6de940b7d99087c9ee Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Ensure the mouse buttons are preserved when entering a widgetAndy Shaw2012-07-031-1/+3
| | | | | | | | | | | | On Mac we have to fake the QEvent::Enter event when entering a widget so we need to ensure the buttons held down are set as part of that event otherwise it causes problems with graphicsview which will update the grabbed item based on this event. Task-number: QTBUG-19353 Change-Id: I89252a46b5edd0d82b6b1a0cf2592f72b472e5cc Reviewed-by: Nils Jeisecke <jeisecke@saltation.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge remote branch 'mainline/master' into merge_rasterFabien Freling2011-03-151-3/+4
|\
| * Merge branch 'master-upstream'Thierry Bastian2011-03-101-1/+2
| |\
| | * Fix preprocessor directive.Fabien Freling2011-03-041-1/+1
| | | | | | | | | | | | | | | | | | Reviewed-by: Andreas Kling Reviewed-by: Tor Arne Vestbø Reviewed-by: Morten Sørvig
| | * Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-231-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def src/testlib/qtestcase.cpp
| | | * Plug memory leak when using qt_mac_set_dock_menu() on CocoaAndy Shaw2011-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-16918 Reviewed-by: Richard Moe Gustavsen
| * | | Cocoa: use mouse location from eventRichard Moe Gustavsen2011-02-181-2/+2
| |/ / | | | | | | | | | | | | | | | | | | This is offcourse important, and the bug was revealed when calling qApp->processEvents(QEventLoop:excludeUserInputEvents), as this call would que up mouse events and dispatch them later on. And offcourse, the mouse would have changed position at that point.
* | | Merge remote branch 'mainline/master' into merge_rasterFabien Freling2011-02-231-127/+333
|\ \ \ | |/ /
| * | Cocoa/Alien: bugfix corner cases with popups and enter/leaveRichard Moe Gustavsen2011-02-141-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | It turns out that we sometimes hit a strange bug with enter/leave events when a popup is showing. If you righpress to show the popup, and then move the mouse outside the window, we get a continues series of leave events. This patch separates more the native vs alien logic for dispatching enter/leave to accommondate this problem
| * | Cocoa: Mouse-grabbing in pop-up menus on OS X isn't workingRichard Moe Gustavsen2011-02-081-8/+13
| | | | | | | | | | | | | | | | | | The reason is that we special case handling of popups, but have forgotten to check for mouse grabs. This patch checks the grabs, also for popups
| * | Alien/Cocoa: popups in creator does not always work for press'n'holdRichard Moe Gustavsen2011-02-081-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | Reason: Cocoa redirects mouse events to the view that received the mouse press (until a corresponding release is preformed). This confused qt_mac_getTargetForMouseEvent as it stood. This patch is more careful about trusting the native widget / nsview suggested by cocoa.
| * | Cocoa: add scroll optimization when scrolling both hor and verRichard Moe Gustavsen2011-01-241-0/+6
| | |
| * | Cocoa/Alien: keep the scrolling within correct boundsRichard Moe Gustavsen2011-01-211-0/+2
| | |
| * | Merge remote branch 'alien-on-cocoa/master' into alien-merged-mainlineRichard Moe Gustavsen2011-01-181-1/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | This merges alien feature branch with Qt master/mainline Conflicts: src/gui/kernel/qt_cocoa_helpers_mac.mm
| | * \ Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-171-1/+3
| | |\ \ | | | |/
| | | * Fix double click event on Mac OS X.Fabien Freling2011-01-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an issue where the double click would be triggered even with different mouse buttons. Task-number: QTBUG-8222 Reviewed-by: Richard Moe Gustavsen
| * | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging into ↵Richard Moe Gustavsen2011-01-171-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | alien-squached Conflicts: src/gui/kernel/qcocoasharedwindowmethods_mac_p.h src/gui/kernel/qcocoaview_mac.mm src/gui/kernel/qwidget_mac.mm
| | * | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| | | * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | Alien implementation for the Cocoa portRichard Moe Gustavsen2011-01-171-125/+321
| |/ / | | | | | | | | | Give Alien on Cocoa a warm welcome.
* | | Remove useless statements.Fabien Freling2011-02-141-2/+0
| | | | | | | | | | | | Reviewed-by: Samuel Rødal
* | | Move all display: utility functions.Fabien Freling2011-01-271-1/+18
| | | | | | | | | | | | | | | | | | | | | All utility functions to call display: are now placed in qt_cocoa_helpers_mac.mm Reviewed-by: Richard Moe Gustavsen
* | | Add a utility function to call setNeedsDisplay:Fabien Freling2011-01-181-0/+7
|/ / | | | | | | | | | | | | This allows to trigger a drawRect: on the NSView associated with a QWidget. Reviewed-by: Richard Moe Gustavsen
* | ShortcutOverride has no effect on some shortcuts on Mac OS X (Cocoa).Prasanth Ullattil2010-11-111-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating the native key sequences for menu items, Qt prefers the non private unicode characters. But the characters in the NSEvent for keyboard events can contain characters form the unicode range reserved for Apple. For e.g. when user presses the "delete" key, the event contains NSDeleteFunctionKey, where in Qt is expecting NSDeleteCharacter. For now this is the only key identified for translation. If we find similar translations, those can be added to qt_mac_removePrivateUnicode(). Task-number: QTBUG-12495 Reviewed-by: Denis
* | Don't assing 'const Foo*' to a 'Foo*'Tor Arne Vestbø2010-10-151-4/+4
| | | | | | | | Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | Experimental support of the unified toolbar withFabien Freling2010-10-081-0/+7
| | | | | | | | | | | | | | the raster engine on Mac OS X. Task-number: QTBUG-12615 Reviewed-by: Samuel Rødal
* | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-041-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/snippets/code/doc_src_qmake-manual.qdoc src/corelib/arch/symbian/arch.pri src/declarative/graphicsitems/qdeclarativeflickable.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h tests/auto/qfontmetrics/tst_qfontmetrics.cpp
| * Update frameGeometry when the unified toolbar visiblity is toggledAndy Shaw2010-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | When the unified toolbar visiblity was toggled on Carbon then it would not have a correct frameGeometry as it would have a top position different to what it should have been as the window does not move. Autotest included in this commit. Task-number: QTBUG-14055 Reviewed-by: Prasanth
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-131-3/+21
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| * Crash when pressing the '£' key on Belgian Keyboard layout (Cocoa)Prasanth Ullattil2010-08-031-3/+5
| | | | | | | | | | | | | | | | | | In some cases the NSKeyDown event won't have fully constructed string in the [NSEvent characters]. So we need to add a guard before accessing the elements of this NSString. Task-number: QTBUG-12474 Reviewed-by: Richard Moe Gustavsen
| * Cocoa: Active QDockWidget does not stay on top of inactive QDockWidgetRichard Moe Gustavsen2010-08-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | If a window has several child windows, it was not be possible to click on a child window to make it stack in front of the other children. The reason is that cocoa held a fixed stacking order of the child windows (sub-windows). This patch will release, and then reestablish, the stacking order of the children upon acitvation. Task-number: QTBUG-11780 Reviewed-by: prasanth
* | Fix the CGContext on Mac OS X. Sometimes we gotFabien Freling2010-07-221-1/+1
| | | | | | | | | | | | | | | | a bad context, resulting in wrong paintings. It also unify the raster engine behavior among platforms. Reviewed-by: Jason Barron
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-011-3/+4
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * QKeyEvent::text() inconsistency between Linux and MacPrasanth Ullattil2010-06-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | For a key event triggered by the cursor keys, QKeyEvent::text() returns char with value 0x14 or similar. This patch (Cocoa only)will remove text from all key events for the unicode range 0xF700-0xF747. This is part of the corporate unicode range used by apple for keyboard function keys. [http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CORPCHAR.TXT] Task-number: QTBUG-11225 Reviewed-by: Bradley T. Hughes
* | Cocoa: remove warningsRichard Moe Gustavsen2010-05-201-4/+4
| | | | | | | | Rev-By: cduclos
* | Cocoa: QShortcut(Qt::Key_Enter) does not show in the menu barRichard Moe Gustavsen2010-05-201-62/+99
| | | | | | | | | | | | | | | | | | | | | | | | The reason is that cocoa expects the unicode control character for "enter", rather than the glyph showing an arrow. So rather than using the glyph-table from QKeySequence, we should use a table containing a mapping from Qt::Key to Cocoa control key. Luckily, such a table exists allready in qt_cocoa_helpers, but reversed ( cocoa key to Qt::Key). So this patch creates a function that binds all this together. Reviewed-by: cduclos
* | Cocoa: Add support for native application event filterRichard Moe Gustavsen2010-05-201-26/+4
|/ | | | | | | | Support for adding application wide filters were never implemented for the cocoa port because of NSApplication singleton issues. This patch removes that problem by using introspection if needed. And the patch also makes qt_cocoaPostMessage more reliable.
* Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2010-04-281-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 4.7-integration * 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (73 commits) Apply Rhys's fix to qpaintengine_vg.cpp to make it compile Attempt again at fixing the OpenVG paint engine build Revert "Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp" Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp Fixing the wrong QUrl usage When on Symbian use smaller files. correctly position glyphs for complex languages Removed inneccessary QGlyphLayout::offsets initialization. Fix mirrored characters for RTL text in Symbian QNAM: Add a code comment related to the cache tst_QSystemSemaphore::processes fixed for WinCE tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE tst_qsharedmemory: create multiple instances of lackey.exe on WinCE tst_qsharedmemory: fix deployment of lackey.exe for WinCE fix compilation of tst_sharedmemory on Windows CE QtScript: regression with instanceof operator for QMetaObject wrappers examples/widgets/stylesheet fix mainwindow.ui QStyleSheetStyle: fix memory leak on base style change QNAM HTTP: Fixed a bug when getting empty files with pipelining Fix window transparency on Symbian. ...
| * Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-211-0/+11
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/openvg/qpaintengine_vg.cpp src/script/bridge/qscriptqobject_p.h tests/auto/bic/tst_bic.cpp
| | * Mac: Graphics View starving user events and sometimes crashes.Bjørn Erik Nilsen2010-04-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that we called processEvents() and excluded user input events. The idea was to only process pending update requests, but by doing that there's also a chance that user input events will starve. Also, there's no gurantee that only update requests will be processed by processEvents(), so a safer solution is to call "HIViewRender" on Carbon and "displayIfNeeded" on Cocoa. This will for sure dispatch pending update requests and nothing else (which is exactly what we want). No auto test regressions. Fixes tst_qgraphicsproxywidget::updateAndDelete failure on Carbon. Benchmarks indicate an increase in performance. Task-number: QTBUG-7502 Reviewed-by: richard
* | | QTabWidget documentMode not working correctly on MacCarlos Manuel Duclos Vergara2010-04-271-3/+117
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This feature was implemented in Carbon and was never ported to Cocoa. The major problem is the fact that Cocoa draws a line under the titlebar, regardless of what we say. The only way to avoid drawing that line is by adding a native toolbar and ask it not to draw its baseline. If there is not toolbar, as it happens in this case, there is no way to prevent that line from being drawn. So instead we paint over that line and hope for the best. Task-number: QTBUG-8159 Reviewed-by: Richard Moe Gustavsen
* | Cocoa: mouse release event reports wrong button stateRichard Moe Gustavsen2010-04-071-1/+9
| | | | | | | | | | | | | | | | | | If you release the mouse over a non-client area, the following mouse up event contains the mouse button that was released in the 'buttons' state. This is wrong, according to the documentation (and the native events auto test!) Reviewed-by: msorvig
* | Do not deliver the same key event multiple times in Cocoa.Denis Dzyubenko2010-03-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | When QCocoaView receives a keyDown or keyUp event, we translate it to QKeyEvent and deliver it to qt widgets, propagating if necessary. However if none of Qt widgets accepted the event we should propagate it back to cocoa - to get a beep from it, or for example if Qt widget is embedded into a native widget. Task-number: related to QTBUG-6444 Task-number: QTCREATORBUG-698 Reviewed-by: Richard Moe Gustavsen
* | Keypress events ignored in listview on Cocoa (64 Bit) with Japanese IMEPrasanth Ullattil2010-03-161-1/+3
| | | | | | | | | | | | | | | | | | | | When appliction is started with a Japanese input method, the keyboard layout data might not be avialble. In such cases use the unicode passed with the NSEvent. Also add key mappping support for the unicode range U+f700 to U+f747 Task-number: QTBUG-8647 Reviewed-by: Denis
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-041-4/+43
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (53 commits) remove non wifi interfaces from being handled. Disable auto-uppercasing and predictive text for password line edits. Avoid QString reallocation in QTextEngine::itemize() Remove the Qt 4.7 #if guards that were needed for 4.6 Always redraw the complete control when an input event comes in. Make sure not to crash if createStandardContextMenu() returns 0 (e.g. on Maemo5) Fix compilation: include QString in order to use QString. Fix compile Block the Maemo5 window attribute values from being assigned to something else on other platforms. be more verbose when warning about incompatible libraries Introduce a setAttribute_internal helper Do not reset state too early on RMB click Fix for QRadioButtons and QCheckBoxes drawn incorrectly when a style sheet is set. Speed up creation of the pixmap cache key Optimize QGtkStyle fix qmake -project mode test qlist some more fix include Don't print a warning when passing an empty string to QColor Stabilize QWidget ...