From a45673978627fc1ee4ba336caf545b56d44dedec Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 8 Sep 2016 13:30:01 +0200 Subject: [PATCH] Add note about lifetime of the pointer returned by QClipboard::mimeData() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explain that it might become invalidated when the clipboard changes. Task-number: QTBUG-55737 Change-Id: Ic7366901f60647caab44930ab03915fd0c9aba1a Reviewed-by: Topi Reiniƶ --- src/gui/kernel/qclipboard.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp index ec6c0bcc36..21127eebbd 100644 --- a/src/gui/kernel/qclipboard.cpp +++ b/src/gui/kernel/qclipboard.cpp @@ -438,6 +438,10 @@ void QClipboard::setPixmap(const QPixmap &pixmap, Mode mode) The text(), image(), and pixmap() functions are simpler wrappers for retrieving text, image, and pixmap data. + \note The pointer returned might become invalidated when the contents + of the clipboard changes; either by calling one of the setter functions + or externally by the system clipboard changing. + \sa setMimeData() */ const QMimeData* QClipboard::mimeData(Mode mode) const