Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdarwinpermissionplugin_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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// Qt-Security score:significant reason:default
4
5#ifndef QDARWINPERMISSIONPLUGIN_P_H
6#define QDARWINPERMISSIONPLUGIN_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. This header file may change
13// from version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qnamespace.h>
19#include <QtCore/private/qpermissions_p.h>
20#include <QtCore/private/qcore_mac_p.h>
21
22#if defined(__OBJC__)
23#include <Foundation/NSObject.h>
24#endif
25
26QT_USE_NAMESPACE
27
28using namespace QPermissions::Private;
29
30#if defined(__OBJC__)
31Q_CORE_EXPORT
32#endif
33QT_DECLARE_NAMESPACED_OBJC_INTERFACE(QDarwinPermissionHandler, NSObject
34- (Qt::PermissionStatus)checkPermission:(QPermission)permission;
35- (void)requestPermission:(QPermission)permission withCallback:(PermissionCallback)callback;
36- (QStringList)usageDescriptionsFor:(QPermission)permission;
37)
38
39QT_BEGIN_NAMESPACE
40
41class Q_CORE_EXPORT QDarwinPermissionPlugin : public QPermissionPlugin
42{
43 Q_OBJECT
44public:
45 QDarwinPermissionPlugin(QDarwinPermissionHandler *handler);
46 ~QDarwinPermissionPlugin();
47
48 Qt::PermissionStatus checkPermission(const QPermission &permission) override;
49 void requestPermission(const QPermission &permission, const PermissionCallback &callback) override;
50
51private:
52 Q_SLOT void permissionUpdated(Qt::PermissionStatus status, const PermissionCallback &callback);
53 bool verifyUsageDescriptions(const QPermission &permission);
54 QDarwinPermissionHandler *m_handler = nullptr;
55};
56
57QT_END_NAMESPACE
58
59#endif // QDARWINPERMISSIONPLUGIN_P_H
Combined button and popup list for selecting options.
QT_DECLARE_NAMESPACED_OBJC_INTERFACE(QMacAccessibilityElement, NSObject -(void) invalidate;) QT_BEGIN_NAMESPACE bool QAccessibleCache
QList< QString > QStringList
Constructs a string list that contains the given string, str.