summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qmacclipboard.mm
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa: Support pasting rich text to Qt appsMorten Johan Sørvig2014-04-051-0/+5
| | | | | | | | | | | | | | | | Native Mac OS X apps uses Rtf as the rich text format while Qt uses html. Add QMacPasteboardMimeRtfText which supports converting from public.rtf to text/html (but not the other way around, since we want to keep posting our html as html). The QMacInternalPasteboardMime API does not support the concept of a one-way handler. Skip the Rtf handler in QMacPasteboard::setMimeData(). Task-number: QTBUG-37188 Change-Id: Ibe29997a038bbb64da24b961e84a5f60133074e0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.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-10/+10
| | | | | | | | | | | | | 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>
* Fix compiler warnings.Erik Verbruggen2013-11-261-3/+4
| | | | | | | | | | | | | | As seen with Xcode 5.0.2. qmacclipboard.mm:108:30: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast] promiseKeeper(paste, (PasteboardItemID)promise.itemId, flavor, this); ^ qmacclipboard.mm:316:56: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast] PasteboardPutItemFlavor(paste, (PasteboardItemID)itemID, QCFString(flavor), 0, kPasteboardFlavorNoFlags); ^ Change-Id: I94b8ea2ff32d606d4cab28981b26c2ef516035dc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-281-1/+1
| | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cocoa: fix memory leaksTeemu Katajisto2012-11-061-1/+4
| | | | | Change-Id: I2e805aa64c65b90d33924ea4a8671735dee581fd Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Reduce QtWidgets dependencies in the Cocoa plugin.Morten Johan Sorvig2012-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | b8246f08 added the new menus implementation which removes one of the major QtWidget dependencies. Continuing on the path to QtWidget-freedom this commit removes the following: - qmenu_mac.h/mm. Not used. - FORMS += filedialog.ui. Not used. - qt_strippedText from qaction.cpp. Duplicate. - Misc stray includes. What is left should be the dependencies needed by the print engine implementation. These will be handled at a later time. Change-Id: I0cead4cdaddcebd402d30c6112f3e889d0f28740 Conflicts: Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add QMacPasteboardMime::count(QMimeData*).Morten Johan Sorvig2012-05-241-8/+2
| | | | | | | | | | | | As QTBUG-25076 points out, the ### comment indicates that we want to add virtual function to QMacPasteboardMime. The default implementation returns 1. Reimplement for QMacPastebardMimeUrl and return the url count. Change-Id: Ie300574eab9991af625986805d2b030914291cc0 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix qtnamespace compile break on Mac.Sarah Smith2012-03-261-4/+0
| | | | | | | | | | | | | | | | | Appears as though the QT_NAMESPACE macros are incorrect here. In fact in qisenum.h because the #define is no respecter of a namespace in most of these conditional compile cases they will be ignored effectively. The QT_HEADER also - if qtypetraits.h conditional compile occurs then it will result in adding extern "C" { twice. For the macros invoking them will not cause the extern "C" { to be used anyway, so just remove this altogether. Task-number: QTBUG-24903 Change-Id: I710dc330f58357f395241a0cf3172e41a5864576 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
* Implement cocoa clipboard support.Morten Johan Sorvig2012-03-151-100/+0
| | | | | | | | | | | | | | | Add QCoccoaClipboard which wraps the existing QMacPasteboard implementation. Remove unused QClipboard integration code from qmacclipboard.mm Change mime type cleanup from using qAddPostRoutine to using an explicit call to destroyMimieTypes in the cocoa platform integration destructor. This is necessary to ensure cleanup happens in the correct order on app shutdown. Change-Id: Ief0e0d996b04c8e84e9fd2cd3a17fb5bd73bb761 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cocoa: Implement Drag-and-Drop.Friedemann Kleint2012-03-071-0/+653
Implement drag and drop support for drags originating from outside Qt. Port mime and pasteboard code from Qt 4. Use QSimpleDrag from from platform support to implement internal Qt drags. Change-Id: I5b664a95ebb00f48de2bd21c24dfb579af16123e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>