summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* QPI/Cocoa: QNSView - guard removeFromSuperview by autorelease poolTim Blechmann2015-11-232-0/+7
| | | | | | | | | | removeFromSuperview could be called from outside the Qt domain (e.g from a native cocoa gui). we need to guard it by an autorelease pool to make sure that potential release/dealloc methods are not postponed to a point when we do not have a qapplication anymore Change-Id: If65cce4c524a16ffee125694c534f900c7d08fa8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* OS X: Don't forward key events to popup window if it's a tooltipTor Arne Vestbø2015-11-161-2/+4
| | | | | | | | | | | | 676edc006e9f43 introduced a regression by not filtering the active popup window for tooltips, which is what the corresponding mouse handler in QNSView does. Change-Id: I5091dba0dd43be2e859ea360dfd812c0f081fd32 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Cocoa integration - do not send move events while in -draggingUpdated:Timur Pocheptsov2015-11-042-1/+10
| | | | | | | | | | | Looks like it's not a good idea to send constant 'fake' mouse move events while mouse is actually moving (mouseDragged/rightMouseDragged) + we're receiving -dragginUpdated:. Change-Id: Ibed5def3d8f06b764dea6c2cd196e37ca19ce967 Task-number: QTBUG-49204 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-041-0/+8
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/styles/qwindowsvistastyle.cpp Change-Id: Ie1725933815891cc8c86258d4c0e8ed0ab386edf
| * Return early if there is no text at the offsetAndy Shaw2015-10-271-0/+8
| | | | | | | | | | Change-Id: I9d0b1e6e054a48bac34fb4e51b656c475f5638b4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Cocoa: Implement QPlatformInputContext::locale().Liang Qi2015-10-244-0/+40
| | | | | | | | | | | | | | | | Listen to NSTextInputContextKeyboardSelectionDidChangeNotification. Task-number: QTBUG-48772 Change-Id: Icea4ef61fd184edbe65a7f195318832a22c312ab Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | QWidgetAction: Don't deactivate the current window on MacGabriel de Dietrich2015-10-233-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We check the name of the window class the widget's QNSView changes window and set a flag when the that window is a native Cocoa menu window. Later, only those views not inside a native menu can become first responder, ensuring Qt won't deactivate the main window. We're allowed to reject becoming the first responder mainly because Cocoa itself doesn't support sending key event to menu views and, therefore, it doesn't change what's already possible. This patch also sets the widget action visible, which needs to be done right after reparenting it to the container widget. Besides that, it also contains a few small code cleaning changes related to Cocoa's support of QWidgetAction. Change-Id: Ia2170bdc5e1f40bfa2f1091c05e9e99397c47187 Task-number: QTBUG-44015 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | OSX: replace use of deprecated API.Erik Verbruggen2015-10-231-7/+8
| | | | | | | | | | | | | | | | dragImage:at:offset:event:pasteboard:source:slideBack: on NSView is deprecated since 10.7. Use the one on NSWindow instead. Change-Id: Ia1c2ea367ae2ca5194b52ea57ab261461bf8b529 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Fix cocoa plugin build with OS X 10.8 SDKSamuel Gaist2015-10-181-4/+8
| | | | | | | | | | | | | | | | | | | | With the 10.8 SDK, NSArray may not respond to firstObject which ends the build with an error. This implementation doesn't use it and also handles the case where no screen is available when calling qt_mac_mainScreenHeight Change-Id: Idce278423c37cc24d8fc31062a386e78d6487492 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Move QEventDispatcherCoreFoundation to QtCoreMorten Johan Sørvig2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Export it for use by the iOS platform plugin. Also move QCFSocketNotifier, and export for use by the Cocoa platform plugin. This is a pure code move with no intended behavior changes, in anticipation of using the Core Foundation event dispatcher as the default Qt Core event dispatcher on OS X. Change-Id: I43677d2f6f3c1d0ed0415c964225aa97d2f13078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Cocoa integration - fix Qt::WindowFullscreenButtonHintTimur Pocheptsov2015-10-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Window collection behavior changed from OS X <= 10.9 to 10.10 to 10.11: - the default behavior (0) included fullscreen button before 10.10, did not include in 10.10, and now it's again included. - it's not enough to exclude fullscreen - since the defualt is 0, 0 & ~fullscreen does not help - we also have to set fullscreen auxiliary. Task-number: QTBUG-48759 Change-Id: If427bd5cfa5c3cefc71f09dae7baa0d232601ee4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-131-10/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qabstractsocket.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp src/sql/drivers/mysql/qsql_mysql.cpp Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
| * Merge remote-tracking branch 'origin/5.5.1' into 5.5Liang Qi2015-10-131-10/+2
| |\ | | | | | | | | | Change-Id: I2942591e1c1ca86ce0f6476e0a5c3033cdf861ee
| | * Revert "Fix the spurious socket notifications on OS X"Alex Trotsenko2015-10-061-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b8e0f7cfc638a71770f44ada828ff2cf6d2ee201. Needs a more testing. Change-Id: Iff0b2741922cfa8f16fbc3f4ce0f83869d6cd8b6 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * Fix the spurious socket notifications on OS XAlex Trotsenko2015-10-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Core Foundation Framework forwards notifications about socket activity through a callback function which called from the run loop. Previous implementation sets kCFSocketReadCallBack, kCFSocketWriteCallBack to be automatically re-enabled after they are triggered. With these semantics, an application need not read all available data in response to a read notification: a single recv in response to each read notification is appropriate. If an application issues multiple recv calls in response to a single notification, it can receive spurious notifications. To solve this issue, this patch disables automatically reenabling callback feature. Now, callback gets called exactly once, and is not called again until manually re-enabled by calling CFSocketEnableCallBacks() just before entering to wait for the new events. Task-number: QTBUG-48556 Change-Id: Ia3393c2026230c7b3397cc614758dec1d432535f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * Revert "Cocoa: correct QDesktopWidget::availableGeometry()"Liang Qi2015-09-151-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrong calculation of flip. This reverts commit 1a5cc2a868969f1b1e9278c4145b7af2fc4b8f69. Task-number: QTBUG-47030 Change-Id: Ide178eb5e027c4ecec1e3952c973fb64987eb7ce Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | | Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | OS X: Forward key events to popup window if presentTor Arne Vestbø2015-10-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OS X we don't treat popup windows as worthy of being activated and focus windows (key windows). Instead we keep track of the active popup windows and forward events to them manually. The forwarding logic is split between QPA, which handles mouse, and QWidgetWindow and QQuickWindowPrivate, which handles key events. This commit adds the logic for key events to QPA, which is the right platform layer for this kind of workarounds. The widget code is left as is for now, and the QQuickWindowPrivate code can be removed in a follow up. Task-number: QTBUG-39415 Change-Id: Iee411fcba9fc81ddcc3a7bc82591184675a6d7a2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Move shortcut handling back into QPA and simplify deliveryTor Arne Vestbø2015-10-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7f5b94b47 moved shortcut handling into QGuiApplication (for all platforms except OS X), due to crashes on Android where the events are delivered from another thread. Now that we have synchronous event delivery (also across threads) from QPA, this is no longer needed, and we can move the code back to QPA, where the platform has more control over when and how shortcut events are delivered in relation to normal key events. Handling shortcuts is as before a two step process. We first send a QKeyEvent::ShortcutOverride event to the active window, which allows clients (widgets e.g.) to signal that they want to handle the shortcut themselves. If the override event is accepted, we treat it as the shortcut not being handled as a regular shortcut, and send the event as a key press instead, allowing the widget to handle the shortcut. If nothing accepted the shortcut override event we pass it along to the global shortcut map, which will treat the event as handled if an exact or partial match is found. The QShortcutMap::tryShortcutEvent() and nextState() implementation has been simplified to not use the events accepted state for its internal operation, which removes the need for saving the state of the incoming event. The QKeyEvent::ShortcutOverride event was also always sent with the accepted state set to false, by calling ignore() on it before sending it. This is now explicit by having shortcut override events being ignored by default in their constructor, and the documentation has been updated accordingly. Change-Id: I9afa29dbc00bef09fd22ee6bf09661b06340d715 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-025-20/+53
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * | Cocoa: Support Qt::WindowTransparentForInputMorten Johan Sørvig2015-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Map this to ignoresMouseEvents on NSWindow. Task-number: QTBUG-45498 Change-Id: I86e518bbf805647d9f12b1af1747355ef55cc167 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * | Cocoa integration - make tool window resizable againTimur Pocheptsov2015-09-211-5/+2
| |/ | | | | | | | | | | | | | | | | | | | | Tool window always had NSResizableWindowMask before dd02c1eb38c6dfc8367f2c692e11897b6c00b097, and this is broken, the new logic depends on WindowMaximizeButtonHint which is not set on, for example, un-docked widget. Bring the old behavior back, while not cancelling dd02c1e - make it resizable unconditionally, as it always was. Task-number: QTBUG-46882 Change-Id: Ib739a701d85aaadab83230deee808757de6b5e21 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
| * QCocoaMenu: Manually reposition popupsGabriel de Dietrich2015-09-111-10/+31
| | | | | | | | | | | | | | | | | | | | If the popup will show too close to the screen bottom, we need to help Cocoa a bit. The horizontal positioning hasn't shown any problems. Change-Id: I5f298529fbf4a902e39f686f368046a8d1c11760 Task-number: QTBUG-45063 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Cocoa: correct QDesktopWidget::availableGeometry()Liang Qi2015-09-071-2/+10
| | | | | | | | | | | | | | | | | | Since 10.9, System Preferences->Mission Control->Displays have separate Spaces settings needs to be followed. Task-number: QTBUG-47030 Change-Id: I1c1cf326246bd5609090ce5ac3212d963d562593 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
| * Fix default hotspot of a hidpi QCursorKari Pihkala2015-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The hotspot is defined in device independent coordinates, so the default coordinates need to be divided by device pixel ratio. Also, modify the scaling of cursor's pixmap to use SmoothTransformation to generate cleaner looking lodpi cursors from hidpi cursors. Change-Id: Ia938fd1e476e19e796f30712e23b06a5efed9964 Task-number: QTBUG-34116 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
| * Make tooltips transparent for mouse events.Alexander Soplyakov2015-09-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This behavior is important because controls (widgets) under tooltips don't receive mouse events and don't update their state if it is really needed. [ChangeLog][QtWidgets][Important behavior changes] Tooltips on OS X are now transparent for mouse events. Change-Id: I06403db7b66c87fe53debb033f8a74aa1c93e26a Task-number: QTBUG-46379 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Clean up cancel operation handling on OS XTor Arne Vestbø2015-09-274-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for handling cancel operations was spread out through the code base and sometimes hard-coded to only include the Escape key shortcut, missing the Command+. shortcut. We now intercept both attempts at cancel operations from the system through cancelOperation, which we forward as normal key events. A new QKeySequence::StandardKey has been added for the Cancel sequence, which maps to Escape on all platforms, and Command+. in addition for OS X. The hard-coded logic in QWidget and subclasses for dealing with closing the dialogs has been replaced with this key sequence, which allows clients to override the behavior. Note that the widget code is not wrapped in checks for QT_NO_SHORTCUT, as we don't care about keeping widgets building and working under that define. The logic in QCocoaWindow to bypass windowShouldClose when delivering IM events has been removed as we now handle that specific case by also forwarding Escape as a cancel operation. Task-number: QTBUG-47557 Task-number: QTBUG-45771 Task-number: QTBUG-44076 Change-Id: Ibe0b3a4819f8659d246a2142dd7d9cd3a826ef78 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Cocoa: Don't send duplicate close events.Morten Johan Sørvig2015-09-251-6/+2
| | | | | | | | | | | | | | | | | | Use the presence of a platform window to detect if the QWindow has already been closed. Change-Id: Ieedf231cc5b805ed6383e55a82ca137087805a4f Task-number: QTBUG-43344 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Clean up some Apple-related includes and declarations.Jake Petroules2015-09-221-3/+0
| | | | | | | | | | Change-Id: I92db9691c2243ae72ecd4e11dd4640afaf4bf822 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Fix QT_NO_ACCESSIBILITY build on OS XLiang Qi2015-09-117-6/+26
| | | | | | | | | | Change-Id: Id8b41787fb9f50296ee9e0ad1f108418565d9325 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Cocoa: Clean up context creation.Morten Johan Sørvig2015-09-021-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Make the fallback to creating an unshared context actually work by using correct [initWithFormat: ] code. Warn and return early on context creation failure instead of continuing and crashing. Change-Id: Ic88f419eaa717436aefc9c1da36c47e0ccb3e956 Task-number: QTBUG-47825 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-263-15/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * Cocoa: Fix backing store performance regression.Morten Johan Sørvig2015-08-253-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 916dfcb8 introduced a regression where QNSView would hold a copy if the backing store QImage, which would cause a detach and deep copy if/when the image was painted on while the copy was held. Revert back to the previous share-by-pointer scheme. Make sure the following bugs stays fixed: QTBUG-38377 QTBUG-42206 QTBUG-44313 Change-Id: Ib8049051d51947113f23b66ee61dc34c22388914 Task-number: QTBUG-46959 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Harmonize input context selectionBernd Weimer2015-08-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
* | OSX FreeType: Add support for sub pixel font rendering.Sérgio Martins2015-08-142-0/+11
| | | | | | | | | | | | Task-number: QTBUG-42839 Change-Id: Iea4552d766936a55fd177e4287591d2715202d9c Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | OSX: Add initial FreeType supportMathias Hasselmann2015-08-113-6/+33
| | | | | | | | | | | | | | | | | | This permits text rendering consistent with other FreeType enabled platforms, like Windows and Linux. Task-number: QTBUG-42839 Change-Id: I8c99bcaa3fb07c16e935a0c3705af467bc3da584 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devTimur Pocheptsov2015-08-091-2/+6
|\ \
| * | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-2/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| | * Fix shortcut handling with modifiersFrederik Gladhorn2015-08-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since d7ca800a87a2291c94c6580f0cfe068bb2280caf the shortcut events were only sent once. The one sent by QGuiApplication did not create a QKeyEvent with the full native modifier state - basically the extended key event expected everywhere. That means that shortcuts on some keyboard layouts - like ctrl-shift-7 on the German keyboard (resulting in ctrl+/) - would not work when the shortcut override was tested from QGuiApplication, but then the same shortcut was sent from QApplication with the full information, so it worked the second time. Shortcuts of this type in Qt Quick were broken before. Task-number: QTBUG-47062 Change-Id: I8390b9a96d0d998a2a538ac65503702e0d299cc7 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* | | OS X adaptations to the high-DPI APIMorten Johan Sørvig2015-08-062-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QPlatformWindow::windowGeometry() and friends instead of the QWindow API, which now returns (possibly scaled) values in device-independent pixels. Rename QCocoaWindow::windowGeometry() -> nativeWindowGeometry() Change-Id: I70279145079c3df793059d16fed9aafba2d49a6d Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | platforms: cocoa - fix QCocoaWindow::bottomLeftClippedByNSWindowOffsetTim Blechmann2015-08-061-5/+4
|/ / | | | | | | | | | | | | | | bottomLeftClippedByNSWindowOffset did not take multiple clippings into account. with this patch, we compute the offset via NSView-visibleRect. Change-Id: If4ec02eb983e30f7cc5a6a1cb73e8f5c28fe1551 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Cocoa QPA plugin: Unlock full Q_DECL_OVERRIDE karmaGabriel de Dietrich2015-08-0115-115/+115
| | | | | | | | | | | | Change-Id: I0f631c3b120d052ad552809d0aab9493e5b41a70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Cocoa Integration: Support non-native input context pluginsGabriel de Dietrich2015-08-012-4/+8
| | | | | | | | | | | | | | | | | | | | This is useful, for example, when we want to test the virtual keyboard on OS X. It uses the usual QT_IM_MODULE code path provided by QPlatformInputContextFactory if that environment variable is set. If not, it defaults to QCocoaInputContext. Change-Id: Ib917d7bd2f4e86eacbc50dd7592cc288a9a702de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Enable non-integer device pixel ratioMorten Johan Sørvig2015-07-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around QPaintDevice::metric's int return type by adding a new metric that returns a scaled devicePixelRatio. Choose a scale factor that gives us more than enough range. The QPaintDevice::devicePixelRatio() convenience accessor is public API and can unfortunately not be changed to return a qreal. Add devicePixelRatioF() which returns the (unscaled) devicePixelRatio. Change all call sites of QPaintDevice::devicePixelRatio() to use QPainDevice::devicePixelRatioF(). Task-number: QTBUG-46615 Change-Id: I97ec4000fe379b7ff5e1624a871ae2512790aad9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-172-11/+11
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Mangle QNSApplication and methods into a namespaceMelanie Cappelaere2015-07-141-10/+10
| | | | | | | | | | | | | | | | | | | | [OS X] Mangle the event handle related calls on QNSApplication, so that the events are passed through the correct QApplications when several Qt5's with different namespaces do UI in the same process. Change-Id: Ibb44246fbcf4a2bc3af5a93c48db0382a1380328 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Fix QAction::setAutoRepeat(false)Frederik Gladhorn2015-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | When cleaning up the shortcut override code, in d7ca800a87a2291c94c6580f0cfe068bb2280caf passing on the autorepeat flags from the native event was accidentally dropped in the call to QWindowSystemInterface::tryHandleShortcutEvent. Task-number: QTBUG-46569 Change-Id: Ib053e11e582de630a1fc1b754f8d10d995c88026 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | qcocoahelpers: make qtKey2CocoaKeySortLessThan a function objectMarc Mutz2015-07-131-4/+8
| | | | | | | | | | | | | | | | This allows all compilers to inline the function call into the std::sort instantiation. Change-Id: I3d831ee9160dd89208f42b258ff2463f942a7630 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add ability for QIcons to be marked as template images.James Turner2015-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows end users to create QSystemTrayIcons that are properly displayed as monochrome images on OS X, which is especially important on Yosemite and above when Dark Mode is turned on. [ChangeLog][QtGui][QIcon] Add ability for QIcons to be marked as template images. This allows end users to create QSystemTrayIcons that are properly displayed as monochrome images on OS X, which is especially important on Yosemite and above when Dark Mode is turned on. Task-number: QTBUG-42109 Change-Id: I095fb71355ffa572d0abb4769341f68b89b877c4 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Fix inefficient code foreaching on container.values()Sérgio Martins2015-07-082-3/+3
| | | | | | | | | | | | | | Saves one full iteration and memory allocation. Change-Id: Ice527499b5f5f62bd1e47d76fdf40119948ee3a1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>