summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformclipboard.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Android: Clear the clipboard when getting a null mimedataAndy Shaw2020-05-301-0/+4
| | | | | | | | | | From API 28 it is possible to clear the clipboard so we should ensure that this is done if API 28 or later is being used. Otherwise it is not removed, but that is due to limitations on the Android side. Pick-to: 5.15 Change-Id: I1fe504d0e566c6923b39b2adf4540619c6b1daf7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Only have one valid QMimeData object kept aroundAndy Shaw2020-05-191-2/+9
| | | | | | | | | | | | Once the clipboard data is queried then we can clean up the previous QMimeData object created. So rather than keeping on to it and cleaning up when the clipboard is created we can delete it at that point. This means it is not necessary to make it a QObject subclass, so we can save in that respect too. Pick-to: 5.15 Change-Id: I152ca6ea5c713abe25f75ca2016759c0e3152bfb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Add support for setting/getting html and uris from clipboardAndy Shaw2018-12-211-6/+5
| | | | | | | | | | | | | This also updates the used API to use ClipData and not the deprecated ClipboardManager API. [ChangeLog][Platform Specific Changes][Android] QClipboard now supports HTML and URI data. Fixes: QTBUG-47835 Fixes: QTBUG-71503 Change-Id: I43f82bfc63b3d159087c0fb6c840c186a370e20c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QClipboard: make dataChanged() signal work on AndroidOleg Yadrov2017-05-041-1/+1
| | | | | | | | | | | This part has not been implemented before. Also replace deprecated android.text.ClipboardManager with modern android.content.ClipboardManager. Task-number: QTBUG-58548 Change-Id: I190208042af8a6c87ed391c6c72f3f51e58dfad3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QAndroidPlatformClipboard: fix build in release modeJ-P Nurmi2014-11-011-2/+3
| | | | | | | Q_ASSERT expands to nothing in release => mode unused. Change-Id: Ieb9ec4382e925250e1146239ce061763003ff6ba Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Make memory handling in QClipboard consistent with iOSEskil Abrahamsen Blomfeldt2014-10-101-1/+2
| | | | | | | | | | | | | | On iOS we do deleteLater() on the mime data instead of deleting it directly, in case the application should happen to use the pointer again directly after setting it on the clipboard. Technically it would be a bug in the application, but using deleteLater() is safer and it's better to be consistent with iOS so that a buggy application crashes in the same places in both. Change-Id: I2996d6c7816a2f83615a43609f5be207aaa72c86 Task-number: QTBUG-41853 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Return empty mime data instead of 0 from empty clipboardEskil Abrahamsen Blomfeldt2014-10-101-4/+4
| | | | | | | | | | | | | | This is consistent with other platforms such as iOS and XCB, which return a QMimeData with an empty text when the clipboard is empty. [ChangeLog][Android] QClipboard::mimeData() now returns an empty object instead of null pointer from QClipboard when clipboard is empty for consistency with other platforms. Change-Id: I17068f0afcb63690cf11048ffa60e19dc9b08691 Task-number: QTBUG-41817 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix memory leak in QClipboard::setMimeData()Eskil Abrahamsen Blomfeldt2014-10-101-0/+1
| | | | | | | | | | | | 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>
* Android: Support QClipboard::clear()Eskil Abrahamsen Blomfeldt2014-10-101-4/+2
| | | | | | | | | | | | | QClipboard::clear() is implemented by calling QPlatformClipboard::setMimeData() with a null pointer. Since we would do nothing in this case on Android, then the clear() function would have no effect. [ChangeLog][Android] Added support for QClipboard::clear() Task-number: QTBUG-41854 Change-Id: Id569b102f2e561e46967b52f89d9b54031d92456 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Avoid creating a new QMimeData each time the Android clipboard is usedSamuel Gaist2014-03-061-4/+2
| | | | | | | | | | | | This patch aims to fix a memory leak that occurs when the platform clipboard is used on Android. The QMimeData from the clipboard is recreated each time mimeData is called [ChangeLog][QtCore][QPA/Android] Fixed a memory leak in the clipboard Task-number: QTBUG-36025 Change-Id: I241f586589ff256885caee5e5f737313d24d942d Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-0/+79
Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>