Q{Calendar,Contact}Permission: invert default state of isReadOnly
The QLocationPermission properties default to the least-intrusive capabilities: Availability::WhenInUse (not: Always) and Accuracy::Approximate (not: Precise). Logically, QCalendar- and ContactPermission's readOnly property should then default to read-only access, not read-write. Orthogonally to this change of default value, it might make sense to invert the name of the property, too: isReadWrite() or hasWriteAccess(). Pick-to: 6.5 Change-Id: I9359c82051b1a6735feca8b2f06b9891acef650f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
afb4e244b0
commit
fae85282ba
@ -432,8 +432,8 @@ QLocationPermission::Availability QLocationPermission::availability() const
|
|||||||
\class QContactsPermission
|
\class QContactsPermission
|
||||||
\brief Access the user's contacts.
|
\brief Access the user's contacts.
|
||||||
|
|
||||||
By default the request is for both read and write access.
|
By default the request is for read-only access.
|
||||||
Use setReadOnly() to override the default.
|
Use setReadOnly(false) to override the default.
|
||||||
|
|
||||||
\section1 Requirements
|
\section1 Requirements
|
||||||
|
|
||||||
@ -454,7 +454,7 @@ QLocationPermission::Availability QLocationPermission::availability() const
|
|||||||
class QContactsPermissionPrivate : public QSharedData
|
class QContactsPermissionPrivate : public QSharedData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool isReadOnly = false;
|
bool isReadOnly = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_DEFINE_PERMISSION_SPECIAL_FUNCTIONS(QContactsPermission)
|
QT_DEFINE_PERMISSION_SPECIAL_FUNCTIONS(QContactsPermission)
|
||||||
@ -480,8 +480,8 @@ bool QContactsPermission::isReadOnly() const
|
|||||||
\class QCalendarPermission
|
\class QCalendarPermission
|
||||||
\brief Access the user's calendar.
|
\brief Access the user's calendar.
|
||||||
|
|
||||||
By default the request is for both read and write access.
|
By default the request is for read-only access.
|
||||||
Use setReadOnly() to override the default.
|
Use setReadOnly(false) to override the default.
|
||||||
|
|
||||||
\section1 Requirements
|
\section1 Requirements
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ bool QContactsPermission::isReadOnly() const
|
|||||||
class QCalendarPermissionPrivate : public QSharedData
|
class QCalendarPermissionPrivate : public QSharedData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool isReadOnly = false;
|
bool isReadOnly = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_DEFINE_PERMISSION_SPECIAL_FUNCTIONS(QCalendarPermission)
|
QT_DEFINE_PERMISSION_SPECIAL_FUNCTIONS(QCalendarPermission)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user