diff --git a/src/core/locator/qfieldlocatorfilter.cpp b/src/core/locator/qfieldlocatorfilter.cpp index a7c468af1d..631290f99c 100644 --- a/src/core/locator/qfieldlocatorfilter.cpp +++ b/src/core/locator/qfieldlocatorfilter.cpp @@ -117,10 +117,10 @@ void QFieldLocatorFilter::prepareResult( const QVariant &details ) result.group = detailsMap.value( QStringLiteral( "group" ), QString() ).toString(); result.groupScore = detailsMap.value( QStringLiteral( "groupScore" ), 0.5 ).toDouble(); const QVariantList actions = detailsMap.value( QStringLiteral( "actions" ) ).toList(); - for ( const QVariant action : actions ) + for ( const QVariant &action : actions ) { const QVariantMap actionMap = action.toMap(); - result.actions << QgsLocatorResult::ResultAction( actionMap.value( "id", 0 ).toInt(), actionMap.value( "name", QString() ).toString(), actionMap.value( "icon", QString() ).toString() ); + result.actions << QgsLocatorResult::ResultAction( actionMap.value( QStringLiteral( "id" ), 0 ).toInt(), actionMap.value( QStringLiteral( "name" ), QString() ).toString(), actionMap.value( QStringLiteral( "icon" ), QString() ).toString() ); } emit resultFetched( result ); } diff --git a/src/qml/LocatorSettings.qml b/src/qml/LocatorSettings.qml index 3bd049df45..5cd09f3427 100644 --- a/src/qml/LocatorSettings.qml +++ b/src/qml/LocatorSettings.qml @@ -96,7 +96,7 @@ Popup { indicator.implicitHeight: 24 indicator.implicitWidth: 24 checked: Default ? true : false - onCheckedChanged: Default = checked + onClicked: Default = checked } } }