diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-07-25 12:37:20 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-07-25 17:05:36 +0000 |
commit | ad0d2f463a0905c4705660d96e8a514539c51d36 (patch) | |
tree | 20b80f249c13b905e9db1b3b5492ee231a08f731 /src/plugins/platforms/cocoa/qmacclipboard.h | |
parent | 65cdffeaeadfc52fe0d1f2a73f82b698327a3b27 (diff) |
Cocoa integration - fix a crash in QMacPasteboard
QMacPasteboard's dtor skips LazyRequest promises and this leaves pasteboard
manager in broken state, since we release the pasteboard itself
of the next step in destructor. As a result, not only Qt's app doing D & D
(and thus via QCocoaDrag creating a stack-allocated QMacPasteboard) can die
suddenly when somebody inspects a pasteboard, this 'somebody' ... can also
die amazingly. So now we DO resolve promises using PasteboardResolvePromises
(but we also preserve the original intent of not providing or providing empty
data for lazy requests).
Task-number: QTBUG-54663
Task-number: QTBUG-54832
Change-Id: I3ce90bd0a012dd3cbb30c93b2b17dce9473acb28
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qmacclipboard.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qmacclipboard.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qmacclipboard.h b/src/plugins/platforms/cocoa/qmacclipboard.h index 0d1f195f48..6989a44a0e 100644 --- a/src/plugins/platforms/cocoa/qmacclipboard.h +++ b/src/plugins/platforms/cocoa/qmacclipboard.h @@ -69,6 +69,7 @@ private: uchar mime_type; mutable QPointer<QMimeData> mime; mutable bool mac_mime_source; + bool resolvingBeforeDestruction; static OSStatus promiseKeeper(PasteboardRef, PasteboardItemID, CFStringRef, void *); void clear_helper(); public: |