Fix crash on access of dead QMimeData
authorAllan Sandfeld Jensen <allan.jensen@digia.com>
Thu, 27 Mar 2014 15:26:15 +0000 (16:26 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 28 Mar 2014 11:04:45 +0000 (12:04 +0100)
commit1967978f5d0b225aec561a0e1028b9e02f5cdce4
treeac2fb549b19e0e9c327ffe018663b9dab0b1b10c
parent9b75f92b9a3ab3216da79f390b49919266ca258f
Fix crash on access of dead QMimeData

When we give a QMimeData to the system pasteboard, we should no longer
access it locally.

This patch ensures we invalidate the pointer to the QMimeDate once it
has been uploaded to the system clipboard. To ensure we can still read
values we have writen, the code to read the pasteboard data will now
read it from the system pasteboard when applicable. Several places
the latter was done manually have been removed.

Task-number: QTBUG-37904
Change-Id: I9c37b2fcc58ebbc387319be39c190fd7db6f70eb
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/qt/PasteboardQt.cpp