summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Android: Add classes to embed QML into native AndroidTinja Paavoseppä2024-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add classes that make it possible to add QML as a View into a native Android app: QtView: Base class for QtQuickView, handles non-Quick dependent operations. In essence a Java ViewGroup class which loads a QWindow and embeds it into itself. QtEmbeddedLoader: Extends QtLoader for embedded case, creates the embedded version of QtActivityDelegate and provides an embedded-specific path to loading Qt libraries (Mostly just allows users to set the name of the main lib) QtAndroidWindowEmbedding namespace: Deals with calls from QtEmbeddedDelegate to create/destroy QWindow and from QtView to show the window. Take the QtEmbeddedDelegate introduced in an earlier commit into use, and add functionality for loading QWindows for QtViews and managing QtViews into it. Add a factory for creating instances of QtEmbeddedDelegate. The factory holds a map of QtEmbeddedDelegate objects and creates them, with the Activity as the key. This is to make it so that the same delegate can be used by multiple views which share the same Context. Known issues left: * keyboard focus not working, as with other child windows Pick-to: 6.7 Task-number: QTBUG-118872 Change-Id: I94a5f9b4f904c05cc6368cf20f273fcf10d31f17 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Give raster windows their own surface, and flush via RHITinja Paavoseppä2023-12-071-2/+0
| | | | | | | | | | | | | | Refactored platform windows on Android so that all window types, including raster windows, have their own surface to draw on. Raster windows now flush the backing-store via RHI/OpenGL. As a drive by, update to newer JNI syntax where appropriate. Task-number: QTBUG-116187 Change-Id: I3b764b7126abf53556750b0ccbb7d27efe007bc1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add initial implementation of an Android icon engineVolker Hilsheimer2023-11-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Try to use the Downloadable Font APIs from AndroidX to download the Material Symbols font. This would ideally allow us to add the official icon variations dynamically to the device's font cache. This works for several fonts from Google Fonts, but not for the fonts we need. So, for the time being, add a path where we consult the resource system for an embedded font file as well. Then an application can add e.g. the font file for the desired icons variation, and Qt will use those glyphs to render icons. Do this in the manual test, using cmake's FetchContent feature to download the font from Googlei's github repository. The incomplete mapping is based on the standard Material icons documentation at https://fonts.google.com/icons. We could in theory use the `codepoints` file that comes with the font files to create the mapping, but then we'd end up with platform specific icon names. Task-number: QTBUG-102346 Change-Id: Ibff3fe6d310a388e6111d983815ef0ddffb684c8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Move clipboard management to own classAssam Boudjelthia2023-10-301-2/+1
| | | | | | | | | | | | | | | Move all clipboard management logic outside of QtNative and to own QtClipboardManager class. Also, don't keep any keep Activity objects under it to avoid memory leaks, the native c++ clipboard manager should be responsible of passing a context when needed instead. As a pass-by, use newer JNI APIs for C++ QtAndroidClipboard code. Task-number: QTBUG-118077 Change-Id: I61726e84a75918d80329f753e9e1c6ebde179bf4 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Remove explicit use of QT_USE_QSTRINGBUILDERAlexey Edelev2023-08-081-2/+0
| | | | | | | | Since we enabled QT_USE_QSTRINGBUILDER by default for all plugins it doesn't make sense to add this definition explicitly. Change-Id: I22ad0b1fb567e12a842df4299231a5697ab9216d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Exclude Android Vulkan sources from Unity BuildAmir Masoud Abdol2023-04-201-0/+3
| | | | | | | | | | If not excluded, `VK_USE_PLATFORM_ANDROID_KHR` might end up being undefined due to the order of includes. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ib7bbf42af319568bc39db0b9e5c796d25db3c364 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Exclude files from unity build to resolve Android's buildAmir Masoud Abdol2023-04-191-0/+12
| | | | | | | | | | | | There are several duplicate symbols defined across android source files. For now, excluding the conflicting files allows us to continue working on bringing unity build to CI. I added some explanation and TODO's on what I think can be done for resolving the conflict. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ic0b31c4ae845c69570ea5dd86316e5a795c166c4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* src: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-101-8/+3
| | | | | | Pick-to: 6.5 Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Android: Fix deadlock caused by a race between permissions query and IMJarkko Koivikko2022-04-051-1/+1
| | | | | | | | | | | | | | | | Android permissions query blocks Qt main thread. If the input method was activated before the permissions query started, android would try to invoke input method before returning back to permissions query. This will cause a deadlock. Fix the issue by moving the deadlock counter to Qt core and incrementing the value before the permissions query. This will prevent the input method queries to enter Qt main thread. Fixes: QTBUG-99484 Pick-to: 6.2 6.3 6.3.0 Change-Id: I54ea59578880cde4095c26fa2a6a264c4dc1b7ff Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-061-1/+1
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use QtBase_SOURCE_DIR instead of QT_SOURCE_TREEJoerg Bornemann2021-07-121-1/+1
| | | | | | | | | | | | | ...where applicable to use a known CMake-provided variable in favor of our own cooked up one. This affects four plugins that are not supposed to be built out of tree, meaning QtBase_SOURCE_DIR is available (and identical to QT_SOURCE_TREE). Task-number: QTBUG-88090 Change-Id: I27f012e6c5fd99c3239a1dd65c0811c819dbcfe9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. This change warns on any PUBLIC usage requirements specified for a plugin. This check is disabled by default to avoid spamming CI builds for repos that haven't been fixed yet. The check can be enabled by a CMake cache option, which is intended for developers to use locally when fixing this issue in other repos (all plugins in qtbase should not trigger this warning as a result of changes in this commit). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-3/+3
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move eglconvenience to QtGuiFriedemann Kleint2020-07-131-1/+3
| | | | | | | Task-number: QTBUG-83255 Change-Id: I8a008d8906308dd73a0793db5b88d3a1b6fdaf5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Fix various issues with the Android buildAlexandru Croitor2020-07-091-8/+0
| | | | | | | | | | | | | | | | | | | Certain resources and compiled jar files have to be copied into the non-prefix build dir location. They were previously only installed, which doesn't do anything in a non-prefix build. Change pro2cmake to generate code that places the compiled java jars into QT_BUILD_DIR, so that non-prefix builds work. Place the module dependencies xml files into lib folder in non-prefix builds. Don't special case the output and install location of the Android QPA plugin. Task-number: QTBUG-85399 Change-Id: I4ac9d3929ea8ecc95ec99a77e621ad2121b68832 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Don't depend on the OpenGL moduleAndy Shaw2020-07-091-6/+0
| | | | | | | | | | It is not using this for anything in the code anyway so we can just drop it. This avoids a need to have the platform plugin depend on OpenGL if it is configured to be on. Change-Id: I87de162800be93db00c5022bef85c235b3655528 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Port platform plugins to QStringViewLars Knoll2020-06-151-0/+2
| | | | | | Task-number: QTBUG-84319 Change-Id: If409ba1c99f30c7ab32c7cc826c7f303ccf18c1d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the UNIX event dispatchers into QtGuiFriedemann Kleint2020-06-101-1/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: I7d32eb1ec01784c9ed6bf5fc4913ffc5b3a34a49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix build for Android on macOSEskil Abrahamsen Blomfeldt2020-06-031-1/+0
| | | | | | | | | | The FreeType engine has moved out of the fontdatabases library, so the .a file would be empty. This caused the error "attempt to map 60 bytes at offset 72 exceeds size of file" when building for Android on macOS. Change-Id: I9d9afca67e7626d3b5c6a62fcde33fed029fe04c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Move QtAccessibilitySupport into QtGuiTor Arne Vestbø2020-06-021-1/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate src/pluginsAlexandru Croitor2020-05-291-5/+6
| | | | | Change-Id: Icceceeb42023e7fa5edf320bb21f03d11bd357b7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-281-2/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-221-2/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-271-1/+1
| | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenenerate projects where recent changes happenedAlexandru Croitor2020-02-111-0/+5
| | | | | Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-051-11/+4
| | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate plugin projects to get new target namesAlexandru Croitor2020-01-271-6/+6
| | | | | | | | | And also to get the original output names (qmake's "TARGET"), so that the plugin file names are as they were in Qt 5. Change-Id: I96a060d1a81693652847857372bec334728cb549 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate src/*Alexandru Croitor2019-11-141-4/+4
| | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate everything under ./srcAlexandru Croitor2019-11-121-1/+0
| | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Add custom targets to generate Android APKLeander Beernaert2019-10-231-3/+3
| | | | | | | | | | This patch adds two custom targets to generate android apks. The targets are named ${TARGET}_prepare_apk_dir and ${TARGET}_make_apk. The first one insures the binary is copied to the right location and the latter invokes androiddeployqt on the apk directory. Change-Id: I8152cef387b50ec03ee2bfd92b56910a6f22754c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Re-generate affected cmake files and configure.json after the mergeSimon Hausmann2019-10-171-1/+0
| | | | | | | | | This also removes the workarounds of commit b2662b05dd078c46b82f5f041f51b0b83554113d now that it's fixed "upstream" in the .pro files. Change-Id: Idd5e6273873a700fcda5a6cad2039c4e88b61f6f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate files after dev -> wip/cmake mergeAlexandru Croitor2019-10-141-4/+2
| | | | | | | | | | Note the following bigger things that had to be done: Handle GSS library / feature with a new custom find module. Implement rudimentary support for relocatability (does not currently handle extprefix). Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate platforms plugins part 4Alexandru Croitor2019-10-081-3/+2
| | | | | | Change-Id: I75d011fe040b96fd15b21476aeac78d8fd9ced77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: implement default qpa plugin behavior for static buildsJean-Michaël Celerier2019-07-051-0/+1
| | | | | | | | | | | | | | | | | This is done by adding a DEFAULT_IF argument to add_qt_plugin, which accepts if-evaluated expressions. e.g. add_qt_plugin(myplugin DEFAULT_IF ${foo} STREQUAL ${bar} ... ) so that this mechanism can be reused later if necessary. Change-Id: I7eba9adaaa28e55a4f0f94cf206e868b990027e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Correct install path for libqtforandroid.soLeander Beernaert2019-06-131-3/+3
| | | | | | | | | | I didn't notice I forgot to prepend the plugin/ to install path. On my local tests I forgot to delete some cached state and I didn't notice it was installing in the wrong directory. Change-Id: Ic898a37388aa0508ad995f922bef4d187f75688f Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Correct install path for QtForAndroid pluginLeander Beernaert2019-06-131-0/+8
| | | | | | | | Installation directory for libqtforandroid.so should be plugins/platform/android instead of plugins/platform. Change-Id: I124bed4d43664eddcceca197c4df26a1e8d3d0af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add the Android QPA plugin to the CMake buildSimon Hausmann2019-06-051-0/+92
Had to apply on unused-variable -Werror fix on top. Change-Id: I4e8decf1e0a1bd56d4168bc2c7153ef3f5e31e13 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>