summaryrefslogtreecommitdiffstats
path: root/tests/manual/permissions
Commit message (Collapse)AuthorAgeFilesLines
* Android: cleanup AndroidManifest.xml files in examplesAssam Boudjelthia6 days1-2/+1
| | | | | Change-Id: I6b0a11ace348891da7ed16dd9039b807902cb828 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Android: set default style extraction to minimalAssam Boudjelthia2023-12-221-4/+0
| | | | | | | | | | | | | | The default value in the default manifest has been for few releases, set as minimal, and since Widgets Android style is not fully supported anymore, we can set this to default to minimal under the hood as well to avoid needing to always explicitly needing to set it to minimal. Pick-to: 6.7 Change-Id: Id0b2134c572694be1e190347ff75f51ade65f0c4 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: remove unneeded allowNativeHeapPointerTagging manifest flagAssam Boudjelthia2023-10-201-1/+0
| | | | | | | | | Amends b0907db9eae4b85fcab4fa997428c438d9443ee0. Pick-to: 6.5 6.6 Task-number: QTBUG-91150 Change-Id: Ic7886a9fc69781e4f21417075516106ccb6c7bf5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename manual tst_qpermissions to tst_manual_qpermissionsMarc Mutz2023-01-111-2/+2
| | | | | | | | To make space for a tst_qpermissions auto-test. Pick-to: 6.5 Change-Id: Ic9ead8afa7ecd035fd5ed56c756f0156828c6705 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Remove direct qt_android_generate_deployment_settings callAlexandru Croitor2022-12-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | in our tests. They are not needed anymore since d20f4ae706559fb7de8db9dd4845f7ce3936061a got merged and the QT_ANDROID_PACKAGE_SOURCE_DIR property is read at generation time rather than configure time. This means the qt_internal_add_test -> qt_internal_add_executable -> _qt_internal_android_executable_finalizer -> qt_android_generate_deployment_settings calls take care of generation the right value for the property even with CMake 3.16. Remove the direct qt_android_generate_deployment_settings calls, in preparation for their deprecation in public api. Pick-to: 6.5 Task-number: QTBUG-88506 Task-number: QTBUG-88840 Task-number: QTBUG-108508 Change-Id: Ief1d0f9f620bd37beeedde26dedb66f728fa4a6f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add permissions feature example and manual test to the buildAssam Boudjelthia2022-11-102-1/+3
| | | | | | | | | | And add license headers and some minor fixes for warnings in the example and test. Task-number: QTBUG-90498 Change-Id: I34592f7f2844c92c25a6a676c8ac1ffca9e03c6d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Plumb public permission APIs to Android backendTor Arne Vestbø2022-11-092-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | The lock and unlock of the Android deadlock mutex is now part of the internal implementation instead of limited to the enum based permission API. It is unclear why 8bca441b6f65 added the guard only to this API and not to the string based API as well. The check for isBackgroundLocationApi29 has been removed, as the logic seemingly resulted in accepting every single permission type except location permissions if used via the enum-based API. Since Android's platform permission API doesn't have an Undetermined status, we keep a hash of the status for each permission type, and by default checkPermission() would return Undetermined, until a requestPermission() call is done which updates the internal hash, and after that checkPermission() would return properly Granted/Denied. Task-number: QTBUG-100413 Change-Id: Ia95c76af754481a281bc90198e349966c9c2da52 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add permission API backend for macOS and iOSTimur Pocheptsov2022-11-033-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When submitting applications to the iOS and macOS AppStore the application goes through static analysis, which will trigger on uses of various privacy protected APIs, unless the application has a corresponding usage description for the permission in the Info.plist file. This applies even if the application never requests the given permission, but just links to a Qt library that has the offending symbols or library dependencies. To ensure that the application does not have to add usage descriptions to their Info.plist for permissions they never plan to use we split up the various permission implementations into small static libraries that register with the Qt plugin mechanism as permission backends. We can then inspect the application's Info.plist at configure time and only add the relevant static permission libraries. Furthermore, since some permissions can be checked without any usage description, we allow the implementation to be split up into two separate translation units. By putting the request in its own translation unit we can selectively include it during linking by telling the linker to look for a special symbol. This is useful for libraries such as Qt Multimedia who would like to check the current permission status, but without needing to request any permission of its own. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Change-Id: Ic2a43e1a0c45a91df6101020639f473ffd9454cc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Long live QPermissions!Tor Arne Vestbø2022-11-013-0/+119
Many features of today's devices and operating systems can have significant privacy, security, and performance implications if misused. It's therefore increasingly common for platforms to require explicit consent from the user before accessing these features. The Qt permission APIs allow the application to check or request permission for such features in a cross platform manner. The check is always synchronous, and can be used in both library and application code, from any thread. The request is asynchronous, and should be initiated from application code on the main thread. The result of the request can be delivered to lambdas, standalone functions, or regular member functions such as slots, with an optional context parameter to manage the lifetime of the request. Individual permissions are distinct types, not enum values, and can be added and extended at a later point. Task-number: QTBUG-90498 Done-with: Timur Pocheptsov <timur.pocheptsov@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I821380bbe56bbc0178cb43e6cabbc99fdbd1235e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>