Android: Fix memory leak in QClipboard::setMimeData()

The ownership of the object passed into QClipboard::setMimeData()
is documented to be transferred to the clipboard, but we never
deleted it, thus all these objects would leak.

[ChangeLog][Android] Fixed memory leak in QClipboard::setMimeData()

Change-Id: I43e6bad1071be5f56c219cb9341584edba54d2bd
Task-number: QTBUG-41852
Reviewed-by: BogDan Vatra <bogdan@kde.org>
bb10
Eskil Abrahamsen Blomfeldt 2014-10-09 12:43:57 +02:00
parent e31a7e46ea
commit 5f1f955524
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ void QAndroidPlatformClipboard::setMimeData(QMimeData *data, QClipboard::Mode mo
{
Q_ASSERT(supportsMode(mode));
QtAndroidClipboard::setClipboardText(data != 0 && data->hasText() ? data->text() : QString());
delete data;
}
bool QAndroidPlatformClipboard::supportsMode(QClipboard::Mode mode) const