Q*Permission: un-Q_GADGET classes w/o Q_ENUMs

We can always add it back later, but for now, it's pointless overhead
(no Q_PROPERTYs, no Q_INVOCABLEs).

Found in API review.

Change-Id: I1e30fbda997e6576a3e94cbae0387a3188c27728
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c307cbea90a885b3981d0d7d661e19084c6134d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-01-16 15:26:09 +01:00 committed by Qt Cherry-pick Bot
parent 63692b40e8
commit 88f28bbbc3

View File

@ -33,8 +33,6 @@ class QCoreApplication;
class QPermission
{
Q_GADGET_EXPORT(Q_CORE_EXPORT)
template <typename T, typename Enable = void>
static constexpr inline bool is_permission_v = false;
@ -75,7 +73,6 @@ private:
};
#define QT_PERMISSION(ClassName) \
Q_GADGET_EXPORT(Q_CORE_EXPORT) \
using QtPermissionHelper = void; \
friend class QPermission; \
union U { \
@ -100,6 +97,7 @@ private: \
class QLocationPermissionPrivate;
class QLocationPermission
{
Q_GADGET_EXPORT(Q_CORE_EXPORT)
public:
enum Accuracy : quint8 {
Approximate,
@ -132,6 +130,7 @@ Q_DECLARE_SHARED(QLocationPermission)
class QCalendarPermissionPrivate;
class QCalendarPermission
{
Q_GADGET_EXPORT(Q_CORE_EXPORT)
public:
Q_CORE_EXPORT void setReadWrite(bool enable);
Q_CORE_EXPORT bool isReadWrite() const;
@ -148,6 +147,7 @@ Q_DECLARE_SHARED(QCalendarPermission)
class QContactsPermissionPrivate;
class QContactsPermission
{
Q_GADGET_EXPORT(Q_CORE_EXPORT)
public:
Q_CORE_EXPORT void setReadWrite(bool enable);
Q_CORE_EXPORT bool isReadWrite() const;