path: root/src/corelib/thread/qmutex.h
diff options
authorVolker Hilsheimer <>2019-12-04 15:06:36 +0100
committerVolker Hilsheimer <>2019-12-10 05:24:11 +0100
commitc69a2448ab129d88411a4778f2350dcf971dc623 (patch)
treed408b79ef6e2c8394784d4b126af4c607e0fcc1a /src/corelib/thread/qmutex.h
parentc978de990b6c448184e13a3c45d9aa268492b48a (diff)
macOS: support copying lazily provided data to the clipboard
Using always EagerRequest type forces the application to provide the data at copy or drag-begin time, even though the data might never be requested (pasted or dropped into another application). For data that is expensive to generate, this is wasteful, and on other platforms Qt uses the functionality provided by the native clipboard to allow for on-demand retrieval of data. Changing the request type to LazyRequest for the cocoa clipboard works, but then we need to make sure that we resolve all promises at shutdown time so that the data is available (which is what the end user expects). Commit ad0d2f463a0905c4705660d96e8a514539c51d36 disabled this for lazy requests to prevent crashes when using drag'n'drop, where the QMacPasteboard object is short-lived and stack allocated. We definitely don't need to worry about lazy data that is not yet retrieved at the end of a drag'n'drop operation, so limit the fix from the previous commit to the drag'n'drop scenario. [ChangeLog][QtGui][QClipboard] Support lazily provided copying of data to the clipboard on macOS Change-Id: Id2203999024a0d9d854d6933d39077cc4af925d0 Fixes: QTBUG-76263 Reviewed-by: Tomi Korpipää <> Reviewed-by: Morten Johan Sørvig <>
Diffstat (limited to 'src/corelib/thread/qmutex.h')
0 files changed, 0 insertions, 0 deletions