LibreOffice Module vcl (master) 1
|
The QClipboard's QMimeData is volatile. More...
#include <QtTransferable.hxx>
Public Member Functions | |
QtClipboardTransferable (const QClipboard::Mode aMode, const QMimeData *pMimeData) | |
css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL | getTransferDataFlavors () override |
sal_Bool SAL_CALL | isDataFlavorSupported (const css::datatransfer::DataFlavor &rFlavor) override |
css::uno::Any SAL_CALL | getTransferData (const css::datatransfer::DataFlavor &rFlavor) override |
Public Member Functions inherited from QtTransferable | |
QtTransferable (const QMimeData *pMimeData) | |
const QMimeData * | mimeData () const |
css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL | getTransferDataFlavors () override |
sal_Bool SAL_CALL | isDataFlavorSupported (const css::datatransfer::DataFlavor &rFlavor) override |
css::uno::Any SAL_CALL | getTransferData (const css::datatransfer::DataFlavor &rFlavor) override |
Private Member Functions | |
bool | hasInFlightChanged () const |
Private Attributes | |
const QClipboard::Mode | m_aMode |
The QClipboard's QMimeData is volatile.
As written in the QClipboard::mimeData documentation, "the pointer returned might become invalidated when the contents of the clipboard changes". Therefore it can just be accessed reliably inside the QClipboard's object thread, which is the QApplication's thread, so all of the access has to go through RunInMainThread().
If we detect a QMimeData change, we simply drop reporting any content. In theory we can recover in the case where there hadn't been any calls of the XTransferable interface, but currently we don't. But we ensure to never report mixed content, so we'll just cease operation on QMimeData change.
Definition at line 62 of file qt5/QtTransferable.hxx.
|
explicit |
|
override |
|
override |
|
private |
|
override |
|
private |
Definition at line 65 of file qt5/QtTransferable.hxx.