diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-02-12 10:49:50 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-02-12 10:49:50 (GMT) |
commit | 8e309899b8287b67905072927df1e00effc2a13e (patch) | |
tree | 6c7bff1a77090c5b39b35a13c88ef876c2535e09 /src/gui/kernel/qclipboard_mac.cpp | |
parent | f74029e286e97067ac39086955481bf979af69dc (diff) | |
parent | 01245bcabf97dfdfdd23a2ec075b8de3e78bdeb2 (diff) | |
download | Qt-8e309899b8287b67905072927df1e00effc2a13e.zip Qt-8e309899b8287b67905072927df1e00effc2a13e.tar.gz Qt-8e309899b8287b67905072927df1e00effc2a13e.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-master-from-4.6
Diffstat (limited to 'src/gui/kernel/qclipboard_mac.cpp')
-rw-r--r-- | src/gui/kernel/qclipboard_mac.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qclipboard_mac.cpp b/src/gui/kernel/qclipboard_mac.cpp index f3a971d..49a6cc8 100644 --- a/src/gui/kernel/qclipboard_mac.cpp +++ b/src/gui/kernel/qclipboard_mac.cpp @@ -388,6 +388,18 @@ QMacPasteboard::setMimeData(QMimeData *mime_src) clear_helper(); QStringList formats = mime_src->formats(); +#ifdef QT_MAC_USE_COCOA + // QMimeData sub classes reimplementing the formats() might not expose the + // temporary "application/x-qt-mime-type-name" mimetype. So check the existence + // of this mime type while doing drag and drop. + QString dummyMimeType(QLatin1String("application/x-qt-mime-type-name")); + if (!formats.contains(dummyMimeType)) { + QByteArray dummyType = mime_src->data(dummyMimeType); + if (!dummyType.isEmpty()) { + formats.append(dummyMimeType); + } + } +#endif for(int f = 0; f < formats.size(); ++f) { QString mimeType = formats.at(f); for (QList<QMacPasteboardMime *>::Iterator it = availableConverters.begin(); it != availableConverters.end(); ++it) { |