summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-0115-111/+101
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * Replace MAC OS X with OS XNico Vertriest2015-06-302-2/+2
| | | | | | | | | | | | Task-number: QTBUG-46374 Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-275-27/+15
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.h Manually fixed src/testlib/qtestcase.cpp to return the right type. Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
| | * OSX: show file dialog in showCocoaFilePanel, don't wait for exec()Shawn Rutledge2015-06-172-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 21e6c7ae4745a76b676dfaa9fe17a2dd40fc0c5c because in QtQuick.Controls, we do not call exec(): we just set the dialog visible. If it is a sheet, then it is already acting as a modal dialog, basically. Task-number: QTBUG-46691 Change-Id: I7fe89f2a2ade0d4ddcf540c9bfc4f5963a077471 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| | * OSX: check if we have a native drag before accessing itRichard Moe Gustavsen2015-06-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to check if [sender draggingSource] != nil to determine if the current drag was started by the application itself or somewhere else. While this is correct use of the API, the problem is that a drag can also be started by UIKit if e.g dragging the file icon in the titlebar. And in that case, Qt has no no native drag data. Since we didn't take this usecase into account, we tried to access the data anyway, which led to a crash. This patch will instead check if we have native drag data directly before trying to access it, which will also cover the usecase mentioned above. Task-number: QTBUG-46598 Change-Id: Ic91b86f658670b895d90a1533246ba24a00dde41 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * Cocoa: Remove ToolTip windows from popup stackMorten Johan Sørvig2015-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Match the cases for the adding logic. Change-Id: I61f49975b4cfcf2acf26b31b521cbc9b96f9d150 Task-number: QTBUG-46447 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
| | * QNSImageView - remove observer before deallocTimur Pocheptsov2015-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can happen that NSMenuDidEndTrackingNotification comes after our imageCell QNSImageView was deallocated (for example, mouse button is not released yet when dealloc called). Remove soon-to-be-deallocated observer. Change-Id: Ib155cc5f0b884c6b1fed0f986d12599096b582c6 Task-number: QTBUG-46425 Reviewed-by: Thierry Bastian <thierryb@filewave.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
| * | Add missing Q_DECL_OVERRIDE in Cocoa specific header filesGabriel de Dietrich2015-06-246-61/+61
| | | | | | | | | | | | | | | | | | Change-Id: I91831390e9e0d97ab28f0e34ca0573fb2c84e954 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | cocoa: QNSView - guard implementation against deleted windowTim Blechmann2015-06-242-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when embedding a QWindow into a native cocoa gui there are cases that the QWindow is destroyed while the QNSView is still available. this patch makes sure that the m_window pointer is cleared when the QWindow is destroyed and adds checks to the implementation to avoid that m_window is called when it has already been destroyed. Change-Id: I7e0614969dedb87b54df74d542a8c1fb15d8acf0 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * | QCocoaMenu: Fix crash with 10.7 QFileDialog shortcutsDyami Caliri2015-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Set target and action in menuHasKeyEquivalent in order to match the specification, and to avoid QFileDialog crashes on OSX 10.7. Task-number: QTBUG-17291 Change-Id: Ie8f88cbda31a42c3e1acd8d4ad36d54a295eac65 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * | Cocoa: QCocoaApplicationDelegate - correctly install cleanup handlerTim Blechmann2015-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | + (id)allocWithZone:(NSZone *)zone returns before the cleanup handler is installed. this causes the QCocoaApplicationDelegate not to be cleaned up by the garbage collector Change-Id: Ic4862b96228539f3da857955f08157402974a104 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Fix inefficient container.values().first()Sérgio Martins2015-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Saves 1 full iteration and 1 memory allocation. Change-Id: I7e521054bd573f30dea2ec166d566ab6ac60eb4e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add QCocoaWindowFunctions and add a function to find the clip offsetJorgen Lind2015-06-114-0/+34
| | | | | | | | | | | | | | | | | | Change-Id: I0f9cd1f923867f6f24b3bc54e442a16b5d2a11e4 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Remove exec bits from files that should not be executableDmitry Shachnev2015-06-072-0/+0
| | | | | | | | | | | | | | | | | | | | | Change-Id: I66f49c6db82eadc3b11cc9b1cf01375e9596a8e6 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | | Fix crash in tst_qfiledialog on OS XSimon Hausmann2015-06-042-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test aggressively shows and hides dialogs and popups, and we would end up installing this global event monitor frequently. However we never cleaned up properly, for example if the window didn't get hidden properly or if the monitor was already installed for some reason. Change-Id: I6fa28eaeb03e089ced735912dbe29b0b8ad75d58 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-0310-99/+119
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * | Cocoa: add QT_MAC_USE_NSWINDOW env. variableMorten Johan Sørvig2015-06-021-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | When enabled, all QWindows will be backed by a NSWindow. This is unlike the default where only top-level QWindows get a NSWindow. The QWindow still has (Q)NSView as the NSWindow content view. The return value of the winId functions are still the NSView and is not affected by this switch. Change-Id: I131b89af04c09451a6e7515d1da3f7498f53979a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * QCocoaMenu: return YES if we have a shortcut for a pseudo-first responderTimur Pocheptsov2015-06-011-12/+22
| | | | | | | | | | | | | | | | | | | | When running a modal session with NSOpenPanel (QFileDialog), our menu delegate should not touch qApp->focusObject, since it's not what actually has focus inside NSOpenPanel (will be some native view). Return YES instead. Task-number: QTBUG-17291 Change-Id: I94f3281237fb25495d317b02310bf9d77b21d2ba Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Add support to disable close button from the tool window in Cocoa.Marko Kangas2015-05-271-3/+16
| | | | | | | | | | | | | | | | | | | | Fixed regression from Qt4 that close button could't be disabled from the tool window. With this patch buttons are hidden before using button hints like it's on Windows. Change-Id: I00f03ff9528ccae3b1136312404452b9415953b4 Task-number: QTBUG-45971 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * QPA plugins: Use _iid macros instead of strings in Q_PLUGIN_METADATA.Friedemann Kleint2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | This makes it easier to change the version numbers by changing the macros in QtGui. Task-number: QTBUG-46009 Change-Id: I94c9591ec6f7c9173a698df9e1fe8fd6a904caf4 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Remove QNSView from superview in ~QCocoaWindow()Morten Johan Sørvig2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A QNSView without a corresponding live QCocoaWindow object is not in a valid state. Previously we would call removeFromSuperview for child QWindows to avoid having Cocoa send messages to the now invalid QNSView. Do this for QWindows embedded in native Cocoa hierarchies as well. Change-Id: I49c6daef8ed061b3f40138fe9b4ce6be190f2fd0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * Cocoa integration - implement Qt::WindowModal file dialogsTimur Pocheptsov2015-05-132-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | Previously, for Qt::WindowModal dialogs we were creating modal sheet with beginSheetModalForWindow: and later (from exec) calling -runModal, essentially making a window modal dialog into (now) application modal sheet, which is not right- it's centered relative to desktop and the jump from window modal sheet's position (centered relative to a window) to application modal was quite visible. Now, instead of [panel runModal] (== [NSApp runModalForWindow:panel]) we call [NSApp runModalForWindow:theRequiredWindow]. Change-Id: I793dc72c7d1fe96497bb35754f4d0eac9a5e00e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Cocoa: Upgrade default surface format to include an alpha channelUlf Hermann2015-05-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | The default surface format on OS X is changed to RGBA since this is most performant. You can request a different surface format to change this. You can not request the default format without alpha channel, though. Change-Id: I4f44d0abe01515c98ba699c76a0dd5e37b873766 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * cocoa: Do not access the integration instance when shutting downLaszlo Agocs2015-05-121-1/+3
| | | | | | | | | | | | Task-number: QTBUG-46016 Change-Id: Icb7f0c73d5fe944538e2b9abf50c2532037e932f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.4' into merge5.5Allan Sandfeld Jensen2015-05-081-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/io/qnoncontiguousbytedevice_p.h src/gui/image/qjpeghandler.cpp src/network/access/qhttpthreaddelegate_p.h tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp tests/auto/widgets/widgets/qmenubar/BLACKLIST Change-Id: I01de8c1c28efcedfd7953d05025f54802dc08ab3
| | * Cocoa: Handle the event passed into the global monitor correctlyAndy Shaw2015-04-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the global monitor was used it did not get the right position for the mouse event and as a result it caused context menus to appear and disappear instantly when right clicking over a non active window. This ensures that the events are sent correctly with the right position and button information. Task-number: QTBUG-45015 Change-Id: I9b17a725e656c716c4e22117b4513e64c357b266 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * | cocoa: ensure app don't crash when receiving drag from other appRichard Moe Gustavsen2015-05-061-34/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 939f21be53ef introduced a crash when dragging data from a 3rd party app into the app. Basically the current code assumed that we always have QCocoaIntegration::instance()->drag()->currentDrag() but this seems to only be the case if the drag was started by the app itself. The crash was found by testing the fridgemagnets example. Just drag text from other app into the example to see it crash. Also, refactored the cursor code into a separate method to simplify code reading. Change-Id: Ica611a4452a0dd02e01451111aeda14c879f8f1b Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * | Clean up API of QPlatformPrintDevice (QPA).Friedemann Kleint2015-05-054-36/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The class inherited QSharedData, had a non-virtual clone() function and a non-virtual operator==() which compared QPlatformPrintDevice::id(). Derived classes implemented clone() and operator==() comparing ids to no effect. The class does not have any setters modifying its values, so detaching, copying and assigning does not make sense. Remove the inheritance, clone(), and operator==() and make the class a non-copyable base class. Use a QSharedPointer instead of a QSharedDataPointer to store it in QPrintDevice. Remove copy constructors and clone() reimplementations that were never called in implementations. Found while investigating QTBUG-44991. Task-number: QTBUG-44991 Change-Id: Ib79354b37048d04d50d936f1d0ae06c36efaac00 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Add shared implementation of a NSAutoreleasePool wrapper to qglobalTor Arne Vestbø2015-05-2723-178/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have at least 5 different (but equal) implementations of a wrapper in Qt, and some code uses explicit NSAutoreleasePools. Having a shared implementation lets us clean up things a bit and makes it easier to reason about which pools are actually needed. Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-273-13/+12
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/tools/qdoc/tree.cpp tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: Iaa78f601a63191fa643aabf853520f913f2f0fdc