diff --git a/src/core/platforms/android/androidplatformutilities.cpp b/src/core/platforms/android/androidplatformutilities.cpp index 7819c7b238..1c284b27f7 100644 --- a/src/core/platforms/android/androidplatformutilities.cpp +++ b/src/core/platforms/android/androidplatformutilities.cpp @@ -573,19 +573,19 @@ bool AndroidPlatformUtilities::checkPositioningPermissions() const auto r = QtAndroidPrivate::checkPermission( "android.permission.ACCESS_COARSE_LOCATION" ).result(); if ( r == QtAndroidPrivate::Denied ) { - return checkAndAcquirePermissions( QStringList() << "android.permission.ACCESS_FINE_LOCATION" ); + return checkAndAcquirePermissions( { QStringLiteral( "android.permission.ACCESS_FINE_LOCATION" ) } ); } return true; } bool AndroidPlatformUtilities::checkCameraPermissions() const { - return checkAndAcquirePermissions( QStringList() << "android.permission.CAMERA" ); + return checkAndAcquirePermissions( { QStringLiteral( "android.permission.CAMERA" ) } ); } bool AndroidPlatformUtilities::checkMicrophonePermissions() const { - return checkAndAcquirePermissions( QStringList() << "android.permission.RECORD_AUDIO" ); + return checkAndAcquirePermissions( { QStringLiteral( "android.permission.RECORD_AUDIO" ) } ); } bool AndroidPlatformUtilities::checkAndAcquirePermissions( QStringList permissions, bool forceAsk ) const @@ -714,7 +714,7 @@ QVariantMap AndroidPlatformUtilities::sceneMargins( QQuickWindow *window ) const void AndroidPlatformUtilities::uploadPendingAttachments( QFieldCloudConnection *connection ) const { // Request notification permission - checkAndAcquirePermissions( QStringList() << QStringLiteral( "android.permission.POST_NOTIFICATIONS" ) ); + checkAndAcquirePermissions( { QStringLiteral( "android.permission.POST_NOTIFICATIONS" ) } ); QTimer::singleShot( 500, [connection]() { if ( connection ) @@ -754,13 +754,13 @@ void AndroidPlatformUtilities::vibrate( int milliseconds ) const void AndroidPlatformUtilities::requestBackgroundPositioningPermissions() { - checkAndAcquirePermissions( QStringLiteral( "android.permission.ACCESS_BACKGROUND_LOCATION" ) ); + checkAndAcquirePermissions( { QStringLiteral( "android.permission.ACCESS_BACKGROUND_LOCATION" ) } ); } void AndroidPlatformUtilities::startPositioningService() const { // Request notification permission - checkAndAcquirePermissions( QStringLiteral( "android.permission.POST_NOTIFICATIONS" ) ); + checkAndAcquirePermissions( { QStringLiteral( "android.permission.POST_NOTIFICATIONS" ) } ); qInfo() << "Launching QField positioning service..."; QJniObject::callStaticMethod( "ch/opengis/" APP_PACKAGE_NAME "/QFieldPositioningService", diff --git a/src/qml/NavigationBar.qml b/src/qml/NavigationBar.qml index 84852621ba..792c50f1ab 100644 --- a/src/qml/NavigationBar.qml +++ b/src/qml/NavigationBar.qml @@ -133,7 +133,7 @@ Rectangle { property int distance: 0 property bool isTracing: false - onPressed: { + onPressed: mouse => { startX = mouse.x; startY = mouse.y; lastX = mouse.x; @@ -142,7 +142,7 @@ Rectangle { distance = 0; isTracing = true; } - onPositionChanged: { + onPositionChanged: mouse => { if (!isTracing) return; var currentVelocity = Math.abs(mouse.y - lastY);