diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2023-05-22 16:32:24 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-09-08 17:17:32 +0000 |
commit | a2f90178cf060508042a8bfb1a56a93a81e2386e (patch) | |
tree | 9b97d7ab71b06efefb426bcea05b724a87c1a035 | |
parent | 81cde27af84ad071e217cb40a639d5661031c568 (diff) |
PySide: Add checkPermission()
- QPermission is an opaque wrapper around typed Permissions.
The conversion from specific typed Permission to QPermission for
usage within API functions like checkPermission(QPermission) involved
implicit conversion from the typed Permission to QPermission through
a templated constructor. Therefore, Shiboken needs to handle each
of the conversions explicitly.
- Only relevant for platforms like Android, where QT_FEATURE_permissions
is turned ON.
Task-number: PYSIDE-1612
Change-Id: I097bf6f24a7ac79e9a62455dab9f3c8bdf6b8246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b6abfbedef444ab15f5340c5edfef7acfa06dc7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/pyside6/PySide6/QtCore/typesystem_core_common.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml index 82089db67..e6c2228fa 100644 --- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml +++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml @@ -2605,6 +2605,14 @@ <modify-argument index="2" pyi-type="str"/> <modify-argument index="3" pyi-type="Optional[str]"/> </modify-function> + <?if !no_QPermission?> + <declare-function signature="checkPermission(const QBluetoothPermission & @permission@)" return-type="Qt::PermissionStatus" since="6.5" /> + <declare-function signature="checkPermission(const QCalendarPermission & @permission@)" return-type="Qt::PermissionStatus" since="6.5" /> + <declare-function signature="checkPermission(const QCameraPermission & @permission@)" return-type="Qt::PermissionStatus" since="6.5" /> + <declare-function signature="checkPermission(const QContactsPermission & @permission@)" return-type="Qt::PermissionStatus" since="6.5" /> + <declare-function signature="checkPermission(const QLocationPermission & @permission@)" return-type="Qt::PermissionStatus" since="6.5" /> + <declare-function signature="checkPermission(const QMicrophonePermission & @permission@)" return-type="Qt::PermissionStatus" since="6.5" /> + <?endif?> </object-type> <object-type name="QSettings"> <enum-type name="Format"/> |