summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* | Respect the PM_SmallIconSize setting for icons in a menu on OS XAndy Shaw2014-09-202-2/+10
| | | | | | | | | | | | | | | | | | When a platform menu is used then it would hard code the icon size to 16x16. Instead of using the hard coded value then PM_SmallIconSize should be used instead. Change-Id: I27540ebc4397501e8f57686a118c28cd7167c0a1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | OS X: Add scan code mappings for Escape, Return and function keys.Dyami Caliri2014-09-171-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | In OS X, certain keyboard layouts (such as Japanese) do not produce unicode character conversions for Escape and other keys. In these cases the code uses a fallback scan code check to map the key. The scan code mapping had the function keys, but there are several other important keys it can map. Task-number: QTBUG-41090 Change-Id: I624793c9bb28ae8c98b54539c277943905cac7e2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | qpa: Make screen geometry updates (full and available geometry) atomicTor Arne Vestbø2014-09-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating the geometry and available geometry in two steps means that QScreen will be in an inconsistent state when emitting the geometry change signal, as the available geometry has not been updated yet. Piggy-backing changes to the availableGeometry based on the virtual geometry changing does not make sense, so we now tie geometry and availableGeometry (and their size variants) to their own separate geometryChanged and availableGeometryChanged signals. Change-Id: Iee0ced642cbb91c470cb54bc507d2c0512482c13 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | OS X QColorDialog: emit reject() when closed by the titlebar buttonShawn Rutledge2014-08-251-0/+19
| | | | | | | | | | | | | | | | | | | | but only if there is a Cancel button. A color dialog without a cancel button might be kept open and apply to various selections, so it doesn't make sense to reject such a dialog, only to close it. Task-number: QTBUG-40855 Change-Id: Ifffb4ae81307c72259ed388a4776ba09543603e7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | OS X: Fix pan gestures.Morten Johan Sørvig2014-08-251-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPanGesture recognizer requires single-point touch events. The touch implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents and forward single touch events if set. Making this work in Qt 5 is a little bit more involved since the platform plugins don't know about widgets. Change the Cocoa touch implementation to send single-point touch events to QWidgetWindow windows only. Make QApplication forward single-point touch events only if the target widget has the Qt::WA_TouchPadAcceptSingleTouchEvents attribute set. Task-number: QTBUG-35893 Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | standardize QPA input event logging category hierarchyShawn Rutledge2014-08-241-20/+15
| | | | | | | | | | | | | | | | | | | | | | If qtlogging.ini contains a rule qt.qpa.input*=true then all available input event logging will be enabled on any platform. There are more specific categories for touch, tablet, gestures, input methods etc. on some platforms. Change-Id: I8754ce23df8f0b750a4b7dfcf3afe5bab800ead8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Giuseppe D'Angelo2014-08-193-45/+7
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-123-45/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| | * Font Database: Add support for private, system UI font familiesGabriel de Dietrich2014-08-113-45/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce QPlatformFontDatabase::isPrivateFontFamily() to allow testing for private, system UI font families. Both QFontComboBox and QFontDialog need to filter out those private font families which, by definition, should be hidden from the end user. (The textedit example had to be updated to fix the issue where the default font would be private. In 5.4, we will be adding an equivalent, public API in QFontDatabase, and a better solution for the textedit example and QTexEdit in general). In particular, on OS X and iOS, private fonts are used for the system UI font. Those have their font family name prefixed by a dot. QCoreTextFontDatabase knows about this, and makes sure those are tested positive as private font families. In order to have a cleaner layer separation, we moved the QPA theme font resolution from the platform theme classes into QCoreTextFontDatabase for both Cocoa and iOS QPA plugins. In both cases, we use CoreText's CTFontCreateUIFontForLanguage(), that nicely maps to the HITheme API we were using so far on Mac. That means one HITheme dependency less. We also cache the font descriptors we get for these font for each time QCTFD::populateFamilies() gets called. (While not common, this currently happens in auto-tests, like tst_QFontDatabase, and could happen in actual applications -- specially when adding and removing application fonts.) Change-Id: Ic6f0b60f9f597afee1a43596a669742dc546b97f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * cocoa: Fix compiler warnings about unused functions.Sérgio Martins2014-07-311-6/+0
| | | | | | | | | | | | | | | Change-Id: Id85c86dd2f2468b3ac17751aefdebe0e8666a0c0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | Handle 10-bit per color formats in qt_mac_toCGImageAllan Sandfeld Jensen2014-08-161-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the four new RGB30 formats to qt_mac_toCGImage so that they get converted to ARGB32_Premultiplied instead of potentially misinterpreted. Change-Id: I0921edaef7509c1db9bd547b454dade03d289ea3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Add accessible rolesFrederik Gladhorn2014-08-131-0/+6
|/ / | | | | | | | | Change-Id: Ic5465687f51c441235ec23cb88045e14644f1d2a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Make the expose region local on all platformsLaszlo Agocs2014-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QExposeEvent::region() reports a region in a random coordinate system. The behavior is undocumented and the platform plugins do different things. xcb, offscreen and ios are correct. These set the region in local coordinates, which is the most logical interpretation of the expose region. windows is almost correct, except for one occurrence. cocoa and others need changes: passing in geometry() as the exposed region is always wrong. The patch documents the expected behavior both for QExposeEvent and internally in QWindowSystemInterface. The problematic plugins are fixed to use local coordinates. Task-number: QTBUG-40470 Change-Id: I6ded3154d14254fa71d4292d8e1b5e6cf696c81a Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | OS X: Remove mnemonics in parenthesesTakumi Asaki2014-08-084-24/+18
| | | | | | | | | | | | | | | | | | | | | | | | In some language, mnemonics put after label text within parentheses. e.g. "&Open" is translated to "開く(&O)" in Japanese. OS X doesn't use mnemonics and '&' in label text is removed. Mnemonics in parentheses (and spaces before them) also should be removed. Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3 Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Add QFont strategy to disable subpixel antialiasingAllan Sandfeld Jensen2014-08-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | This patch adds the option to disable subpixel antialiasing on QFont basis. This can be useful when painting to offscreen surfaces. On OS X this option disables the aggressive LCD font smoothing, which can be necessary for certain fonts it may otherwise ruin. Task-number: QTBUG-40396 Change-Id: I1664b636520ae63ee1503b5df7436748106b9f5c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | OS X: correct tablet stylus rotation to range -180..180 degreesShawn Rutledge2014-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user holds the Wacom Art Pen straight, rotation is zero; when turning it counter-clockwise, it should have a negative angle, whereas the driver sends a positive angle; when turning it clockwise it should have a positive angle up to 180, whereas the driver sends 360 going downwards towards 180. These corrections make the angle reading consistent between Linux, Windows and OS X. Task-number: QTBUG-39570 Change-Id: I7a57cc1fb56d4f7128ca1add10aff2597f29c507 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | OS X: add buttons to tablet eventsShawn Rutledge2014-07-311-2/+13
| | | | | | | | | | | | Task-number: QTBUG-39458 Change-Id: I112107e392bf3b55771039b72271fdf887e2e5db Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | OS X: correct tablet airbrush tangentialPressure to range -1..1Shawn Rutledge2014-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | The driver sends values in the range 0..1, but we want the "center" value to be 0. This correction makes tangentialPressure consistent between Linux, Windows and OS X. Task-number: QTBUG-40469 Change-Id: Ia4aa777efdf015c2802b945f6ca7a8e442bbf5fc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Add accessible roles for web document, paragraph and sectionFrederik Gladhorn2014-07-231-0/+3
| | | | | | | | | | | | | | | | These roles seem wide-spread enough that it makes sense to add them. QtWebEngine will use them. Change-Id: I9c2d6ab23ada0607078bcd407a72ecae9f87eeea Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* | Revert "Session management for OS X"Olivier Goffart2014-07-136-186/+16
| | | | | | | | | | | | | | | | | | Broke tst_QMenu::statusTip by closing the menu while it should not. (and therefore, a QTimer::singleShot that fires while following test are running is making the test fail) This reverts commit 50c04d631858639c630e85456e7e003a80e33493. Change-Id: Ib4ef8190f945b915fe268745cc64d471994c5e2d Reviewed-by: Richard J. Moore <rich@kde.org>
* | Session management for OS XSamuel Gaist2014-07-106-16/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to implement the session management available on OS X. Currently applicationShouldTerminate is just a go through that closes everything and ends the application. The new implementation calls first appCommitData and cancels the termination properly if required. This means that if a user wishes to logout, Qt applications can now cancel that like e.g. answering to Safari asking whether it is ok to close because of a number of opened tab/window. Task-number: QTBUG-33034 Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | QAccessible::PushButton is deprecated in favor of just ButtonFrederik Gladhorn2014-07-101-1/+1
| | | | | | | | | | | | Change-Id: I2878a28f18f3a004705ec50f616846f6cd00eed1 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Accessibility: Improve handling current valueFrederik Gladhorn2014-07-071-1/+1
| | | | | | | | | | | | | | | | | | Value interfaces on OS X and iOS can be strings, so can the value property of MSAA. Before we'd always only send doubles, instead change it to use strings as well. Change-Id: I1b4410c68238ba7a69a5507d87c251f2ac61c568 Reviewed-by: Caroline Chao <caroline.chao@digia.com>