summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_cocoa_helpers_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Replace all ocurrences of NSApp with [NSApplication sharedApplication].Jake Petroules2014-09-011-2/+2
| | | | | | | | | | The former returns an id and the latter returns an NSApplication*. This gives us the benefits of static typing and resolves a build error on OS X 10.10. Task-number: QTBUG-39644 Change-Id: I62939b168f391beb846f8a1c5ae789e45bceb858 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cocoa: fix a typo for F9 in key mappingLiang Qi2013-12-201-1/+1
| | | | | | Task-number: QTBUG-34820 Change-Id: I181f565a0b4f188f83cc821a019cf3781954cb02 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Use [NSScreen backingScaleFactor] on 10.7+Morten Johan Sørvig2013-03-201-2/+7
| | | | | | | userSpaceScaleFactor is deprecated. Change-Id: I892cb579e4b3ef9226495759c884d0e74c85a1d6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* 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-041-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-181-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-111-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