path: root/src
diff options
authorFriedemann Kleint <>2016-09-08 13:30:01 +0200
committerFriedemann Kleint <>2016-09-28 15:42:07 +0000
commita45673978627fc1ee4ba336caf545b56d44dedec (patch)
treeb1e83146dca9bc546489a4b9e9ac9201e049319a /src
parent76746ddab6fc44601d036e0bd3c0000aa6f18f0e (diff)
Add note about lifetime of the pointer returned by QClipboard::mimeData()
Explain that it might become invalidated when the clipboard changes. Task-number: QTBUG-55737 Change-Id: Ic7366901f60647caab44930ab03915fd0c9aba1a Reviewed-by: Topi Reiniƶ <>
Diffstat (limited to 'src')
1 files changed, 4 insertions, 0 deletions
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