Rename PermisionType to spell permission correctly

Thanks to Giuseppe for pointing it out in API change review.

Task-number: QTBUG-94407
Pick-to: 6.2
Change-Id: I3b8fb653b5efa7ded51f81aadb35d361e7dbf19c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Edward Welbourne 2021-06-22 11:35:46 +02:00
parent 9625c744a9
commit ccac1b185a
6 changed files with 16 additions and 13 deletions

View File

@ -3101,7 +3101,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
}
QFuture<QPermission::PermissionResult>
QCoreApplicationPrivate::requestPermission(QPermission::PermisionType permission)
QCoreApplicationPrivate::requestPermission(QPermission::PermissionType permission)
{
Q_UNUSED(permission)
return defaultPermissionFuture();
@ -3115,7 +3115,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
}
QFuture<QPermission::PermissionResult>
QCoreApplicationPrivate::checkPermission(QPermission::PermisionType permission)
QCoreApplicationPrivate::checkPermission(QPermission::PermissionType permission)
{
Q_UNUSED(permission)
return defaultPermissionFuture();
@ -3155,7 +3155,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
\sa checkPermission()
*/
QFuture<QPermission::PermissionResult>
QCoreApplication::requestPermission(QPermission::PermisionType permission)
QCoreApplication::requestPermission(QPermission::PermissionType permission)
{
return QCoreApplicationPrivate::requestPermission(permission);
}
@ -3213,7 +3213,7 @@ QCoreApplication::requestPermission(const QString &permission)
\sa requestPermission()
*/
QFuture<QPermission::PermissionResult>
QCoreApplication::checkPermission(QPermission::PermisionType permission)
QCoreApplication::checkPermission(QPermission::PermissionType permission)
{
return QCoreApplicationPrivate::checkPermission(permission);
}

View File

@ -165,11 +165,11 @@ public:
#ifndef QT_NO_QOBJECT
#if QT_CONFIG(future)
static QFuture<QPermission::PermissionResult> requestPermission(
QPermission::PermisionType permission);
QPermission::PermissionType permission);
static QFuture<QPermission::PermissionResult> requestPermission(const QString &permission);
static QFuture<QPermission::PermissionResult> checkPermission(
QPermission::PermisionType permission);
QPermission::PermissionType permission);
static QFuture<QPermission::PermissionResult> checkPermission(const QString &permission);
#endif
void installNativeEventFilter(QAbstractNativeEventFilter *filterObj);

View File

@ -75,7 +75,7 @@ static int nextRequestCode()
return counter.fetchAndAddRelaxed(1);
}
static QStringList nativeStringsFromPermission(QPermission::PermisionType permission)
static QStringList nativeStringsFromPermission(QPermission::PermissionType permission)
{
static const auto precisePerm = QStringLiteral("android.permission.ACCESS_FINE_LOCATION");
static const auto coarsePerm = QStringLiteral("android.permission.ACCESS_COARSE_LOCATION");
@ -236,7 +236,7 @@ QFuture<QPermission::PermissionResult> groupRequestToSingleResult(const QStringL
}
QFuture<QPermission::PermissionResult>
QCoreApplicationPrivate::requestPermission(QPermission::PermisionType permission)
QCoreApplicationPrivate::requestPermission(QPermission::PermissionType permission)
{
const auto nativePermissions = nativeStringsFromPermission(permission);
@ -282,7 +282,7 @@ QCoreApplicationPrivate::checkPermission(const QString &permission)
}
QFuture<QPermission::PermissionResult>
QCoreApplicationPrivate::checkPermission(QPermission::PermisionType permission)
QCoreApplicationPrivate::checkPermission(QPermission::PermissionType permission)
{
const auto nativePermissions = nativeStringsFromPermission(permission);

View File

@ -205,11 +205,11 @@ public:
inline QString qmljsDebugArgumentsString() const { return qmljs_debug_arguments; }
#if QT_CONFIG(future) && !defined QT_NO_QOBJECT
static QFuture<QPermission::PermissionResult> requestPermission(
QPermission::PermisionType permission);
QPermission::PermissionType permission);
static QFuture<QPermission::PermissionResult> requestPermission(const QString &permission);
static QFuture<QPermission::PermissionResult> checkPermission(
QPermission::PermisionType permission);
QPermission::PermissionType permission);
static QFuture<QPermission::PermissionResult> checkPermission(const QString &permission);
#endif

View File

@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
namespace QPermission
{
enum PermisionType {
enum PermissionType {
Camera,
Microphone,
Bluetooth,
@ -65,6 +65,9 @@ enum PermisionType {
WriteCalendar
};
// ### 6.2 remove as soon as multimedia merges its typo fix
using PermisionType = PermissionType;
enum PermissionResult {
Authorized,
Denied,

View File

@ -35,7 +35,7 @@
*/
/*!
\enum QPermission::PermisionType
\enum QPermission::PermissionType
Predefined sets of permission values.