qt5base-lts/tests/auto/gui/kernel/qclipboard
Eskil Abrahamsen Blomfeldt 74a20b77a6 Fix memory leak in QClipboard::setMimeData()
The setMimeData() function is documented to take ownership of
the object passed in, but in the case where the platform
plugin did not support the requested mode, we would simply
return without deleting the object nor telling the application,
so it would cause a potential memory leak. We need to honor the
contract, even when we fail to set the mime data.

Test was updated to avoid verifying the leak in cases where
the platform does not support all modes.

[ChangeLog][QtGui][Clipboard] Fixed a memory leak in setMimeData()
when the platform plugin did not support the requested mode.

Task-number: QTBUG-41852
Change-Id: I2112da1613199fe1b56724e7ccf097b9e912c117
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-10 13:37:59 +02:00
..
copier Update license headers and add new license files 2014-09-24 12:26:19 +02:00
paster Update license headers and add new license files 2014-09-24 12:26:19 +02:00
test QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
qclipboard.pro Changed qclipboard unittest to work from installation directory. 2012-01-17 04:54:12 +01:00
tst_qclipboard.cpp Fix memory leak in QClipboard::setMimeData() 2014-10-10 13:37:59 +02:00