blob: 00bf848d37b18d572c7aed31553227fcd97b5dd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
//! [requestPermission-functor]
When the request is ready, \a functor will be called as
\c {functor(const QPermission &permission)}, with
\c permission describing the result of the request.
//! [requestPermission-functor]
//! [requestPermission-postamble]
If the user explicitly grants the application the requested \a permission,
or the \a permission is known to not require user authorization on the given
platform, the status will be Qt::PermissionStatus::Granted.
If the user explicitly denies the application the requested \a permission,
or the \a permission is known to not be accessible or applicable to applications
on the given platform, the status will be Qt::PermissionStatus::Denied.
The result of a request will never be Qt::PermissionStatus::Undetermined.
\note Permissions can only be requested from the main thread.
//! [requestPermission-postamble]
//! [permission-metadata]
\inmodule QtCore
\inheaderfile QPermissions
\ingroup permissions
\since 6.5
\sa QPermission,
QCoreApplication::requestPermission(),
QCoreApplication::checkPermission(),
{Application Permissions}
//! [permission-metadata]
//! [begin-usage-declarations]
To request this permission at runtime, the following platform
specific usage declarations have to be made at build time:
\table
\header
\li Platform
\li Type
\li
//! [begin-usage-declarations]
//! [end-usage-declarations]
\endtable
Please see the individual usage declaration types for how
to add them to your project.
//! [end-usage-declarations]
|