![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore \inheaderfile QPermissions More...
#include <qpermissions.h>
Public Member Functions | |
QPermission ()=default | |
template<typename T , if_permission< T > = true> | |
QPermission (const T &t) | |
Qt::PermissionStatus | status () const |
Returns the status of the permission. | |
QMetaType | type () const |
Returns the type of the permission. | |
template<typename T , if_permission< T > = true> | |
std::optional< T > | value () const |
Friends | |
class | QCoreApplication |
Q_CORE_EXPORT QDebug | operator<< (QDebug debug, const QPermission &) |
\inmodule QtCore \inheaderfile QPermissions
An opaque wrapper of a typed permission.
The QPermission class is an opaque wrapper of a \l{typed permission}, used when checking or requesting permissions. You do not need to construct this type explicitly, as the type is automatically used when checking or requesting permissions:
When requesting permissions, the given functor will be passed an instance of a QPermission, which can be used to check the result of the request:
To inspect the properties of the original, typed permission, use the \l {QPermission::}{value()} function:
\target typed permission
Definition at line 34 of file qpermissions.h.
|
explicitdefault |
|
inline |
Definition at line 45 of file qpermissions.h.
|
inline |
Returns the status of the permission.
Definition at line 47 of file qpermissions.h.
|
inline |
Returns the type of the permission.
Definition at line 49 of file qpermissions.h.
References QVariant::metaType().
Referenced by nativeStringsFromPermission().
|
inline |
Definition at line 52 of file qpermissions.h.
Referenced by nativeStringsFromPermission().
|
friend |
Definition at line 653 of file qpermissions.cpp.
|
friend |
Definition at line 69 of file qpermissions.h.