Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qohospermissionshelper_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QOHOSPERMISSIONSHELPER_P_H
5
#
define
QOHOSPERMISSIONSHELPER_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
19
#
include
<
QtCore
/
private
/
qohoscommon_p
.
h
>
20
#
include
<
QtCore
/
qlist
.
h
>
21
#
include
<
QtCore
/
qobject
.
h
>
22
#
include
<
QtCore
/
qstring
.
h
>
23
#
include
<
QtCore
/
qstringlist
.
h
>
24
25
QT_BEGIN_NAMESPACE
26
27
class
Q_CORE_EXPORT
QOhosPermissionsHelper
28
{
29
public
:
30
struct
PermissionRequestResult
31
{
32
bool
permissionGranted =
false
;
33
bool
dialogShown =
false
;
34
};
35
36
virtual
~QOhosPermissionsHelper() =
default
;
37
38
virtual
QList<Qt::PermissionStatus> checkStatusesOfPermissions(
const
QStringList &permissionNames)
const
= 0;
39
40
virtual
void
requestPermissionsFromUserIfNeeded(
41
const
QStringList &permissionNames, QObject *resultConsumerContext,
42
QOhosConsumer<QList<PermissionRequestResult>> resultConsumer) = 0;
43
44
virtual
void
requestPermissionsOnSettingIfNeeded(
45
const
QStringList &permissionNames, QObject *resultConsumerContext,
46
QOhosConsumer<QList<
bool
>> resultConsumer) = 0;
47
48
protected
:
49
QOhosPermissionsHelper() =
default
;
50
51
private
:
52
Q_DISABLE_COPY_MOVE(QOhosPermissionsHelper)
53
};
54
55
Q_CORE_EXPORT
void
qt_setQOhosPermissionsHelper
(QOhosPermissionsHelper *permissionsHelper);
56
57
QT_END_NAMESPACE
58
59
#
endif
QOhosPermissionsHelper
Definition
qohospermissionshelper_p.h:28
qt_setQOhosPermissionsHelper
Q_CORE_EXPORT void qt_setQOhosPermissionsHelper(QOhosPermissionsHelper *permissionsHelper)
Definition
qpermissions_harmony.cpp:121
qtbase
src
corelib
platform
ohos
qohospermissionshelper_p.h
Generated on
for Qt by
1.18.0