diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-05-03 12:25:50 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-11-01 18:56:15 +0100 |
commit | 33cf9d32da0ba78ec90df063a3dda91ea793634d (patch) | |
tree | 4a87de10dcdceb5ced327aba84e2632fb1b1fc47 /src/corelib/global/qnamespace.qdoc | |
parent | 62a4fe434d4d9cb27a6285778fdab7e2ce43b61b (diff) |
Long live QPermissions!
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>
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 1a57c92199..5414369efe 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -3296,6 +3296,31 @@ */ /*! + \enum Qt::PermissionStatus + + This enum describes the possible statuses of a permissions. + + \value Undetermined + The permission status is not yet known. Permission should be requested + via QCoreApplication::requestPermission() to determine the actual status. + This status will never be the result of requesting a permission. + + \value Granted + The user has explicitly granted the application the permission, + or the permission is known to not require user authorization on + the given platform. + + \value Denied + The user has explicitly denied the application the requested permission, + or the permission is known to not be accessible or applicable to applications + on the given platform. + + \since 6.5 + \sa QCoreApplication::requestPermission(), QCoreApplication::checkPermission(), + {Application Permissions} +*/ + +/*! \enum Qt::ReturnByValueConstant \since 5.15 |