summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa plugin - fix a resource leakTimur Pocheptsov2014-10-311-0/+1
| | | | | | | | The patch 916dfcb8275bcce6b39606cd0b930239a60dc5df while fixing one problem, introduced another - leaking CGImage. Change-Id: I08db6ea9fa97ae3489a0bfa1f93e0d18f3671885 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* OS X: fix CFString leaks in mime classesDyami Caliri2014-10-301-2/+2
| | | | | | | | Some CFStringRefs created with CFStringCreate* methods were not being released. Using the QCFString helper class to perform auto release. Change-Id: I36d15c0d35118524089e99ea3cd53c41342d6308 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* QCocoaPrintDevice: fix bad CFReleaseDyami Caliri2014-10-301-4/+4
| | | | | | | CFRelease should be called IFF PMPrinterCopyDescriptionURL succeeds Change-Id: Id289aea3a4e3da397dae4062319256a043538597 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Cocoa: Handle Qt::WA_MacAlwaysShowToolWindowShawn Rutledge2014-10-291-1/+5
| | | | | | | | | | | Forward the flag to QWindow by setting the _q_macAlwaysShowToolWindowproperty on the window in QWidgetPrivate::create_sys(). Test for the property when creating the window. Task-number: QTBUG-29816 Done-with: Morten Sørvig Change-Id: Id810dda98d02deb0902192cce1783d8b16b04d04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Fix regression in key handlingLiang Qi2014-10-291-1/+1
| | | | | | | | The text should be empty when Cmd key is in modifiers. Task-number: QTBUG-36281 Change-Id: Ic71e532695ad4a947c86e8d21ae864d70f9afa4c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Send obscure events on OcclusionStateHiddenMorten Johan Sørvig2014-10-291-5/+10
| | | | | | | | | | | | | This disables animations for windows that are completely obscured by other windows. On examples/quick/animation, obscured CPU usage goes from 10% to 1%. There has been reports of 100% CPU usage with Qt before this patch. Change-Id: Iefea43ed8c1cfaa2df13f1f5a4e4450146ade522 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* OS X - Cocoa backing store and drawRectTimur Pocheptsov2014-10-284-30/+13
| | | | | | | | | | | | | | | m_backingStore pointer has a limited 'lifetime' - usually it is set in -flushBackingStore:region:offset: method, then -drawRect: is invoked/forced by -setNeedsDisplayInRect:, after that it's dangerous to have a non-null pointer to a backing store (and we reset it). But if Cocoa invokes drawRect (due to some reason) our null backing store pointer is also not good. This patch instead is using a shared resource (QImage) from a backing store. This patch also makes getBackingStoreCGImage() redundant - -drawRect: was the only place we called it. Task-number: QTBUG-42206 Change-Id: Ie7726336f05d07c52f660f6326ae5cef114201dd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa QPA Plugin: Remove code depending depending on OS X 10.6 and olderGabriel de Dietrich2014-10-278-423/+187
| | | | | | | Snow Leopard is unsupported from 5.4.0. Change-Id: I5c269cbdc93000a4657b63559cc3c526e298e3db Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Send screen change events before expose events.Morten Johan Sørvig2014-10-271-1/+1
| | | | | | | | | | This fixes the "expose event received for window with invalid geometry" warning from Qt Quick. The window's current screen is now up to date when processing the expose event. Change-Id: Ia5c83e34154182699ec587835f9063809d819d7d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Cocoa: Expose on window size change onlyMorten Johan Sørvig2014-10-271-1/+1
| | | | | | | | Don't send expose events on window move. Task-number: QTBUG-42126 Change-Id: I6e758f9037a2a785c651b63d25b53e7a009b1fdf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add searchEdit as accessible stateFrederik Gladhorn2014-10-253-3/+18
| | | | | | | The search state is used by VoiceOver on iOS to announce a search field. Change-Id: I464125827dbbf275daf38104e26e9591bb23365a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* QPrinter - Fix DuplexMode on all platformsJohn Layt2014-10-242-7/+43
| | | | | | | | | | | | | Add support to get/set the DuplexMode on Windows and Mac, improve the CUPS duplex handling, ensure support is the same on all platforms. [ChangeLog][QtPrintSupport][QPrinter] Added duplex support for Windows and OS X. Task-number: QTBUG-11332 Change-Id: I9d61d63233d828c3b1fd6df54072c6049f3c6298 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cocoa: Prevent FrameStrutMouseEvent double-clicksMorten Johan Sørvig2014-10-241-0/+6
| | | | | | | | | | | | | A window may see drag events without corresponding press/release events when dragging happens across several native windows. Handle NSLeftMouseDraged and NRightMouseDraged to synchronize mouse button state. Task-number: QTBUG-41609 Change-Id: Ieb66eb3460fc3cfd21e64c83ec1a28fe409af595 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa: Bring back qt_mac_set_raise_processMorten Johan Sørvig2014-10-241-3/+6
| | | | | | | | | In the form of an environment variable: QT_MAC_SET_RAISE_PROCESS. The default value is "on". Task-number: QTBUG-41569 Change-Id: Icf2e8818a6b126c7393ee022a1cab493fbc3a18e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa: Don't send FrameStrut events during dragsMorten Johan Sørvig2014-10-241-0/+4
| | | | | | | | | Check the (normal) button state and return early if there is a pressed button. Task-number: QTBUG-41609 Change-Id: I69d23f02e55627ca3e03f2466103e0952ff442b3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Don't flush user input events from setVisibleMorten Johan Sørvig2014-10-241-1/+1
| | | | | | | | | | | | | | Applications do not expect user input event delivery during QCocoaWindow::setVisible. The call to flushWindowSystemEvents still needs to be here for proper expose event processing, but we can at least exclude user input events. Task-number: QTBUG-39842 Change-Id: Ibd511efef47eeda21831481ef096a82d7b5a9cf8 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Fix trackpad scrolling modifiers.Morten Johan Sørvig2014-10-241-4/+0
| | | | | | | | | | | | | | | We would reset the keyboard modifier state on NSEventPhaseEnded, which meant that the state would be NoModifier as soon as the fingers left the trackpad. We want the modifier state to stay constant for the duration of the gesture. Remove the "reset" code and rely on setting currentWheelModifiers on NSEventPhaseNone only. Task-number: QTBUG-40197 Change-Id: I615aa5e1148b2b824f1a585bc042c9dbb3f1f250 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa: avoid sending exposes too earlyLaszlo Agocs2014-10-231-2/+6
| | | | | | | | | | | Expose events trigger backing store sync and thus paint events on QGLWidgets. Sending the exposes too early may lead to failures in the OpenGL calls. Sending exposes before even getting to calling setVisible(true) in QWidget::show() is just wrong. Task-number: QTBUG-36802 Change-Id: Ic7d5125f4e257d715009811217e453d79d0fcc7c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Cocoa: Fix icon size calculation for system tray.Christoph Schleifenbaum2014-10-221-32/+64
| | | | | | | | | | | | | | | | | | | | | The Overall goal is to make it possible to use correctly- sized pixmaps in a predictable way, while still doing something reasonable with small and large pixmaps. (The recommended pixmap height is up to 18 points.) Enable use of rectangular icons by selecting pixmaps based on pixmap height. Draw a low-resolution pixmap on retina displays if there is no high-resolution pixmap available. Scale large pixmaps to fit the available menu bar area. Add a manual-test with various pixmap sizes Task-number: QTBUG-33441 Change-Id: I1926181fe27cae526bae58022df3240bae9f8ac8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cocoa: Delay QMimeData requests for DnD events.Morten Johan Sørvig2014-10-223-16/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We were delaying the conversion from Qt to OS X types, but not the data request to the application. Introduce "Eager" and "Lazy" pasteboard promises: Eager promises request the application data immediately and can continue to use the existing commit-promises- on-app-exit logic. Eager promises are the default type and will be used for copy/paste. Lazy promises delay requesting the data from the application for as long as possible, specifically until when promiseKeeper() is called. Lazy promises are used for drag-and-drop and are not committed on application exit. This brings OS X DnD behavior in line with the Windows behavior. [ChangeLog][OS X] Drag-and-drop QMimeData requests are now delayed until drop time. Task-number: QTBUG-31301 Change-Id: I8ddbba41593251f4c0c49c29492dce990066e20d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Revert "Cocoa: Send obscure events on OcclusionStateHidden"Morten Johan Sørvig2014-10-221-2/+4
| | | | | | | | | | | | | | This caused instability in the CI and testing system: Tests that expected expose and paint events no longer got them due to window placement/visibility, including: tst_QGraphicsProxyWidget::paintEvent tst_QMdiArea::tileSubWindows tst_QSizeGrip::hideAndShowOnWindowStateChange This reverts commit f5cf06f4afc48198780e3c3d0d1a52afce425507. Change-Id: I017fbf24f3ad99cce6602eddafc3a67f8edc494d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* OS X: drag and drop and auto-scrollingTimur Pocheptsov2014-10-221-0/+13
| | | | | | | | | | | | Cocoa sens periodic drag updated events even if there is no actuall mouse movement (or any other updates). This breaks animations in different views/widgets supporting our own auto-scroll (done with timers). This patch kindly asks Cocoa _not_ to send us these events. Task-number: QTBUG-32761 Change-Id: I5dad4ceb0a490e2f3cb34a806a5bdb1045b4dac3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* OS X - unified toolbar and AA_NativeWindowsTimur Pocheptsov2014-10-211-1/+17
| | | | | | | | | | | | | | | | | | | | In some cases QToolBar creates a child window (a child borderless NSWindow) placed on top of the toolbar's main window. As a result it's not possible to drag this main window using its toolbar - the window "jumps" on the screen. The reason is quite subtle - QNSView -handleMouseEvent: uses [NSEvent mouseLocation] and this location is invalid: - we have an NSWindow (parent) - we have a child NSWindow ([parent addChildWindow:child ....] - we handle drag event in a child window - we move a parent window as a result of drag event - Cocoa also moves a child window for us - when handling the next drag event, location [NSEvent mouseLocation] differs from the real event's location. Task-number: QTBUG-40106 Change-Id: Ic68cb92ab4233a1e0746b478820c1e33fd37a462 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* OS X - maximize app's window from the Dock or using cmd-tabTimur Pocheptsov2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | On OS X it's possible to maximize app's window by clicking on an app's icon in the Dock. Another trick is to use cmd-tab to select an app +, while still holding the 'cmd' key, press the 'option' key - this should also maximize a window. None of these works at the moment, and to enable these features app delegate should return YES from the -applicationShouldHandleRepopen:hasVisibleWindows:. method. Task-number: QTBUG-40084 Change-Id: I33ba9e74d55d41d23deb429612519b746d461d9e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* OS X: Emit QClipboard::dataChanged when activating applicationDyami Caliri2014-10-182-3/+21
| | | | | | | | | | The QClipboard documentation states that on OS X it will emit dataChanged() when activating the application, if the system clipboard had changed. It wasn't doing this in Qt5. Task-number: QTBUG-34941 Change-Id: I7f34e757876757691f0a6c94dd2ae76a60146291 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Cocoa: Send obscure events on OcclusionStateHiddenMorten Johan Sørvig2014-10-141-4/+2
| | | | | | | | | | | | This disables animations for windows that are completely obscured by other windows. On examples/quick/animation, obscured CPU usage goes from 10% to 1%. Change-Id: I9945431e6387e406e2064c08d5aa01d5d96ef602 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* OS X: rename special menu items instead of duplicatingTimur Pocheptsov2014-10-102-6/+14
| | | | | | | | | | | | | | | | Two-part fix: QCocoaMenu::syncMenuItem, when selecting the "old" menu, if an item was merged, 'applicationMenu' was always selected, but this is wrong for any item with a role >= CutRole (such an item still can be "merged", but it's not in the application menu). QCocoaMenuItem::sync - item can be merged with itself: after item's role detected, the search for an item to merge with can find exactly the same item we've just detected the role for (since a data-member is modified) - try to avoid this. Task-number: QTBUG-39934 Change-Id: Ibe1df9e92973380652101143067e14922afdfb9e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Don't use QStringLiteral in comparisonsMarc Mutz2014-10-092-2/+2
| | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Utilize Q_FORWARD_DECLARE_OBJC_CLASS in QCocoaFileDialogHelper.Jake Petroules2014-10-082-34/+25
| | | | | | Change-Id: I94ae91ac8fb625de4a328c6628ce0ab45919708f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Correct devicePixelRatio for software OpenGLMorten Johan Sørvig2014-10-071-6/+7
| | | | | | | | | | | | | | | [NSView setWantsBestResulutionOpenGLSurface] is a hint and the driver may ignore it, for example when using software OpenGL on a virtual machine. In these cases devicePixelRatio() must return a value corresponding to the actual OpenGL surface size. Use [NSView convertSizeToBacking] which is one of the recommended methods. Task-number: QTBUG-41767 Change-Id: Ia79242219908a2454a83b44b6eb7463372764162 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-064-3/+36
|\ | | | | | | Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
| * QCocoaMenu: Keep a reference to the containing menu itemGabriel de Dietrich2014-09-294-3/+36
| | | | | | | | | | | | | | | | | | | | | | This allows the menu to tell its containing item the menu got deleted. This removes the need to reset the COCOA_MENU_ANCESTOR property value, which would crash since QCocoaMenuItem::m_menu would be a dangling pointer. Task-number: QTBUG-41587 Change-Id: Ia3408ef85cf823bfddbc2c41d6534e43bf14ed29 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Gabriel de Dietrich2014-10-013-2/+37
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-293-2/+37
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| | * Cocoa: Properly remove content view from its superview in setNSWindow()Gabriel de Dietrich2014-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -[NSWindow setContentView:] doesn't make assupmtions about where that view comes from, and just attaches it to the window. We need to make sure we detach it from its previous window by calling -[NSView removeFromSuperview], or the previous NSWindow may keep references to the view. This can be an issue if the view is deleted right after. Task-number: QTBUG-39628 Change-Id: I152dedcb64ac044d8ca290c9996b388809e2477b Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * OS X: File dialog does not show "Media" section.Timur Pocheptsov2014-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug can be reproduced (AFAIK) only on 10.9. To fix it I suggest we create NSOpenPanel/NSSavePanel _every_ time it must be displayed. Actually, that's what I've seen in all code samples I was able to found - nobody tries to retain this panel and re-use it. If we re-use it, "Media" section magically disappears. I believe this bug is not Qt's bug, but something weird in Cocoa. Task-number: QTBUG-40655 Change-Id: Ic0e76e0a9a5444a76f336d511c0ff93f9fd05797 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * OS X: main window doesn't become key.Timur Pocheptsov2014-09-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ordering a key window out Cocoa tries to find a new KEY window. Looks like it prefers the current MAIN window and since QNSPanel is never a main window, Cocoa is breaking the stack order. To avoid this - try to change the key window BEFORE ordering out a window. The application has a stack of all open windows (visible and hidden), we iterate through this stack starting from our current key window and look for the nearest window below, that can become a new key window. Most probably, it will be our transient parent :) This code will change (potentially) the key window _only_ if there is a transient parent. Task-number: QTBUG-39809 Change-Id: I96b630799341875fc7e38dabf1ff6416338e687b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Make sure we don't delete child QWindows if they have WA_NativeWindow setGabriel de Dietrich2014-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting a QWindow automatically deletes its child windows because they are in the QObject hierarchy. However, if the user sets both WA_NativeWindow and WA_DontCreateNativeAncestors, we can't just delete that widget's QWindow. First because the widget doesn't get notified (and maybe it should be), and then because we may invalidate any reference to the QWindow the user may have kept. Our solution is to reparent the child QWindows into the new parent's closest QWindow. We must, however, take the precaution of not keeping any reference to the backing store in the platform window. Reparenting operations can trigger repaints on the platform window, but the backing store is not set and flushed until later. Task-number: QTBUG-38377 Change-Id: I353f5528f227a227b6d10419367cbe1d5d07a94e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | | cocoa: override new QPlatformMenu::popup() functionRichard Moe Gustavsen2014-09-292-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having two versions of popup, one that takes a point and one that takes a target rect, causes problems for client code if they use the 'target rect' version since not all platforms override that function. So this patch will change the remaining platform that override QPlatformmenu into using the new 'target rect' version. Calling the old version that takes a point will still work, since the base version will then convert the point into a zero-sized rect, and forward the call to the 'target rect' version instead. Change-Id: Icc8531d79270a4f24ec08b8ed95b18ed3db1ad4d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Update license headers and add new license filesMatti Paaso2014-09-2442-797/+461
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-247-19/+52
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-237-19/+52
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | * Cocoa: Handle insertNewLine selector for when it is sent while composing textAndy Shaw2014-09-192-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some IMEs will perform an insertNewLine when Return/Enter is pressed while composing text as well as causing the edit to finish. By handling this it will ensure that the extra enter/return event is sent when the IME requests it. Task-id: QTBUG-39125 Change-Id: Ice6eded68e6b1dc51703a38316f76f78099923da Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * OSX: emit aboutToShow signal for top-level dock menu.Erik Verbruggen2014-09-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt sets a QCocoaMenuDelegate on every menu it creates in order to emit the (OSX specific) aboutToShow signal. However, there are a few cases where OSX will copy a menu without copying the delegate. One of those cases is the dock: the result of -[NSApplication applicationDockMenu:] is used to create a new menu, to which a few more items are copied. This copy is then send back to the dock. This patch invokes the delegate's -menuWillOpen: method when -[NSApplication applicationDockMenu:] is called. Note that sub-menus won't receive the call-back, because the dock doesn't tell the application what happens after returning from applicationDockMenu:. Task-number: QTBUG-39604 Change-Id: I0e06df371a3d77342ae4b7148041214e5c4579d7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * OS X: Fix positioning of popup menus in case of native NSWindowsEike Ziller2014-09-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code transformed the coordinates from the view to the window's content view, and since that content view is flipped in the pure Qt world (content view == QNSView), it manually flipped the coordinates to transform from that to window coordinates. Instead just directly transform the view coordinates to window coordinates using standard Cocoa methods, which then works with any kind of content view and NSWindow configuration. Task-number: QTBUG-40958 Change-Id: Idddd327fe9cff3309606379d0e04ee8b4bd5eece Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * cocoa: fix namespace manging for QNSViewTim Blechmann2014-09-152-2/+6
| | | | | | | | | | | | | | | Change-Id: I83035b45cabd938a9fdfa3a5d12de2c1793b30b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * cocoa: don't override NSApplication-sendEvent if configured as ↵Tim Blechmann2014-09-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | AA_MacPluginApplication Change-Id: I48cebbcb814ee8e97583c3165e7cb668077cfbad Task-number: QTBUG-40409 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * Cocoa: Work around faulty screen list on startupMorten Johan Sørvig2014-08-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NSScreen API has been observed to a return a screen list with one mirrored, non-primary screen when Qt is running as a startup item. Always use the screen if there's only one screen in the list. Change-Id: I721e25bb7595599287b97f6528e04060ce5da6c1 Task-id: QTBUG-37878 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * OSX MenuRole detection: remove ampersand before looking for keywordsShawn Rutledge2014-08-121-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | The chosen shortcut should not affect the menu role. Task-number: QTBUG-40181 Change-Id: I5a77d0109999b2fb8d40f8c526e0bbcfa31ad5e7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | Accessibility OS X: Fix image roleFrederik Gladhorn2014-09-231-0/+1
|/ / | | | | | | | | Change-Id: I0839a30041dbe558c420c944da49abe8ea26e0ab Reviewed-by: Jake Petroules <jake.petroules@petroules.com>