Skip to content

Commit

Permalink
Fix compilation following merging of the background positioning PR
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and mohsenD98 committed Dec 27, 2024
1 parent 74497ad commit 35ace08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/core/platforms/android/androidplatformutilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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<void>( "ch/opengis/" APP_PACKAGE_NAME "/QFieldPositioningService",
Expand Down
4 changes: 2 additions & 2 deletions src/qml/NavigationBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -142,7 +142,7 @@ Rectangle {
distance = 0;
isTracing = true;
}
onPositionChanged: {
onPositionChanged: mouse => {
if (!isTracing)
return;
var currentVelocity = Math.abs(mouse.y - lastY);
Expand Down

0 comments on commit 35ace08

Please sign in to comment.