summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoadrag.mm
Commit message (Collapse)AuthorAgeFilesLines
* Apple: Fix a few deprecation warnings after bumping deployment targetsTor Arne Vestbø2024-02-191-2/+2
| | | | | | | | | | | | - kIOMasterPortDefault -> kIOMainPortDefault - Use UTType instead of Carbon Core functions/constants - NSWorkspace iconForFileType -> iconForContentType - Removed obsoleted kUTTypeInkText pasteboard type There are still a few more, but these will be fixed in follow ups. Change-Id: Ibbca226d578b4ba64bd9c8c5d0addc1870114a20 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Revert "macOS: Don't crash when starting a drag with empty mime data"Volker Hilsheimer2024-01-241-2/+0
| | | | | | | | | | | | This reverts commit 09afa7575276d7b500f17671a1ca9ca677767b44. It broke Qt Designer, which creates QDrag objects without any mime format. It's likely that user code does the same to support internal drag'n'drop. Pick-to: 6.7 6.6 6.6.2 6.5 Task-number: QTBUG-119216 Change-Id: I8b74f2d9b89588cd35bca9ca20973810036a2635 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Don't crash when starting a drag with empty mime dataVolker Hilsheimer2023-11-221-0/+2
| | | | | | | | | | As with all drag'n'drop code, we can't auto-test this as the test would enter a blocking event loop. Task-number: QTBUG-119216 Pick-to: 6.6 6.5 Change-Id: I7bab4a4fe7f5b315cdaec61636ded6186d9f75b4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qcocoadrag: use rvalue overload moreAnton Kudryavtsev2023-09-091-2/+2
| | | | | | | to reuse internal buffer Change-Id: Iab24bf8ff40edc1b64227ab6dbdff02f926b1008 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* cocoa: use const method moreAnton Kudryavtsev2023-09-091-1/+1
| | | | | | | to avoid implicit detach Change-Id: Ifeea193639f357cc53f8af884ae868a18149fbc8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Don't assume DnD is handled via internal drag loopTor Arne Vestbø2023-06-071-2/+3
| | | | | | | | | | | | | | | | If we have only one item, we're not using beginDraggingSessionWithItems which requires us to manage our own drag loop, and instead use good old dragImage, which takes care of the drag loop on our behalf. In both cases we end up in draggingSession:endedAtPoint, so we need to explicitly check for the existence of a manually managed drag session. Amends 8a359343621fa83941946cb4e661b54ca7a1c4cc. Fixes: QTBUG-114236 Pick-to: 6.5 6.6 Change-Id: Ifa9110945e191c4ffebe099e3e4edf9c571ab376 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Don't leak QEventDispatcherUNIX during event dispatcher creationTor Arne Vestbø2023-04-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During QCoreApplication initialization, we create the main thread's event dispatcher, which for a GUI app happens via QGuiApplicationPrivate's createEventDispatcher() override. This in turn relies on the platform integration to create the event dispatcher, but to do that it needs to create the platform integration first. And this might result in calling APIs that themselves initialize the main thread event dispatcher, such as QEventLoop, which non-lazily creates an event dispatcher for the thread. We already had a check to catch the platform integration setting the QCoreApplictionPrivate::eventDispatcher member, but not anything for checking the current thread data. On macOS this resulted in a leak of QEventDispatcherUNIX because QCocoaDrag contained a QEventLoop member. We now track the event loop temproarily via a pointer instead, like we do in other places. An alternative fix would be to defer the initialization of QCocoaDrag until QCocoaIntegration::drag() is called, but that would run the risk of something calling the function during platform initialization and we'd be back to the same problem. It's unclear why QEventLoop is not lazily ensuring the event dispatcher, and this might be a wider fix for similar issues. Pick-to: 6.5 Change-Id: I643010ddb09945936ce9b0b94de0df96f6fe218f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Clean up QUtiMimeConverter APIVolker Hilsheimer2023-02-081-4/+4
| | | | | | | | | | | | | Based on header review comments, make the internal constructor private and declare classes that need it as friends. QFlag-ify the HandlerScope enum, as it is a list of flags, and adjust code accordingly. Pick-to: 6.5 Change-Id: I1d8843265e49e696d463e9eea8306f4dbae75c78 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Reintroduce converter APIs for supporting native clipboard formatsVolker Hilsheimer2022-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5, QWin(dows)Mime and QMacMime lived in the respective Extras modules, which were removed and partially folded into the relevant modules in Qt. QWindowsMime and QMacMime continued to provide the abstraction for implementing built-in support for native clipboard formats and UTIs within Qt, but only as private APIs. After the recent clean up of those APIs and respective infrastructure, we can now bring them back as public converter interfaces. Application developers can subclass those and instantiate an instance of their implementation to add support for platform or application specific data formats. These interfaces are not in the QNativeInterface namespace, as applications don't call into Windows or macOS using those interfaces. I.e. there is no class on which an application would call auto *converter= nativeInterface<QWindowsMimeConverter>(); Also, since applications override those converter types, we do want to guarantee binary and source compatibility. [ChangeLog][QtGui][QWindowsMimeConverter] Reintroduced to allow applications to add support for conversion from and to Windows-native clipboard formats to MIME-encoded data. [ChangeLog][QtGui][QUtiMimeConverter] Reintroduced to allow applications to add support for conversion from and to clipboard data on macOS and iOS to MIME-encoded data. Fixes: QTBUG-93632 Change-Id: Iebd909c3970015d203f59d5ab15e306b3d312f6e Reviewed-by: Yuhang Zhao <2546789017@qq.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: clean up clipboard codeVolker Hilsheimer2022-11-071-2/+2
| | | | | | | | | | | | | | Replace flavor with uti, remove unused parameters, remove unused hasOSFlavor function. Hide QMacMimeData as an implementation detail, it is generally undefined behavior to cast an object to a type it is not an instance of (even if related and without new data members). Apply const, fix coding style. Task-number: QTBUG-93632 Change-Id: I3bc05a72bc47c78958f26211211e734387fbb024 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Make QMacMime's handler scope type-safeVolker Hilsheimer2022-11-071-4/+4
| | | | | | | | | | | | | | | | | | The value indicates for which systems the handler is relevant, e.g. clipboard and/or drag'n'drop. Rename the enum from "MimeType", which is something else already, to "HandlerScope". Make the enum a scoped enum to avoid implicit conversion to uchar, and to allow for better value names. Use the type in APIs and only convert to uchar when needed. Make respective arguments default to both DnD and clipboard implicitly, instead of explicitly interpreting an invalid zero-value as a default value. Task-number: QTBUG-93632 Change-Id: I85ab982f6c9fe78ea4d030dd0b0791c8ab866f67 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Rename QMacInternalPasteboardMime to QMacMimeVolker Hilsheimer2022-11-071-4/+4
| | | | | | | | | | | | | | | We want to make it public, and there is no need for "pasteboard" since it also coveres drag'n'drop. Add a default constructor that defaults to supporting both clipboard and drag'n'drop, and clean up the code by using that constructor where applicable. Historical note: the converter interface was called QMacMime up to Qt 4.2, when due to macOS changes it had to be replaced by QMacPasteboardMime. Task-number: QTBUG-93632 Change-Id: Id9712300039375aa6394598b104827e6f5d6c948 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Refactor: split QMacMime registry and virtual interfaceVolker Hilsheimer2022-11-031-0/+1
| | | | | | | | | | | | | | | | The logic for registration of converter implementations is only used internally through static functions. Move those, and related global functions, to a QMacMimeRegistry namespace. Reduce the QMacInternalPasteboardMime to the abstract interface for converting between native and Qt clipboard data. Historically, mime converters can have different "types"; make that API type-safe. Task-number: QTBUG-93632 Change-Id: I0e16fefa350398b693486199fe10357fd84abcd6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.hSona Kurazyan2022-09-011-0/+1
| | | | | | | | And include qcore_mac_p.h where needed. Task-number: QTBUG-99313 Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCocoaDrag: don't add pasteboard items with non-absolute URLsTimur Pocheptsov2022-08-231-0/+6
| | | | | | | | | | | | | AppKit rejects them and we end up with inconsistent number of pasteboard items and drag images: "NSURLs written to the pasteboard via NSPasteboardWriting must be absolute URLs." "There are 1 items on the pasteboard, but 2 drag images." Fixes: QTBUG-105711 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I7b1bc99f6e0b2b304f92f69125fb6af4ab5e303f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Plugins: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-041-1/+3
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* macOS: Use originating view as drag source when dragging multiple itemsStefan Wastl2022-04-261-5/+3
| | | | | | | | | | | | | We're already tracking the last view along with the last event, so use that instead of always assuming the drag started from the window's content view. Fixes: QTBUG-102584 Pick-to: 6.2 6.3 Change-Id: Ibe8506b0f91ecdfe6e7fe91e17c129b4d7552880 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: <stefan.wastl@native-instruments.de>
* QCocoaDrag - set image only on the first drag itemTimur Pocheptsov2020-09-281-2/+7
| | | | | | | | This image is already a combined image of all urls that we drag. Pick-to: 5.15 Change-Id: I8fe45f64a6022881320d100f8a6f4a25fcac73b9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCocoaDrag::drag - make sure clipboard is ours and populatedTimur Pocheptsov2020-09-231-4/+4
| | | | | | | | | | | | This fix is not final yet, it's just to plumb the serious bug/regression of accessing NSPasteBoard in some strange state and the one we have not populated yet/do not even own (?). Drag image(s) is broken atm and will be fixed in the follow-up patch. Pick-to: 5.15 Task-number: QTBUG-71939 Change-Id: I5c3ac3ec138d7407c2e0c206485478aa5244ae15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCocoaDrag::maybeDragMultipleItems - fix erroneous size checkTimur Pocheptsov2020-09-211-1/+1
| | | | | | | | | | | | | Due to somewhat inverted logic introduced by the 8481a9fc974a1f1dd44a, testing number of items in a pasteboard happens _before_ we fill it, which is wrong and useless. As a result, maybeDragMultipleItems will prevent the single item drag. Pick-to: 5.15 Task-number: QTCREATORBUG-24665 Task-number: QTBUG-86786 Change-Id: Ia4be9fc56677575bb363cbb8b1adbea59e6c3b0b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cleanup API of QMimeDataLars Knoll2020-09-211-1/+1
| | | | | | | | | | | | | Do not use QVariant::Type anymore, instead use QMetaType For some reason, this pushed the qvariant autotest over the limit where MSVC requires the /bigobj flag, so add that one. [ChangeLog][QtCore][QMimeData] The signature of the virtual retrieveData() function has changed and now takes a QMetaType instead of a QVariant::Type. Change-Id: Ib46773bd731ee2177b1ef74d8162d744be7017ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS: Clean up headersTor Arne Vestbø2020-06-051-0/+2
| | | | | | | | | | | | | | The headers are now C++ clean and can be used outside of Objective-C code. All includes of Objective-C frameworks have been moved to the implementation files. Header guards have been added in the few places they were missing. All includes are now done via #include, instead of sometimes using the #import variant. Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QCocoaDrag - avoid using the deprecated API if possibleTimur Pocheptsov2020-05-081-0/+90
| | | | | | | | | | | | | | | | | | | | | The -dragImage stopped to work in 10.14 first with change in behavior documented and the new API (AppKit) proposed/advised. Then after some update the old behavior was restored and D&D for multiple URLs was working again without us having to change anything. In 10.15 it's not working anymore and we have to properly fix it and switch to the API advised. The new API is non-blocking, but QCocoaDrag::drag is expected to be blocking so we have to add a nested event loop to emulate the old behavior. Dragging image is a bit problematic (the exception is thrown because number of images (1) and number of items in NSPasteboard are not equal): creating separate images for different drag items looks really messy. So ... we use the same image again and again with the same frame. Fixes: QTBUG-71939 Change-Id: I02c2a10eab280cf4a55513adaf29c22fff934c01 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Resolve QWidget window handle without depending on QtWidgetsTor Arne Vestbø2020-04-021-15/+10
| | | | | Change-Id: If5b2f17283193d7a1718f476b72f380e9e67d0f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Streamline QImage to NSImage conversionTor Arne Vestbø2020-03-121-7/+4
| | | | | | | | | | | | The conversion uses NSBitmapImageRep and correctly sets the display pixel ratio and size of the resulting image, reducing the need for clients to deal with this. The function returns an auto-released object, as is customary for class-functions like these. Change-Id: I5124d1d8145a7f5266921b22fda1987798771ec1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Replace use of deprecated NSDragPboard enumTor Arne Vestbø2019-11-251-2/+2
| | | | | Change-Id: I90128abe310f971a89ecb6551e31950211adda77 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Cocoa QPA: Clean up 0 as pointerGabriel de Dietrich2018-04-191-6/+6
| | | | | | | | We use nil for Objective-C null pointers and nullptr everywhere else, including CoreFoundation and similar opaque types. Change-Id: Id75c59413dec54bf4d8e83cf7ed0ff7f3d8bb480 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-081-1/+1
| | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QPlatformDrag::platformDropDataAlbert Astals Cid2017-03-131-1/+1
| | | | | | | | | | | | Its only uses were: * Call it to just store it in QDragManager::QDragManager * qnsview.mm calls it but since it knows it's a QCocoaDrag it can just call a function of that class directly * qxcbdrag.cpp calls it but since it basically was calling itself can just use the class member directly Change-Id: Ic7797c877d77f944a1212a7ea01173393bf903fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-0/+4
|\ | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| * macOS: use active window device pixel ratio for drag pixmapOleg Yadrov2017-02-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QCocoaDrag::dragPixmap, it treats QDrag::source as a QWindow, but it is not - it's just a generic QObject* of some kind (which QQuickDrag sets to the originating QQuickItem, and the widgets stack sets to a QWidget). This failure means that dpr stayed at 1.0. Unfortunately it’s not possible to receive a pointer on QWindow directly from QQuickItem because QtWidgets and QtQuick do not share the sources, but we can use the same dpr as current focused window has because drag can only start from active window - press on a window which is not focused should activate it first. Task-number: QTBUG-57942 Change-Id: Id358c181d03d519188caaa83fb4226033b8ed1ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | macOS: fix 32-bit buildsJake Petroules2016-09-211-1/+1
|/ | | | | Change-Id: I767b8907f91fd45f662b67ba7b9a8378a3e4851e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Move image conversion functions to QtGuiTor Arne Vestbø2016-09-181-0/+1
| | | | | Change-Id: I911f2648e506f27519e98be1bffe2c5ab0f388f1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-1/+15
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-1/+15
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * HiDPI Drag and Drop: Properly render the default image on MacGabriel de Dietrich2016-08-091-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only when the attached MIME data contains text, and we fall back to rendering that text into a pixmap. It requires getting the device pixel ratio from the source which, for now, may be a QWidget or a QWindow. Other cases may exist, but that would bring more dependencies than desired. Similarly, it fixes the draggabletext example. Other examples would require either to get updated pixmaps or change substantially in order to support HiDPI (e.g., the fridgemagnets example). Change-Id: I66198214233e3e06c87505744e2aaa9691fe1bb6 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | darwin: Add Foundation conversion functions for QSize/QSizeFTor Arne Vestbø2016-06-141-1/+1
|/ / | | | | | | | | | | | | | | | | | | The fromCGPoint function was left out for QSize, as the foundation type is using CGFloats internally. Clients should use an explicit QSizeF::toSize() when potentially throwing away precision. Change-Id: I12d43ae0881f09ad8d79f2caaa000c3983f4ef30 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-021-1/+3
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * Cocoa: Support high-dpi DnD pixmaps.Morten Johan Sørvig2016-01-261-1/+3
| | | | | | | | | | | | | | | | | | | | Set the NSImage size (which is in points/device independent pixels) to inform Cocoa DnD about the intended image visual size. Change-Id: I6fadd77f4e0173e8e9773725fab3b35f70a055ff Task-id: QTBUG-44179 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@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>
* QCocoaDrag: Fix text, url and image preview pixmap while dragging.Filipe Azevedo2015-03-171-6/+50
| | | | | | | | | | OSX was missing text, url and image preview while dragging causing the drag operation to show a small dashed box around the mouse cursor. Task-number: QTBUG-33824 Change-Id: I8d0acd0d6a48b7cb29ad2faba8b9ecb9cdf2a5ab Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Cocoa: Delay QMimeData requests for DnD events.Morten Johan Sørvig2014-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Cocoa: remove qmacmime includes where not neededRichard Moe Gustavsen2014-03-061-1/+0
| | | | | | Change-Id: Id20df8b80f3064ac0d193124fb790a075a89e53c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix static builds on Mac.Morten Johan Sørvig2013-12-181-4/+4
| | | | | | | | | | | | | QMacPasteboardMime is a public class in Qt 4. Qt 5 has two copies, one public QtMacExtras and an internal one in the cocoa plugin. This causes a symbol collision when building statically. Rename the internal copy to QMacInternalPasteboardMime. Task-number: QTBUG-35310 Change-Id: I891787b451a0b342ed85aa7196e606bc11623e21 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: avoid a crash in QCocoaDragLiang Qi2013-11-291-1/+7
| | | | | | | | | | | | NSEvent needs to be copied. Reference: http://lists.apple.com/archives/cocoa-dev/2007/Dec/msg00678.html Task-number: QTBUG-33533 Change-Id: I73709545573e59aab6875a8c3dd903cb171e858f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix leak in QCocoaDrag.Ivan Komissarov2013-06-111-1/+3
| | | | | Change-Id: I2961d08f95c68446a2893721dc79ba56bf98c0de Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>